aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-12-18 17:16:39 +0100
committerEmil Velikov <[email protected]>2015-12-21 09:13:47 +0000
commit94ac4b3e84737b8c5faa371834670fd25502e024 (patch)
tree5e0c703ad5fd1f708a8bbc7e6c596aef893223e7
parentd126fffe9d22223cb2c4e0eef329b028870d48af (diff)
r600g: write all MRTs only if there is exactly one output (fixes a hang)
This fixes a hang in piglit/arb_blend_func_extended-fbo-extended-blend-pattern_gles2 on REDWOOD. Cc: 11.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (cherry-picked from commit b5b87c4ed1dfd58aec8905e0514c9ba92ba83e1d) Conflicts: src/gallium/drivers/r600/r600_shader.c
-rw-r--r--src/gallium/drivers/r600/r600_shader.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index b345f141d39..911e81fedc0 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2109,7 +2109,9 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
ctx.nliterals = 0;
ctx.literals = NULL;
- shader->fs_write_all = FALSE;
+
+ shader->fs_write_all = ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] &&
+ ctx.info.colors_written == 1;
if (shader->vs_as_gs_a)
vs_add_primid_output(&ctx, key.vs.prim_id_out);
@@ -2140,10 +2142,6 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
case TGSI_TOKEN_TYPE_PROPERTY:
property = &ctx.parse.FullToken.FullProperty;
switch (property->Property.PropertyName) {
- case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
- if (property->u[0].Data == 1)
- shader->fs_write_all = TRUE;
- break;
case TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION:
if (property->u[0].Data == 1)
shader->vs_position_window_space = TRUE;