[Mesa-dev] [PATCH v4 5/9] mesa: initialize gl_geometry_program Invocations field

Jordan Justen jordan.l.justen at intel.com
Thu Feb 6 18:28:05 PST 2014


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
---
 src/mesa/main/mtypes.h                     | 1 +
 src/mesa/main/shaderapi.c                  | 1 +
 src/mesa/program/program.c                 | 1 +
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
 src/mesa/state_tracker/st_program.c        | 1 +
 5 files changed, 5 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4d3a59a..ccee7ab 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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 */
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 65b6b16..ad9cfc6 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1858,6 +1858,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;
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index fa80bc5..82e622d 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 610fc68..ed71cfa 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5182,6 +5182,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");
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index cadbe17..f67b0fa 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1087,6 +1087,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,
-- 
1.9.rc1



More information about the mesa-dev mailing list