Mesa (master): nir: nir_range_analysis needs to be updated for vec16

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 11 15:04:32 UTC 2020


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

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Mon Aug 10 20:28:34 2020 -0700

nir: nir_range_analysis needs to be updated for vec16

Reviewed-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6275>

---

 src/compiler/nir/nir_range_analysis.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c
index 14f93061040..0793d67a02f 100644
--- a/src/compiler/nir/nir_range_analysis.c
+++ b/src/compiler/nir/nir_range_analysis.c
@@ -87,7 +87,10 @@ static struct ssa_result_range
 analyze_constant(const struct nir_alu_instr *instr, unsigned src,
                  nir_alu_type use_type)
 {
-   uint8_t swizzle[4] = { 0, 1, 2, 3 };
+   uint8_t swizzle[NIR_MAX_VEC_COMPONENTS] = { 0, 1, 2, 3,
+                                               4, 5, 6, 7,
+                                               8, 9, 10, 11,
+                                               12, 13, 14, 15 };
 
    /* If the source is an explicitly sized source, then we need to reset
     * both the number of components and the swizzle.



More information about the mesa-commit mailing list