test: Emit expected HLSL file

Sarah fixed the test with https://dawn-review.googlesource.com/c/tint/+/55122

Bug: tint:506
Change-Id: Ia42f6f3fc383214d653353d8de93ab154fd50bc8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55884
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton 2021-06-24 22:37:48 +00:00 committed by Tint LUCI CQ
parent 07b59ca230
commit 5b9203cc05
1 changed files with 27 additions and 27 deletions

View File

@ -1,20 +1,28 @@
SKIP: FAILED float2x2 tint_symbol_4(uint4 buffer[1], uint offset) {
const int scalar_offset = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset / 4];
const int scalar_offset_1 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
float2x2 tint_symbol_6(uint4 buffer[1], uint offset) {
const int scalar_offset_2 = ((offset + 0u)) / 4;
uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
const int scalar_offset_3 = ((offset + 8u)) / 4;
uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
return float2x2(asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
cbuffer cbuffer_x_20 : register(b0, space0) {
Validation Failure: uint4 x_20[1];
struct vertexUniformBuffer1 {
float2x2 transform1;
}; };
struct vertexUniformBuffer2 { cbuffer cbuffer_x_26 : register(b0, space1) {
float2x2 transform2; uint4 x_26[1];
}; };
ConstantBuffer<vertexUniformBuffer1> x_20 : register(b0, space0);
ConstantBuffer<vertexUniformBuffer2> x_26 : register(b0, space1);
struct tint_symbol_1 { struct tint_symbol_1 {
int gl_VertexIndex : SV_VertexID; uint gl_VertexIndex : SV_VertexID;
}; };
struct tint_symbol_2 { struct tint_symbol_2 {
float4 value : SV_Position; float4 value : SV_Position;
@ -24,23 +32,15 @@ struct tint_array_wrapper {
}; };
tint_symbol_2 main(tint_symbol_1 tint_symbol) { tint_symbol_2 main(tint_symbol_1 tint_symbol) {
const int gl_VertexIndex = tint_symbol.gl_VertexIndex; const uint gl_VertexIndex = tint_symbol.gl_VertexIndex;
tint_array_wrapper indexable = {{float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)}}; tint_array_wrapper indexable = {{float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f)}};
const float2x2 x_23 = x_20.transform1; const float2x2 x_23 = tint_symbol_4(x_20, 0u);
const float2x2 x_28 = x_26.transform2; const float2x2 x_28 = tint_symbol_6(x_26, 0u);
const int x_46 = gl_VertexIndex; const uint x_46 = gl_VertexIndex;
const tint_array_wrapper tint_symbol_3 = {{float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)}}; const tint_array_wrapper tint_symbol_7 = {{float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)}};
indexable = tint_symbol_3; indexable = tint_symbol_7;
const float2 x_51 = indexable.arr[x_46]; const float2 x_51 = indexable.arr[x_46];
const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u]))); const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])));
const tint_symbol_2 tint_symbol_4 = {float4(x_52.x, x_52.y, 0.0f, 1.0f)}; const tint_symbol_2 tint_symbol_8 = {float4(x_52.x, x_52.y, 0.0f, 1.0f)};
return tint_symbol_4; return tint_symbol_8;
} }
warning: DXIL.dll not found. Resulting DXIL will not be signed for use in release environments.
error: validation errors
error: SV_VertexID must be uint.
Validation failed.