34 Commits

Author SHA1 Message Date
Bill Hollings
d9f75ed812 Update copyright notices to year 2024. 2024-01-04 14:51:53 -05:00
Bill Hollings
40baeaa965 Fix regression error in argument buffer runtime arrays.
- Update to latest SPIRV-Cross contining the fix.
- Modify CTS options in runcts script to avoid outputting full CTS log,
  and use less file caching, all to reduce memory and filespace consumption,
  and possibly improve performance (unrelated).
- Update MoltenVKShaderConverter tool to include Metal 3.1 support
  and improved argument buffer settings (unrelated).
- Force Github CI to use Python 3.11, to avoid crash in
  glslang::update_glslang_sources.py due to use of distutils,
  removed in Python 3.12 (unrelated).
- Small unrelated non-functional edits.
2023-11-07 14:43:07 -05:00
Bill Hollings
49c6e8bae3 Update dependency libraries to match Vulkan SDK 1.3.268. 2023-10-17 14:36:26 -04:00
Antarctic Coder
056dec80e6 Completed the support for MSL 3.1 enum
This commit adds some extra code that was needed to define to MSL 3.1 enum that was not included in the first commit. Based on PR: #1940
2023-07-05 13:20:59 -04:00
Bill Hollings
46d46f5191 Reduce memory footprint of retained MSL source code.
- Don't retain converted MSL source code in MVKShaderModule.
- Add SPIRVToMSLConversionResult and GLSLToSPIRVConversionResult
  structures to capture all feedback from shader conversions.
2023-02-27 14:54:19 -05:00
Bill Hollings
12592abbc9 Update copyright notices to year 2023. 2023-01-13 12:19:37 -05:00
Bill Hollings
4effb9a5fd Support automatically enable Metal argument buffers when
VK_EXT_descriptor_indexing extension is enabled.

- Change MVKConfiguration::useMetalArgumentBuffers to enum instead of boolean
  and default to enabling Metal argument buffers for VK_EXT_descriptor_indexing.
- Leave Metal argument buffers disabled by default until they are improved.
- Enable VkPhysicalDeviceVulkan12Features::descriptorIndexing.
- Add MVKPhysicalDeviceVulkan12FeaturesNoExt to track and enable Vulkan 1.2
  features not part of any prior extensions absorbed by Vulkan 1.2.
- Update VK_MVK_MOLTENVK_SPEC_VERSION to version `36`.
- MVKDeviceTrackingMixin remove unnecessary inline declarations.
- MoltenShaderConveter tool support Metal Argument Buffers and MSL 3.0.
2022-08-26 14:48:13 -04:00
Bill Hollings
26d4a13e34 Support Xcode 14, macOS 13, and iOS/tvOS 16.
- Update minimum Xcode deployment targets to macOS 10.13, iOS 11, and tvOS 11,
  to avoid Xcode build warnings.
- Add support for MTLLanguageVersion3_0 enumeration.
- Build efficiencies:
  - Build scripts create_dylib.sh and gen_moltenvk_rev_hdr.sh
    only run if build dependencies require it.
  - Packaging and copy_to_staging.sh scripts are too complex to define dependencies,
    and are fast, so configured to run every time, to avoid build warning.
- Replace use of deprecated sprintf() with  snprintf().
- Replace use of deprecated kIOMasterPortDefault with  kIOMainPortDefault.
- Support old-style GPU debug capture only if building for earlier minimum
  deployment targets, to avoid deprecation warning.
- Update minimum Xcode deployment targets of Cube demo to macOS 10.14, iOS 12,
  and tvOS 12, to avoid Xcode build warning regarding MTLSharedEvent in .
- Update README.md document regarding minimum Xcode deployment targets.
2022-07-06 18:15:10 -04:00
Bill Hollings
728182cf75 MoltenVKShaderConverter tool defaults to the
highest MSL version supported on runtime OS.

