diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-05-03 20:16:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-03 20:16:58 -0400 |
| commit | c9ef8d58a135061262fd321a82061d27dc733cf5 (patch) | |
| tree | 888bee92d8519fe80ec9d5dbb95c2dc8da985865 /source/slang/slang.cpp | |
| parent | bf2b05528d6edbbf1beb87552f447d29f92eee47 (diff) | |
HLSL->Vulkan binding support (#2865)
* WIP around VK shift binding.
* Refactor around options parsing.
* Remove needless passing around of sink.
* Some more tidying around OptionsParser.
* Handle vulkan shift parsing.
* Fix small issue around vk binding and "all".
* Fixing some small issues. Missing break.
* Split out VulkanLayoutOptions
* WIP binding taking into account HLSL->Vulkan options.
* First attempt at making binding work with HLSLVulkanOptions.
* VulkanLayoutOptions -> HLSLToVulkanLayoutOptions
* WIP with HLSL-Vulkan binding.
* Some more testing around vk-shift.
* Improvements around global binding.
More tests.
* Improve test coverage.
Improve checking for requirements around default space.
* Update command line options.
* Small fixes.
* Small fix in options reporting.
* Fix warning issue.
* Some fixes for isDefault for HLSLToVulkanLayoutOptions.
* Update hlsl-to-vulkan-shift output. The difference was due to default handling if shift isn't specified, and not being specified was not correctly tracked.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index ec5a7084e..a1c8f9b03 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -61,6 +61,7 @@ extern Slang::String get_slang_hlsl_prelude(); namespace Slang { + /* static */const BaseTypeInfo BaseTypeInfo::s_info[Index(BaseType::CountOf)] = { { 0, 0, uint8_t(BaseType::Void) }, @@ -1444,6 +1445,14 @@ MatrixLayoutMode TargetRequest::getDefaultMatrixLayoutMode() return linkage->getDefaultMatrixLayoutMode(); } +void TargetRequest::setHLSLToVulkanLayoutOptions(HLSLToVulkanLayoutOptions* opts) +{ + if (isKhronosTarget(this)) + { + hlslToVulkanLayoutOptions = opts; + } +} + void TargetRequest::addCapability(CapabilityAtom capability) { rawCapabilities.add(capability); @@ -4678,6 +4687,11 @@ void EndToEndCompileRequest::setTargetProfile(int targetIndex, SlangProfileID pr getLinkage()->targets[targetIndex]->setTargetProfile(Profile(profile)); } +void EndToEndCompileRequest::setHLSLToVulkanLayoutOptions(int targetIndex, HLSLToVulkanLayoutOptions* vulkanShiftOptions) +{ + getLinkage()->targets[targetIndex]->setHLSLToVulkanLayoutOptions(vulkanShiftOptions); +} + void EndToEndCompileRequest::setTargetFlags(int targetIndex, SlangTargetFlags flags) { getLinkage()->targets[targetIndex]->addTargetFlags(flags); |
