mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-28 18:21:22 +00:00
Fix the Renamer to preserve builtin structure member names. Fix the HLSL writer to emit the modf / frexp result type even if there is no private / function storage usage of the types. Fixed: chromium:1236161 Change-Id: I93b9d92980682f9a9cb090d07b04e4c3f6a2f705 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60922 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
20 lines
322 B
HLSL
20 lines
322 B
HLSL
struct modf_result {
|
|
float fract;
|
|
float whole;
|
|
};
|
|
modf_result tint_modf(float param_0) {
|
|
float whole;
|
|
float fract = modf(param_0, whole);
|
|
modf_result result = {fract, whole};
|
|
return result;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
void i() {
|
|
const float s = tint_modf(1.0f).whole;
|
|
}
|