diff options
author | Brian Paul <[email protected]> | 2013-11-21 15:07:25 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-11-22 09:01:13 -0700 |
commit | aad2511c6d082aecfe8da0c3e61e2e678c84f7dd (patch) | |
tree | 01e414e70a0e3db2514495bd36bf2b851ccc204d /src | |
parent | 73b19be32d237af01b5c7184d172efcbc814cc68 (diff) |
st/mesa: simplify writemask for emitting fog result
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 74b3e5b58d9..ac95968d6f5 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4892,7 +4892,7 @@ st_translate_program( 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_writemask(t->outputs[i], TGSI_WRITEMASK_YZW), ureg_imm4f(ureg, 0.0f, 0.0f, 0.0f, 1.0f)); t->outputs[i] = ureg_writemask(t->outputs[i], TGSI_WRITEMASK_X); } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 7d79c623540..1c2abc1224f 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1124,7 +1124,7 @@ st_translate_mesa_program( 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_writemask(t->outputs[i], TGSI_WRITEMASK_YZW), ureg_imm4f(ureg, 0.0f, 0.0f, 0.0f, 1.0f)); t->outputs[i] = ureg_writemask(t->outputs[i], TGSI_WRITEMASK_X); } |