Mesa (master): nir/intrinsics: Don't report negative dest_components

Jason Ekstrand jekstrand at kemper.freedesktop.org
Wed Mar 28 01:18:56 UTC 2018


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Tue Mar 27 16:12:16 2018 -0700

nir/intrinsics: Don't report negative dest_components

I have no idea why but having dest_components == -1 was causing a memory
leak somewhere.  Without this, you can't get through a full shader-db
run without running out of memory.

Reviewed-by: Rob Clark <robdclark at gmail.com>

---

 src/compiler/nir/nir_intrinsics_c.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_intrinsics_c.py b/src/compiler/nir/nir_intrinsics_c.py
index 339214ac53..4410bc6346 100644
--- a/src/compiler/nir/nir_intrinsics_c.py
+++ b/src/compiler/nir/nir_intrinsics_c.py
@@ -35,7 +35,7 @@ const nir_intrinsic_info nir_intrinsic_infos[nir_num_intrinsics] = {
    },
 % endif
    .has_dest = ${"true" if opcode.has_dest else "false"},
-   .dest_components = ${opcode.dest_components},
+   .dest_components = ${max(opcode.dest_components, 0)},
    .num_variables = ${opcode.num_variables},
    .num_indices = ${opcode.num_indices},
 % if opcode.indices:




More information about the mesa-commit mailing list