diff --git a/.pick_status.json b/.pick_status.json index d59dab2e7bf..300b2aced5b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2014,7 +2014,7 @@ "description": "spirv: only consider IO variables when adjusting patch locations for TES", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "dfbc03fa88478126607c69723a61280f6e9a011f", "notes": null diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index ce4b19134ab..49c07b950c9 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -2024,7 +2024,9 @@ adjust_patch_locations(struct vtn_builder *b, struct vtn_variable *var) for (uint16_t i = 0; i < num_data; i++) { vtn_assert(data[i].location < VARYING_SLOT_PATCH0); - if (data[i].patch && data[i].location >= VARYING_SLOT_VAR0) + if (data[i].patch && + (data[i].mode == nir_var_shader_in || data[i].mode == nir_var_shader_out) && + data[i].location >= VARYING_SLOT_VAR0) data[i].location += VARYING_SLOT_PATCH0 - VARYING_SLOT_VAR0; } }