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

Author: Rob Clark <[email protected]>
Date:   Sun Feb 12 08:38:52 2023 -0800

freedreno/a6xx: Drop unneed fd6_texture_state() arg

It is redundant with shader type (stage).

Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

---

 src/gallium/drivers/freedreno/a6xx/fd6_emit.c    | 2 +-
 src/gallium/drivers/freedreno/a6xx/fd6_texture.c | 4 ++--
 src/gallium/drivers/freedreno/a6xx/fd6_texture.h | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c 
b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
index 98ed5312b53..1f14bb0fd63 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
@@ -60,7 +60,7 @@ tex_state(struct fd_context *ctx, enum pipe_shader_type type)
    if (ctx->tex[type].num_textures == 0)
       return NULL;
 
-   return fd_ringbuffer_ref(fd6_texture_state(ctx, type, 
&ctx->tex[type])->stateobj);
+   return fd_ringbuffer_ref(fd6_texture_state(ctx, type)->stateobj);
 }
 
 static struct fd_ringbuffer *
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c 
b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index f162f5a2e7c..7a005ee0fb8 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -689,9 +689,9 @@ handle_invalidates(struct fd_context *ctx)
 }
 
 struct fd6_texture_state *
-fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type,
-                  struct fd_texture_stateobj *tex)
+fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type)
 {
+   struct fd_texture_stateobj *tex = &ctx->tex[type];
    struct fd6_context *fd6_ctx = fd6_context(ctx);
    struct fd6_texture_state *state = NULL;
    struct fd6_texture_key key;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h 
b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
index f970d6af455..278a4e56560 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
@@ -130,7 +130,6 @@ struct fd6_texture_state {
 };
 
 struct fd6_texture_state *
-fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type,
-                  struct fd_texture_stateobj *tex) assert_dt;
+fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type) 
assert_dt;
 
 #endif /* FD6_TEXTURE_H_ */

Reply via email to