2721 Commits

Author SHA1 Message Date
Randall C. O'Reilly
6c044acad6 Update SPIRV-Cross and glslang repo revisions to include support for atomic float (glslang for HLSL support for InterlockedAdd on float) 2023-02-22 01:40:12 -08:00
Randall C. O'Reilly
160a327cbb enable availability of EXT_shader_atomic_float and add docs for how to replace Vulkan SDK .dylib while avoiding need to reboot. 2023-02-05 00:26:04 -08:00
Bill Hollings
dc2dad84d6
Merge pull request #1834 from cdavis5e/sample-dref-lod-array-workaround
Work around problems with explicit LoD with arrayed depth images on A…
2023-02-04 13:55:44 -05:00
Chip Davis
2c01c8b7e0 Work around problems with explicit LoD with arrayed depth images on Apple Silicon.
Use an explicit gradient to make it sample the correct level.

Update SPIRV-Cross to pull in the change needed for this.
2023-02-03 14:48:25 -08:00
Bill Hollings
e8885a24e8
Merge pull request #1833 from billhollings/rmv-obslt-cmts
Remove a couple of large obsolete list content comments in MVKDevice.mm.
2023-01-31 15:17:02 -05:00
Bill Hollings
007136f2f4 Remove a couple of large obsolete list content comments in MVKDevice.mm. 2023-01-30 17:15:44 -05:00
Bill Hollings
74ea8ae987
Merge pull request #1832 from billhollings/fix-enable-bary-coord
Fix issue where VK_KHR_fragment_shader_barycentric incorrectly disabled
2023-01-30 16:26:09 -05:00
Bill Hollings
7e9b5b73de Fix issue where extension VK_KHR_fragment_shader_barycentric
was sometimes incorrectly disabled due to a Metal driver bug.

Update MoltenVK version to 1.2.3.
2023-01-30 15:22:33 -05:00
Bill Hollings
fb581e457a
Merge pull request #1828 from billhollings/sdk-1.3.239
Update dependency libraries to match Vulkan SDK 1.3.239.
2023-01-23 19:01:12 -05:00
Bill Hollings
8bcbb2eb42 Update dependency libraries to match Vulkan SDK 1.3.239.
Update Whats New document.
2023-01-23 17:57:36 -05:00
Bill Hollings
d880f4c86b
Merge pull request #1823 from billhollings/update-physdev_limits
Set more accurate values for some VkPhysicalDeviceLimits members.
2023-01-14 05:24:56 -05:00
Bill Hollings
e0333509a1 Set more accurate values for some VkPhysicalDeviceLimits members.
- Update maxClipDistances and maxCombinedClipAndCullDistances to more accurate values.
- Update maxDrawIndexedIndexValue to acknowledge primitive restart.
2023-01-13 19:03:00 -05:00
Bill Hollings
1609ad4c20
Merge pull request #1821 from billhollings/update-copyright-2023
Update copyright notices to year 2023.
2023-01-13 17:33:04 -05:00
Bill Hollings
12592abbc9 Update copyright notices to year 2023. 2023-01-13 12:19:37 -05:00
Bill Hollings
4fded82c67
Merge pull request #1818 from billhollings/fix-dyn-link-issues
Fix linking issues with dynamic Vulkan functions.
2023-01-10 13:17:21 -05:00
Bill Hollings
682906976d Fix linking issues with dynamic Vulkan functions.
- Ensure Vulkan public symbols are not stripped from the library when
  statically linked to an app that calls all Vulkan functions dynamically.
- Per Vulkan 1.2 spec, support calling vkGetInstanceProcAddr() with a
  null instance, when vkGetInstanceProcAddr itself is the function name.
- Replace uses of strcmp() with mvkStringsAreEqual() to protect against
  null pointers, and provide a direct bool output (unrelated cleanup).
2023-01-10 07:22:05 -05:00
Bill Hollings
7a320974d1
Merge pull request #1807 from billhollings/rmv-unused-debug-log-calls
Remove some old unused commented-out debug log calls.
2023-01-02 10:11:51 -05:00
Bill Hollings
b6b51aa1f3 Remove some old unused commented-out debug log calls. 2022-12-30 10:14:19 -05:00
Bill Hollings
3d886ca665
Merge pull request #1806 from billhollings/fix-swapchain-mem-issues
Fix small memory issues with MVKPresentableSwapchainImage.
2022-12-30 09:55:31 -05:00
Bill Hollings
be51089f25 Fix small memory issues with MVKPresentableSwapchainImage.
- Fix Metal validation error caused by CAMetalDrawable released before
  MTLCommandBuffer is finished using it.
