summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-10-07 12:12:46 -0700
committerChad Versace <[email protected]>2011-10-18 11:42:54 -0700
commitef6de0141ca7c9757ef40b3db18202b11ab2ec98 (patch)
tree78040983b1f81ad0c8e5bbbf9075c795152e211a /src/mesa
parentb48e02383e6bf8a4e1c05d11c6dce25cb796fcf4 (diff)
intel: Fix scatter/gather for depthstencil textures
During anholt's MapTextureImage refactoring, the call to intel_tex_image_s8z24_create_renderbuffers was missplaced. It needs to occur *after* the miptree is allocated. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 83ba50e39ed..fff2daefb95 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -66,11 +66,6 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
*/
ctx->Driver.FreeTextureImageBuffer(ctx, image);
- if (intel->must_use_separate_stencil
- && image->TexFormat == MESA_FORMAT_S8_Z24) {
- intel_tex_image_s8z24_create_renderbuffers(intel, intel_image);
- }
-
if (intel_texobj->mt &&
intel_miptree_match_image(intel_texobj->mt, image)) {
intel_miptree_reference(&intel_image->mt, intel_texobj->mt);
@@ -90,6 +85,11 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
*/
intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
+ if (intel->must_use_separate_stencil
+ && image->TexFormat == MESA_FORMAT_S8_Z24) {
+ intel_tex_image_s8z24_create_renderbuffers(intel, intel_image);
+ }
+
DBG("%s: alloc obj %p level %d %dx%dx%d using new miptree %p\n",
__FUNCTION__, texobj, image->Level,
width, height, depth, intel_image->mt);