etnaviv: detect v4 compression
[mesa.git] / src / gallium / drivers / etnaviv / etnaviv_screen.h
index dc57a38dbb80bc8220ba24915ccf06c7cd4f08c5..4e850d4b7ee7d339c412edaa0511f4672fc91443 100644 (file)
 #define H_ETNAVIV_SCREEN
 
 #include "etnaviv_internal.h"
+#include "etnaviv_query_pm.h"
 
 #include "os/os_thread.h"
 #include "pipe/p_screen.h"
 #include "renderonly/renderonly.h"
+#include "util/set.h"
 #include "util/slab.h"
+#include "util/u_dynarray.h"
+#include "util/u_helpers.h"
 
 struct etna_bo;
 
@@ -46,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 */
 };
 
@@ -65,8 +70,10 @@ struct etna_screen {
    struct etna_device *dev;
    struct etna_gpu *gpu;
    struct etna_pipe *pipe;
+   struct etna_perfmon *perfmon;
    struct renderonly *ro;
 
+   struct util_dynarray supported_pm_queries;
    struct slab_parent_pool transfer_pool;
 
    uint32_t model;
@@ -76,6 +83,10 @@ struct etna_screen {
    struct etna_specs specs;
 
    uint32_t drm_version;
+
+   /* set of resources used by currently-unsubmitted renders */
+   mtx_t lock;
+   struct set *used_resources;
 };
 
 static inline struct etna_screen *