Used to implement proxy textures. If a gallium driver doesn't implement
this function we'll just continue to use the core Mesa fallback code.
Without this hook we really have no good way to implement OpenGL proxy
textures with gallium drivers.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Returns TRUE if all usages can be satisfied.
+
+can_create_resource
+^^^^^^^^^^^^^^^^^^^
+
+Check if a resource can actually be created (but don't actually allocate any
+memory). This is used to implement OpenGL's proxy textures. Typically, a
+driver will simply check if the total size of the given resource is less than
+some limit.
+
+
.. _resource_create:
resource_create
enum pipe_format format,
enum pipe_video_profile profile );
+ /**
+ * Check if we can actually create the given resource (test the dimension,
+ * overall size, etc). Used to implement proxy textures.
+ * \return TRUE if size is OK, FALSE if too large.
+ */
+ boolean (*can_create_resource)(struct pipe_screen *screen,
+ const struct pipe_resource *templat);
+
/**
* Create a new texture object, using the given template info.
*/