summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_span.c
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2011-11-16 14:04:25 -0800
committerChad Versace <chad.versace@linux.intel.com>2011-11-21 16:58:35 -0800
commitda2816a45e6e3a33246a341fee72e6f893f315d9 (patch)
tree22cd63d253a88029ce11968d7a2857cfc0ed8164 /src/mesa/drivers/dri/intel/intel_span.c
parent005149d5860ad55c5e58e2de8a138e3a763f2036 (diff)
downloadexternal_mesa3d-da2816a45e6e3a33246a341fee72e6f893f315d9.zip
external_mesa3d-da2816a45e6e3a33246a341fee72e6f893f315d9.tar.gz
external_mesa3d-da2816a45e6e3a33246a341fee72e6f893f315d9.tar.bz2
intel: Replace intel_renderbuffer::region with a miptree [v3]
Essentially, this patch just globally substitutes `irb->region` with `irb->mt->region` and then does some minor cleanups to avoid segfaults and other problems. This is in preparation for 1. Fixing scatter/gather for mipmapped separate stencil textures. 2. Supporting HiZ for mipmapped depth textures. As a nice benefit, this lays down some preliminary groundwork for easily texturing from any renderbuffer, even those of the window system. A future commit will replace intel_mipmap_tree::hiz_region with a miptree. v2: - Return early in intel_process_dri2_buffer_*() if region allocation fails. - Fix double semicolon. - Fix miptree reference leaks in the following functions: intel_process_dri2_buffer_with_separate_stencil() intel_image_target_renderbuffer_storage() v3: - [anholt] Fix check for hiz allocation failure. Replace ``if (!irb->mt)` with ``if(!irb->mt->hiz_region)``. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_span.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index b103bbd..83676b9 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -39,6 +39,7 @@
#include "intel_buffers.h"
#include "intel_fbo.h"
+#include "intel_mipmap_tree.h"
#include "intel_screen.h"
#include "intel_span.h"
#include "intel_regions.h"
@@ -58,7 +59,7 @@ intel_set_span_functions(struct intel_context *intel,
int minx = 0, miny = 0; \
int maxx = rb->Width; \
int maxy = rb->Height; \
- int pitch = rb->RowStride * irb->region->cpp; \
+ int pitch = rb->RowStride * irb->mt->region->cpp; \
void *buf = rb->Data; \
GLuint p; \
(void) p;