diff options
author | Abdiel Janulgue <[email protected]> | 2014-12-01 14:59:08 +0200 |
---|---|---|
committer | Abdiel Janulgue <[email protected]> | 2014-12-08 20:14:26 +0200 |
commit | 49e04312116e4f7bbb9ebcc59247a0bcb89c3064 (patch) | |
tree | e5b2efee1fe07025dfd24ffcf0eaadf3ac3a9bcf /src/mesa/state_tracker/st_context.c | |
parent | 4ea8c8d56ca8d6b4af36e7750186821b4973355a (diff) |
st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupported
There is a bug in the current lowering pass implementation where we lower saturate
to clamp only for vertex shaders on drivers supporting SM 3.0. The correct behavior
is to actually lower to clamp only when we don't support saturate which happens
on drivers that don't support SM 3.0
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Abdiel Janulgue <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 17235132eea..9da0c776d96 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -271,6 +271,8 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe, */ st->ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize, ctx->Const.MaxPointSizeAA); + /* For vertex shaders, make sure not to emit saturate when SM 3.0 is not supported */ + ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = !st->has_shader_model3; _mesa_compute_version(ctx); |