diff options
author | Kenneth Graunke <[email protected]> | 2014-12-01 01:01:02 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-12-02 17:00:26 -0800 |
commit | afd605f3461462ba1b9f522b079ff5a03e7ab55c (patch) | |
tree | ac5782d37e551f50c51d956d17b1584ffc9c1e4f /src/mesa/drivers/dri/i965/brw_vs.c | |
parent | 169b6c1955deee7333d61f9ff149b7124bdea7d1 (diff) |
i965: Make vertex color clamp handling code VS specific.
Vertex color clamping only applies to gl_[Secondary]{Front,Back}Color,
which are compatibility-only built-in varyings. We only support GS in
core profile, so they can't exist in geometry shaders.
We can drop several dirty bits from the GS program key - they're
unnecessary for a core profile implementation.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 798d975b1e7..e5de3c20d2f 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -380,7 +380,7 @@ brw_vs_debug_recompile(struct brw_context *brw, found |= key_debug(brw, "PointCoord replace", old_key->point_coord_replace, key->point_coord_replace); found |= key_debug(brw, "vertex color clamping", - old_key->base.clamp_vertex_color, key->base.clamp_vertex_color); + old_key->clamp_vertex_color, key->clamp_vertex_color); found |= brw_debug_recompile_sampler_key(brw, &old_key->base.tex, &key->base.tex); @@ -432,7 +432,7 @@ static void brw_upload_vs_prog(struct brw_context *brw) } /* _NEW_LIGHT | _NEW_BUFFERS */ - key.base.clamp_vertex_color = ctx->Light._ClampVertexColor; + key.clamp_vertex_color = ctx->Light._ClampVertexColor; /* _NEW_POINT */ if (brw->gen < 6 && ctx->Point.PointSprite) { @@ -541,6 +541,7 @@ brw_vs_precompile(struct gl_context *ctx, memset(&key, 0, sizeof(key)); brw_vec4_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base); + key.clamp_vertex_color = ctx->API == API_OPENGL_COMPAT; success = do_vs_prog(brw, shader_prog, bvp, &key); |