mesa: initialize gl_geometry_program Invocations field
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 25 Jan 2014 20:34:24 +0000 (12:34 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 20 Feb 2014 18:33:09 +0000 (10:33 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c
src/mesa/program/program.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_program.c

index e7e39ee80a9e539a74953986e9f1e8a504bdd6f9..bc029698da1129f99b2062b1b0e3cdc6e6b9b58b 100644 (file)
@@ -2143,6 +2143,7 @@ struct gl_geometry_program
 
    GLint VerticesIn;
    GLint VerticesOut;
+   GLint Invocations;
    GLenum InputType;  /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
                            GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
    GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
index 44b4c3a85896ca111cb8bd09aa2030d02a01983d..8b962af6677102dd6f139f9200adec221a54ab93 100644 (file)
@@ -1859,6 +1859,7 @@ _mesa_copy_linked_program_data(gl_shader_stage type,
       struct gl_geometry_program *dst_gp = (struct gl_geometry_program *) dst;
       dst_gp->VerticesIn = src->Geom.VerticesIn;
       dst_gp->VerticesOut = src->Geom.VerticesOut;
+      dst_gp->Invocations = src->Geom.Invocations;
       dst_gp->InputType = src->Geom.InputType;
       dst_gp->OutputType = src->Geom.OutputType;
       dst->UsesClipDistanceOut = src->Geom.UsesClipDistance;
index fa80bc58c9aa29864f693f00a82938e89ca1da41..82e622d2bc270d221a05ec94c8e9edfa762520c6 100644 (file)
@@ -550,6 +550,7 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
          struct gl_geometry_program *gpc = gl_geometry_program(clone);
          gpc->VerticesOut = gp->VerticesOut;
          gpc->InputType = gp->InputType;
+         gpc->Invocations = gp->Invocations;
          gpc->OutputType = gp->OutputType;
       }
       break;
index aab916ad66f95fab1d61fea5eec570221687dbb9..94fa9c8eacd9d8638114ab06ddc9b9b3709f19df 100644 (file)
@@ -5183,6 +5183,7 @@ get_mesa_program(struct gl_context *ctx,
       stgp->Base.InputType = shader_program->Geom.InputType;
       stgp->Base.OutputType = shader_program->Geom.OutputType;
       stgp->Base.VerticesOut = shader_program->Geom.VerticesOut;
+      stgp->Base.Invocations = shader_program->Geom.Invocations;
       break;
    default:
       assert(!"should not be reached");
index 438d52c21126cb5db2c48a102532638a9fb8038c..e9074ac97e454fde3ffe83a93ad0a7bf6ddb4ee2 100644 (file)
@@ -1096,6 +1096,7 @@ st_translate_geometry_program(struct st_context *st,
    ureg_property_gs_input_prim(ureg, stgp->Base.InputType);
    ureg_property_gs_output_prim(ureg, stgp->Base.OutputType);
    ureg_property_gs_max_vertices(ureg, stgp->Base.VerticesOut);
+   ureg_property_gs_invocations(ureg, stgp->Base.Invocations);
 
    if (stgp->glsl_to_tgsi)
       st_translate_program(st->ctx,