mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-01 12:11:34 +00:00
This CL implements f16 in uniform and storage address space, allowing using f16 types in uniform and storage buffers on all backends. Tint uint tests and Dawn E2E tests are added to validate the f16 types work as expected. Bug: tint:1473, tint:1502 Change-Id: I15e3de1033d3727f2ea33f4657f682c5f13c2153 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106320 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com> Reviewed-by: Ben Clayton <bclayton@google.com>
36 lines
699 B
HLSL
36 lines
699 B
HLSL
RWByteAddressBuffer sb_rw : register(u0, space0);
|
|
|
|
void arrayLength_cbd6b5() {
|
|
uint tint_symbol_2 = 0u;
|
|
sb_rw.GetDimensions(tint_symbol_2);
|
|
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 2u);
|
|
uint res = tint_symbol_3;
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
arrayLength_cbd6b5();
|
|
return (0.0f).xxxx;
|
|
}
|
|
|
|
tint_symbol vertex_main() {
|
|
const float4 inner_result = vertex_main_inner();
|
|
tint_symbol wrapper_result = (tint_symbol)0;
|
|
wrapper_result.value = inner_result;
|
|
return wrapper_result;
|
|
}
|
|
|
|
void fragment_main() {
|
|
arrayLength_cbd6b5();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
arrayLength_cbd6b5();
|
|
return;
|
|
}
|