summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915tex
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2007-07-14 14:24:20 +0200
committerRoland Scheidegger <[email protected]>2007-07-14 14:24:20 +0200
commita04056d313a8346dc9e6e1b062762a6f115d1b46 (patch)
tree5e9597deefb8653708ea34456d8460af9664358f /src/mesa/drivers/dri/i915tex
parentf022bff5aa828cfdbb4749f672fc51c345f9cb33 (diff)
fix assertion, z/stencil swarst readback, (still looks suspicious) copyTexSubimage
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_pixel_read.c2
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_span.c4
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_tex_copy.c8
3 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c
index 9481cb4800f..c7bdb6bc855 100644
--- a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c
@@ -183,7 +183,7 @@ do_blit_readpixels(GLcontext * ctx,
*/
if (!_mesa_validate_pbo_access(2, pack, width, height, 1,
format, type, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels");
return GL_TRUE;
}
}
diff --git a/src/mesa/drivers/dri/i915tex/intel_span.c b/src/mesa/drivers/dri/i915tex/intel_span.c
index 368e0ec3c09..74f118121c1 100644
--- a/src/mesa/drivers/dri/i915tex/intel_span.c
+++ b/src/mesa/drivers/dri/i915tex/intel_span.c
@@ -264,7 +264,7 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map)
/* depth buffer (Note wrapper!) */
if (ctx->DrawBuffer->_DepthBuffer) {
irb = intel_renderbuffer(ctx->DrawBuffer->_DepthBuffer->Wrapped);
- if (irb && irb->region && irb->Base.Name != 0) {
+ if (irb && irb->region) {
if (map) {
intel_region_map(intel->intelScreen, irb->region);
irb->pfMap = irb->region->map;
@@ -281,7 +281,7 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map)
/* stencil buffer (Note wrapper!) */
if (ctx->DrawBuffer->_StencilBuffer) {
irb = intel_renderbuffer(ctx->DrawBuffer->_StencilBuffer->Wrapped);
- if (irb && irb->region && irb->Base.Name != 0) {
+ if (irb && irb->region) {
if (map) {
intel_region_map(intel->intelScreen, irb->region);
irb->pfMap = irb->region->map;
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
index 90c2b9ebb51..8d7f8f9d91b 100644
--- a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c
@@ -118,9 +118,11 @@ do_copy_texsubimage(struct intel_context *intel,
dstx += x - orig_x;
dsty += y - orig_y;
- /* invert Y */
- y = ctx->ReadBuffer->Height - y - 1;
-
+ if (!(ctx->ReadBuffer->Name == 0)) {
+ /* XXX this looks bogus ? */
+ /* FBO: invert Y */
+ y = ctx->ReadBuffer->Height - y - 1;
+ }
/* A bit of fiddling to get the blitter to work with -ve
* pitches. But we get a nice inverted blit this way, so it's