zink: flag exact alu op results in ntv with NoContraction

this propagates the exact flag and ensures precision isn't lost during
optimizations

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8660>
This commit is contained in:
Mike Blumenkrantz 2020-07-29 10:22:55 -04:00 committed by Marge Bot
parent 8b793f9567
commit 3fc8da13f6

View file

@ -1875,6 +1875,8 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
unreachable("unsupported opcode");
return;
}
if (alu->exact)
spirv_builder_emit_decoration(&ctx->builder, result, SpvDecorationNoContraction);
store_alu_result(ctx, alu, result);
}