svga: Add a limit to the maximum surface size
[mesa.git] / src / gallium / drivers / svga / svga_winsys.h
index 879321f745cf25989f194ade17bd4eab43b48c86..19d074fd66d988e581d61d48efa8929443642338 100644 (file)
@@ -334,6 +334,18 @@ struct svga_winsys_screen
                        struct svga_winsys_surface **pdst,
                        struct svga_winsys_surface *src);
 
+   /**
+    * Check if a resource (texture, buffer) of the given size
+    * and format can be created.
+    * \Return TRUE if OK, FALSE if too large.
+    */
+   boolean
+   (*surface_can_create)(struct svga_winsys_screen *sws,
+                         SVGA3dSurfaceFormat format,
+                         SVGA3dSize size,
+                         uint32 numFaces,
+                         uint32 numMipLevels);
+
    /**
     * Buffer management. Buffer attributes are mostly fixed over its lifetime.
     *