mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 20:31:20 +00:00
Change tint's `--fxc` flag to take the path of the FXC compiler DLL. Have tint attempt to validate with both FXC and DXC if `--validate` is passed. Fix the 'dirsWithNoPassExpectations' logic which looks like it got broken with the tint -> dawn merge. It also incorrectly applied filepath.FromSlash() on windows. Change-Id: I0f46aa5c21bc48a2abc48402c41f846aff4a8633 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96800 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
33 lines
586 B
HLSL
33 lines
586 B
HLSL
void set_int4(inout int4 vec, int idx, int val) {
|
|
vec = (idx.xxxx == int4(0, 1, 2, 3)) ? val.xxxx : vec;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
struct S {
|
|
int4 a[4];
|
|
};
|
|
|
|
static int counter = 0;
|
|
|
|
int foo() {
|
|
counter = (counter + 1);
|
|
return counter;
|
|
}
|
|
|
|
int bar() {
|
|
counter = (counter + 2);
|
|
return counter;
|
|
}
|
|
|
|
void main() {
|
|
S x = (S)0;
|
|
const int tint_symbol_2 = foo();
|
|
const int tint_symbol_save = tint_symbol_2;
|
|
const int tint_symbol_1 = bar();
|
|
set_int4(x.a[tint_symbol_save], tint_symbol_1, (x.a[tint_symbol_save][tint_symbol_1] + 5));
|
|
}
|