1296 Commits

Author SHA1 Message Date
Bill Hollings
2c6f33e793 Each MVKDescriptorBinding respresents only one resource slot.
Remove arrays of slots from MVKDescriptorBinding. For array types, multiple
MVKDescriptorBindings map to one corresponding MVKDescriptorLayoutBinding.
Simplify logic of copying and writing to descriptors.
2020-01-09 17:57:00 -05:00
Morteza Mostajab
d1752cda70 Adds support for vkGetMTLBufferMVK which returns current metal buffer id for a specific vulkan buffer 2020-01-09 20:31:02 +01:00
Bill Hollings
8bca6709a1 Refactor descriptor binding files.
Move MVKDescriptorBinding & MVKDescriptorSetLayoutBinding
to new MVKDescriptorBinding.h/mm files.
2020-01-07 22:25:49 -05:00
Bill Hollings
06e41fab6a
Merge pull request #813 from billhollings/master
Update copyright to 2020.
2020-01-07 18:14:43 -05:00
Bill Hollings
8ec682938b Update copyright to 2020. 2020-01-07 16:47:29 -05:00
Bill Hollings
b081a005b1
Merge pull request #811 from billhollings/master
Document recommendation to use 3 swapchain images, particularly with full-screen rendering.
2020-01-07 15:02:26 -05:00
Bill Hollings
7fb0880374 Document recommendation to use 3 swapchain images, particularly with full-screen rendering. 2020-01-07 13:50:35 -05:00
Bill Hollings
8595f24508
Merge pull request #810 from billhollings/master
Track performance of CAMetalLayer nextDrawable call.
2020-01-06 10:19:52 -05:00
Bill Hollings
e6224803f6 Track performance of CAMetalLayer nextDrawable call.
Add MVKQueuePerformance::nextCAMetalDrawable.
2020-01-06 09:38:14 -05:00
Bill Hollings
bf3ffff4bb
Merge pull request #806 from billhollings/master
Fix Metal validation error on push constant sizing differences between C and MSL structs.
2019-12-28 22:20:32 -05:00
Bill Hollings
537c7b0040 Fix Metal validation error on push constant sizing differences between C and MSL structs.
Add MVKPhysicalDeviceMetalFeatures::pushConstantSizeAlignment, set value to 16 (size of
float4), and ensure push constant buffers have a size that is a multiple of that value.
Update VK_MVK_MOLTENVK_SPEC_VERSION to 24.
2019-12-28 21:13:58 -05:00
Bill Hollings
a5dd0101b2 Rename mvkAlignByteOffset() to mvkAlignByteCount(). 2019-12-28 17:50:53 -05:00
Bill Hollings
1b03076919
Merge pull request #804 from mbarriault/master
Fix a few issues with EXT_inline_uniform_block
2019-12-28 11:26:46 -05:00
Michael Barriault
c3d8d4e159 Merge buffer and inline unions to fix issue where binding inline descriptor would interfere with future binds on the same set index in the same command buffer (now only used in push case anyway) 2019-12-26 14:07:51 -03:30
Michael Barriault
78ca4655ab Use MTLBuffer when inline uniform block descriptor is written to instead of copying host-side bytes 2019-12-26 14:05:08 -03:30
Michael Barriault
2ccfb29998 Fix EXT_inline_uniform_block when using push descriptor sets 2019-12-26 14:02:43 -03:30
Bill Hollings
9e09ece372
Merge pull request #800 from billhollings/master
Fix buffer offset in vkCmdPushDescriptorSet() for non-dedicated buffer memory
2019-12-18 20:02:47 -05:00
Bill Hollings
e28a1b4b8b Fix buffer offset in vkCmdPushDescriptorSet() for non-dedicated buffer memory. 2019-12-18 18:22:30 -05:00
Bill Hollings
84eb344437
Merge pull request #799 from billhollings/master
Fix crash when app does not use queue family zero.
2019-12-18 17:28:35 -05:00
Bill Hollings
8ad03bf0d5 Fix crash when app does not use queue family zero.
Add MVKDevice::getAnyQueue() to safely find the first available queue.
Update MoltenVK version to 1.0.40.
2019-12-18 16:44:35 -05:00
Bill Hollings
8a06463675
Merge pull request #795 from billhollings/master
Update dependency libraries to match Vulkan SDK 1.1.130
2019-12-16 17:35:56 -05:00
Bill Hollings
b6aae29a85 Restrict MTLHeap to private or shared storage modes on iOS.
Set heap storage mode and CPU cache mode parameters directly.
2019-12-16 16:53:20 -05:00
Bill Hollings
a7348e2c69 Remove single-GPU condition from GPU unified memory test. 2019-12-16 15:52:50 -05:00
Bill Hollings
a64f62ee53 Update dependency libraries to match Vulkan SDK 1.1.130.
Update ExternalRevisions/README.md to document new glslang build settings.
Update What's New document.
2019-12-16 14:24:57 -05:00
Bill Hollings
ef8575f219
Merge pull request #789 from billhollings/master
Fix inconsistency in reporting device local memory between type and heap on macOS.
2019-12-16 09:16:53 -05:00
Bill Hollings
5ba074a125 Avoid reading env vars inside library constructor functions. 2019-12-15 21:47:20 -05:00
Bill Hollings
3f025bc63f Fix bug where dynamic shader buffers are overflowing.
Change MVKPhysicalDeviceMetalFeatures::dynamicMTLBuffers from boolean to uint
dynamicMTLBufferSize limit and guard dynamic buffer usage sizes against it.
Update VK_MVK_MOLTENVK_SPEC_VERSION to 23.
2019-12-12 15:46:28 -05:00
Bill Hollings
977a1f4771 Update mvkClear() to support optional length parameter. 2019-12-12 13:07:04 -05:00
Bill Hollings
b213996c5e Support Xcode 11.3.
Update What's New document.
2019-12-12 12:38:17 -05:00
Bill Hollings
574e92a38a Fix inconsistency in reporting shared memory between type and heap on macOS.
Remove VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT and VK_MEMORY_PROPERTY_HOST_CACHED_BIT
from MVK_VK_MEMORY_TYPE_METAL_SHARED.
Refactor MVKPhysicalDevice::initMemoryProperties() to configure memory
types and heaps in a more organized, procedural, and traceable manner.
Enhance MVKPhysicalDevice::getHasUnifiedMemory() detection of unified memory.
Simplify MVKPhysicalDevice::getVRAMSize().
On macOS MVKImage::validateUseTexelBuffer() tests the underlying device memory
directly to determine if it has coherent memory and cannot support texel buffer.
Add MVKInstance::getPhysicalDeviceCount().
Add mvkClear() template function for clearing structs and replace use of
memset(*, 0, sz) with mvkClear().
Refactor mvkCopyStruct() and rename to mvkCopy().
2019-12-12 10:43:20 -05:00
Bill Hollings
98e0b79a52 Fix inconsistency in reporting device local memory between type and heap on macOS. 2019-12-06 10:18:13 -05:00
Bill Hollings
5f9e946232
Merge pull request #787 from billhollings/master
Cube demo use VK_EXT_metal_surface extension.
2019-12-03 13:58:18 -05:00
Bill Hollings
5b1425b73d Cube demo use VK_EXT_metal_surface extension. 2019-12-02 13:46:31 -05:00
Bill Hollings
70749b0618
Merge pull request #785 from billhollings/master
Fix tessellation break when control stage declares but does not use position builtin.
2019-11-26 17:06:29 -05:00
Bill Hollings
9f64cc4bef Fix tessellation break when control stage declares but does not use position builtin.
Add SPIRVShaderOutput::isUsed retrieved from shader reflection.
mvk::sizeOfOutput() returns zero if output var is not used.
Update to latest SPIRV-Cross version.
2019-11-26 16:11:52 -05:00
Bill Hollings
7f83d473ba Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2019-11-26 15:18:24 -05:00
Bill Hollings
a4f65fefe6
Merge pull request #783 from mbarriault/master
Support for EXT_inline_uniform_block
2019-11-26 15:14:23 -05:00
Michael Barriault
82f3f226d3 More tab fixes 2019-11-25 21:42:28 +00:00
Michael Barriault
4b1fb88655 Fix tabbing to be consistent. 2019-11-25 21:40:08 +00:00
Michael Barriault
ddf108153d Support for EXT_inline_uniform_block 2019-11-25 21:35:38 +00:00
Bill Hollings
16afd5e37f Make mvkCeilingDivide() a template function. 2019-11-21 16:51:41 -05:00
Bill Hollings
c5b91b423d
Merge pull request #781 from billhollings/master
Fix MTLHeap memory leak in MVKDeviceMemory.
2019-11-18 14:18:20 -05:00
Bill Hollings
3bb70e8749 Fix MTLHeap memory leak in MVKDeviceMemory. 2019-11-18 13:06:05 -05:00
Bill Hollings
578e97e6dd
Merge pull request #778 from billhollings/master
Fix image subresource sizing calculations for heap-based textures.
2019-11-16 19:47:42 -05:00
Bill Hollings
15cdb32ae9 Fix image subresource sizing calculations for heap-based textures.
Add MVKImage::_rowByteAlignment separate from _byteAlignment.
2019-11-16 19:05:44 -05:00
Bill Hollings
0026475ed2
Merge pull request #777 from billhollings/master
Clamp image copy extents to image extent.
2019-11-14 18:46:47 -05:00
Bill Hollings
ddfa225f79 Fix crash in fetchDependencies on build paths containing spaces. 2019-11-14 17:11:10 -05:00
Bill Hollings
0b6916aa23 Clamp image copy extents to image extent. 2019-11-13 15:40:43 -05:00
Bill Hollings
238f03e3a8
Merge pull request #775 from billhollings/master
Support linear filtering when using vkCmdBlitImage().
2019-11-12 17:41:13 -05:00
Bill Hollings
9b13006018 Support linear filtering when using vkCmdBlitImage().
Fixes linear filtering when using vkCmdBlitImage(), useful for mipmap generation.
Move MVKCmdBlitImage sampler definition to shader as a constexpr sampler,
and ensure mip_filter and filter are set correctly.
Add MVKRPSKeyBlitImg::srcFilter.
Include MVKCommonEnvironment.h in MVKLogging.h.
Update MoltenVK version to 1.0.39.
2019-11-12 16:47:33 -05:00