3118 Commits

Author SHA1 Message Date
Bill Hollings
b59d74cef5
Merge pull request #132 from billhollings/master
Update Demos to use latest LunarG VulkanSamples and Vulkan-LoaderAndValidationLayers code.
2018-04-16 18:49:40 -04:00
Bill Hollings
3a2657b2bb Update Demos to use latest LunarG VulkanSamples and Vulkan-LoaderAndValidationLayers code.
Update to latest Vulkan-LoaderAndValidationLayers version.
Update to latest VulkanSamples version.
Update to latest SPIRV-Cross version.
2018-04-16 16:26:34 -04:00
Bill Hollings
206461371f
Merge pull request #131 from billhollings/master
Add workaround for apps that use one semaphore for all swapchain images.
2018-04-15 10:07:27 -04:00
Bill Hollings
793f3fdaf3 Add workaround for apps that use one semaphore for all swapchain images.
Support deferred secondary signaling of semaphore & fence acquired while image is free.
Add MVKBaseObject::destroy() function to support customization of object destruction.
Support deferred destruction of MVKSemaphore & MVKFence instances.
2018-04-14 20:12:33 -04:00
Bill Hollings
4c746bb288
Merge pull request #129 from billhollings/master
Clean up reference to SDK in dylib build script.
2018-04-10 10:27:25 -04:00
Bill Hollings
9fe7e3659a Clean up reference to SDK in dylib build script. 2018-04-09 17:42:51 -04:00
Bill Hollings
e9499d1209
Merge pull request #127 from billhollings/master
Fix issues #64 & #97.
2018-04-09 16:42:53 -04:00
Bill Hollings
796cf7e417 MVKImage::getArrayLayers() reports only layer count and excludes depth. 2018-04-09 16:22:43 -04:00
Bill Hollings
c08e22e097 vkCmdCopyBufferToImage() & vkCmdCopyImageToBuffer() support a VkBuffer
that is bound to an offseted position in a VkDeviceMemory.
2018-04-09 14:26:02 -04:00
Bill Hollings
256c76683e
Merge pull request #126 from VinDuv/use-ninja-for-deps
fetchDependencies: Use ninja if available to build dependencies
2018-04-09 12:58:02 -04:00
Bill Hollings
586186e8f4
Merge pull request #125 from karl-lunarg/fetch-copy
fetchDeps: Copy glslang instead of symlink
2018-04-09 12:14:33 -04:00
Karl Schultz
b1a18b7855 fetchDeps: Copy glslang instead of symlink
Using a symlink to locate an externally-built glslang
doesn't work if the parent directory of the externally-built
glslang isn't the same as the parent here (External).

This fixes a portability warning when building from V-LVL
because the parent there was "external" vs "External".

Copy is still a win because it is better than fetching and
building.
2018-04-06 18:33:28 -06:00
Vincent Duvert
9a3ab266d1 Use ninja if available to build dependencies
If the ninja build system is installed, ask CMake to generate Ninja build files and use
it for the build.
2018-04-06 08:27:22 +02:00
Bill Hollings
9c8117efe6
Merge pull request #124 from billhollings/master
Queue and device wait idle logic and update to latest version of VulkanSamples.
2018-04-06 00:07:04 -04:00
Bill Hollings
d58da3a3c8 Queue and device wait idle handled by internal fence instead of semaphore.
Merge handling of timed and infinite synchronizations.
2018-04-05 23:32:35 -04:00
Bill Hollings
3a3e52b741 In Cube demo app, replace call to demo_update_and_draw()
with call to demo_draw() to support new version of cube.c.

Update to latest version of VulkanSamples.
2018-04-05 11:15:54 -04:00
Bill Hollings
794db80bb8
Merge pull request #122 from billhollings/master
Round up row and layer byte counts when copying compressed images with sizes that are not integer multiples of block size.
2018-04-03 22:51:50 -04:00
Bill Hollings
9fddb15a53 Round up row and layer byte counts when copying compressed
images with sizes that are not integer multiples of block size.
2018-04-03 17:01:53 -04:00
Bill Hollings
ebfa36287b
Merge pull request #121 from karl-lunarg/fetch-repo
fetchDeps: remove -sdk. New opts for LVL, glslang trees
2018-04-03 09:34:57 -04:00
Karl Schultz
8faa3a2fe4 fetchDeps: remove -sdk. New opts for LVL, glslang trees
Changes to fetchDependencies script:
- remove -sdk option
- Add --v-lvl-root and --glslang-root options (with an arg)
that allow caller to pass in the root dir of these two repos
if the caller already has them.  The script then symlinks to
these instead of fetching and building.

Fixes: #79 #84
2018-04-02 15:09:06 -06:00
Bill Hollings
823bc18cd8
Merge pull request #120 from hanton/master
Fix typo in Demos/README.md
2018-04-02 11:41:06 -04:00
Hanton
6d96f33b53
Fix typo in Demos/README.md 2018-04-01 14:47:03 +08:00
Bill Hollings
1156ff296d
Merge pull request #119 from billhollings/master
Reorganize External dependencies.
2018-03-30 22:36:21 -04:00
Bill Hollings
979a7f801f Reorganize External dependencies.
fetchDependencies script now in top directory to avoid Travis caching of
External directory. fetchDependencies is now smart about fetching vs cloning
and building only what is necessary.
2018-03-30 22:16:27 -04:00
Bill Hollings
5b8c80d0ee
Merge pull request #118 from billhollings/master
Add support for caching converted MSL shader code offline from pipeline cache
2018-03-30 20:13:52 -04:00
Bill Hollings
d974ce46b8 Turn caching of Externals off in .travis.yml
until a better CI dependency graph can be defined.
2018-03-30 19:37:17 -04:00
Bill Hollings
3c6b3ae210 vkCmdClearAttachments() don't attempt to clear non-existing depth & stencil attachments. 2018-03-30 18:28:26 -04:00
Bill Hollings
e4d00447f9 Always clamp scissors to render area to avoid Metal validation error. 2018-03-30 16:44:49 -04:00
Bill Hollings
04849f9f63 Present using command buffer by default.
Update version to 1.0.2.
2018-03-30 16:15:22 -04:00
Bill Hollings
126e5ff9e1 Add instructions in README.md about building MoltenVK via the command line. 2018-03-30 13:03:37 -04:00
Bill Hollings
20c98e5e46 Add support for caching converted MSL shader code offline from pipeline cache
via vkGetPipelineCacheData(), vkCreatePipelineCache() & vkMergePipelineCaches().

