r600g: fix stencil export for evergreen harder
authorDave Airlie <airlied@redhat.com>
Wed, 13 Oct 2010 08:50:37 +0000 (18:50 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Oct 2010 08:50:37 +0000 (18:50 +1000)
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/evergreend.h

index 379d66f48c6dff906d23a387690e3a1619653418..542df11db66bef7e2f2a72713bef809fa36b6388 100644 (file)
@@ -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++;
index 94661fdd1f671f39f66f605abbd847de05d6c93a..5d07f532f09b3838f4bac9f47d943d706d944fe5 100644 (file)
 #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)