[Mesa-dev] [PATCH 5/6] st_api: remove unused get_resource_for_egl_image

Eric Engestrom eric.engestrom at imgtec.com
Mon Oct 9 15:13:31 UTC 2017


On Friday, 2017-10-06 20:16:07 +0000, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> ---
>  src/gallium/include/state_tracker/st_api.h | 37 ------------------------------
>  1 file changed, 37 deletions(-)
> 
> diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
> index 4d27dad5c55..2232c3efa18 100644
> --- a/src/gallium/include/state_tracker/st_api.h
> +++ b/src/gallium/include/state_tracker/st_api.h
> @@ -134,36 +134,20 @@ enum st_attachment_type {
>  /* for buffer_mask in st_visual */
>  #define ST_ATTACHMENT_FRONT_LEFT_MASK     (1 << ST_ATTACHMENT_FRONT_LEFT)
>  #define ST_ATTACHMENT_BACK_LEFT_MASK      (1 << ST_ATTACHMENT_BACK_LEFT)
>  #define ST_ATTACHMENT_FRONT_RIGHT_MASK    (1 << ST_ATTACHMENT_FRONT_RIGHT)
>  #define ST_ATTACHMENT_BACK_RIGHT_MASK     (1 << ST_ATTACHMENT_BACK_RIGHT)
>  #define ST_ATTACHMENT_DEPTH_STENCIL_MASK  (1 << ST_ATTACHMENT_DEPTH_STENCIL)
>  #define ST_ATTACHMENT_ACCUM_MASK          (1 << ST_ATTACHMENT_ACCUM)
>  #define ST_ATTACHMENT_SAMPLE_MASK         (1 << ST_ATTACHMENT_SAMPLE)
>  
>  /**
> - * Enumerations of state tracker context resources.
> - */
> -enum st_context_resource_type {
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_2D,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_3D,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_X,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_X,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Y,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Z,
> -   ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
> -   ST_CONTEXT_RESOURCE_OPENGL_RENDERBUFFER,
> -   ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE
> -};
> -
> -/**
>   * Flush flags.
>   */
>  #define ST_FLUSH_FRONT                    (1 << 0)
>  #define ST_FLUSH_END_OF_FRAME             (1 << 1)
>  #define ST_FLUSH_WAIT                     (1 << 2)
>  
>  /**
>   * Value to st_manager->get_param function.
>   */
>  enum st_manager_param {
> @@ -176,33 +160,20 @@ enum st_manager_param {
>      */
>     ST_MANAGER_BROKEN_INVALIDATE
>  };
>  
>  struct pipe_context;
>  struct pipe_resource;
>  struct pipe_fence_handle;
>  struct util_queue_monitoring;
>  
>  /**
> - * Used in st_context_iface->get_resource_for_egl_image.
> - */
> -struct st_context_resource
> -{
> -   /* these fields are filled in by the caller */
> -   enum st_context_resource_type type;
> -   void *resource;
> -
> -   /* this is owned by the caller */
> -   struct pipe_resource *texture;
> -};
> -
> -/**
>   * Used in st_manager_iface->get_egl_image.
>   */
>  struct st_egl_image
>  {
>     /* this is owned by the caller */
>     struct pipe_resource *texture;
>  
>     /* format only differs from texture->format for multi-planar (YUV): */
>     enum pipe_format format;
>  
> @@ -425,28 +396,20 @@ struct st_context_iface
>     void (*copy)(struct st_context_iface *stctxi,
>                  struct st_context_iface *stsrci, unsigned mask);
>  
>     /**
>      * Used to implement wglShareLists.
>      */
>     boolean (*share)(struct st_context_iface *stctxi,
>                      struct st_context_iface *stsrci);
>  
>     /**
> -    * Look up and return the info of a resource for EGLImage.
> -    *
> -    * This function is optional.
> -    */
> -   boolean (*get_resource_for_egl_image)(struct st_context_iface *stctxi,
> -                                         struct st_context_resource *stres);

This will break the build, as it is still used until the next patch;
this patch should be reordered to go last.

With that fixed, patches 1-4 and this one are:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

Don't have enough brain power right now to properly review the last
patch of this series though, but one note: when you mention that you
"Tested with dEQP-EGL tests.", please mention which ones ;)
I'm assuming you meant `dEQP-EGL.functional.image.*renderbuffer*`?

Cheers,
  Eric

> -
> -   /**
>      * Start the thread if the API has a worker thread.
>      * Called after the context has been created and fully initialized on both
>      * sides (e.g. st/mesa and st/dri).
>      */
>     void (*start_thread)(struct st_context_iface *stctxi);
>  
>     /**
>      * If the API is multithreaded, wait for all queued commands to complete.
>      * Called from the main thread.
>      */
> -- 
> 2.11.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list