Revert changes to markAllStateDirty that cleared D3D11 shader resources.

TRAC #22642 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1949 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 236be77d
...@@ -1676,44 +1676,17 @@ void Renderer11::markAllStateDirty() ...@@ -1676,44 +1676,17 @@ void Renderer11::markAllStateDirty()
mDepthStencilInitialized = false; mDepthStencilInitialized = false;
mRenderTargetDescInitialized = false; mRenderTargetDescInitialized = false;
bool clearVertexTextureResources = false;
for (int i = 0; i < gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS; i++) for (int i = 0; i < gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS; i++)
{ {
if (mCurVertexTextureSerials[i] != 0)
{
clearVertexTextureResources = true;
}
mForceSetVertexSamplerStates[i] = true; mForceSetVertexSamplerStates[i] = true;
mCurVertexTextureSerials[i] = 0; mCurVertexTextureSerials[i] = 0;
} }
if (clearVertexTextureResources && mDeviceContext)
{
ID3D11ShaderResourceView *nullSRVs[gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS] = {0};
mDeviceContext->VSSetShaderResources(0, getMaxVertexTextureImageUnits(), nullSRVs);
}
bool clearPixelTextureResources = false;
for (int i = 0; i < gl::MAX_TEXTURE_IMAGE_UNITS; i++) for (int i = 0; i < gl::MAX_TEXTURE_IMAGE_UNITS; i++)
{ {
if (mCurPixelTextureSerials[i] != 0)
{
clearPixelTextureResources = true;
}
mForceSetPixelSamplerStates[i] = true; mForceSetPixelSamplerStates[i] = true;
mCurPixelTextureSerials[i] = 0; mCurPixelTextureSerials[i] = 0;
} }
if (clearPixelTextureResources && mDeviceContext)
{
ID3D11ShaderResourceView *nullSRVs[gl::MAX_TEXTURE_IMAGE_UNITS] = {0};
mDeviceContext->PSSetShaderResources(0, gl::MAX_TEXTURE_IMAGE_UNITS, nullSRVs);
}
mForceSetBlendState = true; mForceSetBlendState = true;
mForceSetRasterState = true; mForceSetRasterState = true;
mForceSetDepthStencilState = true; mForceSetDepthStencilState = true;
......
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