diff options
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_program.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 28 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.h | 22 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_shader_cache.c | 2 |
5 files changed, 30 insertions, 30 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index b82b28f4d40..9187bac8778 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -257,7 +257,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog, if (st->shader_has_one_variant[prog->info.stage] && stp->variants) return stp->variants->driver_shader; - struct st_basic_variant_key key; + struct st_common_variant_key key; /* use memset, not an initializer to be sure all memory is zeroed */ memset(&key, 0, sizeof(key)); @@ -286,7 +286,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog, } - return st_get_basic_variant(st, stp, &key)->driver_shader; + return st_get_common_variant(st, stp, &key)->driver_shader; } diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index e4b9248db7d..8b74214a894 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -109,7 +109,7 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog) { struct st_common_program *p = st_common_program(prog); - st_release_basic_variants(st, p); + st_release_common_variants(st, p); if (p->glsl_to_tgsi) free_glsl_to_tgsi_visitor(p->glsl_to_tgsi); @@ -179,7 +179,7 @@ st_program_string_notify( struct gl_context *ctx, } else { struct st_common_program *stcp = st_common_program(prog); - st_release_basic_variants(st, stcp); + st_release_common_variants(st, stcp); if (!stcp->shader_program && /* not GLSL->NIR */ !st_translate_common_program(st, stcp)) return false; diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index fdd3cf1a3fa..eb230c2e933 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -318,7 +318,7 @@ st_release_fp_variants(struct st_context *st, struct st_fragment_program *stfp) * the variant from the linked list. */ static void -delete_basic_variant(struct st_context *st, struct st_basic_variant *v, +delete_basic_variant(struct st_context *st, struct st_common_variant *v, GLenum target) { if (v->driver_shader) { @@ -372,12 +372,12 @@ delete_basic_variant(struct st_context *st, struct st_basic_variant *v, * Free all basic program variants. */ void -st_release_basic_variants(struct st_context *st, struct st_common_program *p) +st_release_common_variants(struct st_context *st, struct st_common_program *p) { - struct st_basic_variant *v; + struct st_common_variant *v; for (v = p->variants; v; ) { - struct st_basic_variant *next = v->next; + struct st_common_variant *next = v->next; delete_basic_variant(st, v, p->Base.Target); v = next; } @@ -1677,13 +1677,13 @@ st_translate_common_program(struct st_context *st, /** * Get/create a basic program variant. */ -struct st_basic_variant * -st_get_basic_variant(struct st_context *st, - struct st_common_program *prog, - const struct st_basic_variant_key *key) +struct st_common_variant * +st_get_common_variant(struct st_context *st, + struct st_common_program *prog, + const struct st_common_variant_key *key) { struct pipe_context *pipe = st->pipe; - struct st_basic_variant *v; + struct st_common_variant *v; struct pipe_shader_state tgsi = {0}; /* Search for existing variant */ @@ -1695,7 +1695,7 @@ st_get_basic_variant(struct st_context *st, if (!v) { /* create new */ - v = CALLOC_STRUCT(st_basic_variant); + v = CALLOC_STRUCT(st_common_variant); if (v) { if (prog->state.type == PIPE_SHADER_IR_NIR) { @@ -1830,10 +1830,10 @@ destroy_program_variants(struct st_context *st, struct gl_program *target) case GL_COMPUTE_PROGRAM_NV: { struct st_common_program *p = st_common_program(target); - struct st_basic_variant *v, **prevPtr = &p->variants; + struct st_common_variant *v, **prevPtr = &p->variants; for (v = p->variants; v; ) { - struct st_basic_variant *next = v->next; + struct st_common_variant *next = v->next; if (v->key.st == st) { /* unlink from list */ *prevPtr = next; @@ -1984,12 +1984,12 @@ st_precompile_shader_variant(struct st_context *st, case GL_GEOMETRY_PROGRAM_NV: case GL_COMPUTE_PROGRAM_NV: { struct st_common_program *p = st_common_program(prog); - struct st_basic_variant_key key; + struct st_common_variant_key key; memset(&key, 0, sizeof(key)); key.st = st->has_shareable_shaders ? NULL : st; - st_get_basic_variant(st, p, &key); + st_get_common_variant(st, p, &key); break; } diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 2319115534d..b591633209d 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -274,8 +274,8 @@ struct st_vertex_program -/** Key shared by all shaders except VP, FP */ -struct st_basic_variant_key +/** Shader key shared by other shaders */ +struct st_common_variant_key { struct st_context *st; /**< variants are per-context */ @@ -292,14 +292,14 @@ struct st_basic_variant_key /** * Geometry program variant. */ -struct st_basic_variant +struct st_common_variant { /* Parameters which generated this variant. */ - struct st_basic_variant_key key; + struct st_common_variant_key key; void *driver_shader; - struct st_basic_variant *next; + struct st_common_variant *next; }; @@ -316,7 +316,7 @@ struct st_common_program /* used when bypassing glsl_to_tgsi: */ struct gl_shader_program *shader_program; - struct st_basic_variant *variants; + struct st_common_variant *variants; /** SHA1 hash of linked tgsi shader program, used for on-disk cache */ unsigned char sha1[20]; @@ -409,10 +409,10 @@ st_get_fp_variant(struct st_context *st, struct st_fragment_program *stfp, const struct st_fp_variant_key *key); -extern struct st_basic_variant * -st_get_basic_variant(struct st_context *st, - struct st_common_program *p, - const struct st_basic_variant_key *key); +extern struct st_common_variant * +st_get_common_variant(struct st_context *st, + struct st_common_program *p, + const struct st_common_variant_key *key); extern void st_release_vp_variants( struct st_context *st, @@ -423,7 +423,7 @@ st_release_fp_variants( struct st_context *st, struct st_fragment_program *stfp ); extern void -st_release_basic_variants(struct st_context *st, struct st_common_program *p); +st_release_common_variants(struct st_context *st, struct st_common_program *p); extern void st_destroy_program_variants(struct st_context *st); diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c index eb0695c501a..dd3f25ae2a1 100644 --- a/src/mesa/state_tracker/st_shader_cache.c +++ b/src/mesa/state_tracker/st_shader_cache.c @@ -233,7 +233,7 @@ st_deserialise_ir_program(struct gl_context *ctx, case MESA_SHADER_COMPUTE: { struct st_common_program *stcp = st_common_program(prog); - st_release_basic_variants(st, stcp); + st_release_common_variants(st, stcp); if (prog->info.stage == MESA_SHADER_TESS_EVAL || prog->info.stage == MESA_SHADER_GEOMETRY) |