|
|
|
|
|
|
|
|
static void |
|
|
static void |
|
|
intelSetRenderbufferClipRects(struct intel_context *intel) |
|
|
intelSetRenderbufferClipRects(struct intel_context *intel) |
|
|
{ |
|
|
{ |
|
|
|
|
|
/* If the batch contents require looping over cliprects, flush them before |
|
|
|
|
|
* we go changing which cliprects get referenced when that happens. |
|
|
|
|
|
*/ |
|
|
|
|
|
if (intel->batch->cliprect_mode == LOOP_CLIPRECTS && |
|
|
|
|
|
(intel->fboRect.x2 != intel->ctx.DrawBuffer->Width || |
|
|
|
|
|
intel->fboRect.x2 != intel->ctx.DrawBuffer->Height)) |
|
|
|
|
|
intel_batchbuffer_flush(intel->batch); |
|
|
|
|
|
|
|
|
assert(intel->ctx.DrawBuffer->Width > 0); |
|
|
assert(intel->ctx.DrawBuffer->Width > 0); |
|
|
assert(intel->ctx.DrawBuffer->Height > 0); |
|
|
assert(intel->ctx.DrawBuffer->Height > 0); |
|
|
intel->fboRect.x1 = 0; |
|
|
intel->fboRect.x1 = 0; |
|
|
|
|
|
|
|
|
if (!dPriv) |
|
|
if (!dPriv) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
/* If the batch contents require looping over cliprects, flush them before |
|
|
|
|
|
* we go changing which cliprects get referenced when that happens. |
|
|
|
|
|
*/ |
|
|
|
|
|
if (intel->batch->cliprect_mode == LOOP_CLIPRECTS && |
|
|
|
|
|
intel->pClipRects != dPriv->pClipRects) |
|
|
|
|
|
intel_batchbuffer_flush(intel->batch); |
|
|
intel->numClipRects = dPriv->numClipRects; |
|
|
intel->numClipRects = dPriv->numClipRects; |
|
|
intel->pClipRects = dPriv->pClipRects; |
|
|
intel->pClipRects = dPriv->pClipRects; |
|
|
intel->drawX = dPriv->x; |
|
|
intel->drawX = dPriv->x; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (intel_fb->pf_active || dPriv->numBackClipRects == 0) { |
|
|
if (intel_fb->pf_active || dPriv->numBackClipRects == 0) { |
|
|
/* use the front clip rects */ |
|
|
/* use the front clip rects */ |
|
|
|
|
|
if (intel->batch->cliprect_mode == LOOP_CLIPRECTS && |
|
|
|
|
|
intel->pClipRects != dPriv->pClipRects) |
|
|
|
|
|
intel_batchbuffer_flush(intel->batch); |
|
|
|
|
|
|
|
|
intel->numClipRects = dPriv->numClipRects; |
|
|
intel->numClipRects = dPriv->numClipRects; |
|
|
intel->pClipRects = dPriv->pClipRects; |
|
|
intel->pClipRects = dPriv->pClipRects; |
|
|
intel->drawX = dPriv->x; |
|
|
intel->drawX = dPriv->x; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
/* use the back clip rects */ |
|
|
/* use the back clip rects */ |
|
|
|
|
|
if (intel->batch->cliprect_mode == LOOP_CLIPRECTS && |
|
|
|
|
|
intel->pClipRects != dPriv->pBackClipRects) |
|
|
|
|
|
intel_batchbuffer_flush(intel->batch); |
|
|
|
|
|
|
|
|
intel->numClipRects = dPriv->numBackClipRects; |
|
|
intel->numClipRects = dPriv->numBackClipRects; |
|
|
intel->pClipRects = dPriv->pBackClipRects; |
|
|
intel->pClipRects = dPriv->pBackClipRects; |
|
|
intel->drawX = dPriv->backX; |
|
|
intel->drawX = dPriv->backX; |
|
|
|
|
|
|
|
|
if (fb->Name) |
|
|
if (fb->Name) |
|
|
intel_validate_paired_depth_stencil(ctx, fb); |
|
|
intel_validate_paired_depth_stencil(ctx, fb); |
|
|
|
|
|
|
|
|
/* If the batch contents require looping over cliprects, flush them before |
|
|
|
|
|
* we go changing which cliprects get referenced when that happens. |
|
|
|
|
|
*/ |
|
|
|
|
|
if (intel->batch->cliprect_mode == LOOP_CLIPRECTS) |
|
|
|
|
|
intel_batchbuffer_flush(intel->batch); |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* How many color buffers are we drawing into? |
|
|
* How many color buffers are we drawing into? |
|
|
*/ |
|
|
*/ |