summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-03-14 23:26:30 +0100
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit474468fbf935fcd26704061054ccb4d1629009ed (patch)
treee7d1e7d4acc96e1fce1b4ce097e567c6230fec51 /src/gallium/drivers/radeonsi
parent8ea3da07061d76f5bca089dbd7c39932b94b5f61 (diff)
radeonsi/gfx9: disable features that don't work
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c5
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index d4f3736533a..580781bd4cb 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4590,8 +4590,9 @@ static void tex_fetch_args(
* The sample index should be adjusted as follows:
* sample_index = (fmask >> (sample_index * 4)) & 0xF;
*/
- if (target == TGSI_TEXTURE_2D_MSAA ||
- target == TGSI_TEXTURE_2D_ARRAY_MSAA) {
+ if (ctx->screen->b.chip_class <= VI && /* TODO: fix FMASK on GFX9 */
+ (target == TGSI_TEXTURE_2D_MSAA ||
+ target == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
struct lp_build_context *uint_bld = &bld_base->uint_bld;
struct lp_build_emit_data txf_emit_data = *emit_data;
LLVMValueRef txf_address[4];
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index 7965b461dce..efc9452e9f9 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -834,7 +834,9 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
*
* LLVM 3.8 crashes with this.
*/
- if (HAVE_LLVM >= 0x0309 && array_size > 16) {
+ if ((HAVE_LLVM >= 0x0309 && array_size > 16) ||
+ /* TODO: VGPR indexing is buggy on GFX9. */
+ ctx->screen->b.chip_class == GFX9) {
array_alloca = LLVMBuildAlloca(builder,
LLVMArrayType(bld_base->base.vec_type,
array_size), "array");
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index c4063a8a8d6..d2a1f4bf85c 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2198,7 +2198,8 @@ static void si_initialize_color_surface(struct si_context *sctx,
S_028C74_NUM_FRAGMENTS(log_samples);
if (rtex->fmask.size) {
- color_info |= S_028C70_COMPRESSION(1);
+ /* TODO: fix FMASK on GFX9: */
+ color_info |= S_028C70_COMPRESSION(sctx->b.chip_class <= VI);
unsigned fmask_bankh = util_logbase2(rtex->fmask.bank_height);
if (sctx->b.chip_class == SI) {