gallium: add TGSI_PROPERTY_VS_BLIT_SGPRS_AMD for tgsi_to_nir
[mesa.git] / src / gallium / include / pipe / p_screen.h
index 101e229088be1e7ee70dcb0731d0a7220744f254..9bd24772299391f01891158101ab8ce73d3d37f6 100644 (file)
@@ -131,6 +131,17 @@ struct pipe_screen {
                            enum pipe_compute_cap param,
                            void *ret);
 
+   /**
+    * Get the sample pixel grid's size. This function requires
+    * PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS to be callable.
+    *
+    * \param sample_count - total number of samples
+    * \param out_width - the width of the pixel grid
+    * \param out_height - the height of the pixel grid
+    */
+   void (*get_sample_pixel_grid)(struct pipe_screen *, unsigned sample_count,
+                                 unsigned *out_width, unsigned *out_height);
+
    /**
     * Query a timestamp in nanoseconds. The returned value should match
     * PIPE_QUERY_TIMESTAMP. This function returns immediately and doesn't
@@ -153,28 +164,29 @@ struct pipe_screen {
     * drawing surface.
     * \param bindings  bitmask of PIPE_BIND_*
     */
-   boolean (*is_format_supported)( struct pipe_screen *,
-                                   enum pipe_format format,
-                                   enum pipe_texture_target target,
-                                   unsigned sample_count,
-                                   unsigned bindings );
+   bool (*is_format_supported)( struct pipe_screen *,
+                                enum pipe_format format,
+                                enum pipe_texture_target target,
+                                unsigned sample_count,
+                                unsigned storage_sample_count,
+                                unsigned bindings );
 
    /**
     * Check if the given pipe_format is supported as output for this codec/profile.
     * \param profile  profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN
     */
-   boolean (*is_video_format_supported)( struct pipe_screen *,
-                                         enum pipe_format format,
-                                         enum pipe_video_profile profile,
-                                         enum pipe_video_entrypoint entrypoint );
+   bool (*is_video_format_supported)( struct pipe_screen *,
+                                      enum pipe_format format,
+                                      enum pipe_video_profile profile,
+                                      enum pipe_video_entrypoint entrypoint );
 
    /**
     * 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);
+   bool (*can_create_resource)(struct pipe_screen *screen,
+                               const struct pipe_resource *templat);
 
    /**
     * Create a new texture object, using the given template info.
@@ -191,7 +203,7 @@ struct pipe_screen {
     * another process by first creating a pipe texture and then calling
     * resource_get_handle.
     *
-    * NOTE: in the case of DRM_API_HANDLE_TYPE_FD handles, the caller
+    * NOTE: in the case of WINSYS_HANDLE_TYPE_FD handles, the caller
     * retains ownership of the FD.  (This is consistent with
     * EGL_EXT_image_dma_buf_import)
     *
@@ -238,17 +250,26 @@ struct pipe_screen {
     * the resource into a format compatible for sharing. The use case is
     * OpenGL-OpenCL interop. The context parameter is allowed to be NULL.
     *
-    * NOTE: in the case of DRM_API_HANDLE_TYPE_FD handles, the caller
+    * NOTE: in the case of WINSYS_HANDLE_TYPE_FD handles, the caller
     * takes ownership of the FD.  (This is consistent with
     * EGL_MESA_image_dma_buf_export)
     *
     * \param usage  A combination of PIPE_HANDLE_USAGE_* flags.
     */
-   boolean (*resource_get_handle)(struct pipe_screen *,
-                                  struct pipe_context *context,
-                                 struct pipe_resource *tex,
-                                 struct winsys_handle *handle,
-                                 unsigned usage);
+   bool (*resource_get_handle)(struct pipe_screen *,
+                               struct pipe_context *context,
+                               struct pipe_resource *tex,
+                               struct winsys_handle *handle,
+                               unsigned usage);
+
+   /**
+    * Get stride and offset for the given pipe resource without the need to get
+    * a winsys_handle.
+    */
+   void (*resource_get_info)(struct pipe_screen *screen,
+                             struct pipe_resource *resource,
+                             unsigned *stride,
+                             unsigned *offset);
 
    /**
     * Mark the resource as changed so derived internal resources will be
@@ -293,10 +314,10 @@ struct pipe_screen {
     *
     * \param timeout  in nanoseconds (may be PIPE_TIMEOUT_INFINITE).
     */
-   boolean (*fence_finish)(struct pipe_screen *screen,
-                           struct pipe_context *ctx,
-                           struct pipe_fence_handle *fence,
-                           uint64_t timeout);
+   bool (*fence_finish)(struct pipe_screen *screen,
+                        struct pipe_context *ctx,
+                        struct pipe_fence_handle *fence,
+                        uint64_t timeout);
 
    /**
     * For fences created with PIPE_FLUSH_FENCE_FD (exported fd) or
@@ -389,7 +410,7 @@ struct pipe_screen {
     * Then the underlying memory object is then exported through interfaces
     * compatible with EXT_external_resources.
     *
-    * Note: For DRM_API_HANDLE_TYPE_FD handles, the caller retains ownership
+    * Note: For WINSYS_HANDLE_TYPE_FD handles, the caller retains ownership
     * of the fd.
     *
     * \param handle  A handle representing the memory object to import
@@ -430,6 +451,19 @@ struct pipe_screen {
     * \param uuid    pointer to a memory region of PIPE_UUID_SIZE bytes
     */
    void (*get_device_uuid)(struct pipe_screen *screen, char *uuid);
+
+   /**
+    * Set the maximum number of parallel shader compiler threads.
+    */
+   void (*set_max_shader_compiler_threads)(struct pipe_screen *screen,
+                                           unsigned max_threads);
+
+   /**
+    * Return whether parallel shader compilation has finished.
+    */
+   bool (*is_parallel_shader_compilation_finished)(struct pipe_screen *screen,
+                                                   void *shader,
+                                                   unsigned shader_type);
 };