mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 17:45:58 +00:00
Allow the resolver to understand builtin structures, like __frexp_result_f16. This allows backend transforms to declare the types, even if they're "untypable" by the user. Bug: chromium:1430309 Change-Id: I392709118182a058f737ccf1b7b46fc6b0b7264d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129482 Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
65 lines
1.3 KiB
GLSL
65 lines
1.3 KiB
GLSL
#version 310 es
|
|
precision highp float;
|
|
|
|
struct atomic_compare_exchange_result_i32 {
|
|
int old_value;
|
|
bool exchanged;
|
|
};
|
|
|
|
|
|
struct SB_RW {
|
|
int arg_0;
|
|
};
|
|
|
|
layout(binding = 0, std430) buffer sb_rw_block_ssbo {
|
|
SB_RW inner;
|
|
} sb_rw;
|
|
|
|
void atomicCompareExchangeWeak_1bd40a() {
|
|
atomic_compare_exchange_result_i32 atomic_compare_result;
|
|
atomic_compare_result.old_value = atomicCompSwap(sb_rw.inner.arg_0, 1, 1);
|
|
atomic_compare_result.exchanged = atomic_compare_result.old_value == 1;
|
|
atomic_compare_exchange_result_i32 res = atomic_compare_result;
|
|
}
|
|
|
|
void fragment_main() {
|
|
atomicCompareExchangeWeak_1bd40a();
|
|
}
|
|
|
|
void main() {
|
|
fragment_main();
|
|
return;
|
|
}
|
|
#version 310 es
|
|
|
|
struct atomic_compare_exchange_result_i32 {
|
|
int old_value;
|
|
bool exchanged;
|
|
};
|
|
|
|
|
|
struct SB_RW {
|
|
int arg_0;
|
|
};
|
|
|
|
layout(binding = 0, std430) buffer sb_rw_block_ssbo {
|
|
SB_RW inner;
|
|
} sb_rw;
|
|
|
|
void atomicCompareExchangeWeak_1bd40a() {
|
|
atomic_compare_exchange_result_i32 atomic_compare_result;
|
|
atomic_compare_result.old_value = atomicCompSwap(sb_rw.inner.arg_0, 1, 1);
|
|
atomic_compare_result.exchanged = atomic_compare_result.old_value == 1;
|
|
atomic_compare_exchange_result_i32 res = atomic_compare_result;
|
|
}
|
|
|
|
void compute_main() {
|
|
atomicCompareExchangeWeak_1bd40a();
|
|
}
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void main() {
|
|
compute_main();
|
|
return;
|
|
}
|