mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 00:00:12 +01:00
zink: emit interpolation decorations for ntv outputs
this matches up with nir internal states pre/post ntv Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5384>
This commit is contained in:
parent
ad8e61621b
commit
98d07bd5a0
1 changed files with 17 additions and 0 deletions
|
|
@ -349,6 +349,23 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var)
|
|||
spirv_builder_emit_component(&ctx->builder, var_id,
|
||||
var->data.location_frac);
|
||||
|
||||
switch (var->data.interpolation) {
|
||||
case INTERP_MODE_NONE:
|
||||
case INTERP_MODE_SMOOTH: /* XXX spirv doesn't seem to have anything for this */
|
||||
break;
|
||||
case INTERP_MODE_FLAT:
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationFlat);
|
||||
break;
|
||||
case INTERP_MODE_EXPLICIT:
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationExplicitInterpAMD);
|
||||
break;
|
||||
case INTERP_MODE_NOPERSPECTIVE:
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationNoPerspective);
|
||||
break;
|
||||
default:
|
||||
unreachable("unknown interpolation value");
|
||||
}
|
||||
|
||||
_mesa_hash_table_insert(ctx->vars, var, (void *)(intptr_t)var_id);
|
||||
|
||||
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue