mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-07 13:45:51 +00:00
Wrap the texture expression in parentheses when it has lower precendence than the function call operator. Cast integer coordinates to unsigned integers as required by MSL. Fixed: tint:536 Change-Id: I957e6be3c51044959e25e0be96c2d2c65db18187 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53962 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
28 lines
970 B
Plaintext
28 lines
970 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
void textureSampleLevel_c32df7(texturecube<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
|
|
float4 res = tint_symbol_2.sample(tint_symbol_3, float3(), level(1.0f));
|
|
}
|
|
|
|
vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]], sampler tint_symbol_5 [[sampler(1)]]) {
|
|
textureSampleLevel_c32df7(tint_symbol_4, tint_symbol_5);
|
|
tint_symbol const tint_symbol_1 = {.value=float4()};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
fragment void fragment_main(texturecube<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(1)]]) {
|
|
textureSampleLevel_c32df7(tint_symbol_6, tint_symbol_7);
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main(texturecube<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(1)]]) {
|
|
textureSampleLevel_c32df7(tint_symbol_8, tint_symbol_9);
|
|
return;
|
|
}
|
|
|