- When presenting, MVKPresentableSwapchainImage retains in-flight
  CAMetalDrawable until MTLCommandBuffer completion.

- Fix memory leak of MVKFences and MVKSemaphores when a
  swapchain image is acquired more than it is presented.
- Force MVKPresentableSwapchainImage to untrack any tracked fences or
  semaphores when it is destroyed.

- Update MoltenVK version to 1.2.2.
2022-12-29 21:50:04 -05:00
Bill Hollings
2960554d3a
Merge pull request #1804 from billhollings/revert-e102ce1
Revert PR #1797.
2022-12-28 10:06:01 -05:00
Bill Hollings
b09ee9d370 Revert commit e102ce1102dcdfd4d59df3fd5f3f381cb9a4ab81.
The now-reverted commit had caused fragment shader not
to run at all when no render attachment was available.
2022-12-27 14:09:24 -05:00
Bill Hollings
e743bbcd71
Merge pull request #1797 from billhollings/fix-no-attchmt-tile-mem-prealloc
Fix excessive Metal tile memory preallocation when rendering without attachments.
2022-12-12 15:06:06 -05:00
Bill Hollings
e102ce1102 Fix excessive Metal tile memory preallocation when rendering without attachments.
Metal uses MTLRenderPassDescriptor properties renderTargetWidth,
renderTargetHeight, and renderTargetArrayLength to preallocate tile memory
storage on machines using tiled rendering. This memory preallocation is not
necessary if we are not rendering to attachments, and some apps actively
define extremely oversized framebuffers when they know they are not rendering
to actual attachments, making this internal tile memory allocation even more
wasteful, occasionally to the point of triggering OOM crashes.

Update MoltenVK version to 1.2.2.
2022-12-11 19:11:38 -05:00
Bill Hollings
a307b24001
Merge pull request #1795 from billhollings/fix-buff-binding-justoffset-when-overridden
Fix crash when buffer binding updates only offset while it is overridden.
2022-12-08 19:08:40 -05:00
Bill Hollings
8965c87e14 Fix crash when buffer binding updates only offset while it is overridden.
MVKMTLBufferBinding don't allow justOffset if binding was overridden.
2022-12-08 18:38:49 -05:00
Bill Hollings
32da10556e
Merge pull request #1794 from billhollings/sdk-1.3.236
Update dependency libraries to match Vulkan SDK 1.3.236.
2022-12-08 16:15:00 -05:00
Bill Hollings
f5f6515dce Update dependency libraries to match Vulkan SDK 1.3.236.
Update Whats New document.
2022-12-08 14:10:58 -05:00
Bill Hollings
c0c00d78f0
Merge pull request #1793 from billhollings/fix-fastmath-regression
Fix app performance regression triggered by the previous introduction of VK_KHR_shader_float_controls.
2022-12-08 11:34:25 -05:00
Bill Hollings
985ec99832 Fix app performance regression triggered by the previous introduction
of VK_KHR_shader_float_controls.

The introduction of shaderSignedZeroInfNanPreserveFloat32 was causing Metal
fast math to be aggressively disabled by the use of SignedZeroInfNanPreserve
in shaders in some apps, causing a regression in shader performance in those apps.

- Change MVKConfiguration::fastMathEnabled from bool to enumeration to distinguish
  between always using fast math or allowing shaders to selectively disable it.
- Default value to fast math always.
2022-12-07 12:40:50 -05:00
Bill Hollings
de285efba3
Merge pull request #1790 from billhollings/fix-buff-bind-overrides
Fix Metal buffer index binding overrides for push constants and attachment clearing.
2022-11-30 05:32:24 -05:00
Bill Hollings
8e45217fbd Fix Metal buffer index binding overrides for push constants and attachment clearing.
Push constants and attachment clearing can temporarily override Metal buffer
bindings for descriptor sets and vertex attributes. Mark the overridden buffer
bindings and ensure they are reinstated when the pipeline is updated.

- Add MVKMTLBufferBinding::isOverridden to track if buffer binding is
  temporarily overridden.
- Rename MVKResourcesCommandEncoderState::markIndexDirty()
  to markBufferIndexOverridden() to mark buffer bindings as overridden.
- Rename MVKGraphicsResourcesCommandEncoderState::markBufferIndexDirty()
  to markBufferIndexOverridden().
- Rename MVKComputeResourcesCommandEncoderState::markBufferIndexDirty()
  to markBufferIndexOverridden().
- Add MVKResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
  to mark overridden buffer bindings as dirty.
- Add MVKGraphicsResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
  and call when render pipeline change is encoded
