summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-09-10 09:35:58 -0500
committerIan Romanick <[email protected]>2013-09-19 16:29:44 -0500
commitd91249df1a9f99813794aac09c4fba77831da1f7 (patch)
tree5c9e37f266517a63128115944f17ce0fdffb57c7 /src/mesa/state_tracker/st_extensions.c
parenta384238c3dbcc89f7acc51027b123e50d2d3ae60 (diff)
mesa: Use correct data for MAX_{VERTEX,GEOMETRY}_VARYING_COMPONENTS_ARB queries
Previously gl_constants::MaxVaryingComponents was used. Now gl_constants::VertexProgram::MaxOutputs and gl_constants::GeometryProgram::MaxOutputs are used. This means that st_extensions.c had to be updated to set these fields instead of MaxVaryingComponents. It was previously the only place that set MaxVaryingComponents. I believe that the structure is allocated by calloc, so the value should be initialized to zero in non-Gallium drivers before and after my change. Right now nobody enables GL_ARB_geometry_shader4, so it's pretty much dead code anyway. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Paul Berry <[email protected]> Cc: Zack Rusin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 0b7001baec2..97dd7321061 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -256,7 +256,10 @@ void st_init_limits(struct st_context *st)
c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
PIPE_SHADER_CAP_MAX_INPUTS);
c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING);
- c->MaxVaryingComponents = c->MaxVarying * 4;
+ c->FragmentProgram.MaxInputComponents = c->MaxVarying * 4;
+ c->VertexProgram.MaxOutputComponents = c->MaxVarying * 4;
+ c->GeometryProgram.MaxInputComponents = c->MaxVarying * 4;
+ c->GeometryProgram.MaxOutputComponents = c->MaxVarying * 4;
c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET);
c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET);