mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 11:30:22 +01:00
meta/blit: Restore GL_DEPTH_STENCIL_TEXTURE_MODE state for GL_TEXTURE_RECTANGLE
Commitc246828cadded 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 <ian.d.romanick@intel.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> (cherry picked from commit18b0ba340b)
This commit is contained in:
parent
e22133f1bf
commit
e5d37f16e0
1 changed files with 8 additions and 8 deletions
|
|
@ -827,16 +827,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_BindSampler(ctx->Texture.CurrentUnit, blit->samplerSave);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue