radeonsi: handle imported textures with DCC robustly
authorMarek Olšák <marek.olsak@amd.com>
Mon, 20 Nov 2017 00:51:50 +0000 (01:51 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 25 Nov 2017 16:16:56 +0000 (17:16 +0100)
now you can hack the driver to enable DCC for displayable textures and
Glamor that doesn't enable that by default won't crash anymore.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index fcf4928e65ea253feb4a243466c3cf0d2e03a666..46c45eae99cc5560c0acecab38a7ccf9379993eb 100644 (file)
@@ -4625,7 +4625,7 @@ static void si_apply_opaque_metadata(struct r600_common_screen *rscreen,
            md->metadata[0] != 0 &&
            md->metadata[1] == si_get_bo_metadata_word1(rscreen) &&
            G_008F28_COMPRESSION_EN(desc[6])) {
-               assert(rtex->dcc_offset == ((uint64_t)desc[7] << 8));
+               rtex->dcc_offset = (uint64_t)desc[7] << 8;
                return;
        }