summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-10-04 20:44:23 +0200
committerMarek Olšák <[email protected]>2014-10-12 23:52:07 +0200
commit34e82005998138504147fd265f87825e4aace31f (patch)
tree2fc88ab8c1577afbc787b482dcddbb2c364ff50f /src/gallium/drivers/radeonsi/si_shader.c
parent5e0fbe1b631d883eb0e033938a534a259c8d95fd (diff)
radeonsi: don't recompile shaders when changing nr_cbufs from 0 to 1
Both cases are equivalent. Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index c9e67922c3b..5a47055fc72 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1479,8 +1479,8 @@ static void si_llvm_emit_fs_epilogue(struct lp_build_tgsi_context * bld_base)
/* Handle FS_COLOR0_WRITES_ALL_CBUFS. */
if (shader->selector->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] &&
shader->output[i].sid == 0 &&
- si_shader_ctx->shader->key.ps.nr_cbufs > 1) {
- for (int c = 1; c < si_shader_ctx->shader->key.ps.nr_cbufs; c++) {
+ si_shader_ctx->shader->key.ps.last_cbuf > 0) {
+ for (int c = 1; c <= si_shader_ctx->shader->key.ps.last_cbuf; c++) {
si_llvm_init_export_args_load(bld_base,
si_shader_ctx->radeon_bld.soa.outputs[index],
V_008DFC_SQ_EXP_MRT + c, args);