gallium: remove the geom_flags param from is_format_supported
[mesa.git] / src / gallium / include / pipe / p_screen.h
index 1bad045b162a672a87ee0dd81e5e53c65df5ed6a..a7845dd24d9fd772d6251bebeae9b04743eed5d1 100644 (file)
@@ -54,7 +54,6 @@ struct winsys_handle;
 /** Opaque type */
 struct pipe_fence_handle;
 struct pipe_winsys;
-struct pipe_texture;
 struct pipe_resource;
 struct pipe_surface;
 struct pipe_transfer;
@@ -79,37 +78,33 @@ struct pipe_screen {
     * Query an integer-valued capability/parameter/limit
     * \param param  one of PIPE_CAP_x
     */
-   int (*get_param)( struct pipe_screen *, int param );
+   int (*get_param)( struct pipe_screen *, enum pipe_cap param );
 
    /**
     * Query a float-valued capability/parameter/limit
     * \param param  one of PIPE_CAP_x
     */
-   float (*get_paramf)( struct pipe_screen *, int param );
+   float (*get_paramf)( struct pipe_screen *, enum pipe_cap param );
+
+   /**
+    * Query a per-shader-stage integer-valued capability/parameter/limit
+    * \param param  one of PIPE_CAP_x
+    */
+   int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param );
 
    struct pipe_context * (*context_create)( struct pipe_screen *,
                                            void *priv );
-   
+
    /**
     * Check if the given pipe_format is supported as a texture or
     * drawing surface.
     * \param bindings  bitmask of PIPE_BIND_*
-    * \param geom_flags  bitmask of PIPE_TEXTURE_GEOM_*
     */
    boolean (*is_format_supported)( struct pipe_screen *,
                                    enum pipe_format format,
                                    enum pipe_texture_target target,
-                                   unsigned bindings,
-                                   unsigned geom_flags );
-
-   /**
-    * Check if the given pipe_format is supported with a requested
-    * number of samples for msaa.
-    * \param sample_count number of samples for multisampling
-    */
-   boolean (*is_msaa_supported)( struct pipe_screen *,
-                                 enum pipe_format format,
-                                 unsigned sample_count );
+                                   unsigned sample_count,
+                                   unsigned bindings );
 
    /**
     * Create a new texture object, using the given template info.
@@ -120,7 +115,7 @@ struct pipe_screen {
    /**
     * Create a texture from a winsys_handle. The handle is often created in
     * another process by first creating a pipe texture and then calling
-    * texture_get_handle.
+    * resource_get_handle.
     */
    struct pipe_resource * (*resource_from_handle)(struct pipe_screen *,
                                                  const struct pipe_resource *templat,
@@ -139,18 +134,6 @@ struct pipe_screen {
    void (*resource_destroy)(struct pipe_screen *,
                            struct pipe_resource *pt);
 
-   /** Get a 2D surface which is a "view" into a texture
-    * \param usage  bitmaks of PIPE_BIND_* flags
-    */
-   struct pipe_surface *(*get_tex_surface)(struct pipe_screen *,
-                                           struct pipe_resource *resource,
-                                           unsigned face, unsigned level,
-                                           unsigned zslice,
-                                           unsigned usage );
-
-   void (*tex_surface_destroy)(struct pipe_surface *);
-   
-
 
    /**
     * Create a buffer that wraps user-space data.
@@ -185,7 +168,8 @@ struct pipe_screen {
     *                                gets out-of-band
     */
    void (*flush_frontbuffer)( struct pipe_screen *screen,
-                              struct pipe_surface *surf,
+                              struct pipe_resource *resource,
+                              unsigned level, unsigned layer,
                               void *winsys_drawable_handle );
 
 
@@ -197,21 +181,17 @@ struct pipe_screen {
 
    /**
     * Checks whether the fence has been signalled.
-    * \param flags  driver-specific meaning
-    * \return zero on success.
     */
-   int (*fence_signalled)( struct pipe_screen *screen,
-                           struct pipe_fence_handle *fence,
-                           unsigned flags );
+   boolean (*fence_signalled)( struct pipe_screen *screen,
+                               struct pipe_fence_handle *fence );
 
    /**
     * Wait for the fence to finish.
-    * \param flags  driver-specific meaning
-    * \return zero on success.
+    * \param timeout  in nanoseconds
     */
-   int (*fence_finish)( struct pipe_screen *screen,
-                        struct pipe_fence_handle *fence,
-                        unsigned flags );
+   boolean (*fence_finish)( struct pipe_screen *screen,
+                            struct pipe_fence_handle *fence,
+                            uint64_t timeout );
 
 };