Skip to content

Commit 86fc455

Browse files
Render state cache test: added workaround for D3D12 WARP bug
1 parent 51dccbf commit 86fc455

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/DiligentCoreAPITest/assets/shaders/RenderStateCache/Reload/PixelShaderRld.psh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ float4 main(in PSInput PSIn) : SV_Target
3535
Color *= CheckValue(g_Tex2D_Static0.Sample(g_Tex2D_Static0_sampler, UV.xy), g_Data.RefTexColors[0]);
3636
Color *= CheckValue(g_Tex2D_Static1.Sample(g_Tex2D_Static1_sampler, UV.xy), g_Data.RefTexColors[1]);
3737
#ifdef WEBGPU
38-
Color *= CheckValue(g_Tex2D_Mut_0.Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[1]);
38+
Color *= CheckValue(g_Tex2D_Mut_0.Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[2]);
3939
Color *= CheckValue(g_Tex2D_Mut_1.Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[2]);
4040
#else
41-
Color *= CheckValue(g_Tex2D_Mut[0].Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[1]);
41+
Color *= CheckValue(g_Tex2D_Mut[0].Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[2]);
4242
Color *= CheckValue(g_Tex2D_Mut[1].Sample(g_Tex2D_Mut_sampler, UV.xy), g_Data.RefTexColors[2]);
4343
#endif
4444
Color *= CheckValue(g_Tex2D_Dyn.Sample(g_Tex2D_Dyn_sampler, UV.xy), g_Data.RefTexColors[3]);

Tests/DiligentCoreAPITest/src/RenderStateCacheTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,12 +1369,12 @@ void TestPipelineReload(TEST_PIPELINE_RELOAD_FLAGS Flags)
13691369
pPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_Tex2D_Static1")->Set(RefTextures.GetView(1));
13701370
pPSO->CreateShaderResourceBinding(&pSRB0, true);
13711371

1372-
IDeviceObject* ppTexSRVs[] = {RefTextures.GetView(1), RefTextures.GetView(2)};
1372+
IDeviceObject* ppTexSRVs[] = {RefTextures.GetView(2), RefTextures.GetView(2)};
13731373
pSRB0->GetVariableByName(SHADER_TYPE_PIXEL, "g_Tex2D_Mut")->SetArray(ppTexSRVs, 0, 2);
13741374
pSRB0->GetVariableByName(SHADER_TYPE_PIXEL, "g_Tex2D_Dyn")->Set(RefTextures.GetView(3));
13751375
}
13761376

1377-
IDeviceObject* ppTexSRVs[] = {RefTextures.GetView(1), RefTextures.GetView(2)};
1377+
IDeviceObject* ppTexSRVs[] = {RefTextures.GetView(2), RefTextures.GetView(2)};
13781378
(UseSignatures ? pSRB1 : pSRB0)->GetVariableByName(SHADER_TYPE_PIXEL, "g_Tex2D_Mut")->SetArray(ppTexSRVs, 0, 2);
13791379
pSRB0->GetVariableByName(SHADER_TYPE_PIXEL, "g_Tex2D_Dyn")->Set(RefTextures.GetView(3));
13801380

0 commit comments

Comments
 (0)