summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-30 16:05:42 +0200
committerMarek Olšák <[email protected]>2017-05-08 18:32:00 +0200
commitbb6e851a1e52599e346112837b93686a90817901 (patch)
treebe73ec74dab5f45e9871f5de8408620b877469e7 /src/mesa/state_tracker/st_program.c
parent7ca8b86cb9d27db2251507d84026e031ae9304f3 (diff)
st/mesa: unify TCS, TES, GS st_*_program structures
Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c24
1 files changed, 12 insertions, 12 deletions
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;
}