[EMAIL PROTECTED] wrote:

>It's not exactly a known problem. I havn't had problems with scissors
>yet, probably because it's not widely used in games and other stuff I
>tested. I suspect that scissors interact badly with the window cliprect.
>It's still a big mess in the driver. If you feel like driver hacking
>take a look at savagestate.c. That's where the scissors are computed.

Hi,

I've been tracing the savagestate.c code and i've found that the
savageDDRenderStart always sets the scissor to their initial value.
I've add a checking to avoid that. Now my code works fine, but i
don't know if this change have side-effects. Where the savage code
comes from ? I would like to study the original driver and try to
clarify this behaviour.


void savageDDRenderStart(GLcontext *ctx)
{
    savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
    __DRIdrawablePrivate *dPriv = imesa->driDrawable;
    drm_clip_rect_t *pbox;
    GLint nbox;

    /* if the screen is overrided by other application. set the scissor.
     * In MulitPass, re-render the screen.
     */
    pbox = dPriv->pClipRects;
    nbox = dPriv->numClipRects;
    if (nbox)
    {
        imesa->currentClip = nbox;

+       if (imesa->scissorChanged)
+       {
+           imesa->dirty |= SAVAGE_UPLOAD_CLIPRECTS;
+       }
+       else
+       {
            /* set scissor to the first clip box*/
            savageDDScissor(ctx,pbox->x1,pbox->y1,pbox->x2,pbox->y2);
+       }
        /*savageDDUpdateHwState(ctx);*/ /* update to hardware register*/
    }
    else /* need not render at all*/
    {
        /*ctx->VB->CopyStart = ctx->VB->Count;*/
    }
}


I hope this help,
Jorge




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to