mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
freedreno/a6xx: Static-ify sampler_view_update()
It doesn't need to be visible elsewhere since commit a93d3f1498
("freedreno/a6xx: Move tex state building")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>
This commit is contained in:
parent
e9fa92d6fa
commit
818b49932a
2 changed files with 30 additions and 31 deletions
|
|
@ -349,36 +349,9 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
}
|
||||
|
||||
static void
|
||||
fd6_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
|
||||
unsigned start, unsigned nr,
|
||||
unsigned unbind_num_trailing_slots,
|
||||
bool take_ownership,
|
||||
struct pipe_sampler_view **views) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(pctx);
|
||||
|
||||
fd_set_sampler_views(pctx, shader, start, nr, unbind_num_trailing_slots,
|
||||
take_ownership, views);
|
||||
|
||||
if (!views)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < nr; i++) {
|
||||
struct fd6_pipe_sampler_view *so = fd6_pipe_sampler_view(views[i + start]);
|
||||
|
||||
if (!so)
|
||||
continue;
|
||||
|
||||
struct fd_resource *rsc = fd_resource(so->base.texture);
|
||||
|
||||
fd6_validate_format(ctx, rsc, so->base.format);
|
||||
fd6_sampler_view_update(ctx, so);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
fd6_sampler_view_update(struct fd_context *ctx,
|
||||
struct fd6_pipe_sampler_view *so)
|
||||
assert_dt
|
||||
{
|
||||
const struct pipe_sampler_view *cso = &so->base;
|
||||
struct pipe_resource *prsc = cso->texture;
|
||||
|
|
@ -465,6 +438,35 @@ fd6_sampler_view_update(struct fd_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fd6_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
|
||||
unsigned start, unsigned nr,
|
||||
unsigned unbind_num_trailing_slots,
|
||||
bool take_ownership,
|
||||
struct pipe_sampler_view **views)
|
||||
in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(pctx);
|
||||
|
||||
fd_set_sampler_views(pctx, shader, start, nr, unbind_num_trailing_slots,
|
||||
take_ownership, views);
|
||||
|
||||
if (!views)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < nr; i++) {
|
||||
struct fd6_pipe_sampler_view *so = fd6_pipe_sampler_view(views[i + start]);
|
||||
|
||||
if (!so)
|
||||
continue;
|
||||
|
||||
struct fd_resource *rsc = fd_resource(so->base.texture);
|
||||
|
||||
fd6_validate_format(ctx, rsc, so->base.format);
|
||||
fd6_sampler_view_update(ctx, so);
|
||||
}
|
||||
}
|
||||
|
||||
/* NOTE this can be called in either driver thread or frontend thread
|
||||
* depending on where the last unref comes from
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -94,9 +94,6 @@ fd6_pipe_sampler_view(struct pipe_sampler_view *pview)
|
|||
return (struct fd6_pipe_sampler_view *)pview;
|
||||
}
|
||||
|
||||
void fd6_sampler_view_update(struct fd_context *ctx,
|
||||
struct fd6_pipe_sampler_view *so) assert_dt;
|
||||
|
||||
void fd6_texture_init(struct pipe_context *pctx);
|
||||
void fd6_texture_fini(struct pipe_context *pctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue