diff options
author | marha <marha@users.sourceforge.net> | 2013-11-22 08:50:11 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-22 08:50:11 +0100 |
commit | 697f071e3dcd3b01dba050d6c5316f2a23ee82f8 (patch) | |
tree | 78ab3ffa70b85d25940220d8768c304889c24a85 /mesalib/src/mesa/state_tracker | |
parent | bb953a87489963f63e65c797a1f2837382ff7808 (diff) | |
download | vcxsrv-697f071e3dcd3b01dba050d6c5316f2a23ee82f8.tar.gz vcxsrv-697f071e3dcd3b01dba050d6c5316f2a23ee82f8.tar.bz2 vcxsrv-697f071e3dcd3b01dba050d6c5316f2a23ee82f8.zip |
libxtrans mesa git update 22 nov 2013
libxtrans commit 8b2c8aabe27bcaa4de6432b53c4a1296010ea823
mesa commit bb354c6c279031dafc08029a62cd3e76a6c1ca71
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 7 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 6319079d5..74b3e5b58 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4889,6 +4889,13 @@ st_translate_program( t->outputs[i] = ureg_DECL_output(ureg, outputSemanticName[i], outputSemanticIndex[i]); + if (outputSemanticName[i] == TGSI_SEMANTIC_FOG) { + /* force register to contain a fog coordinate in the form (F, 0, 0, 1). */ + ureg_MOV(ureg, + ureg_writemask(t->outputs[i], TGSI_WRITEMASK_XYZW & ~TGSI_WRITEMASK_X), + ureg_imm4f(ureg, 0.0f, 0.0f, 0.0f, 1.0f)); + t->outputs[i] = ureg_writemask(t->outputs[i], TGSI_WRITEMASK_X); + } } if (passthrough_edgeflags) emit_edgeflags(t); diff --git a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c index 921b0f9b8..7d79c6235 100644 --- a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1121,6 +1121,13 @@ st_translate_mesa_program( t->outputs[i] = ureg_DECL_output( ureg, outputSemanticName[i], outputSemanticIndex[i] ); + if (outputSemanticName[i] == TGSI_SEMANTIC_FOG) { + /* force register to contain a fog coordinate in the form (F, 0, 0, 1). */ + ureg_MOV(ureg, + ureg_writemask(t->outputs[i], TGSI_WRITEMASK_XYZW & ~TGSI_WRITEMASK_X), + ureg_imm4f(ureg, 0.0f, 0.0f, 0.0f, 1.0f)); + t->outputs[i] = ureg_writemask(t->outputs[i], TGSI_WRITEMASK_X); + } } if (passthrough_edgeflags) emit_edgeflags( t, program ); |