aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-03-21 07:16:35 +1000
committerMarge Bot <[email protected]>2020-05-06 06:20:38 +0000
commit8611a6b34b889d6ee9220767d6f19e4057dc2047 (patch)
tree29203c381c6e4b939e28694d15037d08e5284677 /src
parent2d13591ba4d9df28ef2e90f90b8eda4ff6c7fc98 (diff)
llvmpipe: fixup multisample coverage masks for covered tiles
For fully covered tiles just pass in the filled out mask. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_priv.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 4273e152296..551b517fbb2 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -361,6 +361,10 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
depth_sample_stride = scene->zsbuf.sample_stride;
}
+ uint64_t mask = 0;
+ for (unsigned i = 0; i < scene->fb_max_samples; i++)
+ mask |= (uint64_t)(0xffff) << (16 * i);
+
/* Propagate non-interpolated raster state. */
task->thread_data.raster_state.viewport_index = inputs->viewport_index;
@@ -374,7 +378,7 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
GET_DADY(inputs),
color,
depth,
- (uint64_t)0xffff,
+ mask,
&task->thread_data,
stride,
depth_stride,
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index 6055aad8450..de8527ae0c6 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -261,6 +261,10 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task,
depth_stride = scene->zsbuf.stride;
}
+ uint64_t mask = 0;
+ for (unsigned i = 0; i < scene->fb_max_samples; i++)
+ mask |= (uint64_t)0xffff << (16 * i);
+
/*
* The rasterizer may produce fragments outside our
* allocated 4x4 blocks hence need to filter them out here.
@@ -279,7 +283,7 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task,
GET_DADY(inputs),
color,
depth,
- (uint64_t)0xffff,
+ mask,
&task->thread_data,
stride,
depth_stride,