i965/mesa/st: eliminate gl_tess_eval_program
authorTimothy Arceri <timothy.arceri@collabora.com>
Tue, 18 Oct 2016 23:30:52 +0000 (10:30 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 03:29:36 +0000 (14:29 +1100)
We now get all the tes metadata from shader_info.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
21 files changed:
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_tes_surface_state.c
src/mesa/drivers/dri/i965/gen7_ds_state.c
src/mesa/main/context.c
src/mesa/main/mtypes.h
src/mesa/main/state.c
src/mesa/program/program.c
src/mesa/program/program.h
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom_constbuf.c
src/mesa/state_tracker/st_atom_rasterizer.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h

index 9b7e184668030d1b26ee97fc2b62298d80ae790a..db48aa1fd7e7c2dd648225931e6db72a1267675f 100644 (file)
@@ -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;
 }
index 5485de3692aa63ef64fede3d6665b6e6590bc850..2dbaddd800552cce19273691110e81f193e2ee28 100644 (file)
@@ -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 =
index 4e0df5a77ffff01897eef000b783660b1dbcde70..7c553c831e1fb05eea0e1bdac0e02d1a338e2f42 100644 (file)
@@ -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;
       }
index 345aa7f1a4cc642b1830a5b79ab2e2fb045e6652..75115074c0c97ec77653c7b7c7cf8053b754b4d3 100644 (file)
@@ -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;
index fed19751b5c84b2dcd385ed48a0b6e87dc1cddd0..3992bb312a870c7e38dd54fe6a10acb778fc163d 100644 (file)
@@ -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));
 
index b1e85eebb5c52b5f94779591b60230df089cba02..2a7d48a591d3d2c61ff4632c7e7a57b86ad019ba 100644 (file)
@@ -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);
 }
 
index 1edb8fdd495c4363b8b5848ffb925ca44b8f6bcc..23e03d7e2af16abe2fa53d3b847362d5beaf680a 100644 (file)
@@ -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);
index 1e4f87d65361d48a3dd69f9cb2268221f395068a..5f00365cd0d81a8150ec829fef9e8cc1590cf7c9 100644 (file)
@@ -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);
index 9436f8e29094936e1844afe1497fd8e29b88b62c..c0984f122b4e10f381f906055bbe744c65e0dcf4 100644 (file)
@@ -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. */
index b5207613e32918c506a0cc346b5768aeacd1d508..10194a9f5caef93d49ba43463877a32402df9f3e 100644 (file)
@@ -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);
       }
    }
 
index f89a833d20221b457f0b9023d6a45aa45af0ba34..85c9b7b17116bed8ffbb2adef2f314a0a47be79c 100644 (file)
@@ -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);
index d937f826697c62945004ac19a71b667fd1a44086..41806c218e458485e5befd9f5b8e3a4e1f151781 100644 (file)
@@ -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
index 497ba82aab9758dbe2e19d886f7d5d188b553524..231bdd95fa11f51228b308dd8fabb6bbd46ecbd5 100644 (file)
@@ -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;
index 90d4ffbe98b975d2e51e69b7a84ee0327ec7d223..77232f243239455b4790080f5e0dded967aafb7d 100644 (file)
@@ -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 );
    }
 }
index ca975aafddee8edf2338281172d96cc2077107b6..8d22bfc3a635afeb0632fa8ef1f450f7088d7ba6 100644 (file)
@@ -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)
index 76b355cec9536a489a228237288255a5e08e8dcf..c802ad56e91df0466a1668aeca25a8e2b8d6c872 100644 (file)
@@ -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]);
index 0df0770bb1e565ac9f0dbb20c866d0ad3e529ade..235303cfd24430986ae9acdabc87d470d49bc9db 100644 (file)
@@ -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);
index fbd73d69f225cae81537f146d43bf1d507bafffb..613886e756411bfe84a1e0528ff43173b00353ee 100644 (file)
@@ -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]);
index c85f0ef83ff846755d75cc635573760e6349e928..9878e9c52fa6092e6374c1a032cc958b2d620b99 100644 (file)
@@ -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;
 
index 210aa33daf5be4e59ec9fcd361da4dc0ae41b5a2..78044526d56dd1a751f5e496fde07dbbffa21fd8 100644 (file)
@@ -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);
index b801891832d92798c9f5942e24a98c25d3c2d9eb..daea78128efb2c211c779c469d035e80aab9a386 100644 (file)
@@ -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;
 }