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

Author: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>
Date:   Wed Jan 10 17:05:10 2018 +0100

ac/nir: Sanitize location_frac for local variables.

If they were promoted from inputs/outputs, they could have a
non-zero value left over, which messed with our store handling.

Fixes: 06f05040eb "radv: Link shaders."
Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

---

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

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 5885c70ef8..8301b16057 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -5556,6 +5556,7 @@ setup_locals(struct ac_nir_context *ctx,
        nir_foreach_variable(variable, &func->impl->locals) {
                unsigned attrib_count = 
glsl_count_attribute_slots(variable->type, false);
                variable->data.driver_location = ctx->num_locals * 4;
+               variable->data.location_frac = 0;
                ctx->num_locals += attrib_count;
        }
        ctx->locals = malloc(4 * ctx->num_locals * sizeof(LLVMValueRef));

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

Reply via email to