diff options
author | Eric Anholt <[email protected]> | 2012-08-26 14:43:52 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-28 11:43:04 -0700 |
commit | bfae8650ec25d9f03ed1f58435325fd9b62b8da8 (patch) | |
tree | 806bae6beaddd6460ae34f25cb912ebc71911583 /src/mesa/drivers | |
parent | 707f242c4be9bd6ea9140b9a7a7673ae5e4e191d (diff) |
i965: Move depth resolve for span fallbacks to a simpler place.
Reviewed-by: Chad Versace <[email protected]>
Acked-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_span.c | 28 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_validate.c | 3 |
2 files changed, 3 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 3dc7f21f0bd..475c01d4758 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -104,33 +104,6 @@ intel_offset_S8(uint32_t stride, uint32_t x, uint32_t y, bool swizzled) return u; } - -/** - * Resolve all buffers that will be mapped by intelSpanRenderStart(). - * - * Resolve the depth buffer of each enabled texture and of the read and draw - * buffers. - * - * (Note: In the future this will also perform MSAA resolves.) - */ -static void -intel_span_resolve_buffers(struct intel_context *intel) -{ - struct gl_context *ctx = &intel->ctx; - struct intel_texture_object *tex_obj; - - /* Resolve depth buffer of each enabled texture. */ - for (int i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - if (!ctx->Texture.Unit[i]._ReallyEnabled) - continue; - tex_obj = intel_texture_object(ctx->Texture.Unit[i]._Current); - intel_finalize_mipmap_tree(intel, i); - if (!tex_obj || !tex_obj->mt) - continue; - intel_miptree_all_slices_resolve_depth(intel, tex_obj->mt); - } -} - /** * Map the regions needed by intelSpanRenderStart(). */ @@ -165,7 +138,6 @@ intelSpanRenderStart(struct gl_context * ctx) intel_flush(ctx); intel_prepare_render(intel); - intel_span_resolve_buffers(intel); intel_flush(ctx); intel_span_map_buffers(intel); } diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index 77c93290216..578b4173512 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -134,6 +134,9 @@ intel_tex_map_image_for_swrast(struct intel_context *intel, face = intel_image->base.Base.Face; mt = intel_image->mt; + for (int i = 0; i < mt->level[level].depth; i++) + intel_miptree_slice_resolve_depth(intel, mt, level, i); + if (mt->target == GL_TEXTURE_3D || mt->target == GL_TEXTURE_2D_ARRAY || mt->target == GL_TEXTURE_1D_ARRAY) { |