mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-27 09:31:03 +00:00
zink: don't emit illegal interpolation
this is not valid for vertex inputs or fragment outputs cc: mesa-stable Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18365> (cherry picked from commit da1a3ed2ead1633b9ba7170b3e1fb4c08fa8dc2b)
This commit is contained in:
parent
c3cccad441
commit
0b081167b2
@ -6133,7 +6133,7 @@
|
||||
"description": "zink: don't emit illegal interpolation",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@ -553,6 +553,7 @@ emit_input(struct ntv_context *ctx, struct nir_variable *var)
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationCentroid);
|
||||
else if (var->data.sample)
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationSample);
|
||||
emit_interpolation(ctx, var_id, var->data.interpolation);
|
||||
} else if (ctx->stage < MESA_SHADER_FRAGMENT) {
|
||||
switch (var->data.location) {
|
||||
HANDLE_EMIT_BUILTIN(POS, Position);
|
||||
@ -582,8 +583,6 @@ emit_input(struct ntv_context *ctx, struct nir_variable *var)
|
||||
if (var->data.patch)
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationPatch);
|
||||
|
||||
emit_interpolation(ctx, var_id, var->data.interpolation);
|
||||
|
||||
_mesa_hash_table_insert(ctx->vars, var, (void *)(intptr_t)var_id);
|
||||
|
||||
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
|
||||
@ -631,6 +630,7 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var)
|
||||
ctx->so_output_gl_types[idx] = var->type;
|
||||
ctx->so_output_types[idx] = var_type;
|
||||
}
|
||||
emit_interpolation(ctx, var_id, var->data.interpolation);
|
||||
} else {
|
||||
if (var->data.location >= FRAG_RESULT_DATA0) {
|
||||
spirv_builder_emit_location(&ctx->builder, var_id,
|
||||
@ -667,8 +667,6 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var)
|
||||
spirv_builder_emit_component(&ctx->builder, var_id,
|
||||
var->data.location_frac);
|
||||
|
||||
emit_interpolation(ctx, var_id, var->data.interpolation);
|
||||
|
||||
if (var->data.patch)
|
||||
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationPatch);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user