glsl: Don't optimize min/max into saturate when EmitNoSat is set
v3: Fix multi-line comment format (Ian) Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
This commit is contained in:
parent
39f7b72428
commit
4ea8c8d56c
|
@ -689,7 +689,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
|||
|
||||
case ir_binop_min:
|
||||
case ir_binop_max:
|
||||
if (ir->type->base_type != GLSL_TYPE_FLOAT)
|
||||
if (ir->type->base_type != GLSL_TYPE_FLOAT || options->EmitNoSat)
|
||||
break;
|
||||
|
||||
/* Replace min(max) operations and its commutative combinations with
|
||||
|
|
|
@ -2990,6 +2990,7 @@ struct gl_shader_compiler_options
|
|||
GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
|
||||
GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
|
||||
GLboolean EmitNoPow; /**< Emit POW opcodes? */
|
||||
GLboolean EmitNoSat; /**< Emit SAT opcodes? */
|
||||
GLboolean LowerClipDistance; /**< Lower gl_ClipDistance from float[8] to vec4[2]? */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue