diff options
author | Brian <brian@i915.localnet.net> | 2007-07-31 15:44:50 -0600 |
---|---|---|
committer | Brian <brian@i915.localnet.net> | 2007-07-31 15:44:50 -0600 |
commit | 2f245bce420c7a6c6928c4927d0f9a5701cde17f (patch) | |
tree | 452d9fc0bf376477f1eb69ee085171f5b6792282 /src/mesa/drivers/dri/i915pipe/intel_span.c | |
parent | 33891b64a9a00ddfd7b9c57a2020e83449af62e5 (diff) |
Lift region-related functions up to the pipe interface.
Some of these functions probably should be driver-private.
Note: intel_buffer_object is in p_state.h and should be fixed/removed.
There are just a few i915 dependencies in intel_region.c
Diffstat (limited to 'src/mesa/drivers/dri/i915pipe/intel_span.c')
-rw-r--r-- | src/mesa/drivers/dri/i915pipe/intel_span.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i915pipe/intel_span.c b/src/mesa/drivers/dri/i915pipe/intel_span.c index 5a978d9ce2..c635ebe0af 100644 --- a/src/mesa/drivers/dri/i915pipe/intel_span.c +++ b/src/mesa/drivers/dri/i915pipe/intel_span.c @@ -33,12 +33,13 @@ #include "intel_fbo.h" #include "intel_screen.h" #include "intel_span.h" -#include "intel_regions.h" #include "intel_ioctl.h" #include "intel_tex.h" #include "swrast/swrast.h" +#include "pipe/p_context.h" + /* break intelWriteRGBASpan_ARGB8888 */ @@ -187,9 +188,9 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) /* this is a user-created intel_renderbuffer */ if (irb->region) { if (map) - intel_region_map(intel->intelScreen, irb->region); + intel->pipe->region_map(intel->pipe, irb->region); else - intel_region_unmap(intel->intelScreen, irb->region); + intel->pipe->region_unmap(intel->pipe, irb->region); } irb->pfMap = irb->region->map; irb->pfPitch = irb->region->pitch; @@ -220,9 +221,9 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) irb = intel_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer); if (irb && irb->region) { if (map) - intel_region_map(intel->intelScreen, irb->region); + intel->pipe->region_map(intel->pipe, irb->region); else - intel_region_unmap(intel->intelScreen, irb->region); + intel->pipe->region_unmap(intel->pipe, irb->region); irb->pfMap = irb->region->map; irb->pfPitch = irb->region->pitch; } @@ -261,12 +262,12 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) irb = intel_renderbuffer(ctx->DrawBuffer->_DepthBuffer->Wrapped); if (irb && irb->region) { if (map) { - intel_region_map(intel->intelScreen, irb->region); + intel->pipe->region_map(intel->pipe, irb->region); irb->pfMap = irb->region->map; irb->pfPitch = irb->region->pitch; } else { - intel_region_unmap(intel->intelScreen, irb->region); + intel->pipe->region_unmap(intel->pipe, irb->region); irb->pfMap = NULL; irb->pfPitch = 0; } @@ -278,12 +279,12 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) irb = intel_renderbuffer(ctx->DrawBuffer->_StencilBuffer->Wrapped); if (irb && irb->region) { if (map) { - intel_region_map(intel->intelScreen, irb->region); + intel->pipe->region_map(intel->pipe, irb->region); irb->pfMap = irb->region->map; irb->pfPitch = irb->region->pitch; } else { - intel_region_unmap(intel->intelScreen, irb->region); + intel->pipe->region_unmap(intel->pipe, irb->region); irb->pfMap = NULL; irb->pfPitch = 0; } @@ -312,9 +313,9 @@ intelSpanRenderStart(GLcontext * ctx) /* Just map the framebuffer and all textures. Bufmgr code will * take care of waiting on the necessary fences: */ - intel_region_map(intel->intelScreen, intel->front_region); - intel_region_map(intel->intelScreen, intel->back_region); - intel_region_map(intel->intelScreen, intel->intelScreen->depth_region); + intel->pipe->region_map(intel->intelScreen, intel->front_region); + intel->pipe->region_map(intel->intelScreen, intel->back_region); + intel->pipe->region_map(intel->intelScreen, intel->intelScreen->depth_region); #endif for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { @@ -342,9 +343,9 @@ intelSpanRenderFinish(GLcontext * ctx) /* Now unmap the framebuffer: */ #if 0 - intel_region_unmap(intel, intel->front_region); - intel_region_unmap(intel, intel->back_region); - intel_region_unmap(intel, intel->intelScreen->depth_region); + intel->pipe->region_unmap(intel, intel->front_region); + intel->pipe->region_unmap(intel, intel->back_region); + intel->pipe->region_unmap(intel, intel->intelScreen->depth_region); #endif for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { |