Mesa (master): freedreno: wire up core sample-shading support

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 25 22:12:34 UTC 2019


Module: Mesa
Branch: master
Commit: 85949c52b493435efe22d40a12172c39b63f8d28
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=85949c52b493435efe22d40a12172c39b63f8d28

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Apr 25 12:22:30 2019 -0700

freedreno: wire up core sample-shading support

Signed-off-by: Rob Clark <robdclark at chromium.org>

---

 src/gallium/drivers/freedreno/freedreno_context.h | 2 ++
 src/gallium/drivers/freedreno/freedreno_state.c   | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index d389a42e62d..4d22f8c470e 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -126,6 +126,7 @@ enum fd_dirty_3d_state {
 	FD_DIRTY_VIEWPORT    = BIT(8),
 	FD_DIRTY_VTXSTATE    = BIT(9),
 	FD_DIRTY_VTXBUF      = BIT(10),
+	FD_DIRTY_MIN_SAMPLES = BIT(11),
 
 	FD_DIRTY_SCISSOR     = BIT(12),
 	FD_DIRTY_STREAMOUT   = BIT(13),
@@ -285,6 +286,7 @@ struct fd_context {
 	struct pipe_blend_color blend_color;
 	struct pipe_stencil_ref stencil_ref;
 	unsigned sample_mask;
+	unsigned min_samples;
 	/* local context fb state, for when ctx->batch is null: */
 	struct pipe_framebuffer_state framebuffer;
 	struct pipe_poly_stipple stipple;
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c
index e1970f432c1..8bf51bee615 100644
--- a/src/gallium/drivers/freedreno/freedreno_state.c
+++ b/src/gallium/drivers/freedreno/freedreno_state.c
@@ -78,6 +78,14 @@ fd_set_sample_mask(struct pipe_context *pctx, unsigned sample_mask)
 	ctx->dirty |= FD_DIRTY_SAMPLE_MASK;
 }
 
+static void
+fd_set_min_samples(struct pipe_context *pctx, unsigned min_samples)
+{
+	struct fd_context *ctx = fd_context(pctx);
+	ctx->min_samples = min_samples;
+	ctx->dirty |= FD_DIRTY_MIN_SAMPLES;
+}
+
 /* notes from calim on #dri-devel:
  * index==0 will be non-UBO (ie. glUniformXYZ()) all packed together padded
  * out to vec4's
@@ -582,6 +590,7 @@ fd_state_init(struct pipe_context *pctx)
 	pctx->set_stencil_ref = fd_set_stencil_ref;
 	pctx->set_clip_state = fd_set_clip_state;
 	pctx->set_sample_mask = fd_set_sample_mask;
+	pctx->set_min_samples = fd_set_min_samples;
 	pctx->set_constant_buffer = fd_set_constant_buffer;
 	pctx->set_shader_buffers = fd_set_shader_buffers;
 	pctx->set_shader_images = fd_set_shader_images;




More information about the mesa-commit mailing list