diff --git a/util/test/demos/d3d11/d3d11_refcount_check.cpp b/util/test/demos/d3d11/d3d11_refcount_check.cpp index 09a81e35a..6f1cc47f2 100644 --- a/util/test/demos/d3d11/d3d11_refcount_check.cpp +++ b/util/test/demos/d3d11/d3d11_refcount_check.cpp @@ -167,6 +167,9 @@ RD_TEST(D3D11_Refcount_Check, D3D11GraphicsTest) reftest.annot = NULL; reftest.swapBlitVS = NULL; reftest.swapBlitPS = NULL; + reftest.DefaultTriVS = NULL; + reftest.DefaultTriPS = NULL; + reftest.DefaultTriVB = NULL; dbg->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL); diff --git a/util/test/demos/d3d11/d3d11_test.cpp b/util/test/demos/d3d11/d3d11_test.cpp index 1d64125ad..683b9154a 100644 --- a/util/test/demos/d3d11/d3d11_test.cpp +++ b/util/test/demos/d3d11/d3d11_test.cpp @@ -338,17 +338,17 @@ float4 main(float4 pos : SV_Position) : SV_Target0 { swapBlitVS = CreateVS(Compile(D3DFullscreenQuadVertex, "main", "vs_4_0")); swapBlitPS = CreatePS(Compile(blitPixel, "main", "ps_5_0")); + + ID3DBlobPtr vsblob = Compile(D3DDefaultVertex, "main", "vs_4_0"); + ID3DBlobPtr psblob = Compile(D3DDefaultPixel, "main", "ps_4_0"); + + CreateDefaultInputLayout(vsblob); + + DefaultTriVS = CreateVS(vsblob); + DefaultTriPS = CreatePS(psblob); + + DefaultTriVB = MakeBuffer().Vertex().Data(DefaultTri); } - - ID3DBlobPtr vsblob = Compile(D3DDefaultVertex, "main", "vs_4_0"); - ID3DBlobPtr psblob = Compile(D3DDefaultPixel, "main", "ps_4_0"); - - CreateDefaultInputLayout(vsblob); - - DefaultTriVS = CreateVS(vsblob); - DefaultTriPS = CreatePS(psblob); - - DefaultTriVB = MakeBuffer().Vertex().Data(DefaultTri); } void D3D11GraphicsTest::Shutdown() @@ -372,6 +372,11 @@ void D3D11GraphicsTest::Shutdown() swapBlitVS = NULL; swapBlitPS = NULL; + + DefaultTriVS = NULL; + DefaultTriPS = NULL; + + DefaultTriVB = NULL; } bool D3D11GraphicsTest::Running() diff --git a/util/test/demos/gl/gl_test.cpp b/util/test/demos/gl/gl_test.cpp index 6a304417d..e4e7bc96e 100644 --- a/util/test/demos/gl/gl_test.cpp +++ b/util/test/demos/gl/gl_test.cpp @@ -113,6 +113,9 @@ void OpenGLGraphicsTest::PostInit() glBindVertexArray(DefaultTriVAO); ConfigureDefaultVAO(); + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + DefaultTriProgram = MakeProgram(GLDefaultVertex, GLDefaultPixel); }