mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
glsl: assign varying locations to tess shaders when doing SSO
GRID Autosport uses SSO shaders. When a tessellation evaluation shader
is passed through this, it triggers assertion failures down the line
with unassigned varying locations. Make sure to do this when the first
shader in the pipeline is not a vertex shader.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit eca8f38dcf)
This commit is contained in:
parent
242146977f
commit
66e0a26b56
1 changed files with 4 additions and 4 deletions
|
|
@ -4379,13 +4379,13 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
if (first < MESA_SHADER_FRAGMENT) {
|
||||
gl_shader *const sh = prog->_LinkedShaders[last];
|
||||
|
||||
if (first == MESA_SHADER_GEOMETRY) {
|
||||
if (first != MESA_SHADER_VERTEX) {
|
||||
/* There was no vertex shader, but we still have to assign varying
|
||||
* locations for use by geometry shader inputs in SSO.
|
||||
* locations for use by tessellation/geometry shader inputs in SSO.
|
||||
*
|
||||
* If the shader is not separable (i.e., prog->SeparateShader is
|
||||
* false), linking will have already failed when first is
|
||||
* MESA_SHADER_GEOMETRY.
|
||||
* false), linking will have already failed when first is not
|
||||
* MESA_SHADER_VERTEX.
|
||||
*/
|
||||
if (!assign_varying_locations(ctx, mem_ctx, prog,
|
||||
NULL, prog->_LinkedShaders[first],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue