diff options
author | Jonathan Marek <[email protected]> | 2019-07-01 19:31:46 -0400 |
---|---|---|
committer | Jonathan Marek <[email protected]> | 2019-07-04 14:05:18 -0400 |
commit | f6a0d17abe854999b1ab984b4e94263b16ee0bc0 (patch) | |
tree | f0b6b37835f2faeef0dc0ddd6f4733a6d7567840 /src/gallium/drivers/etnaviv | |
parent | e910acb3f23ee197b563e0af8a79bc7ff5ec6b49 (diff) |
etnaviv: detect v4 compression
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_internal.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_screen.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_screen.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_internal.h b/src/gallium/drivers/etnaviv/etnaviv_internal.h index c00101732e2..27b6c3b28e7 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_internal.h +++ b/src/gallium/drivers/etnaviv/etnaviv_internal.h @@ -76,6 +76,8 @@ struct etna_specs { unsigned has_new_transcendentals : 1; /* has the new dp2/dpX_norm instructions, among others */ unsigned has_halti2_instructions : 1; + /* has V4_COMPRESSION */ + unsigned v4_compression : 1; /* supports single-buffer rendering with multiple pixel pipes */ unsigned single_buffer : 1; /* has unified uniforms memory */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index ec6f3021001..18c581fda20 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -613,6 +613,8 @@ etna_get_specs(struct etna_screen *screen) VIV_FEATURE(screen, chipMinorFeatures3, HAS_FAST_TRANSCENDENTALS); screen->specs.has_halti2_instructions = VIV_FEATURE(screen, chipMinorFeatures4, HALTI2); + screen->specs.v4_compression = + VIV_FEATURE(screen, chipMinorFeatures6, V4_COMPRESSION); if (screen->specs.halti >= 5) { /* GC7000 - this core must load shaders from memory. */ @@ -832,6 +834,12 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu, } screen->features[6] = val; + if (etna_gpu_get_param(screen->gpu, ETNA_GPU_FEATURES_7, &val)) { + DBG("could not get ETNA_GPU_FEATURES_7"); + goto fail; + } + screen->features[7] = val; + if (!etna_get_specs(screen)) goto fail; diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.h b/src/gallium/drivers/etnaviv/etnaviv_screen.h index 9757985526e..4e850d4b7ee 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.h +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.h @@ -50,6 +50,7 @@ enum viv_features_word { viv_chipMinorFeatures3 = 4, viv_chipMinorFeatures4 = 5, viv_chipMinorFeatures5 = 6, + viv_chipMinorFeatures6 = 7, VIV_FEATURES_WORD_COUNT /* Must be last */ }; |