diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom.c | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 24 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_program.c | 34 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 18 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 24 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.h | 88 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_shader_cache.c | 30 |
10 files changed, 94 insertions, 160 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index b40ce1e3399..cbac7629e9c 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -65,9 +65,9 @@ static void check_program_state( struct st_context *st ) { struct gl_context *ctx = st->ctx; struct st_vertex_program *old_vp = st->vp; - struct st_tessctrl_program *old_tcp = st->tcp; - struct st_tesseval_program *old_tep = st->tep; - struct st_geometry_program *old_gp = st->gp; + struct st_common_program *old_tcp = st->tcp; + struct st_common_program *old_tep = st->tep; + struct st_common_program *old_gp = st->gp; struct st_fragment_program *old_fp = st->fp; struct gl_program *new_vp = ctx->VertexProgram._Current; @@ -91,21 +91,21 @@ static void check_program_state( struct st_context *st ) if (old_tcp) dirty |= old_tcp->affected_states; if (new_tcp) - dirty |= st_tessctrl_program(new_tcp)->affected_states; + dirty |= st_common_program(new_tcp)->affected_states; } if (unlikely(new_tep != &old_tep->Base)) { if (old_tep) dirty |= old_tep->affected_states; if (new_tep) - dirty |= st_tesseval_program(new_tep)->affected_states; + dirty |= st_common_program(new_tep)->affected_states; } if (unlikely(new_gp != &old_gp->Base)) { if (old_gp) dirty |= old_gp->affected_states; if (new_gp) - dirty |= st_geometry_program(new_gp)->affected_states; + dirty |= st_common_program(new_gp)->affected_states; } if (unlikely(new_fp != &old_fp->Base)) { diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 9c04580f084..6cbfba7e9c0 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -163,7 +163,7 @@ void st_update_fs_constants(struct st_context *st ) */ void st_update_gs_constants(struct st_context *st ) { - struct st_geometry_program *gp = st->gp; + struct st_common_program *gp = st->gp; struct gl_program_parameter_list *params; if (gp) { @@ -176,7 +176,7 @@ void st_update_gs_constants(struct st_context *st ) */ void st_update_tcs_constants(struct st_context *st ) { - struct st_tessctrl_program *tcp = st->tcp; + struct st_common_program *tcp = st->tcp; struct gl_program_parameter_list *params; if (tcp) { @@ -189,7 +189,7 @@ void st_update_tcs_constants(struct st_context *st ) */ void st_update_tes_constants(struct st_context *st ) { - struct st_tesseval_program *tep = st->tep; + struct st_common_program *tep = st->tep; struct gl_program_parameter_list *params; if (tep) { diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 091cbe01a0a..875279da636 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -185,21 +185,21 @@ st_update_vp( struct st_context *st ) void st_update_gp( struct st_context *st ) { - struct st_geometry_program *stgp; + struct st_common_program *stgp; if (!st->ctx->GeometryProgram._Current) { cso_set_geometry_shader_handle(st->cso_context, NULL); - st_reference_geomprog(st, &st->gp, NULL); + st_reference_prog(st, &st->gp, NULL); return; } - stgp = st_geometry_program(st->ctx->GeometryProgram._Current); + stgp = st_common_program(st->ctx->GeometryProgram._Current); assert(stgp->Base.Target == GL_GEOMETRY_PROGRAM_NV); st->gp_variant = st_get_basic_variant(st, PIPE_SHADER_GEOMETRY, &stgp->tgsi, &stgp->variants); - st_reference_geomprog(st, &st->gp, stgp); + st_reference_prog(st, &st->gp, stgp); cso_set_geometry_shader_handle(st->cso_context, st->gp_variant->driver_shader); @@ -209,21 +209,21 @@ st_update_gp( struct st_context *st ) void st_update_tcp( struct st_context *st ) { - struct st_tessctrl_program *sttcp; + struct st_common_program *sttcp; if (!st->ctx->TessCtrlProgram._Current) { cso_set_tessctrl_shader_handle(st->cso_context, NULL); - st_reference_tesscprog(st, &st->tcp, NULL); + st_reference_prog(st, &st->tcp, NULL); return; } - sttcp = st_tessctrl_program(st->ctx->TessCtrlProgram._Current); + sttcp = st_common_program(st->ctx->TessCtrlProgram._Current); assert(sttcp->Base.Target == GL_TESS_CONTROL_PROGRAM_NV); st->tcp_variant = st_get_basic_variant(st, PIPE_SHADER_TESS_CTRL, &sttcp->tgsi, &sttcp->variants); - st_reference_tesscprog(st, &st->tcp, sttcp); + st_reference_prog(st, &st->tcp, sttcp); cso_set_tessctrl_shader_handle(st->cso_context, st->tcp_variant->driver_shader); @@ -233,21 +233,21 @@ st_update_tcp( struct st_context *st ) void st_update_tep( struct st_context *st ) { - struct st_tesseval_program *sttep; + struct st_common_program *sttep; if (!st->ctx->TessEvalProgram._Current) { cso_set_tesseval_shader_handle(st->cso_context, NULL); - st_reference_tesseprog(st, &st->tep, NULL); + st_reference_prog(st, &st->tep, NULL); return; } - sttep = st_tesseval_program(st->ctx->TessEvalProgram._Current); + sttep = st_common_program(st->ctx->TessEvalProgram._Current); assert(sttep->Base.Target == GL_TESS_EVALUATION_PROGRAM_NV); st->tep_variant = st_get_basic_variant(st, PIPE_SHADER_TESS_EVAL, &sttep->tgsi, &sttep->variants); - st_reference_tesseprog(st, &st->tep, sttep); + st_reference_prog(st, &st->tep, sttep); cso_set_tesseval_shader_handle(st->cso_context, st->tep_variant->driver_shader); diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index b104649b036..531d20d20ff 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -69,18 +69,18 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id, return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm); } case GL_GEOMETRY_PROGRAM_NV: { - struct st_geometry_program *prog = rzalloc(NULL, - struct st_geometry_program); + struct st_common_program *prog = rzalloc(NULL, + struct st_common_program); return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm); } case GL_TESS_CONTROL_PROGRAM_NV: { - struct st_tessctrl_program *prog = rzalloc(NULL, - struct st_tessctrl_program); + struct st_common_program *prog = rzalloc(NULL, + struct st_common_program); return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm); } case GL_TESS_EVALUATION_PROGRAM_NV: { - struct st_tesseval_program *prog = rzalloc(NULL, - struct st_tesseval_program); + struct st_common_program *prog = rzalloc(NULL, + struct st_common_program); return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm); } case GL_COMPUTE_PROGRAM_NV: { @@ -115,8 +115,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog) break; case GL_GEOMETRY_PROGRAM_NV: { - struct st_geometry_program *stgp = - (struct st_geometry_program *) prog; + struct st_common_program *stgp = + (struct st_common_program *) prog; st_release_basic_variants(st, stgp->Base.Target, &stgp->variants, &stgp->tgsi); @@ -138,8 +138,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog) break; case GL_TESS_CONTROL_PROGRAM_NV: { - struct st_tessctrl_program *sttcp = - (struct st_tessctrl_program *) prog; + struct st_common_program *sttcp = + (struct st_common_program *) prog; st_release_basic_variants(st, sttcp->Base.Target, &sttcp->variants, &sttcp->tgsi); @@ -150,8 +150,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog) break; case GL_TESS_EVALUATION_PROGRAM_NV: { - struct st_tesseval_program *sttep = - (struct st_tesseval_program *) prog; + struct st_common_program *sttep = + (struct st_common_program *) prog; st_release_basic_variants(st, sttep->Base.Target, &sttep->variants, &sttep->tgsi); @@ -204,7 +204,7 @@ st_program_string_notify( struct gl_context *ctx, st->dirty |= stfp->affected_states; } else if (target == GL_GEOMETRY_PROGRAM_NV) { - struct st_geometry_program *stgp = (struct st_geometry_program *) prog; + struct st_common_program *stgp = (struct st_common_program *) prog; st_release_basic_variants(st, stgp->Base.Target, &stgp->variants, &stgp->tgsi); @@ -225,8 +225,8 @@ st_program_string_notify( struct gl_context *ctx, st->dirty |= ST_NEW_VERTEX_PROGRAM(st, stvp); } else if (target == GL_TESS_CONTROL_PROGRAM_NV) { - struct st_tessctrl_program *sttcp = - (struct st_tessctrl_program *) prog; + struct st_common_program *sttcp = + (struct st_common_program *) prog; st_release_basic_variants(st, sttcp->Base.Target, &sttcp->variants, &sttcp->tgsi); @@ -237,8 +237,8 @@ st_program_string_notify( struct gl_context *ctx, st->dirty |= sttcp->affected_states; } else if (target == GL_TESS_EVALUATION_PROGRAM_NV) { - struct st_tesseval_program *sttep = - (struct st_tesseval_program *) prog; + struct st_common_program *sttep = + (struct st_common_program *) prog; st_release_basic_variants(st, sttep->Base.Target, &sttep->variants, &sttep->tgsi); diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 801322622f0..d99791100a7 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -131,12 +131,12 @@ st_get_active_states(struct gl_context *ctx) { struct st_vertex_program *vp = st_vertex_program(ctx->VertexProgram._Current); - struct st_tessctrl_program *tcp = - st_tessctrl_program(ctx->TessCtrlProgram._Current); - struct st_tesseval_program *tep = - st_tesseval_program(ctx->TessEvalProgram._Current); - struct st_geometry_program *gp = - st_geometry_program(ctx->GeometryProgram._Current); + struct st_common_program *tcp = + st_common_program(ctx->TessCtrlProgram._Current); + struct st_common_program *tep = + st_common_program(ctx->TessEvalProgram._Current); + struct st_common_program *gp = + st_common_program(ctx->GeometryProgram._Current); struct st_fragment_program *fp = st_fragment_program(ctx->FragmentProgram._Current); struct st_compute_program *cp = @@ -583,10 +583,10 @@ void st_destroy_context( struct st_context *st ) _mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st); st_reference_fragprog(st, &st->fp, NULL); - st_reference_geomprog(st, &st->gp, NULL); + st_reference_prog(st, &st->gp, NULL); st_reference_vertprog(st, &st->vp, NULL); - st_reference_tesscprog(st, &st->tcp, NULL); - st_reference_tesseprog(st, &st->tep, NULL); + st_reference_prog(st, &st->tcp, NULL); + st_reference_prog(st, &st->tep, NULL); st_reference_compprog(st, &st->cp, NULL); /* release framebuffer surfaces */ diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index f1b38fc36e9..eb1a1630fd5 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -172,9 +172,9 @@ struct st_context struct st_vertex_program *vp; /**< Currently bound vertex program */ struct st_fragment_program *fp; /**< Currently bound fragment program */ - struct st_geometry_program *gp; /**< Currently bound geometry program */ - struct st_tessctrl_program *tcp; /**< Currently bound tess control program */ - struct st_tesseval_program *tep; /**< Currently bound tess eval program */ + struct st_common_program *gp; /**< Currently bound geometry program */ + struct st_common_program *tcp; /**< Currently bound tess control program */ + struct st_common_program *tep; /**< Currently bound tess eval program */ struct st_compute_program *cp; /**< Currently bound compute program */ struct st_vp_variant *vp_variant; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index f04719b66b6..0a8782ec364 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6830,9 +6830,9 @@ get_mesa_program_tgsi(struct gl_context *ctx, struct st_vertex_program *stvp; struct st_fragment_program *stfp; - struct st_geometry_program *stgp; - struct st_tessctrl_program *sttcp; - struct st_tesseval_program *sttep; + struct st_common_program *stgp; + struct st_common_program *sttcp; + struct st_common_program *sttep; struct st_compute_program *stcp; switch (shader->Stage) { @@ -6845,15 +6845,15 @@ get_mesa_program_tgsi(struct gl_context *ctx, stfp->glsl_to_tgsi = v; break; case MESA_SHADER_GEOMETRY: - stgp = (struct st_geometry_program *)prog; + stgp = (struct st_common_program *)prog; stgp->glsl_to_tgsi = v; break; case MESA_SHADER_TESS_CTRL: - sttcp = (struct st_tessctrl_program *)prog; + sttcp = (struct st_common_program *)prog; sttcp->glsl_to_tgsi = v; break; case MESA_SHADER_TESS_EVAL: - sttep = (struct st_tesseval_program *)prog; + sttep = (struct st_common_program *)prog; sttep->glsl_to_tgsi = v; break; case MESA_SHADER_COMPUTE: diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index d9b1d12434e..09e6696782f 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -120,7 +120,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_TESS_CTRL: - states = &((struct st_tessctrl_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_TCS_STATE; @@ -135,7 +135,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_TESS_EVAL: - states = &((struct st_tesseval_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_TES_STATE | ST_NEW_RASTERIZER; @@ -151,7 +151,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog) break; case MESA_SHADER_GEOMETRY: - states = &((struct st_geometry_program*)prog)->affected_states; + states = &((struct st_common_program*)prog)->affected_states; *states = ST_NEW_GS_STATE | ST_NEW_RASTERIZER; @@ -1630,7 +1630,7 @@ st_translate_program_common(struct st_context *st, */ bool st_translate_geometry_program(struct st_context *st, - struct st_geometry_program *stgp) + struct st_common_program *stgp) { struct ureg_program *ureg; @@ -1717,7 +1717,7 @@ st_get_basic_variant(struct st_context *st, */ bool st_translate_tessctrl_program(struct st_context *st, - struct st_tessctrl_program *sttcp) + struct st_common_program *sttcp) { struct ureg_program *ureg; @@ -1742,7 +1742,7 @@ st_translate_tessctrl_program(struct st_context *st, */ bool st_translate_tesseval_program(struct st_context *st, - struct st_tesseval_program *sttep) + struct st_common_program *sttep) { struct ureg_program *ureg; @@ -1918,9 +1918,9 @@ destroy_program_variants(struct st_context *st, struct gl_program *target) case GL_TESS_EVALUATION_PROGRAM_NV: case GL_COMPUTE_PROGRAM_NV: { - struct st_geometry_program *gp = (struct st_geometry_program*)target; - struct st_tessctrl_program *tcp = (struct st_tessctrl_program*)target; - struct st_tesseval_program *tep = (struct st_tesseval_program*)target; + struct st_common_program *gp = (struct st_common_program*)target; + struct st_common_program *tcp = (struct st_common_program*)target; + struct st_common_program *tep = (struct st_common_program*)target; struct st_compute_program *cp = (struct st_compute_program*)target; struct st_basic_variant **variants = target->Target == GL_GEOMETRY_PROGRAM_NV ? &gp->variants : @@ -2066,19 +2066,19 @@ st_precompile_shader_variant(struct st_context *st, } case GL_TESS_CONTROL_PROGRAM_NV: { - struct st_tessctrl_program *p = (struct st_tessctrl_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_TESS_CTRL, &p->tgsi, &p->variants); break; } case GL_TESS_EVALUATION_PROGRAM_NV: { - struct st_tesseval_program *p = (struct st_tesseval_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_TESS_EVAL, &p->tgsi, &p->variants); break; } case GL_GEOMETRY_PROGRAM_NV: { - struct st_geometry_program *p = (struct st_geometry_program *)prog; + struct st_common_program *p = (struct st_common_program *)prog; st_get_basic_variant(st, PIPE_SHADER_GEOMETRY, &p->tgsi, &p->variants); break; } diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index e2607a870bc..57673e9fb01 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -254,43 +254,9 @@ struct st_basic_variant /** * Derived from Mesa gl_program: */ -struct st_geometry_program +struct st_common_program { - struct gl_program Base; /**< The Mesa geometry program */ - struct pipe_shader_state tgsi; - struct glsl_to_tgsi_visitor* glsl_to_tgsi; - uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ - - struct st_basic_variant *variants; - - /** SHA1 hash of linked tgsi shader program, used for on-disk cache */ - unsigned char sha1[20]; -}; - - -/** - * Derived from Mesa gl_program: - */ -struct st_tessctrl_program -{ - struct gl_program Base; /**< The Mesa tess ctrl program */ - struct pipe_shader_state tgsi; - struct glsl_to_tgsi_visitor* glsl_to_tgsi; - uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ - - struct st_basic_variant *variants; - - /** SHA1 hash of linked tgsi shader program, used for on-disk cache */ - unsigned char sha1[20]; -}; - - -/** - * Derived from Mesa gl_program: - */ -struct st_tesseval_program -{ - struct gl_program Base; /**< The Mesa tess eval program */ + struct gl_program Base; struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ @@ -335,22 +301,10 @@ st_vertex_program( struct gl_program *vp ) return (struct st_vertex_program *)vp; } -static inline struct st_geometry_program * -st_geometry_program( struct gl_program *gp ) +static inline struct st_common_program * +st_common_program( struct gl_program *gp ) { - return (struct st_geometry_program *)gp; -} - -static inline struct st_tessctrl_program * -st_tessctrl_program( struct gl_program *tcp ) -{ - return (struct st_tessctrl_program *)tcp; -} - -static inline struct st_tesseval_program * -st_tesseval_program( struct gl_program *tep ) -{ - return (struct st_tesseval_program *)tep; + return (struct st_common_program *)gp; } static inline struct st_compute_program * @@ -370,16 +324,6 @@ st_reference_vertprog(struct st_context *st, } static inline void -st_reference_geomprog(struct st_context *st, - struct st_geometry_program **ptr, - struct st_geometry_program *prog) -{ - _mesa_reference_program(st->ctx, - (struct gl_program **) ptr, - (struct gl_program *) prog); -} - -static inline void st_reference_fragprog(struct st_context *st, struct st_fragment_program **ptr, struct st_fragment_program *prog) @@ -390,19 +334,9 @@ st_reference_fragprog(struct st_context *st, } static inline void -st_reference_tesscprog(struct st_context *st, - struct st_tessctrl_program **ptr, - struct st_tessctrl_program *prog) -{ - _mesa_reference_program(st->ctx, - (struct gl_program **) ptr, - (struct gl_program *) prog); -} - -static inline void -st_reference_tesseprog(struct st_context *st, - struct st_tesseval_program **ptr, - struct st_tesseval_program *prog) +st_reference_prog(struct st_context *st, + struct st_common_program **ptr, + struct st_common_program *prog) { _mesa_reference_program(st->ctx, (struct gl_program **) ptr, @@ -499,15 +433,15 @@ st_translate_fragment_program(struct st_context *st, extern bool st_translate_geometry_program(struct st_context *st, - struct st_geometry_program *stgp); + struct st_common_program *stgp); extern bool st_translate_tessctrl_program(struct st_context *st, - struct st_tessctrl_program *sttcp); + struct st_common_program *sttcp); extern bool st_translate_tesseval_program(struct st_context *st, - struct st_tesseval_program *sttep); + struct st_common_program *sttep); extern bool st_translate_compute_program(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 1a11f1135d7..0771ca660cf 100644 --- a/src/mesa/state_tracker/st_shader_cache.c +++ b/src/mesa/state_tracker/st_shader_cache.c @@ -87,7 +87,7 @@ st_store_tgsi_in_disk_cache(struct st_context *st, struct gl_program *prog, break; } case MESA_SHADER_TESS_CTRL: { - struct st_tessctrl_program *stcp = (struct st_tessctrl_program *) prog; + struct st_common_program *stcp = (struct st_common_program *) prog; sha1 = stcp->sha1; write_stream_out_to_cache(blob, out_state); @@ -95,7 +95,7 @@ st_store_tgsi_in_disk_cache(struct st_context *st, struct gl_program *prog, break; } case MESA_SHADER_TESS_EVAL: { - struct st_tesseval_program *step = (struct st_tesseval_program *) prog; + struct st_common_program *step = (struct st_common_program *) prog; sha1 = step->sha1; write_stream_out_to_cache(blob, out_state); @@ -103,7 +103,7 @@ st_store_tgsi_in_disk_cache(struct st_context *st, struct gl_program *prog, break; } case MESA_SHADER_GEOMETRY: { - struct st_geometry_program *stgp = (struct st_geometry_program *) prog; + struct st_common_program *stgp = (struct st_common_program *) prog; sha1 = stgp->sha1; write_stream_out_to_cache(blob, out_state); @@ -188,24 +188,24 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, break; } case MESA_SHADER_TESS_CTRL: { - struct st_tessctrl_program *stcp = - (struct st_tessctrl_program *) glprog; + struct st_common_program *stcp = + (struct st_common_program *) glprog; stage_sha1[i] = stcp->sha1; ralloc_strcat(&buf, " tcs"); disk_cache_compute_key(ctx->Cache, buf, strlen(buf), stage_sha1[i]); break; } case MESA_SHADER_TESS_EVAL: { - struct st_tesseval_program *step = - (struct st_tesseval_program *) glprog; + struct st_common_program *step = + (struct st_common_program *) glprog; stage_sha1[i] = step->sha1; ralloc_strcat(&buf, " tes"); disk_cache_compute_key(ctx->Cache, buf, strlen(buf), stage_sha1[i]); break; } case MESA_SHADER_GEOMETRY: { - struct st_geometry_program *stgp = - (struct st_geometry_program *) glprog; + struct st_common_program *stgp = + (struct st_common_program *) glprog; stage_sha1[i] = stgp->sha1; ralloc_strcat(&buf, " gs"); disk_cache_compute_key(ctx->Cache, buf, strlen(buf), stage_sha1[i]); @@ -278,8 +278,8 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, break; } case MESA_SHADER_TESS_CTRL: { - struct st_tessctrl_program *sttcp = - (struct st_tessctrl_program *) glprog; + struct st_common_program *sttcp = + (struct st_common_program *) glprog; st_release_basic_variants(st, sttcp->Base.Target, &sttcp->variants, &sttcp->tgsi); @@ -293,8 +293,8 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, break; } case MESA_SHADER_TESS_EVAL: { - struct st_tesseval_program *sttep = - (struct st_tesseval_program *) glprog; + struct st_common_program *sttep = + (struct st_common_program *) glprog; st_release_basic_variants(st, sttep->Base.Target, &sttep->variants, &sttep->tgsi); @@ -308,8 +308,8 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, break; } case MESA_SHADER_GEOMETRY: { - struct st_geometry_program *stgp = - (struct st_geometry_program *) glprog; + struct st_common_program *stgp = + (struct st_common_program *) glprog; st_release_basic_variants(st, stgp->Base.Target, &stgp->variants, &stgp->tgsi); |