mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 22:30:11 +01:00
Fix glean scissor test
This commit is contained in:
parent
d4330fc322
commit
db93e6165e
3 changed files with 11 additions and 4 deletions
|
|
@ -676,6 +676,11 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
|
|||
|
||||
_mesa_update_state(vmesa->glCtx);
|
||||
viaValidateState(vmesa->glCtx);
|
||||
ctx->Driver.Scissor(vmesa->glCtx,
|
||||
vmesa->glCtx->Scissor.X,
|
||||
vmesa->glCtx->Scissor.Y,
|
||||
vmesa->glCtx->Scissor.Width,
|
||||
vmesa->glCtx->Scissor.Height);
|
||||
}
|
||||
else {
|
||||
_mesa_make_current(0,0);
|
||||
|
|
|
|||
|
|
@ -665,10 +665,10 @@ void viaFlushDmaLocked(viaContextPtr vmesa, GLuint flags)
|
|||
b.y1 = pbox[i].y1 - vmesa->drawY;
|
||||
b.y2 = pbox[i].y2 - vmesa->drawY;
|
||||
|
||||
if (vmesa->glCtx->Scissor.Enabled &&
|
||||
if (vmesa->scissor &&
|
||||
!intersect_rect(&b, &b, &vmesa->scissorRect))
|
||||
continue;
|
||||
|
||||
|
||||
b.x1 += vmesa->drawXoff;
|
||||
b.x2 += vmesa->drawXoff;
|
||||
|
||||
|
|
|
|||
|
|
@ -612,14 +612,15 @@ static void viaScissor(GLcontext *ctx, GLint x, GLint y,
|
|||
if (VIA_DEBUG)
|
||||
fprintf(stderr, "%s %d,%d %dx%d, drawH %d\n", __FUNCTION__, x,y,w,h, vmesa->driDrawable->h);
|
||||
|
||||
if (ctx->Scissor.Enabled) {
|
||||
if (vmesa->scissor) {
|
||||
VIA_FLUSH_DMA(vmesa); /* don't pipeline cliprect changes */
|
||||
}
|
||||
|
||||
vmesa->scissorRect.x1 = x;
|
||||
vmesa->scissorRect.y1 = vmesa->driDrawable->h - (y + h);
|
||||
vmesa->scissorRect.y1 = vmesa->driDrawable->h - y - h;
|
||||
vmesa->scissorRect.x2 = x + w;
|
||||
vmesa->scissorRect.y2 = vmesa->driDrawable->h - y;
|
||||
|
||||
if (VIA_DEBUG) fprintf(stderr, "%s out\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
|
|
@ -630,6 +631,7 @@ static void viaEnable(GLcontext *ctx, GLenum cap, GLboolean state)
|
|||
switch (cap) {
|
||||
case GL_SCISSOR_TEST:
|
||||
VIA_FLUSH_DMA(vmesa);
|
||||
vmesa->scissor = state;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue