diff options
author | Eric Anholt <[email protected]> | 2013-04-15 16:44:55 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-04-25 12:03:00 -0700 |
commit | 578987ce1c17d17cfa538eb70d07a751fda55eb1 (patch) | |
tree | 3ebb054b7d72e6af58160b6d358b571e17e605d9 /src | |
parent | b5145ca2a810b0a65311a18bffd05db35b2a21d6 (diff) |
i965: Avoid recompiles for fragment clamping on non-clamping APIs.
Removes 75/78 state-dependent recompiles in GLB2.7 (the remaining 3 are
due to FBO-rendering size predictions). We currently expose
GL_ARB_color_buffer_float on GL core, so we may mis-predict there, but I'm
about to send a patch for removing that silly extension in that case.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 5f659b13932..66e78d06354 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3153,7 +3153,7 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog) } } - key.clamp_fragment_color = true; + key.clamp_fragment_color = ctx->API == API_OPENGL_COMPAT; for (int i = 0; i < MAX_SAMPLERS; i++) { if (fp->Base.ShadowSamplers & (1 << i)) { diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 998edb079cb..6eb916ea4c6 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -564,7 +564,7 @@ brw_vs_precompile(struct gl_context *ctx, struct gl_shader_program *prog) memset(&key, 0, sizeof(key)); key.base.program_string_id = bvp->id; - key.base.clamp_vertex_color = true; + key.base.clamp_vertex_color = ctx->API == API_OPENGL_COMPAT; for (int i = 0; i < MAX_SAMPLERS; i++) { if (vp->Base.ShadowSamplers & (1 << i)) { |