i965: fix segfault caused by commit e131c46b20
.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user