diff options
author | Rob Clark <[email protected]> | 2016-04-25 09:07:04 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-04-30 14:56:19 -0400 |
commit | e04db879f8933915501bfb9cce0d1359d62766bd (patch) | |
tree | 765b56d0a273fefaa0a922e037842e1c445a15fd /src/gallium/drivers/freedreno/a4xx/fd4_draw.c | |
parent | 64abf6d404be9030d1232e1533a64edb09ad8b13 (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/a4xx/fd4_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c index 68e1f53e2dd..5b0b972022a 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c @@ -104,6 +104,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; @@ -129,6 +135,8 @@ fd4_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, .rasterflat = ctx->rasterizer->flatshade, // TODO set .half_precision based on render target format, // ie. float16 and smaller use half, float32 use full.. |