summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-28 12:30:45 -0700
committerEric Anholt <[email protected]>2011-10-03 13:29:37 -0700
commita73d56dce37ae13f422215de1bf1fdfb8e2f6ed7 (patch)
tree490d2b7a4a4f481db77a0a8547e7fc0dc38f7d36 /src
parente928c34d3ec54bb8a6b80036e6b6a91977bf0865 (diff)
intel: Allocate s8z24 separate renderbuffers from AllocTextureImageBuffer().
Before, we were only allocating these from our TexImage, so if the texture image was set up in any other way (non-accelerated glGenerateMipmaps()), they'd be missing or wrong.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index c7d57f7caf9..ba1e364b9e9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -60,6 +60,11 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_object *texobj = image->TexObject;
struct intel_texture_object *intel_texobj = intel_texture_object(texobj);
+ 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);
diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h
index d0757b7d746..fb97c431d86 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.h
+++ b/src/mesa/drivers/dri/intel/intel_tex.h
@@ -68,6 +68,9 @@ void intel_tex_map_images(struct intel_context *intel,
void intel_tex_unmap_images(struct intel_context *intel,
struct intel_texture_object *intelObj);
+bool
+intel_tex_image_s8z24_create_renderbuffers(struct intel_context *intel,
+ struct intel_texture_image *image);
void intel_tex_image_s8z24_scatter(struct intel_context *intel,
struct intel_texture_image *intel_image);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 7c2831e9d22..c0f609f603d 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -282,7 +282,7 @@ intel_tex_image_s8z24_gather(struct intel_context *intel,
intel_tex_image_s8z24_scattergather(intel, intel_image, false);
}
-static bool
+bool
intel_tex_image_s8z24_create_renderbuffers(struct intel_context *intel,
struct intel_texture_image *image)
{