mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-09 14:45:58 +00:00
D3D11 only supports HLSL SM5.0 which doesn't support `space` (binding group in WGSL). So for D3D11, only one binding group will be used, and tint will not emit `space` for HLSL, so shaders can be used with D3D11. Bug: dawn:1705 Change-Id: Ie0e9868137f10762c5243e188d76f5e41879c2bc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/125080 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com>
60 lines
1.3 KiB
HLSL
60 lines
1.3 KiB
HLSL
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
RWByteAddressBuffer buffer : register(u0);
|
|
static uint v = 0u;
|
|
|
|
int idx1() {
|
|
v = (v + 1u);
|
|
return 1;
|
|
}
|
|
|
|
int idx2() {
|
|
v = (v + 1u);
|
|
return 2;
|
|
}
|
|
|
|
int idx3() {
|
|
v = (v + 1u);
|
|
return 3;
|
|
}
|
|
|
|
int idx4() {
|
|
v = (v + 1u);
|
|
return 4;
|
|
}
|
|
|
|
int idx5() {
|
|
v = (v + 1u);
|
|
return 0;
|
|
}
|
|
|
|
int idx6() {
|
|
v = (v + 1u);
|
|
return 2;
|
|
}
|
|
|
|
void main() {
|
|
{
|
|
const int tint_symbol_save = idx1();
|
|
const int tint_symbol_save_1 = idx2();
|
|
const int tint_symbol_1 = idx3();
|
|
buffer.Store((((64u * uint(tint_symbol_save)) + (16u * uint(tint_symbol_save_1))) + (4u * uint(tint_symbol_1))), asuint((asint(buffer.Load((((64u * uint(tint_symbol_save)) + (16u * uint(tint_symbol_save_1))) + (4u * uint(tint_symbol_1))))) + 1)));
|
|
while (true) {
|
|
if (!((v < 10u))) {
|
|
break;
|
|
}
|
|
{
|
|
}
|
|
{
|
|
const int tint_symbol_2_save = idx4();
|
|
const int tint_symbol_2_save_1 = idx5();
|
|
const int tint_symbol_3 = idx6();
|
|
buffer.Store((((64u * uint(tint_symbol_2_save)) + (16u * uint(tint_symbol_2_save_1))) + (4u * uint(tint_symbol_3))), asuint((asint(buffer.Load((((64u * uint(tint_symbol_2_save)) + (16u * uint(tint_symbol_2_save_1))) + (4u * uint(tint_symbol_3))))) + 1)));
|
|
}
|
|
}
|
|
}
|
|
}
|