vc4: Enable glSampleMask() even when !rasterizer->multisample.
[mesa.git] / src / gallium / drivers / vc4 / vc4_screen.h
index 03f76b257e3578f7327b0c0b9767f2ae713a3eef..1f91ad37f8861a4f6f0665d682d6ab9934905f9b 100644 (file)
 #include "os/os_thread.h"
 #include "state_tracker/drm_driver.h"
 #include "util/list.h"
+#include "util/slab.h"
+
+#ifndef DRM_VC4_PARAM_SUPPORTS_ETC1
+#define DRM_VC4_PARAM_SUPPORTS_ETC1            4
+#endif
 
 struct vc4_bo;
 
@@ -46,12 +51,15 @@ struct vc4_bo;
 #define VC4_MAX_MIP_LEVELS 12
 #define VC4_MAX_TEXTURE_SAMPLERS 16
 
+struct vc4_simulator_file;
+
 struct vc4_screen {
         struct pipe_screen base;
         int fd;
 
-        void *simulator_mem_base;
-        uint32_t simulator_mem_size;
+        int v3d_ver;
+
+        const char *name;
 
         /** The last seqno we've completed a wait for.
          *
@@ -60,6 +68,8 @@ struct vc4_screen {
          */
         uint64_t finished_seqno;
 
+        struct slab_parent_pool transfer_pool;
+
         struct vc4_bo_cache {
                 /** List of struct vc4_bo freed, by age. */
                 struct list_head time_list;
@@ -73,8 +83,16 @@ struct vc4_screen {
                 uint32_t bo_count;
         } bo_cache;
 
+        struct util_hash_table *bo_handles;
+        pipe_mutex bo_handles_mutex;
+
         uint32_t bo_size;
         uint32_t bo_count;
+        bool has_control_flow;
+        bool has_etc1;
+        bool has_threaded_fs;
+
+        struct vc4_simulator_file *sim_file;
 };
 
 static inline struct vc4_screen *
@@ -92,6 +110,10 @@ struct vc4_bo *
 vc4_screen_bo_from_handle(struct pipe_screen *pscreen,
                           struct winsys_handle *whandle);
 
+const void *
+vc4_screen_get_compiler_options(struct pipe_screen *pscreen,
+                                enum pipe_shader_ir ir, unsigned shader);
+
 extern uint32_t vc4_debug;
 
 void