mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-01 19:03:41 +00:00
Implement these for all the writers. SPIR-V reader not implemented (the old overloads weren't implemented either). Deprecate the old overloads. Fixed: tint:54 Change-Id: If66d26dbac3389ff604734f31b426abe47868b91 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59302 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
19 lines
370 B
HLSL
19 lines
370 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 main() {
|
|
const modf_result res = tint_modf(1.230000019f);
|
|
const float fract = res.fract;
|
|
const float whole = res.whole;
|
|
return;
|
|
}
|