From 6010d7b8e8bee1bcea2b329cf6d3b44c5fc3ca66 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 25 Aug 2017 19:22:03 +0200 Subject: gallium: add PIPE_CAP_MAX_VARYINGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some NVIDIA hardware can accept 128 fragment shader input components, but only have up to 124 varying-interpolated input components. We add a new cap to express this cleanly. For most drivers, this will have the same value as PIPE_SHADER_CAP_MAX_INPUTS for the fragment shader. Fixes KHR-GL45.limits.max_fragment_input_components Signed-off-by: Karol Herbst [imirkin: rebased, improved docs/commit message] Signed-off-by: Ilia Mirkin Acked-by: Rob Clark Acked-by: Eric Anholt Reviewed-by: Marek Olšák Cc: 19.0 --- src/mesa/state_tracker/st_extensions.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mesa/state_tracker/st_extensions.c') diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index c1a528551cd..2dbda83ca10 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -365,10 +365,7 @@ void st_init_limits(struct pipe_screen *screen, c->Program[MESA_SHADER_VERTEX].MaxAttribs = MIN2(c->Program[MESA_SHADER_VERTEX].MaxAttribs, 16); - /* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number - * of inputs. It's always 2 colors + N generic inputs. */ - c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, - PIPE_SHADER_CAP_MAX_INPUTS); + c->MaxVarying = screen->get_param(screen, PIPE_CAP_MAX_VARYINGS); c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); c->MaxGeometryOutputVertices = screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES); -- cgit v1.2.3