summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2015-04-06 22:37:40 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2015-04-06 22:37:40 +0300
commit7b22538eeca87204e864cf9abf89e7be7a338e74 (patch)
treeb9672b36277ebf71e768afba53efe3f9d6bc7c45
parent9becf3fdb8411ae0563eb89a9c10bcd56443c8a8 (diff)
i965/meta/hack: Prepare stencil blit for ARB_texture_stencil8stencil_hack
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
index fc7018d15b..db07747a0a 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
@@ -387,10 +387,14 @@ set_read_rb_tex_image(struct gl_context *ctx, struct fb_tex_blit_state *blit,
*target = tex_obj->Target;
level = att->TextureLevel;
} else {
+ GLenum internal_format_save = rb->InternalFormat;
+ rb->InternalFormat = GL_DEPTH_STENCIL;
if (!_mesa_meta_bind_rb_as_tex_image(ctx, rb, &blit->tempTex, &tex_obj,
target)) {
+ rb->InternalFormat = internal_format_save;
return false;
}
+ rb->InternalFormat = internal_format_save;
}
blit->baseLevelSave = tex_obj->BaseLevel;
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 9d7ca44132..93d4004820 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -167,7 +167,7 @@ gen8_update_texture_surface(struct gl_context *ctx,
return;
}
- if (tObj->StencilSampling && firstImage->_BaseFormat == GL_DEPTH_STENCIL) {
+ if (tObj->StencilSampling && mt->stencil_mt) {
mt = mt->stencil_mt;
format = MESA_FORMAT_S_UINT8;
}