It is always legal in Vulkan to read a builtin, particularly
`BuiltInPosition`, even if it weren't written by the previous stage. The
CTS tests that this scenario works in the driver.
Update SPIRV-Cross to pull in a change required for this.
Fixes 8 CTS tests under `dEQP-VK.pipeline.*.no_position`. (Eight other
tests worked solely by accident without this change.)
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.
- Replace use of deprecated kIOMasterPortDefault with MACH_PORT_NULL.
- Convert an inline VLA with constant length array.
- Add input files to all build phases to trigger dependencies when inputs change.
- Add packaging scripts to per-platform ExternalDependencies targets.
Add dummy output files to each Xcode Run Script build phase that doesn't
already have dependencies set, to avoid setting alwaysOutOfDate flag
(by disabling "Based on dependency analysis" UI flag), which forces
the Xcode project to a version that can't be read by Xcode 11.7.
- 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.
When flattening shader inputs for stage_in, which are to be read from a buffer
that was populated as nested structs during an earlier stage, the structs will
be aligned according to C++ rules, which can affect the alignment of the first
member of the flattened input struct.
Add SPIRVShaderOutput::firstStructMemberAlignment to track the alignment
requirements of the first member of a nested structure, and recursively
determine the alignment of the first member of each nested output structure.
Move sizeOfOutput() from MVKPipeline.mm to SPIRVReflection.h,
rename to getShaderOutputSize(), and add getShaderOutputAlignment()
to extract member alignment.
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.
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).
Remove #include "SPIRVReflection.h" from SPIRVToMSLConverter.h.
Remove MoltenVKShaderConverter/Common and move contained files to
MoltenVKShaderConverter/MoltenVKShaderConverter.
to each other to find cached shader, only consider current shader stage resources.
Rename more references to ShaderConverterContext to ShaderConversionConfig.
pipelines and only encode bindings that are in use for each stage.
Add SPIRVToMSLConversionConfiguration::isResourceUsed() and
remove SPIRVToMSLConversionResults::isDescriptorSetUsed().
MVKBitArray add copy constructor and allow queries beyond range.
MVKDescriptorSetLayoutBinding no longer uses MTLTextureType to create
MTLArgumentEncoder, which is not needed for descriptor set argument encoding.
Remove obsolete MSLResourceBinding::outMTLTextureType and
SPIRVToMSLConversionConfiguration::getMTLTextureType().
or one MTLArgumentEncoder per combination of pipeline-stage/descriptor set.
Add MVKPhysicalDeviceMetalFeatures::descriptorSetArgumentBuffers,
and MVKDeviceTrackingMixin::isUsingDescriptorSetMetalArgumentBuffers()
and isUsingPipelineStageMetalArgumentBuffers() to track this.
Create a separate MTLArgumentEncoder for each shader stage from
MTLFunction instead of MTLDevice, and track per-stage in MVKPipeline.
Add MVKMTLArgumentEncoder to track MTLArgumentEncoders in pipelines and desc set layouts.
Add SPIRVToMSLConversionResults::activeDescriptorSets to get desc sets used by a shader.
In SPIRV-Cross make padded Metal argument buffer descriptors
for buffers a pointer to float instead of pointer to void.
Update to latest version of SPIRV-Cross to use arg buffer padding feature.
Enable argument buffer support only when one MTLArgumentEncoder per
descriptor set can be used (macOS 10.16 and later or Intel GPU's).
Move dynamic offsets from the Metal argument buffer to an implicit shader buffer.
Add SPIRVToMSLConversionConfiguration::dynamicBufferDescriptors to track dynamic
buffer descriptors, and add SPIRVToMSLConversionResults::needsDynamicOffsetBuffer
to indicate shader needs an implicit buffer to track these dynamic offsets.
Add MVKShaderStageResourceBinding::dynamicOffsetBufferIndex to track a
descriptor's index into the implicit dynamic offsets buffer.
MVKPipelineLayout change how per-descriptor set offsets are calculated and tracked
when using Metal argument buffers, so that resource indexes do not accumulate
across descriptor sets, but dynamic offset buffer indexes do accumulate.
MVKPipelineLayout rearrange order of implicit buffer indexes to give more commonly used
implicit buffers lower indexes to help reduce risk of exhausting discrete buffer bindings.
usage not tracked accurately across shader stages.
Remove tracking of descriptor usage in MVKPipeline.
Don't bind argument buffer to command encoder if descriptor set unused by shader stage.
MVKDescriptor::encodeToMetalArgumentBuffer() remove unused shader stage argument.
Remove SPIRVToMSLConversionConfiguration::isResourceUsed().
Support SPIRV-Cross CompilerMSL::Options::pad_argument_buffer_resources and
MSLResourceBinding::base_type.
Consolidate mvkPopulateShaderConverterContext() and set
MSLResourceBinding::base_type from VkDescriptorType.
Add MVKDescriptorSetLayout::initForMetalArgumentBufferUse() to measure size of Metal
argument buffer needed for descriptor set by creating a ephemeral MTLArgumentEncoder
from the descriptor bindings and measuring its length.
MVKDescriptorPool::initMetalArgumentBuffer() measure size of a single MTLBuffer
to use for all descriptor sets in the pool.
MVKDescriptorPool use VkDescriptorPoolInlineUniformBlockCreateInfoEXT to determine
descriptor count for VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT.
Set max size of temporary inline block buffer allocations from
MVKDevice::_pMetalFeatures->dynamicMTLBufferSize.
Set MTLSamplerDescriptor::supportArgumentBuffers property when appropriate.
Use specific resource indices of MVKShaderStageResourceBinding
when assigning indices to argument buffer elements.
MVKShaderStageResourceBinding expand elements to uint32_t
to support larger numbers of resource arguments.
Fix calculation of descriptor set Metal argument buffer size requirements.
Streamline MVKResourcesCommandEncoderState::encodeToMetalArgumentBuffer(),
and add fix for GPU capturing of Metal arg buffers for Xcode 12.
Update MSLResourceBinding::outMTLTextureType and outIsUsedByShader from shader
only if resource binding is for the correct shader stage, to allow outIsUsedByShader
to be carried across multiple-stage shader compilations.
Remove MVKDescriptorSet::populateMetalArgumentBufferBinding().
Remove MVKSamplerDescriptorMixin::getMetalArgumentBufferSamplerIndexOffset().
Add MVKCommandEncoderState::getDevice().
shader cache lookup hits in MVKShaderLibraryCache.
Rename MSLResourceBinding::mtlTextureType, MSLResourceBinding::isUsedByShader, and
MSLShaderInput::isUsedByShader to add a prefix out*, to clarify that those variables
are output from the conversion process, instead of input to the conversion process.
Don't use MSLResourceBinding::outMTLTextureType when looking up cached shaders.
MVKPipeline track descriptors used by shaders.
Update resources as dirty at start of Metal render pass or compute encoder.
Add MVKCommandEncoder::beginMetalComputeEncoding() to mark a new Metal compute encoder.
MVKResourcesCommandEncoderState track resource usage that needs to be encoded.
Add MVKResourcesCommandEncoderState::encodeArgumentBufferResourceUsage().
Add MVKCommandEncoderState::beginMetalComputeEncoding() to mark compute
state dirty when a MTLComputeEncoder is created.
Add SPIRVToMSLConversionConfiguration::isResourceUsed().
MVKBitArray add ability to retain contents when resizing, and clear bit during getBit().
Add MVKBitArray getBit() option to clear bit.
Add MVKPhysicalDeviceMetalFeatures::argumentBuffers.
Add MVKConfiguration::useMetalArgumentBuffers and
MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS env var.
MVKPhysicalDevice and MVKDeviceTrackingMixin add isUsingMetalArgumentBuffers().
Populate VkPhysicalDeviceDescriptorIndexingPropertiesEXT with larger Tier2
limits when supported.
Populate pipelineCacheUUID with feature flag if Metal arg buffers are used.
SPIRVToMSLConversionConfiguration add content to extract shader texture types
and mark discrete descriptor sets.
External libraries in particular make liberal use of assert() calls, which bypass
error catching, sometimes causing crashes rather than catch errors and moving on.
Remove SPIRV-Cross/ qualifier from include references to SPIRV-Cross header files.
Remove glslang/ qualifier from include references to glslang header files.
This change allows easier integration with app build scripts.
Add SPIRVToMSLConversionResults::isPositionInvariant to query
position invariance from SPIR-V.
MVKDevice::getMTLCompileOptions() takes into consideration need to preserve invariance.
MVKShaderModule compile MSL to preserve invariance if required by shader.
Support querying SignedZeroInfNanPreserve execution mode
from SPIR-V to disable fast-math for individual shaders.
Clean up namespace references in SPIRVToMSLConverter.cpp.