mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
Merge branch 'nir-spirv' into vulkan
This commit is contained in:
commit
fe786ff67d
1 changed files with 6 additions and 2 deletions
|
|
@ -1285,8 +1285,6 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
|
|||
val->deref = nir_deref_var_create(b, var);
|
||||
val->deref_type = type;
|
||||
|
||||
vtn_foreach_decoration(b, val, var_decoration_cb, var);
|
||||
|
||||
if (b->execution_model == SpvExecutionModelFragment &&
|
||||
var->data.mode == nir_var_shader_out) {
|
||||
var->data.location += FRAG_RESULT_DATA0;
|
||||
|
|
@ -1298,6 +1296,12 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
|
|||
var->data.location += VARYING_SLOT_VAR0;
|
||||
}
|
||||
|
||||
/* We handle decorations last because decorations might cause us to
|
||||
* over-write other things such as the variable's location and we want
|
||||
* those changes to stick.
|
||||
*/
|
||||
vtn_foreach_decoration(b, val, var_decoration_cb, var);
|
||||
|
||||
/* If this was a uniform block, then we're not going to actually use the
|
||||
* variable (we're only going to use it to compute offsets), so don't
|
||||
* declare it in the shader.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue