summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-01-12 16:08:47 -0800
committerIan Romanick <[email protected]>2016-01-25 10:43:47 -0800
commit18b0ba340b9229e7afd5e38b5d825fde3a435b63 (patch)
tree4dc46749b2b2a5548b14d4514b429f80358cd963
parentf7800fadff63cf2df184fc5201ecb10c92fb2908 (diff)
meta/blit: Restore GL_DEPTH_STENCIL_TEXTURE_MODE state for GL_TEXTURE_RECTANGLE
Commit c246828c added the code to save and restore the stencil texturing mode. The restore, however, was erroneously inside the 'target != GL_TEXTURE_RECTANGLE' block. Fixes piglit test 'arb_stencil_texturing-blit_corrupts_state GL_TEXTURE_RECTANGLE'. Signed-off-by: Ian Romanick <[email protected]> Cc: "11.0 11.1" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/common/meta_blit.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index b414dce8819..78ecfe2db59 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -834,16 +834,16 @@ _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
if (target != GL_TEXTURE_RECTANGLE_ARB) {
_mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, blit->baseLevelSave);
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, blit->maxLevelSave);
+ }
- if (ctx->Extensions.ARB_stencil_texturing) {
- const struct gl_texture_object *texObj =
- _mesa_get_current_tex_object(ctx, target);
+ if (ctx->Extensions.ARB_stencil_texturing) {
+ const struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
- if (texObj->StencilSampling != blit->stencilSamplingSave)
- _mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE,
- blit->stencilSamplingSave ?
- GL_STENCIL_INDEX : GL_DEPTH_COMPONENT);
- }
+ if (texObj->StencilSampling != blit->stencilSamplingSave)
+ _mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE,
+ blit->stencilSamplingSave ?
+ GL_STENCIL_INDEX : GL_DEPTH_COMPONENT);
}
_mesa_bind_sampler(ctx, ctx->Texture.CurrentUnit, blit->samp_obj_save);