gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporaries
[mesa.git] / src / gallium / drivers / svga / svga_screen_cache.h
index 9365f751f72c634adda37f676c07333ff02ab19d..c2bfc076ffa053826cb6caa0b5ef7cff81f50ea5 100644 (file)
 
 struct svga_winsys_surface;
 struct svga_screen;
+struct svga_context;
 
 /**
  * Same as svga_winsys_screen::surface_create.
  */
 struct svga_host_surface_cache_key
 {
-   SVGA3dSurfaceFlags flags;
+   SVGA3dSurfaceAllFlags flags;
    SVGA3dSurfaceFormat format;
    SVGA3dSize size;
    uint32_t numFaces:3;
@@ -68,6 +69,7 @@ struct svga_host_surface_cache_key
    uint32_t cachable:1;         /* False if this is a shared surface */
    uint32_t sampleCount:5;
    uint32_t scanout:1;
+   uint32_t coherent:1;
 };
 
 
@@ -105,7 +107,7 @@ struct svga_host_surface_cache_entry
  */
 struct svga_host_surface_cache 
 {
-   pipe_mutex mutex;
+   mtx_t mutex;
    
    /* Unused buffers are put in buckets to speed up lookups */
    struct list_head bucket[SVGA_HOST_SURFACE_CACHE_BUCKETS];
@@ -136,6 +138,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen);
 
 void
 svga_screen_cache_flush(struct svga_screen *svgascreen,
+                        struct svga_context *svga,
                         struct pipe_fence_handle *fence);
 
 enum pipe_error
@@ -145,6 +148,7 @@ svga_screen_cache_init(struct svga_screen *svgascreen);
 struct svga_winsys_surface *
 svga_screen_surface_create(struct svga_screen *svgascreen,
                            unsigned bind_flags, enum pipe_resource_usage usage,
+                           boolean *validated,
                            struct svga_host_surface_cache_key *key);
 
 void
@@ -155,5 +159,8 @@ svga_screen_surface_destroy(struct svga_screen *svgascreen,
 void
 svga_screen_cache_dump(const struct svga_screen *svgascreen);
 
+unsigned
+svga_surface_size(const struct svga_host_surface_cache_key *key);
+
 
 #endif /* SVGA_SCREEN_CACHE_H_ */