summaryrefslogtreecommitdiffstats
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
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]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_tes.c25
-rw-r--r--src/mesa/drivers/dri/i965/brw_tes_surface_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen7_ds_state.c4
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/mtypes.h17
-rw-r--r--src/mesa/main/state.c11
-rw-r--r--src/mesa/program/program.c7
-rw-r--r--src/mesa/program/program.h22
-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
21 files changed, 53 insertions, 93 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 9b7e1846680..db48aa1fd7e 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -344,7 +344,7 @@ struct brw_tess_ctrl_program {
/** Subclass of Mesa tessellation evaluation program */
struct brw_tess_eval_program {
- struct gl_tess_eval_program program;
+ struct gl_program program;
unsigned id; /**< serial no. to identify tess eval progs, never re-used */
};
@@ -1009,7 +1009,7 @@ struct brw_context
const struct gl_vertex_program *vertex_program;
const struct gl_geometry_program *geometry_program;
const struct gl_program *tess_ctrl_program;
- const struct gl_tess_eval_program *tess_eval_program;
+ const struct gl_program *tess_eval_program;
const struct gl_fragment_program *fragment_program;
const struct gl_compute_program *compute_program;
@@ -1736,7 +1736,7 @@ brw_tess_ctrl_program(struct gl_program *p)
}
static inline struct brw_tess_eval_program *
-brw_tess_eval_program(struct gl_tess_eval_program *p)
+brw_tess_eval_program(struct gl_program *p)
{
return (struct brw_tess_eval_program *) p;
}
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 5485de3692a..2dbaddd8005 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -456,7 +456,7 @@ brw_try_draw_prims(struct gl_context *ctx,
brw->gs.base.sampler_count = ctx->GeometryProgram._Current ?
util_last_bit(ctx->GeometryProgram._Current->Base.SamplersUsed) : 0;
brw->tes.base.sampler_count = ctx->TessEvalProgram._Current ?
- util_last_bit(ctx->TessEvalProgram._Current->Base.SamplersUsed) : 0;
+ util_last_bit(ctx->TessEvalProgram._Current->SamplersUsed) : 0;
brw->tcs.base.sampler_count = ctx->TessCtrlProgram._Current ?
util_last_bit(ctx->TessCtrlProgram._Current->SamplersUsed) : 0;
brw->vs.base.sampler_count =
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 4e0df5a77ff..7c553c831e1 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -179,7 +179,7 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
if (prog) {
prog->id = get_new_program_id(brw->screen);
- return _mesa_init_gl_program(&prog->program.Base, target, id);
+ return _mesa_init_gl_program(&prog->program, target, id);
} else {
return NULL;
}
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 345aa7f1a4c..75115074c0c 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -320,7 +320,7 @@ brw_tcs_populate_key(struct brw_context *brw,
(struct brw_tess_ctrl_program *) brw->tess_ctrl_program;
struct brw_tess_eval_program *tep =
(struct brw_tess_eval_program *) brw->tess_eval_program;
- struct gl_program *tes_prog = &tep->program.Base;
+ struct gl_program *tes_prog = &tep->program;
uint64_t per_vertex_slots = tes_prog->info.inputs_read;
uint32_t per_patch_slots = tes_prog->info.patch_inputs_read;
@@ -341,10 +341,10 @@ brw_tcs_populate_key(struct brw_context *brw,
/* We need to specialize our code generation for tessellation levels
* based on the domain the DS is expecting to tessellate.
*/
- key->tes_primitive_mode = tep->program.Base.info.tes.primitive_mode;
+ key->tes_primitive_mode = tep->program.info.tes.primitive_mode;
key->quads_workaround = brw->gen < 9 &&
- tep->program.Base.info.tes.primitive_mode == GL_QUADS &&
- tep->program.Base.info.tes.spacing == GL_EQUAL;
+ tep->program.info.tes.primitive_mode == GL_QUADS &&
+ tep->program.info.tes.spacing == GL_EQUAL;
if (tcp) {
key->program_string_id = tcp->id;
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index fed19751b5c..3992bb312a8 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -85,7 +85,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
const struct brw_compiler *compiler = brw->screen->compiler;
const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct brw_stage_state *stage_state = &brw->tes.base;
- nir_shader *nir = tep->program.Base.nir;
+ nir_shader *nir = tep->program.nir;
struct brw_tes_prog_data prog_data;
bool start_busy = false;
double start_time = 0;
@@ -93,10 +93,10 @@ brw_codegen_tes_prog(struct brw_context *brw,
memset(&prog_data, 0, sizeof(prog_data));
brw_assign_common_binding_table_offsets(MESA_SHADER_TESS_EVAL, devinfo,
- shader_prog, &tep->program.Base,
+ shader_prog, &tep->program,
&prog_data.base.base, 0);
- switch (tep->program.Base.info.tes.spacing) {
+ switch (tep->program.info.tes.spacing) {
case GL_EQUAL:
prog_data.partitioning = BRW_TESS_PARTITIONING_INTEGER;
break;
@@ -110,7 +110,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
unreachable("invalid domain shader spacing");
}
- switch (tep->program.Base.info.tes.primitive_mode) {
+ switch (tep->program.info.tes.primitive_mode) {
case GL_QUADS:
prog_data.domain = BRW_TESS_DOMAIN_QUAD;
break;
@@ -124,13 +124,13 @@ brw_codegen_tes_prog(struct brw_context *brw,
unreachable("invalid domain shader primitive mode");
}
- if (tep->program.Base.info.tes.point_mode) {
+ if (tep->program.info.tes.point_mode) {
prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_POINT;
- } else if (tep->program.Base.info.tes.primitive_mode == GL_ISOLINES) {
+ } else if (tep->program.info.tes.primitive_mode == GL_ISOLINES) {
prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_LINE;
} else {
/* Hardware winding order is backwards from OpenGL */
- switch (tep->program.Base.info.tes.vertex_order) {
+ switch (tep->program.info.tes.vertex_order) {
case GL_CCW:
prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_TRI_CW;
break;
@@ -164,10 +164,10 @@ brw_codegen_tes_prog(struct brw_context *brw,
prog_data.base.base.nr_image_params = tes->NumImages;
prog_data.base.cull_distance_mask =
- ((1 << tep->program.Base.CullDistanceArraySize) - 1) <<
- tep->program.Base.ClipDistanceArraySize;
+ ((1 << tep->program.CullDistanceArraySize) - 1) <<
+ tep->program.ClipDistanceArraySize;
- brw_nir_setup_glsl_uniforms(nir, shader_prog, &tep->program.Base,
+ brw_nir_setup_glsl_uniforms(nir, shader_prog, &tep->program,
&prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_TESS_EVAL]);
@@ -237,7 +237,7 @@ brw_tes_populate_key(struct brw_context *brw,
(struct brw_tess_ctrl_program *) brw->tess_ctrl_program;
struct brw_tess_eval_program *tep =
(struct brw_tess_eval_program *) brw->tess_eval_program;
- struct gl_program *prog = &tep->program.Base;
+ struct gl_program *prog = &tep->program;
uint64_t per_vertex_slots = prog->info.inputs_read;
uint32_t per_patch_slots = prog->info.patch_inputs_read;
@@ -308,8 +308,7 @@ brw_tes_precompile(struct gl_context *ctx,
struct brw_stage_prog_data *old_prog_data = brw->tes.base.prog_data;
bool success;
- struct gl_tess_eval_program *tep = (struct gl_tess_eval_program *)prog;
- struct brw_tess_eval_program *btep = brw_tess_eval_program(tep);
+ struct brw_tess_eval_program *btep = brw_tess_eval_program(prog);
memset(&key, 0, sizeof(key));
diff --git a/src/mesa/drivers/dri/i965/brw_tes_surface_state.c b/src/mesa/drivers/dri/i965/brw_tes_surface_state.c
index b1e85eebb5c..2a7d48a591d 100644
--- a/src/mesa/drivers/dri/i965/brw_tes_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_tes_surface_state.c
@@ -52,7 +52,7 @@ brw_upload_tes_pull_constants(struct brw_context *brw)
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_TESS_EVAL);
/* _NEW_PROGRAM_CONSTANTS */
- brw_upload_pull_constants(brw, BRW_NEW_TES_CONSTBUF, &dp->program.Base,
+ brw_upload_pull_constants(brw, BRW_NEW_TES_CONSTBUF, &dp->program,
stage_state, prog_data);
}
diff --git a/src/mesa/drivers/dri/i965/gen7_ds_state.c b/src/mesa/drivers/dri/i965/gen7_ds_state.c
index 1edb8fdd495..23e03d7e2af 100644
--- a/src/mesa/drivers/dri/i965/gen7_ds_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_ds_state.c
@@ -39,8 +39,8 @@ gen7_upload_tes_push_constants(struct brw_context *brw)
/* BRW_NEW_TES_PROG_DATA */
const struct brw_stage_prog_data *prog_data = brw->tes.base.prog_data;
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_TESS_EVAL);
- gen6_upload_push_constants(brw, &tep->program.Base, prog_data,
- stage_state, AUB_TRACE_VS_CONSTANTS);
+ gen6_upload_push_constants(brw, &tep->program, prog_data, stage_state,
+ AUB_TRACE_VS_CONSTANTS);
}
gen7_upload_constant_state(brw, stage_state, tep, _3DSTATE_CONSTANT_DS);
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 1e4f87d6536..5f00365cd0d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1298,7 +1298,7 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
_mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL);
- _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL);
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 9436f8e2909..c0984f122b4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1998,19 +1998,6 @@ struct gl_vertex_program
};
-/** Tessellation evaluation program object */
-struct gl_tess_eval_program
-{
- struct gl_program Base; /**< base class */
-
- /* input layout */
- GLenum PrimitiveMode; /* GL_TRIANGLES, GL_QUADS or GL_ISOLINES */
- GLenum Spacing; /* GL_EQUAL, GL_FRACTIONAL_EVEN, GL_FRACTIONAL_ODD */
- GLenum VertexOrder; /* GL_CW or GL_CCW */
- bool PointMode;
-};
-
-
/** Geometry program object */
struct gl_geometry_program
{
@@ -2136,7 +2123,7 @@ struct gl_tess_ctrl_program_state
struct gl_tess_eval_program_state
{
/** Currently bound and valid shader. */
- struct gl_tess_eval_program *_Current;
+ struct gl_program *_Current;
};
/**
@@ -2774,7 +2761,7 @@ struct gl_shader_program
struct {
/**
* True if gl_ClipDistance is written to. Copied into
- * gl_tess_eval_program by _mesa_copy_linked_program_data().
+ * gl_program by _mesa_copy_linked_program_data().
*/
GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or
0 if not present. */
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index b5207613e32..10194a9f5ca 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -111,7 +111,7 @@ update_program(struct gl_context *ctx)
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current;
- const struct gl_tess_eval_program *prevTEP = ctx->TessEvalProgram._Current;
+ const struct gl_program *prevTEP = ctx->TessEvalProgram._Current;
const struct gl_compute_program *prevCP = ctx->ComputeProgram._Current;
GLbitfield new_state = 0x0;
@@ -196,13 +196,12 @@ update_program(struct gl_context *ctx)
if (tesProg && tesProg->LinkStatus
&& tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]) {
/* Use GLSL tessellation evaluation shader */
- _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current,
- gl_tess_eval_program(
- tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program));
+ _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current,
+ tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program);
}
else {
/* No tessellation evaluation program */
- _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL);
}
if (tcsProg && tcsProg->LinkStatus
@@ -275,7 +274,7 @@ update_program(struct gl_context *ctx)
new_state |= _NEW_PROGRAM;
if (ctx->Driver.BindProgram) {
ctx->Driver.BindProgram(ctx, GL_TESS_EVALUATION_PROGRAM_NV,
- (struct gl_program *) ctx->TessEvalProgram._Current);
+ ctx->TessEvalProgram._Current);
}
}
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index f89a833d202..85c9b7b1711 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -227,14 +227,11 @@ _mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id)
struct gl_geometry_program *prog = CALLOC_STRUCT(gl_geometry_program);
return _mesa_init_gl_program(&prog->Base, target, id);
}
- case GL_TESS_CONTROL_PROGRAM_NV: {
+ case GL_TESS_CONTROL_PROGRAM_NV:
+ case GL_TESS_EVALUATION_PROGRAM_NV: {
struct gl_program *prog = CALLOC_STRUCT(gl_program);
return _mesa_init_gl_program(prog, target, id);
}
- case GL_TESS_EVALUATION_PROGRAM_NV: {
- struct gl_tess_eval_program *prog = CALLOC_STRUCT(gl_tess_eval_program);
- return _mesa_init_gl_program(&prog->Base, target, id);
- }
case GL_COMPUTE_PROGRAM_NV: {
struct gl_compute_program *prog = CALLOC_STRUCT(gl_compute_program);
return _mesa_init_gl_program(&prog->Base, target, id);
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index d937f826697..41806c218e4 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -125,15 +125,6 @@ _mesa_reference_compprog(struct gl_context *ctx,
(struct gl_program *) prog);
}
-static inline void
-_mesa_reference_tesseprog(struct gl_context *ctx,
- struct gl_tess_eval_program **ptr,
- struct gl_tess_eval_program *prog)
-{
- _mesa_reference_program(ctx, (struct gl_program **) ptr,
- (struct gl_program *) prog);
-}
-
extern GLboolean
_mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count);
@@ -257,19 +248,6 @@ gl_compute_program_const(const struct gl_program *prog)
return (const struct gl_compute_program *) prog;
}
-static inline struct gl_tess_eval_program *
-gl_tess_eval_program(struct gl_program *prog)
-{
- return (struct gl_tess_eval_program *) prog;
-}
-
-static inline const struct gl_tess_eval_program *
-gl_tess_eval_program_const(const struct gl_program *prog)
-{
- return (const struct gl_tess_eval_program *) prog;
-}
-
-
#ifdef __cplusplus
} /* extern "C" */
#endif
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;
}