diff --git a/src/gallium/drivers/lima/lima_context.h b/src/gallium/drivers/lima/lima_context.h index 5bc9775921d..bcdf724ce8a 100644 --- a/src/gallium/drivers/lima/lima_context.h +++ b/src/gallium/drivers/lima/lima_context.h @@ -51,12 +51,12 @@ struct lima_fs_compiled_shader { struct lima_bo *bo; }; -struct lima_fs_bind_state { +struct lima_fs_uncompiled_shader { struct pipe_shader_state base; }; struct lima_fs_key { - struct lima_fs_bind_state *shader_state; + struct lima_fs_uncompiled_shader *uncomp_shader; struct { uint8_t swizzle[4]; } tex[PIPE_MAX_SAMPLERS]; @@ -89,12 +89,12 @@ struct lima_vs_compiled_shader { struct lima_bo *bo; }; -struct lima_vs_bind_state { +struct lima_vs_uncompiled_shader { struct pipe_shader_state base; }; struct lima_vs_key { - struct lima_vs_bind_state *shader_state; + struct lima_vs_uncompiled_shader *uncomp_shader; }; struct lima_rasterizer_state { @@ -210,8 +210,8 @@ struct lima_context { struct pipe_scissor_state clipped_scissor; struct lima_vs_compiled_shader *vs; struct lima_fs_compiled_shader *fs; - struct lima_vs_bind_state *bind_vs; - struct lima_fs_bind_state *bind_fs; + struct lima_vs_uncompiled_shader *uncomp_vs; + struct lima_fs_uncompiled_shader *uncomp_fs; struct lima_vertex_element_state *vertex_elements; struct lima_context_vertex_buffer vertex_buffers; struct lima_rasterizer_state *rasterizer; diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c index 11b853c56d9..5f1ea4a2644 100644 --- a/src/gallium/drivers/lima/lima_draw.c +++ b/src/gallium/drivers/lima/lima_draw.c @@ -1153,7 +1153,7 @@ lima_draw_vbo(struct pipe_context *pctx, struct lima_context *ctx = lima_context(pctx); - if (!ctx->bind_fs || !ctx->bind_vs) { + if (!ctx->uncomp_fs || !ctx->uncomp_vs) { debug_warn_once("no shader, skip draw\n"); return; } diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index d4beb8e123a..6f823a962c1 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -276,7 +276,7 @@ lima_fs_compile_shader(struct lima_context *ctx, struct lima_fs_compiled_shader *fs) { struct lima_screen *screen = lima_screen(ctx->base.screen); - nir_shader *nir = nir_shader_clone(fs, key->shader_state->base.ir.nir); + nir_shader *nir = nir_shader_clone(fs, key->uncomp_shader->base.ir.nir); struct nir_lower_tex_options tex_options = { .lower_txp = ~0u, @@ -349,7 +349,7 @@ lima_create_fs_state(struct pipe_context *pctx, const struct pipe_shader_state *cso) { struct lima_context *ctx = lima_context(pctx); - struct lima_fs_bind_state *so = rzalloc(NULL, struct lima_fs_bind_state); + struct lima_fs_uncompiled_shader *so = rzalloc(NULL, struct lima_fs_uncompiled_shader); if (!so) return NULL; @@ -371,7 +371,7 @@ lima_create_fs_state(struct pipe_context *pctx, if (lima_debug & LIMA_DEBUG_PRECOMPILE) { /* Trigger initial compilation with default settings */ struct lima_fs_key key = { - .shader_state = so, + .uncomp_shader = so, }; for (int i = 0; i < ARRAY_SIZE(key.tex); i++) { for (int j = 0; j < 4; j++) @@ -388,7 +388,7 @@ lima_bind_fs_state(struct pipe_context *pctx, void *hwcso) { struct lima_context *ctx = lima_context(pctx); - ctx->bind_fs = hwcso; + ctx->uncomp_fs = hwcso; ctx->dirty |= LIMA_CONTEXT_DIRTY_UNCOMPILED_FS; } @@ -396,11 +396,11 @@ static void lima_delete_fs_state(struct pipe_context *pctx, void *hwcso) { struct lima_context *ctx = lima_context(pctx); - struct lima_fs_bind_state *so = hwcso; + struct lima_fs_uncompiled_shader *so = hwcso; hash_table_foreach(ctx->fs_cache, entry) { const struct lima_fs_key *key = entry->key; - if (key->shader_state == so) { + if (key->uncomp_shader == so) { struct lima_fs_compiled_shader *fs = entry->data; _mesa_hash_table_remove(ctx->fs_cache, entry); if (fs->bo) @@ -422,7 +422,7 @@ lima_vs_compile_shader(struct lima_context *ctx, struct lima_vs_key *key, struct lima_vs_compiled_shader *vs) { - nir_shader *nir = nir_shader_clone(vs, key->shader_state->base.ir.nir); + nir_shader *nir = nir_shader_clone(vs, key->uncomp_shader->base.ir.nir); lima_program_optimize_vs_nir(nir); @@ -490,7 +490,7 @@ lima_update_vs_state(struct lima_context *ctx) struct lima_vs_key local_key; struct lima_vs_key *key = &local_key; memset(key, 0, sizeof(*key)); - key->shader_state = ctx->bind_vs; + key->uncomp_shader = ctx->uncomp_vs; struct lima_vs_compiled_shader *old_vs = ctx->vs; @@ -518,7 +518,7 @@ lima_update_fs_state(struct lima_context *ctx) struct lima_fs_key local_key; struct lima_fs_key *key = &local_key; memset(key, 0, sizeof(*key)); - key->shader_state = ctx->bind_fs; + key->uncomp_shader = ctx->uncomp_fs; for (int i = 0; i < lima_tex->num_textures; i++) { struct lima_sampler_view *sampler = lima_sampler_view(lima_tex->textures[i]); @@ -551,7 +551,7 @@ lima_create_vs_state(struct pipe_context *pctx, const struct pipe_shader_state *cso) { struct lima_context *ctx = lima_context(pctx); - struct lima_vs_bind_state *so = rzalloc(NULL, struct lima_vs_bind_state); + struct lima_vs_uncompiled_shader *so = rzalloc(NULL, struct lima_vs_uncompiled_shader); if (!so) return NULL; @@ -573,7 +573,7 @@ lima_create_vs_state(struct pipe_context *pctx, if (lima_debug & LIMA_DEBUG_PRECOMPILE) { /* Trigger initial compilation with default settings */ struct lima_vs_key key = { - .shader_state = so, + .uncomp_shader = so, }; lima_get_compiled_vs(ctx, &key); } @@ -586,7 +586,7 @@ lima_bind_vs_state(struct pipe_context *pctx, void *hwcso) { struct lima_context *ctx = lima_context(pctx); - ctx->bind_vs = hwcso; + ctx->uncomp_vs = hwcso; ctx->dirty |= LIMA_CONTEXT_DIRTY_UNCOMPILED_VS; } @@ -594,11 +594,11 @@ static void lima_delete_vs_state(struct pipe_context *pctx, void *hwcso) { struct lima_context *ctx = lima_context(pctx); - struct lima_vs_bind_state *so = hwcso; + struct lima_vs_uncompiled_shader *so = hwcso; hash_table_foreach(ctx->vs_cache, entry) { const struct lima_vs_key *key = entry->key; - if (key->shader_state == so) { + if (key->uncomp_shader == so) { struct lima_vs_compiled_shader *vs = entry->data; _mesa_hash_table_remove(ctx->vs_cache, entry); if (vs->bo) diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c index e19b9be8898..d16a0b0b731 100644 --- a/src/gallium/drivers/lima/lima_resource.c +++ b/src/gallium/drivers/lima/lima_resource.c @@ -736,8 +736,8 @@ lima_util_blitter_save_states(struct lima_context *ctx) util_blitter_save_depth_stencil_alpha(ctx->blitter, (void *)ctx->zsa); util_blitter_save_stencil_ref(ctx->blitter, &ctx->stencil_ref); util_blitter_save_rasterizer(ctx->blitter, (void *)ctx->rasterizer); - util_blitter_save_fragment_shader(ctx->blitter, ctx->bind_fs); - util_blitter_save_vertex_shader(ctx->blitter, ctx->bind_vs); + util_blitter_save_fragment_shader(ctx->blitter, ctx->uncomp_fs); + util_blitter_save_vertex_shader(ctx->blitter, ctx->uncomp_vs); util_blitter_save_viewport(ctx->blitter, &ctx->viewport.transform); util_blitter_save_scissor(ctx->blitter, &ctx->scissor);