summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-04-25 09:07:04 -0400
committerRob Clark <[email protected]>2016-04-30 14:56:19 -0400
commite04db879f8933915501bfb9cce0d1359d62766bd (patch)
tree765b56d0a273fefaa0a922e037842e1c445a15fd /src/gallium/drivers/freedreno/a3xx
parent64abf6d404be9030d1232e1533a64edb09ad8b13 (diff)
freedreno/ir3: handle color clamp variant ourselves
Now that there is a pass to do this in NIR, lets just use that and manage the variants ourself, rather than letting state-tracker do it. This way, mesa/st will precompile shaders without requiring ST_DEBUG=precompile (which requires a debug build). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
index f48d464c294..ae36d137828 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
@@ -118,6 +118,12 @@ fixup_shader_state(struct fd_context *ctx, struct ir3_shader_key *key)
ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
}
+ if (last_key->vclamp_color != key->vclamp_color)
+ ctx->prog.dirty |= FD_SHADER_DIRTY_VP;
+
+ if (last_key->fclamp_color != key->fclamp_color)
+ ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+
if (last_key->color_two_side != key->color_two_side)
ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
@@ -140,6 +146,8 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info)
/* do binning pass first: */
.binning_pass = true,
.color_two_side = ctx->rasterizer->light_twoside,
+ .vclamp_color = ctx->rasterizer->clamp_vertex_color,
+ .fclamp_color = ctx->rasterizer->clamp_fragment_color,
// TODO set .half_precision based on render target format,
// ie. float16 and smaller use half, float32 use full..
.half_precision = !!(fd_mesa_debug & FD_DBG_FRAGHALF),