Module: Mesa
Branch: main
Commit: 1a74a0b637012c8d41aa7ba2071713430e587ea0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a74a0b637012c8d41aa7ba2071713430e587ea0

Author: Alejandro PiƱeiro <[email protected]>
Date:   Tue May 23 00:06:45 2023 +0200

v3d: remove v3d_create_texture_shader_state_bo

This is a one-line wrapper, so let's just use the v3d_X or v3dX macros
instead.

Acked-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Juan A. Suarez <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23172>

---

 src/gallium/drivers/v3d/v3d_context.c  | 7 -------
 src/gallium/drivers/v3d/v3d_context.h  | 3 ---
 src/gallium/drivers/v3d/v3d_resource.c | 4 +++-
 src/gallium/drivers/v3d/v3dx_state.c   | 4 ++--
 4 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/gallium/drivers/v3d/v3d_context.c 
b/src/gallium/drivers/v3d/v3d_context.c
index a28be460e7a..5e7e5012fbc 100644
--- a/src/gallium/drivers/v3d/v3d_context.c
+++ b/src/gallium/drivers/v3d/v3d_context.c
@@ -219,13 +219,6 @@ v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
         }
 }
 
-void
-v3d_create_texture_shader_state_bo(struct v3d_context *v3d,
-                                   struct v3d_sampler_view *so)
-{
-        v3d_X(&v3d->screen->devinfo, create_texture_shader_state_bo)(v3d, so);
-}
-
 void
 v3d_get_tile_buffer_size(bool is_msaa,
                          bool double_buffer,
diff --git a/src/gallium/drivers/v3d/v3d_context.h 
b/src/gallium/drivers/v3d/v3d_context.h
index b4663b35ff6..139cea85fde 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -801,9 +801,6 @@ void v3d_ensure_prim_counts_allocated(struct v3d_context 
*ctx);
 void v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
                                   enum pipe_shader_type shader);
 
-void v3d_create_texture_shader_state_bo(struct v3d_context *v3d,
-                                        struct v3d_sampler_view *so);
-
 void v3d_get_tile_buffer_size(bool is_msaa,
                               bool double_buffer,
                               uint32_t nr_cbufs,
diff --git a/src/gallium/drivers/v3d/v3d_resource.c 
b/src/gallium/drivers/v3d/v3d_resource.c
index 1d8b4415a4a..b9bc843f111 100644
--- a/src/gallium/drivers/v3d/v3d_resource.c
+++ b/src/gallium/drivers/v3d/v3d_resource.c
@@ -161,8 +161,10 @@ rebind_sampler_views(struct v3d_context *v3d,
 
                         struct v3d_sampler_view *sview =
                                 v3d_sampler_view(psview);
+                        struct v3d_device_info *devinfo =
+                                &v3d->screen->devinfo;
 
-                        v3d_create_texture_shader_state_bo(v3d, sview);
+                        v3d_X(devinfo, create_texture_shader_state_bo)(v3d, 
sview);
 
                         v3d_flag_dirty_sampler_state(v3d, st);
                 }
diff --git a/src/gallium/drivers/v3d/v3dx_state.c 
b/src/gallium/drivers/v3d/v3dx_state.c
index 4a9a23d6e53..66c6e07fcb9 100644
--- a/src/gallium/drivers/v3d/v3dx_state.c
+++ b/src/gallium/drivers/v3d/v3dx_state.c
@@ -1202,7 +1202,7 @@ v3d_create_sampler_view(struct pipe_context *pctx, struct 
pipe_resource *prsc,
                 pipe_resource_reference(&so->texture, prsc);
         }
 
-        v3d_create_texture_shader_state_bo(v3d, so);
+        v3dX(create_texture_shader_state_bo)(v3d, so);
 
         return &so->base;
 }
@@ -1253,7 +1253,7 @@ v3d_set_sampler_views(struct pipe_context *pctx,
                                 v3d_sampler_view(stage_tex->textures[i]);
                         struct v3d_resource *rsc = v3d_resource(so->texture);
                         if (so->serial_id != rsc->serial_id)
-                                v3d_create_texture_shader_state_bo(v3d, so);
+                                v3dX(create_texture_shader_state_bo)(v3d, so);
                 }
         }
 

Reply via email to