aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-02-16 01:04:07 +0000
committerAlyssa Rosenzweig <[email protected]>2019-02-18 05:13:50 +0000
commit2c6a7fbeb78856d6405e1c0dff17a58478b0019e (patch)
treedb55061b6ac247994f45479b2d442eda55c8fe17
parentfa1b36ddc2b6407e3c0e2b938e94f40d825e33f0 (diff)
panfrost: Fix clipping region
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index cfed9f6ff90..822b5a0dfef 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -557,10 +557,17 @@ panfrost_viewport(struct panfrost_context *ctx,
* (somewhat) asymmetric ints. */
struct mali_viewport ret = {
- .clip_minx = viewport_x0,
- .clip_miny = viewport_y0,
- .clip_maxx = viewport_x1,
- .clip_maxy = viewport_x1,
+ /* By default, do no viewport clipping, i.e. clip to (-inf,
+ * inf) in each direction. Clipping to the viewport in theory
+ * should work, but in practice causes issues when we're not
+ * explicitly trying to scissor */
+
+ .clip_minx = -inff,
+ .clip_miny = -inff,
+ .clip_maxx = inff,
+ .clip_maxy = inff,
+
+ /* We always perform depth clipping (TODO: Can this be disabled?) */
.clip_minz = depth_clip_near,
.clip_maxz = depth_clip_far,