diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2008-01-10 16:45:35 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2008-01-10 16:45:35 +0800 |
commit | c30392f187dc45412e579283989992ed4dd2fed8 (patch) | |
tree | 540da73413d0ffa3383dacee9c93f25d73394595 /src/mesa/drivers/dri/intel | |
parent | e131c46b20241737ceba4856dbe01dcca6dd2c03 (diff) |
i965: fix segfault caused by commit e131c46b20241737ceba4856dbe01dcca6dd2c03.
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_span.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 298e453c42..df4f5927a0 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/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, irb->region); irb->pfMap = irb->region->map; @@ -272,8 +272,8 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) } else { intel_region_unmap(intel, irb->region); - irb->pfMap = NULL; - irb->pfPitch = 0; + irb->pfMap = irb->region->map; + irb->pfPitch = irb->region->pitch; } } } @@ -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, irb->region); irb->pfMap = irb->region->map; @@ -289,8 +289,8 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) } else { intel_region_unmap(intel, irb->region); - irb->pfMap = NULL; - irb->pfPitch = 0; + irb->pfMap = irb->region->map; + irb->pfPitch = irb->region->pitch; } } } |