zink: fix slot mapping for legacy gl io with tess stages
e.g., gl_BackColor is a thing
Fixes: aec03553e1 ("zink: fix tess shader i/o variables")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9019>
This commit is contained in:
committed by
Marge Bot
parent
2b6950c3fd
commit
e3428419fb
@@ -413,9 +413,9 @@ handle_handle_slot(struct ntv_context *ctx, struct nir_variable *var, bool outpu
|
||||
if (var->data.patch) {
|
||||
assert(var->data.location >= VARYING_SLOT_PATCH0);
|
||||
return var->data.location - VARYING_SLOT_PATCH0;
|
||||
} else if ((output && ctx->stage == MESA_SHADER_TESS_CTRL) ||
|
||||
(!output && ctx->stage == MESA_SHADER_TESS_EVAL)) {
|
||||
assert(var->data.location >= VARYING_SLOT_VAR0);
|
||||
} else if (var->data.location >= VARYING_SLOT_VAR0 &&
|
||||
((output && ctx->stage == MESA_SHADER_TESS_CTRL) ||
|
||||
(!output && ctx->stage == MESA_SHADER_TESS_EVAL))) {
|
||||
return var->data.location - VARYING_SLOT_VAR0;
|
||||
}
|
||||
return handle_slot(ctx, var->data.location);
|
||||
|
||||
Reference in New Issue
Block a user