Update to latest SPIRV-Cross.
Update Docs/Whats_New.md document.
2022-03-08 21:22:25 -05:00
Nikita Fediuchin
be51560ba9 Update license year 2 2022-02-04 17:36:53 +02:00
Bill Hollings
d4daba6687 MoltenVKShaderConverter updates.
mvk::getShaderOutputs() in SPRIVReflection.h support flattening nested structures.
MoltenVKShaderConverter tool support loading tessellation shader files.
MoltenVKShaderConverter tool update to MSL 2.4 by default.
Remove use of deprecated MTLCreateSystemDefaultDevice().
Update to latest version of SPIRV-Cross.
2022-01-19 15:55:44 -05:00
Bill Hollings
18642002ce Updates to better support Rosetta2 runtimes, and MSL 2.4 and 2.3 versions.
Do not use MTLEvent for VkSemaphore under Rosetta2.
Remove compile test for MVK_MACOS_APPLE_SILICON and MVK_APPLE_SILICON when testing
for Apple GPU families, to allow x86 builds to test for Apple GPU under Rosetta2.
Simplify identifying M1 GPU. All M1 SoCs currently support the A14 (Apple7) GPU.
Support compiling MSL 2.4 in runtime pipelines and MoltenVKShaderConverterTool.
Fix issue where MSL 2.3 only available on Apple Silicon, even on macOS.
Update to latest SPIRV-Cross (unrelated to Rosetta2).
2021-12-01 18:14:07 -05:00
Bill Hollings
1655f3b455 Add tag names to anonymous structs. 2021-04-30 20:49:01 -04:00
Chip Davis
2bfb5ed77b Fix build on Xcode 11.
I missed this.
2021-01-29 14:53:03 -06:00
Bill Hollings
2fc9fcb079 Support shaderInt64 feature only on minimum MSL 2.3 and higher GPUs. 2021-01-25 21:40:29 -05:00
Bill Hollings
57763529b1 Advertise support for shaderInt64 feature.
Add MVKDevice::mslVersionIsAtLeast() to support tests for MSL version.
Also bump MSL support level of standalone MoltenVKShaderConverter tool.
2021-01-25 13:08:41 -05:00
Bill Hollings
015031c955 Update copyright notices to year 2021 and Xcode build settings check to Xcode 12.3. 2021-01-21 13:37:07 -05:00
Bill Hollings
dd98fbd26f Remove use of @available() directive as it can cause issues in some build environments.
Generally replace use of @available() with respondsToSelector:.
Add mvkMakeOSVersion() and mvkOSVersionIsAtLeast(macos,ios) to help testing OS versions.
Set maxDrawIndexedIndexValue to kMVKUndefinedLargeUInt32 instead of uint32_t max.
2020-06-11 12:43:38 -04:00
Bill Hollings
eb99488f04 Reinstate VulkanSamples API-Samples demo apps.
MVKShaderConverterTool add support to output SPIR-V as header (.h) files.
Add MVKShaderConverterTool Xcode target.
Add MVKShaderConverterTool Package Xcode scheme.
fetchDependencies builds MVKShaderConverterTool and runs
it on shader files in VulkanSamples API-Samples directory.
2020-04-11 16:19:03 -04:00
Bill Hollings
8ec682938b Update copyright to 2020. 2020-01-07 16:47:29 -05:00
Bill Hollings
84ea825ea3 Separate SPIRVToMSLConverterContext into input config and output results.
Refactor SPIRVToMSLConverterContext into distinct SPIRVToMSLConversionConfiguration
and SPIRVToMSLConversionResults for conversion input and output, respectively.
Update to latest SPIRV-Cross version.
Update What's New document.
2019-06-29 18:01:07 -04:00
Bill Hollings
64d7e07243 Support immutable depth compare samplers as constexpr samplers hardcoded in MSL.
On iOS GPU family 2 and earlier:
  - Allow immutable samplers to be passed to SPIRV-Cross in a format
    they can be output as hardcoded constexpr samplers in MSL.
  - Validate depth compare samplers are only used as immutable.

