Fix clearing the geometry shader state in copytexture, and errors generated by a…

Fix clearing the geometry shader state in copytexture, and errors generated by a BGRA backbuffer format. TRAC #22545 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1893 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8d2f086a
......@@ -1331,6 +1331,7 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma
if (colorbufferFormat != GL_ALPHA8_EXT &&
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
{
return gl::error(GL_INVALID_OPERATION);
......@@ -1342,6 +1343,7 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma
colorbufferFormat != GL_RGB8_OES &&
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
{
return gl::error(GL_INVALID_OPERATION);
......@@ -1351,6 +1353,7 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma
case GL_RGBA:
if (colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_BGRA8_EXT &&
colorbufferFormat != GL_RGBA8_OES)
{
return gl::error(GL_INVALID_OPERATION);
......
......@@ -2648,6 +2648,7 @@ bool Renderer11::copyTexture(ID3D11ShaderResourceView *source, const gl::Rectang
}
mDeviceContext->PSSetShader(ps, NULL, 0);
mDeviceContext->GSSetShader(NULL, NULL, 0);
// Unset the currently bound shader resource to avoid conflicts
static ID3D11ShaderResourceView *const nullSRV = NULL;
......
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