From 50f44c178de4c614dc45fc48938e6881c0373f6a Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 9 Oct 2024 01:23:56 +0800 Subject: Look through attributes and rates when determining by reference initialization (#5023) * Look through attributes and rates when determining by reference initialization Closes #5022 * Make type of unwrapAttributedType more specific * loosen type of unwrapAttributedType * Discard changes to source/slang/slang-emit-spirv.cpp * Discard changes to source/slang/slang-ir-check-differentiability.cpp * Discard changes to source/slang/slang-ir.cpp * Discard changes to source/slang/slang-ir.h * Update slang-ir-use-uninitialized-values.cpp * Remove redundant cast --------- Co-authored-by: Yong He --- source/slang/slang-ir-use-uninitialized-values.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-ir-use-uninitialized-values.cpp b/source/slang/slang-ir-use-uninitialized-values.cpp index c09077528..98fd9841a 100644 --- a/source/slang/slang-ir-use-uninitialized-values.cpp +++ b/source/slang/slang-ir-use-uninitialized-values.cpp @@ -265,7 +265,7 @@ namespace Slang // Consider it as a store if its passed // as an out/inout/ref parameter - IRType* type = ftype->getParamType(index); + auto type = unwrapAttributedType(ftype->getParamType(index)); return (as(type) || as(type) || as(type)) ? Store : Load; } -- cgit v1.2.3