mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-11 23:56:05 +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>
35 lines
961 B
HLSL
35 lines
961 B
HLSL
void main_1() {
|
|
const uint u1 = 10u;
|
|
const uint u2 = 15u;
|
|
const uint u3 = 20u;
|
|
const int i1 = 30;
|
|
const int i2 = 35;
|
|
const int i3 = 40;
|
|
const float f1 = 50.0f;
|
|
const float f2 = 60.0f;
|
|
const float f3 = 70.0f;
|
|
const uint2 v2u1 = uint2(10u, 20u);
|
|
const uint2 v2u2 = uint2(20u, 10u);
|
|
const uint2 v2u3 = uint2(15u, 15u);
|
|
const int2 v2i1 = int2(30, 40);
|
|
const int2 v2i2 = int2(40, 30);
|
|
const int2 v2i3 = int2(35, 35);
|
|
const float2 v2f1 = float2(50.0f, 60.0f);
|
|
const float2 v2f2 = float2(60.0f, 50.0f);
|
|
const float2 v2f3 = float2(70.0f, 70.0f);
|
|
const float3 v3f1 = float3(50.0f, 60.0f, 70.0f);
|
|
const float3 v3f2 = float3(60.0f, 70.0f, 50.0f);
|
|
const float4 v4f1 = float4(50.0f, 50.0f, 50.0f, 50.0f);
|
|
const float4 v4f2 = v4f1;
|
|
const float x_98 = (f1 + f1);
|
|
const float x_99 = (f2 + f2);
|
|
const float x_1 = (x_98 - (2.0f * (x_99 * (x_99 * x_98))));
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
main_1();
|
|
return;
|
|
}
|