mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 03:11:29 +00:00
Add the unit tests samples from src/reader/spirv when: - they are valid for Vulkan 1.0 (plus some common extensions) - they should translate to valid WGSL Bug: tint:1043 Change-Id: I40a01990dbc40aff5cf7ace0b1aabfd0e437f638 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60000 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: David Neto <dneto@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
31 lines
921 B
HLSL
31 lines
921 B
HLSL
SamplerState x_10 : register(s0, space0);
|
|
Texture2DArray<float4> x_20 : register(t1, space2);
|
|
SamplerState x_30 : register(s1, space0);
|
|
|
|
void main_1() {
|
|
const float f1 = 1.0f;
|
|
const float2 vf12 = float2(1.0f, 2.0f);
|
|
const float2 vf21 = float2(2.0f, 1.0f);
|
|
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
|
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
|
const int i1 = 1;
|
|
const int2 vi12 = int2(1, 2);
|
|
const int3 vi123 = int3(1, 2, 3);
|
|
const int4 vi1234 = int4(1, 2, 3, 4);
|
|
const uint u1 = 1u;
|
|
const uint2 vu12 = uint2(1u, 2u);
|
|
const uint3 vu123 = uint3(1u, 2u, 3u);
|
|
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
|
const float coords1 = 1.0f;
|
|
const float2 coords12 = vf12;
|
|
const float3 coords123 = vf123;
|
|
const float4 coords1234 = vf1234;
|
|
const float4 x_79 = x_20.SampleBias(x_10, float3(coords123.xy, float(int(coords123.z))), 7.0f);
|
|
return;
|
|
}
|
|
|
|
void main() {
|
|
main_1();
|
|
return;
|
|
}
|