summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_encode.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-07-16 12:37:31 +0200
committerDave Airlie <[email protected]>2018-07-17 13:59:47 +1000
commitb5db3aa6e8173600037b68e7ec4351bd2c1aade4 (patch)
treec8ce360074097b1bbb9dc5b5dda2f21979bd22f3 /src/gallium/drivers/virgl/virgl_encode.c
parentba1b41b504b9e3867cf4589a55fb69ab4441f041 (diff)
virgl: implement set_min_samples
This allows us to implement glMinSampleShading correctly, which up until now just got ignored. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_encode.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_encode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index 6b800d3d077..c7c6b1e7d34 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -726,6 +726,13 @@ void virgl_encoder_set_sample_mask(struct virgl_context *ctx,
virgl_encoder_write_dword(ctx->cbuf, sample_mask);
}
+void virgl_encoder_set_min_samples(struct virgl_context *ctx,
+ unsigned min_samples)
+{
+ virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_MIN_SAMPLES, 0, VIRGL_SET_MIN_SAMPLES_SIZE));
+ virgl_encoder_write_dword(ctx->cbuf, min_samples);
+}
+
void virgl_encoder_set_clip_state(struct virgl_context *ctx,
const struct pipe_clip_state *clip)
{