mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
etnaviv: factor out TS state emitting
Will be reused in NTE path. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>
This commit is contained in:
parent
ec91456952
commit
a9494a8b9c
1 changed files with 19 additions and 3 deletions
|
|
@ -282,12 +282,10 @@ etna_sampler_view_state_destroy(struct pipe_context *pctx,
|
|||
#define EMIT_STATE_RELOC(state_name, src_value) \
|
||||
etna_coalsence_emit_reloc(stream, &coalesce, VIVS_##state_name, src_value)
|
||||
|
||||
/* Emit plain (non-descriptor) texture state */
|
||||
static void
|
||||
etna_emit_texture_state(struct etna_context *ctx)
|
||||
etna_emit_ts_state(struct etna_context *ctx)
|
||||
{
|
||||
struct etna_cmd_stream *stream = ctx->stream;
|
||||
struct etna_screen *screen = ctx->screen;
|
||||
uint32_t active_samplers = active_samplers_bits(ctx);
|
||||
uint32_t dirty = ctx->dirty;
|
||||
struct etna_coalesce coalesce;
|
||||
|
|
@ -320,6 +318,24 @@ etna_emit_texture_state(struct etna_context *ctx)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
etna_coalesce_end(stream, &coalesce);
|
||||
}
|
||||
|
||||
/* Emit plain (non-descriptor) texture state */
|
||||
static void
|
||||
etna_emit_texture_state(struct etna_context *ctx)
|
||||
{
|
||||
struct etna_cmd_stream *stream = ctx->stream;
|
||||
struct etna_screen *screen = ctx->screen;
|
||||
uint32_t active_samplers = active_samplers_bits(ctx);
|
||||
uint32_t dirty = ctx->dirty;
|
||||
struct etna_coalesce coalesce;
|
||||
|
||||
etna_emit_ts_state(ctx);
|
||||
|
||||
etna_coalesce_start(stream, &coalesce);
|
||||
|
||||
if (unlikely(dirty & (ETNA_DIRTY_SAMPLER_VIEWS | ETNA_DIRTY_SAMPLERS))) {
|
||||
for (int x = 0; x < VIVS_TE_SAMPLER__LEN; ++x) {
|
||||
uint32_t val = 0; /* 0 == sampler inactive */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue