Mesa (master): freedreno/a6xx: Always pass ctx to fd6_emit_textures()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 1 20:26:12 UTC 2021
Module: Mesa
Branch: master
Commit: 73f70d9b5f81d71699737e1468bc72abe5d8747c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73f70d9b5f81d71699737e1468bc72abe5d8747c
Author: Rob Clark <robdclark at chromium.org>
Date: Sun Feb 28 11:04:42 2021 -0800
freedreno/a6xx: Always pass ctx to fd6_emit_textures()
Prep for next patch.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9321>
---
src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 16 ++++++++--------
src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 4 ++--
src/gallium/drivers/freedreno/a6xx/fd6_texture.c | 3 +--
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
index 8a8373dd1ee..bef28411753 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
@@ -282,11 +282,11 @@ fd6_emit_fb_tex(struct fd_ringbuffer *state, struct fd_context *ctx)
}
bool
-fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring,
+fd6_emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
enum pipe_shader_type type, struct fd_texture_stateobj *tex,
unsigned bcolor_offset,
/* can be NULL if no image/SSBO/fb state to merge in: */
- const struct ir3_shader_variant *v, struct fd_context *ctx)
+ const struct ir3_shader_variant *v)
{
bool needs_border = false;
unsigned opcode, tex_samp_reg, tex_const_reg, tex_count_reg;
@@ -341,7 +341,7 @@ fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring,
if (tex->num_samplers > 0) {
struct fd_ringbuffer *state =
- fd_ringbuffer_new_object(pipe, tex->num_samplers * 4 * 4);
+ fd_ringbuffer_new_object(ctx->pipe, tex->num_samplers * 4 * 4);
for (unsigned i = 0; i < tex->num_samplers; i++) {
static const struct fd6_sampler_stateobj dummy_sampler = {};
const struct fd6_sampler_stateobj *sampler = tex->samplers[i] ?
@@ -388,7 +388,7 @@ fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring,
if (num_merged_textures > 0) {
struct fd_ringbuffer *state =
- fd_ringbuffer_new_object(pipe, num_merged_textures * 16 * 4);
+ fd_ringbuffer_new_object(ctx->pipe, num_merged_textures * 16 * 4);
for (unsigned i = 0; i < num_textures; i++) {
static const struct fd6_pipe_sampler_view dummy_view = {};
const struct fd6_pipe_sampler_view *view = tex->textures[i] ?
@@ -540,8 +540,8 @@ fd6_emit_combined_textures(struct fd_ringbuffer *ring, struct fd6_emit *emit,
unsigned bcolor_offset =
fd6_border_color_offset(ctx, type, tex);
- needs_border |= fd6_emit_textures(ctx->pipe, stateobj, type, tex,
- bcolor_offset, v, ctx);
+ needs_border |= fd6_emit_textures(ctx, stateobj, type, tex,
+ bcolor_offset, v);
fd6_emit_take_group(emit, stateobj, s[type].state_id,
s[type].enable_mask);
@@ -1142,8 +1142,8 @@ fd6_emit_cs_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
struct fd_texture_stateobj *tex = &ctx->tex[PIPE_SHADER_COMPUTE];
unsigned bcolor_offset = fd6_border_color_offset(ctx, PIPE_SHADER_COMPUTE, tex);
- bool needs_border = fd6_emit_textures(ctx->pipe, ring, PIPE_SHADER_COMPUTE, tex,
- bcolor_offset, cp, ctx);
+ bool needs_border = fd6_emit_textures(ctx, ring, PIPE_SHADER_COMPUTE, tex,
+ bcolor_offset, cp);
if (needs_border)
emit_border_color(ctx, ring);
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
index 5d51d3c570d..54376a27c7f 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
@@ -270,10 +270,10 @@ fd6_gl2spacing(enum gl_tess_spacing spacing)
}
}
-bool fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring,
+bool fd6_emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
enum pipe_shader_type type, struct fd_texture_stateobj *tex,
unsigned bcolor_offset,
- const struct ir3_shader_variant *v, struct fd_context *ctx) assert_dt;
+ const struct ir3_shader_variant *v) assert_dt;
void fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit) assert_dt;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index 56d25ce9a0d..c417ee385a7 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -400,8 +400,7 @@ fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type,
state->stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);
state->needs_border = needs_border;
- fd6_emit_textures(ctx->pipe, state->stateobj, type, tex, key.bcolor_offset,
- NULL, NULL);
+ fd6_emit_textures(ctx, state->stateobj, type, tex, key.bcolor_offset, NULL);
/* NOTE: uses copy of key in state obj, because pointer passed by caller
* is probably on the stack
More information about the mesa-commit
mailing list