MVKMVKPipelineLayout & MVKDescriptorSetLayout can take null MVKCommandEncoder
to perform a validation pass when binding or pushing.
Reduce redundancy by combining SPIRVToMSLConverterContext structs
with compatible SPIRV-Cross structs.
Update MoltenVK version to 1.0.36.
2019-06-15 01:47:13 -04:00
Bill Hollings
c3aaf976ae Add support for the VK_NV_glsl_shader extension.
Support runtime shader compilation from GLSL.
Return VK_ERROR_INVALID_SHADER_NV on shader and pipeline compilation errors.
Add MVKShaderCompilationPerformance::glslToSPRIV to track GLSL conversion performance.
Rename MoltenVKGLSLToSPIRVConverter MVKShaderStage enum to MVKGLSLConversionShaderStage
to avoid naming conflicts with MoltenVK MVKShaderStage enum.
Hologram demo load SPIR-V directly instead of using GLSL through either
MoltenVKGLSLToSPIRVConverter or VK_NV_glsl_shader extension.
Update to latest version of VulkanSamples that supports MVKGLSLConversionShaderStage.
2019-05-10 12:21:03 -04:00
Bill Hollings
eca03b8de1 MoltenVKShaderConverter tool add MSL version and platform command-line options.
Add SPIRVToMSLConverterOptions::platform to track platform. Default to build platform.
Update default SPIRVToMSLConverterOptions MSL version to 2.1.
MoltenVKShaderConverter test MSL compilation use same MSL version as conversion.
Default min perf tracking value to 0.0.
SPIRVToMSLConverter.h reference spirv.hpp via SPIRV-Cross framework.
Update What's New document.
2019-04-17 16:09:07 -04:00
Bill Hollings
ebce19b0b7 Add MoltenVKShaderConverter tool option to log shader conversion performance.
Move MVKOSExtension.h/mm to from MoltenVK to Common
and move MTLDevice functions to MVKDevice.
2019-04-11 14:26:35 -04:00
Bill Hollings
0ac1edbac0 Project build enhancements, and MoltenVKShaderConverter
tool now validates converted MSL with a test compilation.

Project build scripts now build dylib and framework in separate build directories
to enable MoltenVKShaderConverter to link to static library instead of dynamic library.
Final Package structure remains the same.
In Debug build, copy dylib dSYM files to Package.
Package/Latest directory now links relative to local Debug or Release directory.
Add install option to Makefile.
MoltenVKShaderConverter tool now validates converted MSL with a test compilation.
Clean up various MSL conversion and compilation error logging.
MVKCommandResourceFactory wrap Metal library compile with autorelease pool.
Build ExternalDependencies with same symbol hiding as MoltenVK to suppress visibility warnings.
Update What's New document.
2019-03-22 19:36:21 -04:00
Bill Hollings
2a2072294b MoltenVKShaderConverterTool support cs & csh for compute shader file extensions. 2019-03-06 16:27:52 -05:00
Bill Hollings
6f2dc4bdcb Add static and dynamic libraries to MoltenVKShaderConverter project.
Refactor build scripts.
Update paths to MoltenVKGLSLToSPIRVConverter framework in demos.
Fix rare build race condition on MoltenVKShaderConverter link to MoltenVK.
2019-02-18 22:19:37 +00:00
Bill Hollings
cf22742c40 MoltenVKShaderConverter tool returns failure exit code when any file in directory fails. 2019-01-16 13:36:43 -05:00
Bill Hollings
fe55930fd5 Update Brenwill copyright noticies to 2019. 2019-01-01 21:13:25 -05:00
Bill Hollings
e203b93285 Fix compute shader workgroup size specialization.
Support separate specialization for each workgroup dimension.
Support zero as a specialization ID value.
Cleanup MoltenVKShaderConverterTool.
Update to latest SPIRV-Cross version.
Update MoltenVK version to 1.0.14.
2018-07-03 13:57:53 -04:00
Bill Hollings
98b050e6e2 Update copyright dates to 2018. 2018-01-31 16:57:59 -05:00
Bill Hollings
03f865ea96 SPIR-V enhancements.
Fix OOM conditions with multiple consecutive two-vector OpVectorShuffles.
Support non-square row-major matrix conversions.
Add ability to write SPIR-V to file for debugging purposes.
Update ThirdPartyConfig.md to latest use of SPIRV-Cross testability.
Update to latest SPIRV-Cross version.
2018-01-08 21:44:46 -05:00
Bill Hollings
fd7b8234f9 Initial open-source commit. 2017-11-17 11:14:29 -05:00