summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state.c
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2012-06-26 22:47:27 +0400
committerVadim Girlin <[email protected]>2012-06-27 02:06:55 +0400
commit0c47d9dcab80923c61b3f5375128e9b511b842fb (patch)
treea604add9f750a3a089f9924d2a9e466102887c3b /src/gallium/drivers/r600/r600_state.c
parent4acf71f01ea1edb253cd38cc059d4af1a2a40bf4 (diff)
r600g: avoid unnecessary shader exports v2
In some cases TGSI shader has more color outputs than the number of CBs, so it seems we need to limit the number of color exports. This requires different shader variants depending on the nr_cbufs, but on the other hand we are doing less exports, which are very costly. v2: fix various piglit regressions Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r--src/gallium/drivers/r600/r600_state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 295453a5aef..d621aee9201 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1644,6 +1644,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
/* build states */
rctx->have_depth_fb = 0;
+ rctx->nr_cbufs = state->nr_cbufs;
+
for (int i = 0; i < state->nr_cbufs; i++) {
r600_cb(rctx, rstate, state, i);
}