zink: clamp PIPE_SHADER_CAP_MAX_INPUTS for xfb

vertex shader stages that can produce xfb must have
their input size clamped to the compiler define MAX_VARYING
to successfully be able to export an xfb output for each input

fixes KHR-GL46.geometry_shader.limits.max_input_components

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13632>
This commit is contained in:
Mike Blumenkrantz 2021-11-01 10:44:59 -04:00 committed by Marge Bot
parent 46e167028d
commit 5d1b81d8ac

View file

@ -790,6 +790,14 @@ zink_get_shader_param(struct pipe_screen *pscreen,
default:
return 0; /* unsupported stage */
}
switch (shader) {
case PIPE_SHADER_VERTEX:
case PIPE_SHADER_TESS_EVAL:
case PIPE_SHADER_GEOMETRY:
/* last vertex stage must support streamout, and this is capped in glsl compiler */
return MIN2(max, MAX_VARYING);
default: break;
}
return MIN2(max, 64); // prevent overflowing struct shader_info::inputs_read
}