Mesa (master): r600g: fix stencil export for evergreen harder
Dave Airlie
airlied at kemper.freedesktop.org
Wed Oct 13 08:55:45 UTC 2010
Module: Mesa
Branch: master
Commit: ff4b397517a374ac3d4bf437f85ae6a96171a714
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff4b397517a374ac3d4bf437f85ae6a96171a714
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 13 18:50:37 2010 +1000
r600g: fix stencil export for evergreen harder
---
src/gallium/drivers/r600/evergreen_state.c | 2 +-
src/gallium/drivers/r600/evergreend.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 379d66f..542df11 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1568,7 +1568,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
exports_ps = 0;
num_cout = 0;
for (i = 0; i < rshader->noutput; i++) {
- if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
+ if (rshader->output[i].name == TGSI_SEMANTIC_POSITION || rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
exports_ps |= 1;
else if (rshader->output[i].name == TGSI_SEMANTIC_COLOR) {
num_cout++;
diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h
index 94661fd..5d07f53 100644
--- a/src/gallium/drivers/r600/evergreend.h
+++ b/src/gallium/drivers/r600/evergreend.h
@@ -686,8 +686,8 @@
#define S_02880C_Z_EXPORT_ENABLE(x) (((x) & 0x1) << 0)
#define G_02880C_Z_EXPORT_ENABLE(x) (((x) >> 0) & 0x1)
#define C_02880C_Z_EXPORT_ENABLE 0xFFFFFFFE
-#define S_02880C_STENCIL_EXPORT_ENABLE(x) (((x) & 0x2) << 0)
-#define G_02880C_STENCIL_EXPORT_ENABLE(x) (((x) >> 0) & 0x2)
+#define S_02880C_STENCIL_EXPORT_ENABLE(x) (((x) & 0x1) << 1)
+#define G_02880C_STENCIL_EXPORT_ENABLE(x) (((x) >> 1) & 0x1)
#define C_02880C_STENCIL_EXPORT_ENABLE 0xFFFFFFFD
#define S_02880C_Z_ORDER(x) (((x) & 0x3) << 4)
#define G_02880C_Z_ORDER(x) (((x) >> 4) & 0x3)
More information about the mesa-commit
mailing list