@@ -18,29 +18,36 @@ auto CJITIncludeLoader::getInclude(const system::path& searchPath, const std::st
1818std::string CJITIncludeLoader::collectDeviceCaps (const SPhysicalDeviceLimits& limits, const SPhysicalDeviceFeatures& features)
1919{
2020 return R"===(
21- #ifndef _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
22- #define _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
23-
24- namespace nbl
25- {
26- namespace hlsl
27- {
28- namespace jit
29- {
30- struct device_capabilities
31- {
32- NBL_CONSTEXPR_STATIC_INLINE bool shaderFloat64 = )===" + std::to_string (features.shaderFloat64 ) + R"===( ;
33- NBL_CONSTEXPR_STATIC_INLINE bool shaderDrawParameters = )===" + std::to_string (features.shaderDrawParameters ) + R"===( ;
34- NBL_CONSTEXPR_STATIC_INLINE bool subgroupArithmetic = )===" + std::to_string (limits.shaderSubgroupArithmetic ) + R"===( ;
35- NBL_CONSTEXPR_STATIC_INLINE bool fragmentShaderPixelInterlock = )===" + std::to_string (features.fragmentShaderPixelInterlock ) + R"===( ;
36-
37- NBL_CONSTEXPR_STATIC_INLINE uint16_t maxOptimallyResidentWorkgroupInvocations = )===" + std::to_string (limits.maxOptimallyResidentWorkgroupInvocations ) + R"===( ;
38- };
39- }
40- }
41- }
42-
43- #endif // _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
21+ #ifndef _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
22+ #define _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
23+
24+ #include <nbl/builtin/hlsl/device_capabilities_traits.hlsl>
25+
26+ namespace nbl
27+ {
28+ namespace hlsl
29+ {
30+ namespace jit
31+ {
32+ struct device_capabilities
33+ {
34+ NBL_CONSTEXPR_STATIC_INLINE bool shaderFloat64 = )===" + std::to_string (features.shaderFloat64 ) + R"===( ;
35+ NBL_CONSTEXPR_STATIC_INLINE bool shaderDrawParameters = )===" + std::to_string (features.shaderDrawParameters ) + R"===( ;
36+ NBL_CONSTEXPR_STATIC_INLINE bool subgroupArithmetic = )===" + std::to_string (limits.shaderSubgroupArithmetic ) + R"===( ;
37+ NBL_CONSTEXPR_STATIC_INLINE bool fragmentShaderPixelInterlock = )===" + std::to_string (features.fragmentShaderPixelInterlock ) + R"===( ;
38+
39+ NBL_CONSTEXPR_STATIC_INLINE uint16_t maxOptimallyResidentWorkgroupInvocations = )===" + std::to_string (limits.maxOptimallyResidentWorkgroupInvocations ) + R"===( ;
40+ };
41+
42+ //TODO: when `device_capabilities_traits` is ready
43+ //typedef nbl::hlsl::device_capabilities_traits<device_capabilities> device_capabilities_traits;
44+ //for now just alias them
45+ typedef device_capabilities device_capabilities_traits;
46+ }
47+ }
48+ }
49+
50+ #endif // _NBL_BUILTIN_HLSL_JIT_DEVICE_CAPABILITIES_INCLUDED_
4451 )===" ;
4552}
4653}
0 commit comments