summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 12:11:06 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit9605b98a078654f6f76e85221599e5fa8c073de6 (patch)
treee5b3666d491fa200674dee9a635684d721d4f84d /src/mesa/state_tracker
parent5a228c0aae347ce68009f165427581e149611d65 (diff)
i965/mesa/st: eliminate gl_compute_program
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.c2
-rw-r--r--src/mesa/state_tracker/st_program.c6
-rw-r--r--src/mesa/state_tracker/st_program.h6
8 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 573615e2ea0..a86cffc4c65 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -178,7 +178,7 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
case ST_PIPELINE_COMPUTE: {
struct st_compute_program *old_cp = st->cp;
- struct gl_compute_program *new_cp = ctx->ComputeProgram._Current;
+ struct gl_program *new_cp = ctx->ComputeProgram._Current;
if (new_cp != &old_cp->Base) {
if (old_cp)
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index bc9a1568ed3..31d1ef49ab4 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -229,7 +229,7 @@ static void update_cs_constants(struct st_context *st )
struct gl_program_parameter_list *params;
if (cp) {
- params = cp->Base.Base.Parameters;
+ params = cp->Base.Parameters;
st_upload_constants( st, params, MESA_SHADER_COMPUTE );
}
}
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 91baa59df25..a7174f882b6 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -360,7 +360,7 @@ update_samplers(struct st_context *st)
if (ctx->ComputeProgram._Current) {
update_shader_samplers(st,
PIPE_SHADER_COMPUTE,
- &ctx->ComputeProgram._Current->Base,
+ ctx->ComputeProgram._Current,
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_COMPUTE],
&st->state.num_samplers[PIPE_SHADER_COMPUTE]);
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 554e342e805..1c3be08de7a 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -312,7 +312,7 @@ update_cp( struct st_context *st )
}
stcp = st_compute_program(st->ctx->ComputeProgram._Current);
- assert(stcp->Base.Base.Target == GL_COMPUTE_PROGRAM_NV);
+ assert(stcp->Base.Target == GL_COMPUTE_PROGRAM_NV);
st->cp_variant = st_get_cp_variant(st, &stcp->tgsi, &stcp->variants);
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index e4257dd2271..ea263ab43d8 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -285,7 +285,7 @@ update_compute_textures(struct st_context *st)
if (ctx->ComputeProgram._Current) {
update_textures(st,
MESA_SHADER_COMPUTE,
- &ctx->ComputeProgram._Current->Base,
+ ctx->ComputeProgram._Current,
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_COMPUTE],
&st->state.num_sampler_views[PIPE_SHADER_COMPUTE]);
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index fb0bdd2ded3..d0478ca2ea9 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -79,7 +79,7 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
}
case GL_COMPUTE_PROGRAM_NV: {
struct st_compute_program *prog = ST_CALLOC_STRUCT(st_compute_program);
- return _mesa_init_gl_program(&prog->Base.Base, target, id);
+ return _mesa_init_gl_program(&prog->Base, target, id);
}
default:
assert(0);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 2e58f07d5c1..55cf57289ec 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -211,7 +211,7 @@ st_release_cp_variants(struct st_context *st, struct st_compute_program *stcp)
for (v = *variants; v; ) {
struct st_basic_variant *next = v->next;
- delete_basic_variant(st, v, stcp->Base.Base.Target);
+ delete_basic_variant(st, v, stcp->Base.Target);
v = next;
}
@@ -1681,12 +1681,12 @@ st_translate_compute_program(struct st_context *st,
if (ureg == NULL)
return false;
- st_translate_program_common(st, &stcp->Base.Base, stcp->glsl_to_tgsi, ureg,
+ st_translate_program_common(st, &stcp->Base, stcp->glsl_to_tgsi, ureg,
PIPE_SHADER_COMPUTE, &prog);
stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI;
stcp->tgsi.prog = prog.tokens;
- stcp->tgsi.req_local_mem = stcp->Base.Base.info.cs.shared_size;
+ stcp->tgsi.req_local_mem = stcp->Base.info.cs.shared_size;
stcp->tgsi.req_private_mem = 0;
stcp->tgsi.req_input_mem = 0;
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 0263c8eb39e..deb7009bfac 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -288,11 +288,11 @@ struct st_tesseval_program
/**
- * Derived from Mesa gl_compute_program:
+ * Derived from Mesa gl_program:
*/
struct st_compute_program
{
- struct gl_compute_program Base; /**< The Mesa compute program */
+ struct gl_program Base; /**< The Mesa compute program */
struct pipe_compute_state tgsi;
struct glsl_to_tgsi_visitor* glsl_to_tgsi;
uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */
@@ -333,7 +333,7 @@ st_tesseval_program( struct gl_program *tep )
}
static inline struct st_compute_program *
-st_compute_program( struct gl_compute_program *cp )
+st_compute_program( struct gl_program *cp )
{
return (struct st_compute_program *)cp;
}