r600g: fix exports_ps to export a number not a mask.
authorHenri Verbeet <hverbeet@gmail.com>
Sun, 19 Sep 2010 23:29:43 +0000 (09:29 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 19 Sep 2010 23:30:21 +0000 (09:30 +1000)
src/gallium/drivers/r600/eg_hw_states.c
src/gallium/drivers/r600/r600_hw_states.c

index ad8aa4ca9a6ac32c882f053f3dcb5e7560ebf121..65a5c6434b3f05d2f1a2423bb7dab54497411dee 100644 (file)
@@ -961,10 +961,10 @@ static int eg_ps_shader(struct r600_context *rctx, struct r600_context_state *rp
                if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
                        exports_ps |= 1;
                else if (rshader->output[i].name == TGSI_SEMANTIC_COLOR) {
-                       exports_ps |= (1 << (num_cout+1));
                        num_cout++;
                }
        }
+       exports_ps |= (1 << num_cout);
        if (!exports_ps) {
                /* always at least export 1 component per pixel */
                exports_ps = 2;
index 25344c6f82a5306c9ed5b4966bd077206fa55423..5e43085c620645772f5599663e5f1ed2493772fd 100644 (file)
@@ -974,10 +974,10 @@ static int r600_ps_shader(struct r600_context *rctx, struct r600_context_state *
                if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
                        exports_ps |= 1;
                else if (rshader->output[i].name == TGSI_SEMANTIC_COLOR) {
-                       exports_ps |= (1 << (num_cout+1));
                        num_cout++;
                }
        }
+       exports_ps |= (num_cout << 1);
        if (!exports_ps) {
                /* always at least export 1 component per pixel */
                exports_ps = 2;