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

Author: Eric Anholt <e...@anholt.net>
Date:   Sat Feb 10 10:37:37 2018 +0000

ac/nir: Fix compiler warning about uninitialized dw_addr.

Even switching the def's condition to be the same chip revision check as
the use, the compiler doesn't figure it out.  Just NULL-init it.

Fixes: ec53e527421d ("ac/nir: Add ES output to LDS for GFX9.")
Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>

---

 src/amd/common/ac_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index d04e24f600..477b98b0d9 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -6088,7 +6088,7 @@ handle_es_outputs_post(struct nir_to_llvm_context *ctx,
        }
 
        for (unsigned i = 0; i < RADEON_LLVM_MAX_OUTPUTS; ++i) {
-               LLVMValueRef dw_addr;
+               LLVMValueRef dw_addr = NULL;
                LLVMValueRef *out_ptr = &ctx->nir->outputs[i * 4];
                int param_index;
                int length = 4;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to