i965/blorp: Prepare drawing rectangle for flipped coordinates
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Sun, 29 Mar 2015 18:52:02 +0000 (21:52 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 29 Apr 2015 21:28:49 +0000 (00:28 +0300)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/gen6_blorp.cpp

index ed08898d957d7a4b48b348058d0688cbddc741a8..b6a3d78d8496d18afb86beb78e62e86debb9932b 100644 (file)
@@ -950,8 +950,8 @@ gen6_blorp_emit_drawing_rectangle(struct brw_context *brw,
    BEGIN_BATCH(4);
    OUT_BATCH(_3DSTATE_DRAWING_RECTANGLE << 16 | (4 - 2));
    OUT_BATCH(0);
-   OUT_BATCH(((params->x1 - 1) & 0xffff) |
-             ((params->y1 - 1) << 16));
+   OUT_BATCH(((MAX2(params->x1, params->x0) - 1) & 0xffff) |
+             ((MAX2(params->y1, params->y0) - 1) << 16));
    OUT_BATCH(0);
    ADVANCE_BATCH();
 }