mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
Use the new semantic constant value information to significantly reduce the complex indexing logic emitted for UBO accesses. This will dramatically reduce the number of `for` loops that are decayed to `while` loops. Change-Id: I1b0adb5edde2b4ed39c6beafc2e28106b86e0edd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57701 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
10 lines
148 B
HLSL
10 lines
148 B
HLSL
cbuffer cbuffer_v : register(b0, space0) {
|
|
uint4 v[1];
|
|
};
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
const int use = (asint(v[0].x) + 1);
|
|
return;
|
|
}
|