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/gallium/drivers/svga/svga_screen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/svga/svga_screen.c') diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 95dde8b0897..6cb5a14f5b0 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -350,6 +350,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: return sws->have_sm4_1 ? 1 : 0; /* only single-channel textures */ + case PIPE_CAP_MAX_VARYINGS: + return sws->have_vgpu10 ? VGPU10_MAX_FS_INPUTS : 10; /* Unsupported features */ case PIPE_CAP_TEXTURE_MIRROR_CLAMP: -- cgit v1.2.3