meson: Add support for the vc4 driver.
[mesa.git] / src / gallium / drivers / vc4 / vc4_screen.h
index 1f91ad37f8861a4f6f0665d682d6ab9934905f9b..85108219ee3babc434c3c3ac3921aa4d8b8b9d32 100644 (file)
@@ -25,6 +25,7 @@
 #define VC4_SCREEN_H
 
 #include "pipe/p_screen.h"
+#include "renderonly/renderonly.h"
 #include "os/os_thread.h"
 #include "state_tracker/drm_driver.h"
 #include "util/list.h"
@@ -47,6 +48,7 @@ struct vc4_bo;
 #define VC4_DEBUG_ALWAYS_SYNC  0x0100
 #define VC4_DEBUG_NIR       0x0200
 #define VC4_DEBUG_DUMP      0x0400
+#define VC4_DEBUG_SURFACE   0x0800
 
 #define VC4_MAX_MIP_LEVELS 12
 #define VC4_MAX_TEXTURE_SAMPLERS 16
@@ -55,6 +57,8 @@ struct vc4_simulator_file;
 
 struct vc4_screen {
         struct pipe_screen base;
+        struct renderonly *ro;
+
         int fd;
 
         int v3d_ver;
@@ -77,20 +81,21 @@ struct vc4_screen {
                 struct list_head *size_list;
                 uint32_t size_list_size;
 
-                pipe_mutex lock;
+                mtx_t lock;
 
                 uint32_t bo_size;
                 uint32_t bo_count;
         } bo_cache;
 
         struct util_hash_table *bo_handles;
-        pipe_mutex bo_handles_mutex;
+        mtx_t bo_handles_mutex;
 
         uint32_t bo_size;
         uint32_t bo_count;
         bool has_control_flow;
         bool has_etc1;
         bool has_threaded_fs;
+        bool has_tiling_ioctl;
 
         struct vc4_simulator_file *sim_file;
 };
@@ -101,18 +106,12 @@ vc4_screen(struct pipe_screen *screen)
         return (struct vc4_screen *)screen;
 }
 
-struct pipe_screen *vc4_screen_create(int fd);
-boolean vc4_screen_bo_get_handle(struct pipe_screen *pscreen,
-                                 struct vc4_bo *bo,
-                                 unsigned stride,
-                                 struct winsys_handle *whandle);
-struct vc4_bo *
-vc4_screen_bo_from_handle(struct pipe_screen *pscreen,
-                          struct winsys_handle *whandle);
+struct pipe_screen *vc4_screen_create(int fd, struct renderonly *ro);
 
 const void *
 vc4_screen_get_compiler_options(struct pipe_screen *pscreen,
-                                enum pipe_shader_ir ir, unsigned shader);
+                                enum pipe_shader_ir ir,
+                                enum pipe_shader_type shader);
 
 extern uint32_t vc4_debug;