diff options
author | Michel Dänzer <[email protected]> | 2012-12-21 15:39:26 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-01-17 16:57:21 +0100 |
commit | 1ace200b2b916d4e9696ae7f711578dcdd5d28e0 (patch) | |
tree | 4e0e8c630e75eb4ad5cb493732266f5748744fd6 /src/gallium/drivers/radeonsi/radeonsi_shader.c | |
parent | bc5e65096d2e9ae14b048811315814831427608a (diff) |
radeonsi: Set SPI_SHADER_COL_FORMAT to what the pixel shader actually exports.
Instead of deriving it from the colour buffer formats only.
Fixes a number of piglit tests which export depth from the pixel shader.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_shader.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 484333097b9..52ecef9b547 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -478,6 +478,13 @@ static void si_llvm_init_export_args(struct lp_build_tgsi_context *bld_base, if (cbuf >= 0 && cbuf < 8) { struct r600_context *rctx = si_shader_ctx->rctx; compressed = (si_shader_ctx->key.export_16bpc >> cbuf) & 0x1; + + if (compressed) + si_shader_ctx->shader->spi_shader_col_format |= + V_028714_SPI_SHADER_FP16_ABGR << (4 * cbuf); + else + si_shader_ctx->shader->spi_shader_col_format |= + V_028714_SPI_SHADER_32_ABGR << (4 * cbuf); } } @@ -759,6 +766,9 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base) last_args[6]= uint->zero; last_args[7]= uint->zero; last_args[8]= uint->zero; + + si_shader_ctx->shader->spi_shader_col_format |= + V_028714_SPI_SHADER_32_ABGR; } /* Specify whether the EXEC mask represents the valid mask */ |