aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-03-21 07:07:53 +1000
committerMarge Bot <[email protected]>2020-05-06 06:20:38 +0000
commit78b7f2283879d1f952cd13534f4c666447b5b3ea (patch)
treeb059affd6306c8936b628f76e584136f80e217f1 /src/gallium
parentc638a59fa890887ba4ef791c0186ec64a623110a (diff)
llvmpipe: add new rast api to pass full 64-bit mask.
The 64-bit mask is a 16-bit mask per sample for up to 4 samples. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c22
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_priv.h6
2 files changed, 21 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index c4c5053be78..4273e152296 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -413,10 +413,10 @@ lp_rast_shade_tile_opaque(struct lp_rasterizer_task *task,
* \param y Y position of quad in window coords
*/
void
-lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
- const struct lp_rast_shader_inputs *inputs,
- unsigned x, unsigned y,
- unsigned mask)
+lp_rast_shade_quads_mask_sample(struct lp_rasterizer_task *task,
+ const struct lp_rast_shader_inputs *inputs,
+ unsigned x, unsigned y,
+ uint64_t mask)
{
const struct lp_rast_state *state = task->state;
struct lp_fragment_shader_variant *variant = state->variant;
@@ -482,7 +482,7 @@ lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
GET_DADY(inputs),
color,
depth,
- (uint64_t)mask,
+ mask,
&task->thread_data,
stride,
depth_stride,
@@ -492,7 +492,17 @@ lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
}
}
-
+void
+lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
+ const struct lp_rast_shader_inputs *inputs,
+ unsigned x, unsigned y,
+ unsigned mask)
+{
+ uint64_t new_mask = 0;
+ for (unsigned i = 0; i < task->scene->fb_max_samples; i++)
+ new_mask |= ((uint64_t)mask) << (16 * i);
+ lp_rast_shade_quads_mask_sample(task, inputs, x, y, new_mask);
+}
/**
* Begin a new occlusion query.
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index 6c962ffdc52..6055aad8450 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -131,7 +131,11 @@ struct lp_rasterizer
util_barrier barrier;
};
-
+void
+lp_rast_shade_quads_mask_sample(struct lp_rasterizer_task *task,
+ const struct lp_rast_shader_inputs *inputs,
+ unsigned x, unsigned y,
+ uint64_t mask);
void
lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
const struct lp_rast_shader_inputs *inputs,