Tweak BindGroupTests to workaround FXC bug
Constructing a float2x2 from a float4 in a ConstantBuffer by extracting individual scalars with the array-index operator appears to produce invalid DXBC. Tweak the test so that we use .xy, .zw swizzles instead. Bug: tint:681 Change-Id: I027f8df96f2a5fda355668b35773d79f4fcdc08b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47421 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
99bfeeb630
commit
9178d9bf35
|
@ -155,9 +155,6 @@ TEST_P(BindGroupTests, ReusedBindGroupSingleSubmit) {
|
|||
// It contains a transformation matrix for the VS and the fragment color for the FS.
|
||||
// These must result in different register offsets in the native APIs.
|
||||
TEST_P(BindGroupTests, ReusedUBO) {
|
||||
// TODO(crbug.com/tint/681): Fails for D3D12 with use_tint_generator
|
||||
DAWN_SKIP_TEST_IF(IsD3D12() && HasToggleEnabled("use_tint_generator"));
|
||||
|
||||
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
|
||||
|
||||
wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"(
|
||||
|
@ -177,9 +174,7 @@ TEST_P(BindGroupTests, ReusedUBO) {
|
|||
vec2<f32>( 1.0, 1.0),
|
||||
vec2<f32>(-1.0, -1.0));
|
||||
|
||||
var transform : mat2x2<f32> = mat2x2<f32>(
|
||||
vec2<f32>(vertexUbo.transform[0], vertexUbo.transform[1]),
|
||||
vec2<f32>(vertexUbo.transform[2], vertexUbo.transform[3]));
|
||||
var transform : mat2x2<f32> = mat2x2<f32>(vertexUbo.transform.xy, vertexUbo.transform.zw);
|
||||
Position = vec4<f32>(transform * pos[VertexIndex], 0.0, 1.0);
|
||||
})");
|
||||
|
||||
|
@ -242,9 +237,6 @@ TEST_P(BindGroupTests, ReusedUBO) {
|
|||
// shader. In D3D12 for example, these different types of bindings end up in different namespaces,
|
||||
// but the register offsets used must match between the shader module and descriptor range.
|
||||
TEST_P(BindGroupTests, UBOSamplerAndTexture) {
|
||||
// TODO(crbug.com/tint/681): Fails for D3D12 with use_tint_generator
|
||||
DAWN_SKIP_TEST_IF(IsD3D12() && HasToggleEnabled("use_tint_generator"));
|
||||
|
||||
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
|
||||
|
||||
wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"(
|
||||
|
@ -263,9 +255,7 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) {
|
|||
vec2<f32>( 1.0, 1.0),
|
||||
vec2<f32>(-1.0, -1.0));
|
||||
|
||||
var transform : mat2x2<f32> = mat2x2<f32>(
|
||||
vec2<f32>(vertexUbo.transform[0], vertexUbo.transform[1]),
|
||||
vec2<f32>(vertexUbo.transform[2], vertexUbo.transform[3]));
|
||||
var transform : mat2x2<f32> = mat2x2<f32>(vertexUbo.transform.xy, vertexUbo.transform.zw);
|
||||
Position = vec4<f32>(transform * pos[VertexIndex], 0.0, 1.0);
|
||||
})");
|
||||
|
||||
|
|
Loading…
Reference in New Issue