- Add MVKComputeResourcesCommandEncoderState::markOverriddenBufferIndexesDirty()
  and call when compute pipeline change is encoded.
2022-11-30 00:01:07 -05:00
Bill Hollings
13535d0f35
Merge pull request #1783 from cdavis5e/discarded-frag-checks
MVKPipeline: Force extra checks for stores after fragment discard.
2022-11-23 13:32:52 -05:00
Chip Davis
03ce25da20 MVKPipeline: Force extra checks for stores after fragment discard.
Update SPIRV-Cross to pull in multiple CTS fixes. Handle the new
`check_discarded_frag_stores` and `manual_helper_invocation_updates`
options.
2022-11-21 11:04:29 -08:00
Bill Hollings
417d27da72
Merge pull request #1780 from billhollings/fix-ycbcr-format-support
Fix mistaken YCBCR format support indication.
2022-11-19 09:13:55 -05:00
Bill Hollings
bd497fe713 Fix mistaken YCBCR format support indication.
MVKVkFormatDesc::chromaSubsamplingPlaneCount must be > 1 to be considered supported.
2022-11-18 23:35:46 -05:00
Bill Hollings
0dd329398a
Merge pull request #1769 from MennoVink/#1764_emulated_semaphores_freeze_fix
Only wait on emulated semaphores once...
2022-11-17 18:13:27 -05:00
Bill Hollings
0fe5ffecc5
Merge pull request #1773 from billhollings/misc-small-fixes
Misc small fixes - Document Xcode 13 linkage, and Intel Iris Plus Graphics driver workaround
2022-11-16 15:12:29 -05:00
Bill Hollings
b2acfb61cb Upgrade GitHub CI to use Xcode 14.1 on macOS 12. 2022-11-16 13:58:52 -05:00
Bill Hollings
7c0143c37b Support Xcode 14.1 build settings. 2022-11-15 20:49:17 -05:00
Bill Hollings
4d003bf256 Document new linkage model used by Xcode 14 and later, and how to link
MoltenVK to an app or game using Xcode 13 or earlier.
2022-11-15 18:48:36 -05:00
Bill Hollings
6d7f4330c7 Work around MTLCounterSet crash on additional Intel Iris Plus Graphics devices.
Add 0x8a5a and 0x8a5c to list of Intel Iris Plus Graphics
device IDs requiring workaround.
2022-11-15 17:44:55 -05:00
Bill Hollings
c8f581088f
Merge pull request #1767 from cdavis5e/optimal-tiling-atomics
MVKImage: Always use a texel buffer for atomic storage images.
2022-11-13 17:01:53 -05:00
Chip Davis
b871d8f603 MVKDevice: Fix backwards attribution of storage/uniform texel buffer alignments.
A drive-by fix for something I noticed while investigating a problem
with linear-for-atomics textures.
2022-11-12 14:27:39 -08:00
Chip Davis
94b1ea3c95 MVKImage: Always use a texel buffer for atomic storage images.
Do this even if `OPTIMAL` tiling were requested. Vulkan mandates support
for image atomics on `OPTIMAL`-tiled `R32_UINT` and `R32_SINT` images.
In a way, this is "optimal"; image atomics won't work without this.

Advertise support for atomics on `OPTIMAL` tiled images now.

Fixes at least two CTS tests under
`dEQP-VK.compute.basic.image_atomic_op_*`.
2022-11-12 14:27:32 -08:00
Bill Hollings
9cdf4ed881
Merge pull request #1770 from spnda/fix_cmd_blit
Fix: Invalid blit offsets
2022-11-11 13:47:16 -05:00
sean
0b62f647d5
Fix: Invalid blit offsets 2022-11-11 18:33:54 +01:00
Menno Vink
05c757c8b7 Only wait on emulated semaphores once to prevent freezing when using prefilled command buffers. 2022-11-11 14:18:32 +01:00
Bill Hollings
5ebeac741d
Merge pull request #1755 from cdavis5e/raw-buffer-tese-input
MVKPipeline: Stop using vertex-style input for tessellation evaluatio…
2022-11-10 20:46:24 -05:00
Chip Davis
2cb33c09b6 MVKPipeline: Stop using vertex-style input for tessellation evaluation shaders.
This has caused us nothing but trouble. The code to build up the vertex
descriptor is fragile; we can rip that out now.

Also, make sure to positively identify per-patch blocks as per-patch.
For those, the individual members have the `Patch` decoration.

Update SPIRV-Cross to pull in the changes needed for this.

Fixes 66 tests in the CTS.
2022-11-10 14:12:02 -08:00