summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 11:13:52 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit64d9773cfebded42691a70e3b233cadf896e53ba (patch)
tree5723116394eb77c64c8bb52459540131ec1ab38f /src/mesa/state_tracker
parent750b14ed8e6ff539f17069dec63004159575ccd8 (diff)
i965/mesa/st: eliminate gl_tess_ctrl_program
We now get all the tcs 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_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.c10
-rw-r--r--src/mesa/state_tracker/st_program.c6
-rw-r--r--src/mesa/state_tracker/st_program.h6
8 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 94e012a97c7..497ba82aab9 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -70,7 +70,7 @@ static void check_program_state( struct st_context *st )
struct st_fragment_program *old_fp = st->fp;
struct gl_vertex_program *new_vp = ctx->VertexProgram._Current;
- struct gl_tess_ctrl_program *new_tcp = ctx->TessCtrlProgram._Current;
+ struct gl_program *new_tcp = ctx->TessCtrlProgram._Current;
struct gl_tess_eval_program *new_tep = ctx->TessEvalProgram._Current;
struct gl_geometry_program *new_gp = ctx->GeometryProgram._Current;
struct gl_fragment_program *new_fp = ctx->FragmentProgram._Current;
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 8882582c601..90d4ffbe98b 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -195,7 +195,7 @@ static void update_tcs_constants(struct st_context *st )
struct gl_program_parameter_list *params;
if (tcp) {
- params = tcp->Base.Base.Parameters;
+ params = tcp->Base.Parameters;
st_upload_constants( st, params, MESA_SHADER_TESS_CTRL );
}
}
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 065df6dd006..76b355cec95 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -344,7 +344,7 @@ update_samplers(struct st_context *st)
if (ctx->TessCtrlProgram._Current) {
update_shader_samplers(st,
PIPE_SHADER_TESS_CTRL,
- &ctx->TessCtrlProgram._Current->Base,
+ ctx->TessCtrlProgram._Current,
ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_TESS_CTRL],
&st->state.num_samplers[PIPE_SHADER_TESS_CTRL]);
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 2f700a2fc55..0df0770bb1e 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -254,7 +254,7 @@ update_tcp( struct st_context *st )
}
sttcp = st_tessctrl_program(st->ctx->TessCtrlProgram._Current);
- assert(sttcp->Base.Base.Target == GL_TESS_CONTROL_PROGRAM_NV);
+ 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);
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index c8ae62c2a7b..fbd73d69f22 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -253,7 +253,7 @@ update_tessctrl_textures(struct st_context *st)
if (ctx->TessCtrlProgram._Current) {
update_textures(st,
MESA_SHADER_TESS_CTRL,
- &ctx->TessCtrlProgram._Current->Base,
+ ctx->TessCtrlProgram._Current,
ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_TESS_CTRL],
&st->state.num_sampler_views[PIPE_SHADER_TESS_CTRL]);
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 1fd50191d75..c85f0ef83ff 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -71,7 +71,7 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
}
case GL_TESS_CONTROL_PROGRAM_NV: {
struct st_tessctrl_program *prog = ST_CALLOC_STRUCT(st_tessctrl_program);
- return _mesa_init_gl_program(&prog->Base.Base, target, id);
+ return _mesa_init_gl_program(&prog->Base, target, id);
}
case GL_TESS_EVALUATION_PROGRAM_NV: {
struct st_tesseval_program *prog = ST_CALLOC_STRUCT(st_tesseval_program);
@@ -134,8 +134,8 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
struct st_tessctrl_program *sttcp =
(struct st_tessctrl_program *) prog;
- st_release_basic_variants(st, sttcp->Base.Base.Target,
- &sttcp->variants, &sttcp->tgsi);
+ st_release_basic_variants(st, sttcp->Base.Target, &sttcp->variants,
+ &sttcp->tgsi);
if (sttcp->glsl_to_tgsi)
free_glsl_to_tgsi_visitor(sttcp->glsl_to_tgsi);
@@ -221,8 +221,8 @@ st_program_string_notify( struct gl_context *ctx,
struct st_tessctrl_program *sttcp =
(struct st_tessctrl_program *) prog;
- st_release_basic_variants(st, sttcp->Base.Base.Target,
- &sttcp->variants, &sttcp->tgsi);
+ st_release_basic_variants(st, sttcp->Base.Target, &sttcp->variants,
+ &sttcp->tgsi);
if (!st_translate_tessctrl_program(st, sttcp))
return false;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 65f903703c2..cb402115c23 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1605,10 +1605,10 @@ st_translate_tessctrl_program(struct st_context *st,
return false;
ureg_property(ureg, TGSI_PROPERTY_TCS_VERTICES_OUT,
- sttcp->Base.Base.info.tcs.vertices_out);
+ sttcp->Base.info.tcs.vertices_out);
- st_translate_program_common(st, &sttcp->Base.Base, sttcp->glsl_to_tgsi,
- ureg, PIPE_SHADER_TESS_CTRL, &sttcp->tgsi);
+ st_translate_program_common(st, &sttcp->Base, sttcp->glsl_to_tgsi, ureg,
+ PIPE_SHADER_TESS_CTRL, &sttcp->tgsi);
free_glsl_to_tgsi_visitor(sttcp->glsl_to_tgsi);
sttcp->glsl_to_tgsi = NULL;
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index ea55d476ff0..b801891832d 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -260,11 +260,11 @@ struct st_geometry_program
/**
- * Derived from Mesa gl_tess_ctrl_program:
+ * Derived from Mesa gl_program:
*/
struct st_tessctrl_program
{
- struct gl_tess_ctrl_program Base; /**< The Mesa tess ctrl 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 */
@@ -321,7 +321,7 @@ st_geometry_program( struct gl_geometry_program *gp )
}
static inline struct st_tessctrl_program *
-st_tessctrl_program( struct gl_tess_ctrl_program *tcp )
+st_tessctrl_program( struct gl_program *tcp )
{
return (struct st_tessctrl_program *)tcp;
}