[Mesa-dev] [PATCH 3/4] st/mesa: emit saturates in the vertex shader if GLSL >= 1.30 is supported
Marek Olšák
maraeo at gmail.com
Thu Jan 31 15:21:55 PST 2013
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 994a551..6d556a2 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1286,10 +1286,10 @@ glsl_to_tgsi_visitor::try_emit_mad_for_and_not(ir_expression *ir, int try_operan
bool
glsl_to_tgsi_visitor::try_emit_sat(ir_expression *ir)
{
- /* Saturates were only introduced to vertex programs in
- * NV_vertex_program3, so don't give them to drivers in the VP.
+ /* Emit saturates in the vertex shader only if GLSL 1.30 is supported.
*/
- if (this->prog->Target == GL_VERTEX_PROGRAM_ARB)
+ if (this->prog->Target == GL_VERTEX_PROGRAM_ARB &&
+ this->ctx->Const.GLSLVersion < 130)
return false;
ir_rvalue *sat_src = ir->as_rvalue_to_saturate();
--
1.7.10.4
More information about the mesa-dev
mailing list