Mesa (main): nir/serialize: fix missing divergence info after deserialization

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 8 06:43:15 UTC 2022


Module: Mesa
Branch: main
Commit: 2071804f335bfee006ce506c61ed76a17b84c422
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2071804f335bfee006ce506c61ed76a17b84c422

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Thu Jul  7 12:44:10 2022 +0200

nir/serialize: fix missing divergence info after deserialization

Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17397>

---

 src/compiler/nir/nir_serialize.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c
index 8866d4bdb94..3e419115aa1 100644
--- a/src/compiler/nir/nir_serialize.c
+++ b/src/compiler/nir/nir_serialize.c
@@ -1389,6 +1389,7 @@ read_load_const(read_ctx *ctx, union packed_instr header)
    nir_load_const_instr *lc =
       nir_load_const_instr_create(ctx->nir, header.load_const.last_component + 1,
                                   decode_bit_size_3bits(header.load_const.bit_size));
+   lc->def.divergent = false;
 
    switch (header.load_const.packing) {
    case load_const_scalar_hi_19bits:
@@ -1478,6 +1479,8 @@ read_ssa_undef(read_ctx *ctx, union packed_instr header)
       nir_ssa_undef_instr_create(ctx->nir, header.undef.last_component + 1,
                                  decode_bit_size_3bits(header.undef.bit_size));
 
+   undef->def.divergent = false;
+
    read_add_object(ctx, &undef->def);
    return undef;
 }



More information about the mesa-commit mailing list