[Mesa-dev] [PATCH] r600g: fix VS fog export

Vadim Girlin vadimgirlin at gmail.com
Mon Jan 23 01:47:51 PST 2012


Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
---

Tested on evergreen: fixes fogcoord-dp* tests, no regressions

 src/gallium/drivers/r600/r600_shader.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index f430774..e635e74 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1145,6 +1145,11 @@ static int r600_shader_from_tgsi(struct r600_pipe_context * rctx, struct r600_pi
 					output[j].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM;
 				}
 				break;
+			case TGSI_SEMANTIC_FOG:
+				output[j].swizzle_y = 4; /* 0 */
+				output[j].swizzle_z = 4; /* 0 */
+				output[j].swizzle_w = 5; /* 1 */
+				break;
 			}
 			break;
 		case TGSI_PROCESSOR_FRAGMENT:
-- 
1.7.7.5



More information about the mesa-dev mailing list