Module: Mesa
Branch: master
Commit: a18c84ecce37a32ad394191a12e49c16858223cb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a18c84ecce37a32ad394191a12e49c16858223cb

Author: Rhys Perry <[email protected]>
Date:   Tue Aug 18 16:07:32 2020 +0100

nir/instr_set: hash intrinsic sources

ministat (CSE only):
Difference at 95.0% confidence
        -9.80325 +/- 0.173089
        -41.4434% +/- 0.461972%
        (Student's t, pooled s = 0.0763653)

ministat (entire run):
Difference at 95.0% confidence
        -3.13667 +/- 0.61519
        -5.11107% +/- 0.990737%
        (Student's t, pooled s = 0.271416)

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6860>

---

 src/compiler/nir/nir_instr_set.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c
index 23d59d52b4f..c30d7317b94 100644
--- a/src/compiler/nir/nir_instr_set.c
+++ b/src/compiler/nir/nir_instr_set.c
@@ -249,6 +249,10 @@ hash_intrinsic(uint32_t hash, const nir_intrinsic_instr 
*instr)
    }
 
    hash = XXH32(instr->const_index, info->num_indices * 
sizeof(instr->const_index[0]), hash);
+
+   for (unsigned i = 0; i < nir_intrinsic_infos[instr->intrinsic].num_srcs; 
i++)
+      hash = hash_src(hash, &instr->src[i]);
+
    return hash;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to