dawn-cmake/test/bug/tint/757.wgsl.expected.hlsl
Ben Clayton 3628949efc test: Add bug cases taken from monorail
Some now pass, some still fail.

If we fix bugs and they begin to pass, we have a better chance of noticing and marking the issues as fixed.

Change-Id: I7278f960967a570ccde8865dcf2aa580235559bf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54062
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-06-10 18:49:14 +00:00

41 lines
1.1 KiB
HLSL

bug/tint/757.wgsl:3:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
[[offset(0)]] level : i32;
^^^^^^
bug/tint/757.wgsl:10:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
[[offset(0)]] values : [[stride(4)]] array<f32>;
^^^^^^
struct Constants {
int level;
};
struct tint_symbol_1 {
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
RWByteAddressBuffer result : register(u3, space0);
Texture2DArray<float4> myTexture : register(t1, space0);
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
const uint3 GlobalInvocationID = tint_symbol.GlobalInvocationID;
uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x);
flatIndex = (flatIndex * 1u);
float4 texel = myTexture.Load(int4(GlobalInvocationID.xy, 0, 0), 0);
{
uint i = 0u;
while (true) {
if (!((i < 1u))) {
break;
}
result.Store((4u * (flatIndex + i)), asuint(texel.r));
{
i = (i + 1u);
}
}
}
return;
}