Add the cereal serialization framework as a dependency.
Update documentation. Update project settings to Xcode 9.3.
2018-03-30 12:13:50 -04:00
Bill Hollings
c45b47183e Shader libraries cached in MVKPipelineCache instead of MVKShaderModule. 2018-03-22 23:52:12 -04:00
Bill Hollings
fd7521dc7b VkPhysicalDeviceProperties::pipelineCacheUUID value derived
from MoltenVK version and highest supported Metal feature set.
2018-03-21 10:17:41 -04:00
Bill Hollings
18fa813fc4
Merge pull request #108 from billhollings/master
SPIRV entry points, streamline integration with V-LVL & v1.0.1.
2018-03-19 12:25:09 -04:00
Bill Hollings
8fbbaba11f Add option for per-frame performance logging via un-commentable logging code. 2018-03-19 11:44:12 -04:00
Bill Hollings
afebc3fe08 Support SPIR-V containing multiple entry points.
Include name and stage when matching shaders contexts for pipelines.
Avoid deprecated SPIRV-Cross members.
Update to latest SPIRV-Cross version.
2018-03-19 10:58:46 -04:00
Bill Hollings
808029bbc7 Update to latest version of Vulkan-LoaderAndValidationLayers, with glslang & SPIRV-Tools. 2018-03-18 19:51:12 -04:00
Bill Hollings
c77ad3a383 Remove folder symlinks and update MoltenVK version to 1.0.1.
Remove duplicate build of SPIRV-Tools in fetchDependencies.
Remove folder symlinks from Externals and MoltenVKShaderCompiler folders.
Update header search paths to reference External folders directly.
Update External/README.md documentation.
Update MoltenVK version to 1.0.1 to reflect new build instructions.
Minor update to performance logging.
2018-03-18 18:41:19 -04:00
Bill Hollings
2a6a186337
Merge pull request #106 from billhollings/master
Fix memory issues.
2018-03-15 22:59:50 -04:00
Bill Hollings
a911b63247 Fix memory issues.
Wrap each queue submission in a dedicated @autoreleasepool.
Fix memory leak during creation of global format mappings.
2018-03-15 18:46:56 -04:00
Bill Hollings
5cc7652a62
Merge pull request #104 from billhollings/master
Derive vkCmdCopyBuffer() alignment requirement at runtime.
2018-03-14 15:31:44 -04:00
Bill Hollings
9ba039c6d6 Derive vkCmdCopyBuffer() alignment requirement at runtime.
Add MVKPhysicalDeviceMetalFeatures::mtlCopyBufferAlignment.
Set MTLComputeCommandEncoder label based on Vulkan command type.
Add MVKCommandUse::kMVKCommandUseDispatch.
2018-03-14 10:13:19 -04:00
Bill Hollings
75dfe75db8 Add reference to MoltenVK binaries via LunarG SDK to README.md. 2018-03-13 16:09:26 -04:00
Bill Hollings
7df5a739d5
Merge pull request #93 from mikes-lunarg/mikes_getinstanceprocaddr_null
Fix vkGetInstanceProcAddr to work with 1.1 loader
2018-03-13 14:28:40 -04:00
Bill Hollings
ec4072115f
Merge pull request #99 from mellinoe/fix-vkCmdCopyBuffer
Fix vkCmdCopyBuffer when copying unaligned regions.
2018-03-13 14:20:19 -04:00
Bill Hollings
b33bc9c2b1
Merge pull request #92 from ndsol/master
Wrap try/catch blocks for if exceptions disabled
2018-03-13 13:41:22 -04:00
Bill Hollings
595bf211af
Merge pull request #98 from billhollings/master
Align versioning of external libraries with those used by LunarG SDK.
2018-03-13 12:39:56 -04:00
Bill Hollings
010b1aacd3 Update .travis.yml to use new fetchDependencies script. 2018-03-13 10:52:14 -04:00
Eric Mellino
349ba44ac4 Fix vkCmdCopyBuffer when copying unaligned regions.
* Vulkan allows any valid copy regions to be used in this function.
  However, Metal's blit command encoder only allows copy offsets and
  sizes which are multiples of 4 bytes.
* Before this change, attempting to copy such a region would cause
  Metal validation errors to trigger.
* This adds logic to detect such copy regions and uses a special compute
  shader to perform a byte-by-byte copy from the source buffer to
  the destination buffer with the appropriate offsets.
* This new code path is only needed on macOS, because iOS does not share
  the same copy region restrictions.
2018-03-12 22:50:18 -07:00
Bill Hollings
9e9aae4687 Remove executable permissions from non-executable files. 2018-03-12 16:59:34 -04:00