Bug 27643 - Setting a glScissor that is fully offscreen does not work
Setting a glScissor that is fully offscreen does not work
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
Other All
: medium normal
Assigned To: Eric Anholt
Depends on:
  Show dependency treegraph
Reported: 2010-04-14 10:28 UTC by Neil Roberts
Modified: 2010-04-20 13:42 UTC (History)
0 users

See Also:

Test case (3.45 KB, patch)
2010-04-14 10:28 UTC, Neil Roberts
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Roberts 2010-04-14 10:28:19 UTC
Created attachment 35017 [details] [review]
Test case

If I set a scissor that is zero sized and fully offscreen then I would expect it to clip everything. However on my i965 with git master nothing gets clipped. Attached is a test case for piglet to demonstrate.
Comment 1 Eric Anholt 2010-04-20 13:42:51 UTC
commit dab3798f02259f04f3fa4e0adf6b0e31c1ebe58f
Author: Neil Roberts <neil@linux.intel.com>
Date:   Wed Apr 14 18:23:32 2010 +0100

    offscreen-scissor: New test for setting a scissor that is fully offscreen
    The test sets a zero-width and height scissor that is off the edge of
    the window. This should clip everything. It then tries to fill the
    window with red triangles. These do not currently get clipped on i965.
    Signed-off-by: Eric Anholt <eric@anholt.net>

(whoops, renamed to scissor-offscreen alongside other scissoring tests, didn't rename commit message).

commit 8e5e9cdca590109aff6840661449cdc09f70ffd8
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 20 13:40:28 2010 -0700

    i965: Fix scissoring when width or height is 0.
    We would run into trouble due to the hardware using inclusive numbers
    and the subtraction to handle that producing negative (meaning large
    positive) coordinates.
    Bug #27643.