summaryrefslogtreecommitdiff
path: root/source/slang/hlsl.meta.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-07-25 15:00:14 -0700
committerGitHub <noreply@github.com>2024-07-25 15:00:14 -0700
commitc9d89a40775a055873adf82cfb0ee1cb6bdcb93c (patch)
tree2438f353e87b30febe966ca23976793637c018d2 /source/slang/hlsl.meta.slang
parent1343ab79fcd0ff9e5ffebbcf95414e51ab19e9cd (diff)
Overhaul IR lowering of pointer types. (#4710)
* Overhaul IR lowering of pointer types. * Propagate address space in IRBuilder. * Fixup. * Fix. * Fix. * Change how Ptr type is printed to text. * Fix.
Diffstat (limited to 'source/slang/hlsl.meta.slang')
-rw-r--r--source/slang/hlsl.meta.slang16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang
index 1a112e1a9..0539097eb 100644
--- a/source/slang/hlsl.meta.slang
+++ b/source/slang/hlsl.meta.slang
@@ -17568,11 +17568,11 @@ Ref<T> __hitObjectAttributes<T>()
return t;
}
[ForceInline]
-Ptr<T> __allocHitObjectAttributes<T>()
+__Addr<T> __allocHitObjectAttributes<T>()
{
- [__vulkanHitObjectAttributes]
+ [__vulkanHitObjectAttributes]
static T t;
- return &t;
+ return __get_addr(t);
}
// Next is the custom intrinsic that will compute the hitObjectAttributes location
@@ -17840,7 +17840,7 @@ struct HitObject
case spirv:
{
// Save the attributes
- Ptr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
+ __Addr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
*attr = attributes;
@@ -17914,7 +17914,7 @@ struct HitObject
case spirv:
{
// Save the attributes
- Ptr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
+ __Addr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
*attr = attributes;
@@ -18004,7 +18004,7 @@ struct HitObject
case spirv:
{
// Save the attributes
- Ptr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
+ __Addr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
*attr = attributes;
let origin = Ray.Origin;
let direction = Ray.Direction;
@@ -18071,7 +18071,7 @@ struct HitObject
case spirv:
{
// Save the attributes
- Ptr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
+ __Addr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
*attr = attributes;
let origin = Ray.Origin;
let direction = Ray.Direction;
@@ -18618,7 +18618,7 @@ struct HitObject
}
case spirv:
{
- Ptr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
+ __Addr<attr_t> attr = __allocHitObjectAttributes<attr_t>();
spirv_asm
{
OpExtension "SPV_NV_shader_invocation_reorder";