summaryrefslogtreecommitdiff
path: root/source/slang/hlsl.meta.slang
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2025-08-01 12:36:29 -0700
committerGitHub <noreply@github.com>2025-08-01 19:36:29 +0000
commit8a15efb37a33d3c2943be87a19cbf9b5e2e8432b (patch)
tree3ee02acbcfc4b53112427ce9febc2aa0d92815ed /source/slang/hlsl.meta.slang
parent6239a67cbeb3c551e08bfbf96044a0451e8ecc24 (diff)
Drain sink when single-argument constructor call fail (#7883)
* fix bug * fix test * push test changs for clarity * fix bug * fix test * push test changs for clarity * test what fails * remove redundant code
Diffstat (limited to 'source/slang/hlsl.meta.slang')
-rw-r--r--source/slang/hlsl.meta.slang13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang
index 9fd5c8b6e..c3d2efaac 100644
--- a/source/slang/hlsl.meta.slang
+++ b/source/slang/hlsl.meta.slang
@@ -22665,7 +22665,7 @@ struct ConstBufferPointer<T, int alignment = 16>
[ForceInline]
static ConstBufferPointer<T> fromUInt(uint64_t val)
{
- return {(T*)val};
+ return ConstBufferPointer<T>(val);
}
[ForceInline]
@@ -22679,8 +22679,17 @@ struct ConstBufferPointer<T, int alignment = 16>
{
return _ptr != nullptr;
}
-}
+ __init(T* val)
+ {
+ _ptr = val;
+ }
+
+ __init(uint64_t val)
+ {
+ _ptr = (T*)val;
+ }
+}
//
// HLSL-like dynamic resources
// https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_DynamicResources.html