Skip to content

Commit 1e637c4

Browse files
"Fix" SelectIsCallable its really HLSL's fault as a language
1 parent 33a3247 commit 1e637c4

File tree

1 file changed

+2
-1
lines changed
  • include/nbl/builtin/hlsl/spirv_intrinsics

1 file changed

+2
-1
lines changed

include/nbl/builtin/hlsl/spirv_intrinsics/core.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ template<typename T, typename U NBL_FUNC_REQUIRES(concepts::Boolean<U> && (!conc
382382
[[vk::ext_instruction(spv::OpSelect)]]
383383
T select(U a, T x, T y);
384384

385-
NBL_VALID_EXPRESSION(SelectIsCallable, (T)(U), select<T,U>(experimental::declval<U>(),experimental::declval<T>(),experimental::declval<T>()));
385+
// need to use `spirv::` even in the namespace because it matches the HLSL intrinsic which is not namespaced at all, and will happily match anything
386+
NBL_VALID_EXPRESSION(SelectIsCallable, (T)(U), spirv::select<T,U>(experimental::declval<U>(),experimental::declval<T>(),experimental::declval<T>()));
386387

387388
}
388389

0 commit comments

Comments
 (0)