i915g: Fix off-by-one in scissors.
authorDavid Reveman <reveman@chromium.org>
Wed, 24 Aug 2011 01:49:11 +0000 (18:49 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Fri, 26 Aug 2011 05:57:48 +0000 (22:57 -0700)
src/gallium/drivers/i915/i915_state_dynamic.c

index 204cee6fe9ebe5c3d3dfc09902bcdcd753568c3b..1a21433eb9e3e5ec7cb55b52b02f36fe346851b3 100644 (file)
@@ -268,8 +268,8 @@ static void upload_SCISSOR_RECT(struct i915_context *i915)
 {
    unsigned x1 = i915->scissor.minx;
    unsigned y1 = i915->scissor.miny;
-   unsigned x2 = i915->scissor.maxx;
-   unsigned y2 = i915->scissor.maxy;
+   unsigned x2 = i915->scissor.maxx - 1;
+   unsigned y2 = i915->scissor.maxy - 1;
    unsigned sc[3];
 
    sc[0] = _3DSTATE_SCISSOR_RECT_0_CMD;