Commit ba597af9 by Jamie Madill

Re-enable hazard warnings for setting render targets that are currently bound as SRVs.

We can manually unset applied textures in SetRenderTargets. This should fix the spurious warnings while still showing a warning on error cases. TRAC #24039 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent bfcda81d
...@@ -222,8 +222,6 @@ EGLint Renderer11::initialize() ...@@ -222,8 +222,6 @@ EGLint Renderer11::initialize()
{ {
D3D11_MESSAGE_ID hideMessages[] = D3D11_MESSAGE_ID hideMessages[] =
{ {
D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD,
D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD,
D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET
}; };
...@@ -943,6 +941,25 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer) ...@@ -943,6 +941,25 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer)
renderTargetFormat = colorbuffer->getActualFormat(); renderTargetFormat = colorbuffer->getActualFormat();
missingColorRenderTarget = false; missingColorRenderTarget = false;
} }
#ifdef _DEBUG
// Workaround for Debug SETSHADERRESOURCES_HAZARD D3D11 warnings
for (unsigned int vertexSerialIndex = 0; vertexSerialIndex < gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS; vertexSerialIndex++)
{
if (colorbuffer->getTextureSerial() != 0 && mCurVertexTextureSerials[vertexSerialIndex] == colorbuffer->getTextureSerial())
{
setTexture(gl::SAMPLER_VERTEX, vertexSerialIndex, NULL);
}
}
for (unsigned int pixelSerialIndex = 0; pixelSerialIndex < gl::MAX_TEXTURE_IMAGE_UNITS; pixelSerialIndex++)
{
if (colorbuffer->getTextureSerial() != 0 && mCurPixelTextureSerials[pixelSerialIndex] == colorbuffer->getTextureSerial())
{
setTexture(gl::SAMPLER_PIXEL, pixelSerialIndex, NULL);
}
}
#endif
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment