aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 10:30:52 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit67c2d80a839614e4638d6cff390627122f8148ca (patch)
treefc6e4bd791478b11338cee1028bd77f0196c970c /src/mesa/state_tracker
parent65225c20c64dd5980f4e3a4eaecb9088aabea2fb (diff)
i965/mesa/st: eliminate gl_tess_eval_program
We now get all the tes metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom.c2
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c2
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c2
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c2
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c2
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c2
-rw-r--r--src/mesa/state_tracker/st_cb_program.c8
-rw-r--r--src/mesa/state_tracker/st_program.c12
-rw-r--r--src/mesa/state_tracker/st_program.h6
9 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 497ba82aab9..231bdd95fa1 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -71,7 +71,7 @@ static void check_program_state( struct st_context *st )
struct gl_vertex_program *new_vp = ctx->VertexProgram._Current;
struct gl_program *new_tcp = ctx->TessCtrlProgram._Current;
- struct gl_tess_eval_program *new_tep = ctx->TessEvalProgram._Current;
+ struct gl_program *new_tep = ctx->TessEvalProgram._Current;
struct gl_geometry_program *new_gp = ctx->GeometryProgram._Current;
struct gl_fragment_program *new_fp = ctx->FragmentProgram._Current;
uint64_t dirty = 0;
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 90d4ffbe98b..77232f24323 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -212,7 +212,7 @@ static void update_tes_constants(struct st_context *st )
struct gl_program_parameter_list *params;
if (tep) {
- params = tep->Base.Base.Parameters;
+ params = tep->Base.Parameters;
st_upload_constants( st, params, MESA_SHADER_TESS_EVAL );
}
}
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index ca975aafdde..8d22bfc3a63 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -211,7 +211,7 @@ static void update_raster_state( struct st_context *st )
if (ctx->GeometryProgram._Current)
last = &ctx->GeometryProgram._Current->Base;
else if (ctx->TessEvalProgram._Current)
- last = &ctx->TessEvalProgram._Current->Base;
+ last = ctx->TessEvalProgram._Current;
else if (ctx->VertexProgram._Current)
last = &ctx->VertexProgram._Current->Base;
if (last)
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 76b355cec95..c802ad56e91 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -352,7 +352,7 @@ update_samplers(struct st_context *st)
if (ctx->TessEvalProgram._Current) {
update_shader_samplers(st,
PIPE_SHADER_TESS_EVAL,
- &ctx->TessEvalProgram._Current->Base,
+ ctx->TessEvalProgram._Current,
ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_TESS_EVAL],
&st->state.num_samplers[PIPE_SHADER_TESS_EVAL]);
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 0df0770bb1e..235303cfd24 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -283,7 +283,7 @@ update_tep( struct st_context *st )
}
sttep = st_tesseval_program(st->ctx->TessEvalProgram._Current);
- assert(sttep->Base.Base.Target == GL_TESS_EVALUATION_PROGRAM_NV);
+ 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);
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index fbd73d69f22..613886e7564 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -269,7 +269,7 @@ update_tesseval_textures(struct st_context *st)
if (ctx->TessEvalProgram._Current) {
update_textures(st,
MESA_SHADER_TESS_EVAL,
- &ctx->TessEvalProgram._Current->Base,
+ ctx->TessEvalProgram._Current,
ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_TESS_EVAL],
&st->state.num_sampler_views[PIPE_SHADER_TESS_EVAL]);
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index c85f0ef83ff..9878e9c52fa 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -75,7 +75,7 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
}
case GL_TESS_EVALUATION_PROGRAM_NV: {
struct st_tesseval_program *prog = ST_CALLOC_STRUCT(st_tesseval_program);
- return _mesa_init_gl_program(&prog->Base.Base, target, id);
+ return _mesa_init_gl_program(&prog->Base, target, id);
}
case GL_COMPUTE_PROGRAM_NV: {
struct st_compute_program *prog = ST_CALLOC_STRUCT(st_compute_program);
@@ -146,7 +146,7 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
struct st_tesseval_program *sttep =
(struct st_tesseval_program *) prog;
- st_release_basic_variants(st, sttep->Base.Base.Target,
+ st_release_basic_variants(st, sttep->Base.Target,
&sttep->variants, &sttep->tgsi);
if (sttep->glsl_to_tgsi)
@@ -233,8 +233,8 @@ st_program_string_notify( struct gl_context *ctx,
struct st_tesseval_program *sttep =
(struct st_tesseval_program *) prog;
- st_release_basic_variants(st, sttep->Base.Base.Target,
- &sttep->variants, &sttep->tgsi);
+ st_release_basic_variants(st, sttep->Base.Target, &sttep->variants,
+ &sttep->tgsi);
if (!st_translate_tesseval_program(st, sttep))
return false;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 210aa33daf5..78044526d56 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1629,13 +1629,13 @@ st_translate_tesseval_program(struct st_context *st,
if (ureg == NULL)
return false;
- if (sttep->Base.Base.info.tes.primitive_mode == GL_ISOLINES)
+ if (sttep->Base.info.tes.primitive_mode == GL_ISOLINES)
ureg_property(ureg, TGSI_PROPERTY_TES_PRIM_MODE, GL_LINES);
else
ureg_property(ureg, TGSI_PROPERTY_TES_PRIM_MODE,
- sttep->Base.Base.info.tes.primitive_mode);
+ sttep->Base.info.tes.primitive_mode);
- switch (sttep->Base.Base.info.tes.spacing) {
+ switch (sttep->Base.info.tes.spacing) {
case GL_EQUAL:
ureg_property(ureg, TGSI_PROPERTY_TES_SPACING, PIPE_TESS_SPACING_EQUAL);
break;
@@ -1652,11 +1652,11 @@ st_translate_tesseval_program(struct st_context *st,
}
ureg_property(ureg, TGSI_PROPERTY_TES_VERTEX_ORDER_CW,
- sttep->Base.Base.info.tes.vertex_order == GL_CW);
+ sttep->Base.info.tes.vertex_order == GL_CW);
ureg_property(ureg, TGSI_PROPERTY_TES_POINT_MODE,
- sttep->Base.Base.info.tes.point_mode);
+ sttep->Base.info.tes.point_mode);
- st_translate_program_common(st, &sttep->Base.Base, sttep->glsl_to_tgsi,
+ st_translate_program_common(st, &sttep->Base, sttep->glsl_to_tgsi,
ureg, PIPE_SHADER_TESS_EVAL, &sttep->tgsi);
free_glsl_to_tgsi_visitor(sttep->glsl_to_tgsi);
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index b801891832d..daea78128ef 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -274,11 +274,11 @@ struct st_tessctrl_program
/**
- * Derived from Mesa gl_tess_eval_program:
+ * Derived from Mesa gl_program:
*/
struct st_tesseval_program
{
- struct gl_tess_eval_program Base; /**< The Mesa tess eval program */
+ struct gl_program Base; /**< The Mesa tess eval 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 */
@@ -327,7 +327,7 @@ st_tessctrl_program( struct gl_program *tcp )
}
static inline struct st_tesseval_program *
-st_tesseval_program( struct gl_tess_eval_program *tep )
+st_tesseval_program( struct gl_program *tep )
{
return (struct st_tesseval_program *)tep;
}