Dan Ginsburg
a46855ecfd
Closes issue #34 - fix Metal validation error with a renderpass with no depth attachment
...
If there is no depth attachment, Metal Validation will give the
following error: "validateDepthStencilState:3657: failed assertion
`MTLDepthStencilDescriptor sets depth test but MTLRenderPassDescriptor
has a nil depthAttachment texture'". Fix by checking the current
subpass to see if there is a depth/stencil attachment, and if not use a
depth/stencil state with depth test always, depth write disabled, and no
stencil state.
2018-01-31 11:03:24 -05:00
Bill Hollings
69e36e5656
Merge pull request #32 from danginsburg/dota_texture_corruption
...
Fix intermittent corruption uploading textures in Dota 2.
2018-01-31 10:18:00 -05:00
Dan Ginsburg
640c989a20
Address feedback from pull request review
...
* Move mutex lock in MVKBuffer::getMTLBuffer() to be after checking
MVKDeviceMemory::getMTLBuffer() so we don't always lock in that case
* Fix comment I put in the wrong place in previous commit
2018-01-31 09:07:45 -05:00
Dan Ginsburg
6d50a88178
Fix intermittent corruption uploading textures in Dota 2.
...
The problem was that MVKBuffer::getMTLBuffer() was not thread-safe. If
multiple threads called it at the same time, more than one underlying
_mtlBuffer would be created. This could make the vkCmdCopyBufferToImage
copy from an unfilled buffer leaving the texture corrupted. I also
added similar thread safety to MVKImage::getMTLTexture() and
MVKImageView::getMTLTexture() since they both looked like they would
have the same potential problem.
2018-01-30 12:28:14 -05:00
Bill Hollings
d1cd122201
Merge pull request #31 from billhollings/master
...
Fixes for scissors and release builds.
2018-01-30 11:03:11 -05:00
Bill Hollings
e8e75f480e
Enhance viewport and scissor handling.
...
In debug mode, ensure scissors fit inside renderpass area to avoid Metal validation assertions.
Consolidate setting of viewport and scissors by pipeline and command.
2018-01-30 11:00:50 -05:00
Bill Hollings
ee943818b0
Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK
2018-01-30 10:43:34 -05:00
Bill Hollings
856f5ebc36
Allow color attachment when clearing depth only.
2018-01-29 15:46:49 -05:00
Bill Hollings
bee5cb019d
Fix link failure on Release builds.
2018-01-29 13:34:05 -05:00
Bill Hollings
91f3c61046
Merge pull request #30 from billhollings/master
...
GPU management.
2018-01-29 12:01:22 -05:00
Bill Hollings
c3ac62ecd7
GPU management.
...
Log which GPU is attached to a VkDevice.
Sort multiple GPU's to put higher-power GPU's at front of list.
Use pipelineStatisticsQuery feature to determine whether pipeline stats are available.
Update to latest SPIRV-Cross.
2018-01-29 11:57:14 -05:00
Bill Hollings
aa1bd3d4f2
Merge pull request #29 from danginsburg/issue_7
...
Closes issue #7 . Support DXT1 RGB texture compression.
2018-01-24 16:07:20 -05:00
Dan Ginsburg
85f7a99523
Closes issue #7 . Support DXT1 RGB texture compression.
2018-01-24 11:02:25 -05:00
Bill Hollings
84640bcebb
Merge pull request #28 from billhollings/master
...
Retrieve heap size from MTLDevice on macOS and from free shared system memory on iOS.
2018-01-23 22:23:19 -05:00
Bill Hollings
b2644ad909
Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK
2018-01-23 22:21:28 -05:00
Bill Hollings
67abb772f5
Merge pull request #26 from danginsburg/bind_image_memory_crash
...
Fix vkBindImageMemory crash when multiple simultaneous threads are bi…
2018-01-23 22:19:26 -05:00
Bill Hollings
89e1c92845
Retrieve heap size from MTLDevice on macOS and from free shared system memory on iOS.
2018-01-23 22:06:43 -05:00
Bill Hollings
6753d90ac4
Merge pull request #27 from danginsburg/memory_heap_size
...
Use MTLDevice recommendedMaxWorkingSetSize to set the heap size rathe…
2018-01-23 18:51:25 -05:00
Dan Ginsburg
9105bf58cd
Use MTLDevice recommendedMaxWorkingSetSize to set the heap size rather than leaving it at 0 (on macOS). recommenededMaxWorkingSetSize does not exist on iOS so for iOS continue to leave it at 0 for now.
2018-01-23 15:16:07 -05:00
Dan Ginsburg
47952be008
Fix vkBindImageMemory crash when multiple simultaneous threads are binding to different offsets in the of the same VkDeviceMemory. The _resources vector inside of MVKDeviceMemory was not mutex protected which could cause it to become corrupted on simulaneous access. Add mutex protection.
2018-01-23 13:47:02 -05:00
Bill Hollings
89bd4b7413
Merge pull request #23 from danginsburg/issue_22_fix
...
Closes #22 . Fix "Game Rendering Quality" slider and Pause (F9) in dota2
2018-01-18 13:17:09 -05:00
Bill Hollings
df48f0ff58
Merge pull request #20 from danginsburg/issue_19_fix
...
Closes issue #19 . The problem was that MVKRenderPass was ignoring VK…
2018-01-18 11:21:35 -05:00
Bill Hollings
22390372ce
Merge pull request #18 from danginsburg/image_view_attachment_bug
...
Closes issue #17 . Modify MVKImageView::populateMTLRenderPassAttachme…
2018-01-18 11:20:06 -05:00
Bill Hollings
ab2afa5ddf
Merge pull request #4 from karl-lunarg/patch-1
...
Fix markdown syntax
2018-01-18 11:02:37 -05:00
Bill Hollings
60c2581f61
Merge pull request #24 from billhollings/master
...
Allow color attachment on depth-only rendering.
2018-01-18 11:00:49 -05:00
Bill Hollings
4cffdc449e
Allow color attachment on depth-only rendering.
...
SPIR-V use initializer list for composite initializations.
2018-01-18 10:58:04 -05:00
Dan Ginsburg
12736f5956
Remove accidental inclusion of other fix.
2018-01-16 10:31:29 -05:00
Dan Ginsburg
79c4658ed6
Closes #22 . Fix "Game Rendering Quality" slider and Pause (F9) in dota2:
...
* In the case of vkCmdBlitImage with formats that don't match, use the Metal Blit render path and don't return an error.
* Fix MvkCmdBlitImage::populateVertices which had the source and destination y shifted.
2018-01-16 10:29:24 -05:00
Dan Ginsburg
893894ae5f
Closes issue #19 . The problem was that MVKRenderPass was ignoring VKAttachmentDescription.stencil[Load|Store]Op and was instead using the regular [load|store]Op for the stencil attachment. This fixes water reflections/refractions not rendering correctly in Dota 2.
2018-01-12 12:31:17 -05:00
Dan Ginsburg
e4d8f5afa6
Closes issue #17 . Modify MVKImageView::populateMTLRenderPassAttachmentDescriptor and MVKImageView::populateMTLRenderPassAttachmentDescriptorResolve to use the MTLTextureView rather than MTLTexture. This makes sure that the texture view with the correct format is used for the renderpass. For example, in the case of a mutable image with sRGB and UNORM format, the correct format will be used for the renderpass attachment.
2018-01-12 09:20:47 -05:00
Bill Hollings
29e853ca15
Merge pull request #10 from billhollings/master
...
Add Vulkan Loader and Validation Layer ICD JSON file.
2018-01-09 21:15:28 -05:00
Bill Hollings
9c4d66d7a6
Add Vulkan Loader and Validation Layer ICD JSON file.
2018-01-09 21:12:02 -05:00
Bill Hollings
c14a9ee441
Merge pull request #9 from billhollings/master
...
Add support for Vulkan Loader and Validation Layer API version 5.
2018-01-09 15:39:24 -05:00
Bill Hollings
9a6c7f0711
Add support for Vulkan Loader and Validation Layer API version 5.
...
Update to latest SPIRV-Cross and Vulkan-LVL versions.
2018-01-09 15:38:14 -05:00
Bill Hollings
8e6d9e62f2
Merge pull request #8 from billhollings/master
...
SPIR-V enhancements.
2018-01-08 22:40:49 -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
51193c7805
Merge pull request #6 from billhollings/master
...
Fixes to compute workgroup sizes and barriers.
2017-12-26 22:21:41 -05:00
Bill Hollings
9b185a9c3a
Fixes to compute workgroup sizes and barriers.
...
Improved extraction of entry point name and workgroup size from SPIR-V.
Consolidate to a single ThirdPartyConfig.md document.
MSL enhancements to nested function use of globals.
Support customizing MSL based on iOS or macOS platform.
MSL threadgroup barrier memory scope only on iOS MSL 2.0.
Update to latest SPIRV libraries.
2017-12-26 22:20:20 -05:00
Bill Hollings
097b9f29d1
Merge pull request #5 from billhollings/master
...
Add support for LunarG Vulkan Loader ICD API.
2017-12-21 10:53:05 -05:00
Bill Hollings
ff97e692df
Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK
2017-12-21 10:50:55 -05:00
Bill Hollings
83f96078ec
Add support for LunarG Vulkan Loader ICD API.
...
Return Loader-compatible structure for dispatchable Vulkan objects.
Add Vulkan-LoaderAndValidationLayers repository as submodule.
2017-12-21 10:48:51 -05:00
Karl Schultz
e08866565b
Fix markdown syntax
2017-12-15 13:30:33 -07:00
Bill Hollings
0abc41212e
Merge pull request #3 from billhollings/master
...
Don't log error from vkGetPhysicalDeviceFormatProperties() if format not supported.
2017-12-14 20:56:07 -05:00
Bill Hollings
150b06a189
Don't log error from vkGetPhysicalDeviceFormatProperties() if format not supported.
...
Fix MoltenVK version logging.
Update to latest SPRIV-Cross.
2017-12-14 20:54:39 -05:00
Bill Hollings
8f14ce3878
Merge pull request #2 from billhollings/master
...
Update to latest versions of submodules, including SPIRV-Cross OpUndef support.
2017-12-05 12:30:41 -05:00
Bill Hollings
5acec6e2f5
Update to latest versions of submodules.
2017-12-05 11:45:16 -05:00
Bill Hollings
dd9dfb5a93
SPIRV-Cross fixes to use {} instead of constructors to init OpUndef values.
2017-11-30 16:00:31 -05:00
Bill Hollings
a6c038107c
Merge pull request #1 from billhollings/master
...
Updates and fixes to dynamic library creation process.
2017-11-26 15:41:04 -05:00
Bill Hollings
780d3efe62
Updates and fixes to dynamic library creation process.
...
Use clang instead of libtool for building dynamic library from static library.
Fix SDK issue when building dylib with Xcode 9 on Sierra.
Add scripts to update submodules to latest versions.
Update to latest versions of submodules.
Remove Brenwill code signing IDs from Demo projects.
2017-11-26 15:37:55 -05:00
Bill Hollings
fd7b8234f9
Initial open-source commit.
2017-11-17 11:14:29 -05:00