From 78b7e49c846c535f6907c18a9982d07c9e9feabb Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 11 Sep 2007 03:54:34 -0700 Subject: intel: disentangle planes & pipes This is the Mesa portion of the pipe & plane disambiguation. Mesa needs to use the new assumptions about plane vs. pipe mappings and should use the new SAREA field names to avoid confusion. --- src/mesa/drivers/dri/i915/intel_context.c | 20 ++++++++++---------- src/mesa/drivers/dri/i915/server/i830_common.h | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 18 deletions(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 11c23f24a1..07bee4ef9f 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -564,16 +564,16 @@ void intelWindowMoved( intelContextPtr intel ) drmI830Sarea *sarea = intel->sarea; drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w, .y1 = dPriv->y, .y2 = dPriv->y + dPriv->h }; - drm_clip_rect_t pipeA_rect = { .x1 = sarea->pipeA_x, - .x2 = sarea->pipeA_x + sarea->pipeA_w, - .y1 = sarea->pipeA_y, - .y2 = sarea->pipeA_y + sarea->pipeA_h }; - drm_clip_rect_t pipeB_rect = { .x1 = sarea->pipeB_x, - .x2 = sarea->pipeB_x + sarea->pipeB_w, - .y1 = sarea->pipeB_y, - .y2 = sarea->pipeB_y + sarea->pipeB_h }; - GLint areaA = driIntersectArea( drw_rect, pipeA_rect ); - GLint areaB = driIntersectArea( drw_rect, pipeB_rect ); + drm_clip_rect_t planeA_rect = { .x1 = sarea->planeA_x, + .x2 = sarea->planeA_x + sarea->planeA_w, + .y1 = sarea->planeA_y, + .y2 = sarea->planeA_y + sarea->planeA_h }; + drm_clip_rect_t planeB_rect = { .x1 = sarea->planeB_x, + .x2 = sarea->planeB_x + sarea->planeB_w, + .y1 = sarea->planeB_y, + .y2 = sarea->planeB_y + sarea->planeB_h }; + GLint areaA = driIntersectArea( drw_rect, planeA_rect ); + GLint areaB = driIntersectArea( drw_rect, planeB_rect ); GLuint flags = intel->vblank_flags; if (areaB > areaA || (areaA == areaB && areaB > 0)) { diff --git a/src/mesa/drivers/dri/i915/server/i830_common.h b/src/mesa/drivers/dri/i915/server/i830_common.h index fb6ceaa52d..a5d2598849 100644 --- a/src/mesa/drivers/dri/i915/server/i830_common.h +++ b/src/mesa/drivers/dri/i915/server/i830_common.h @@ -119,14 +119,17 @@ typedef struct { unsigned int rotated_tiled; unsigned int rotated2_tiled; - int pipeA_x; - int pipeA_y; - int pipeA_w; - int pipeA_h; - int pipeB_x; - int pipeB_y; - int pipeB_w; - int pipeB_h; + int planeA_x; + int planeA_y; + int planeA_w; + int planeA_h; + int planeB_x; + int planeB_y; + int planeB_w; + int planeB_h; + + int planeA_pipe; + int planeB_pipe; } drmI830Sarea; /* Flags for perf_boxes -- cgit v1.2.3