Skip to content

Commit

Permalink
Merge pull request #795 from billhollings/master
Browse files Browse the repository at this point in the history
 Update dependency libraries to match Vulkan SDK 1.1.130
  • Loading branch information
billhollings authored Dec 16, 2019
2 parents ef8575f + b6aae29 commit 8a06463
Show file tree
Hide file tree
Showing 11 changed files with 3,030 additions and 2,943 deletions.
32 changes: 31 additions & 1 deletion Docs/Whats_New.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For best results, use a Markdown reader.*
MoltenVK 1.0.39
---------------

Released TBD
Released 2019/12/16

- Add support for extensions:
- `VK_EXT_inline_uniform_block`
Expand All @@ -33,6 +33,36 @@ Released TBD
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to `23`.
- Cube demo use `VK_EXT_metal_surface` extension.
- Support *Xcode 11.3*.
- Update dependency libraries to match *Vulkan SDK 1.1.130*.
- Update to latest SPIRV-Cross version:
- MSL: Rewrite `tessellation_access_chain()`.
- MSL: Report tess input array failures more accurately.
- MSL: Deal with chained access chains for tessellation IO variables.
- MSL: Fix array of array declaration.
- MSL: Declare struct type explicitly.
- MSL: Declare arrays with proper type wrapper.
- MSL: Remove workaround for passing constant arrays to functions.
- MSL: Fix unpacking of column from padded matrix.
- MSL: Fix integer cast.
- MSL: Add missing reference output.
- MSL: Ensure stable output for access chain CFG workarounds.
- MSL: Remove stray `allow_id_rewrite()`.
- MSL: Do read-only lookups of access_chain_children.
- MSL: Do not declare variables which will not be unflattened.
- MSL: Rewrite propagated depth comparison state handling.
- MSL: Do not declare array of UBO/SSBO as `spvUnsafeArray<T>`.
- MSL: Remove dubious workaround code in `unpack_expression()`.
- MSL: Remove hacky workaround for patch constant passing.
- MSL: Revert hack with `kBufferSizeBufferBinding`.
- MSL: Remove stale code for texture swizzle.
- MSL: Avoid some fallthrough warnings.
- Expose as public `Compiler::update_active_builtins()` and `has_active_builtin()`.
- Implement constant empty struct correctly on all backends.
- Mark loop headers as complex as early as possible.
- Clean up call to `builtin_translates_to_nonarray()`.
- Fix broken access tracking for `OpFunctionCall` results.
- Avoid including stdexcept in no-exception environment.
- Add `spvc_type_get_base_type_id()`.



Expand Down
5,900 changes: 2,969 additions & 2,931 deletions ExternalDependencies.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions ExternalRevisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ the *SPIRV-Tools* library to the `ExternalDependencies` *Xcode* project as follo
"$(SRCROOT)/External/glslang/External/spirv-tools/external/spirv-headers/include"
"$(SRCROOT)/External/glslang/External/spirv-tools/build"

4. Repeat *Step 3* for the `SPIRV-Tools-iOS` target within the `ExternalDependencies` *Xcode* project
5. Repeat *Step 4* for the `SPIRV-Tools-iOS` target within the `ExternalDependencies` *Xcode* project

5. Update `Templates/spirv-tools/build.zip` from the contents of `External/glslang/External/spirv-tools/build`,
6. Update `Templates/spirv-tools/build.zip` from the contents of `External/glslang/External/spirv-tools/build`,
and test by running `./fetchDependencies --skip-spirv-tools-build`, and a **MoltenVK** build.


Expand Down Expand Up @@ -232,3 +232,15 @@ if you encounter any building errors, you may need to re-add the *glslang* libra

External/glslang/glslang/MachineIndependant/glslang.y
External/glslang/glslang/OSDependent/Windows


4. In the *Project Navigator* panel, select the `ExternalDependencies` *Xcode* project, then
select the `glslang-macOS` target, and open the *Build Settings* tab. Locate the build
setting entry **Header Search Paths** (`HEADER_SEARCH_PATHS`) and add the following paths:

$(inherited)
"$(SRCROOT)/External/glslang"

5. Repeat *Step 4* for the `glslang-iOS` target within the `ExternalDependencies` *Xcode* project


2 changes: 1 addition & 1 deletion ExternalRevisions/Vulkan-Headers_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6be1d00866a6d3bf8a1839b902d1de9e7065a4b8
0e57fc1cfa56a203efe43e4dfb9b3c9e9b105593
2 changes: 1 addition & 1 deletion ExternalRevisions/Vulkan-Tools_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0a0625a3dca69b9d7ecb73558539ce5e3cd4ddfa
0c2618b2c31e2f216e131ff4c1c83e2c92c6ae66
2 changes: 1 addition & 1 deletion ExternalRevisions/VulkanSamples_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b131c57a650c094d21c9118d99f36263447a7c9c
ae32f2390060925afa9c5b111ac94de6d13fe229
2 changes: 1 addition & 1 deletion ExternalRevisions/glslang_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b131630e7c749a5dc19faa458024260c71fb170f
ebf634bcaa3e46ca8a912ed05b87281c731b2391
5 changes: 2 additions & 3 deletions MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1860,9 +1860,8 @@ static uint32_t mvkGetEntryProperty(io_registry_entry_t entry, CFStringRef prope
return true;
#endif
#if MVK_MACOS
return (([_mtlDevice respondsToSelector: @selector(hasUnifiedMemory)] && _mtlDevice.hasUnifiedMemory)
|| _mtlDevice.isLowPower
|| getInstance()->getPhysicalDeviceCount() == 1);
return ([_mtlDevice respondsToSelector: @selector(hasUnifiedMemory)]
? _mtlDevice.hasUnifiedMemory : _mtlDevice.isLowPower);
#endif
}

Expand Down
10 changes: 8 additions & 2 deletions MoltenVK/MoltenVK/GPUObjects/MVKDeviceMemory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,19 @@
if (_allocationSize == 0) { return true; }

#if MVK_MACOS
// MTLHeaps on Mac must use private storage for now.
// MTLHeaps on macOS must use private storage for now.
if (_mtlStorageMode != MTLStorageModePrivate) { return true; }
#endif
#if MVK_IOS
// MTLHeaps on iOS must use private or shared storage for now.
if ( !(_mtlStorageMode == MTLStorageModePrivate ||
_mtlStorageMode == MTLStorageModeShared) ) { return true; }
#endif

MTLHeapDescriptor* heapDesc = [MTLHeapDescriptor new];
heapDesc.type = MTLHeapTypePlacement;
heapDesc.resourceOptions = getMTLResourceOptions();
heapDesc.storageMode = _mtlStorageMode;
heapDesc.cpuCacheMode = _mtlCPUCacheMode;
// For now, use tracked resources. Later, we should probably default
// to untracked, since Vulkan uses explicit barriers anyway.
heapDesc.hazardTrackingMode = MTLHazardTrackingModeTracked;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/glslang\"",
"\"$(SRCROOT)/glslang/External/spirv-tools/include\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down Expand Up @@ -931,6 +932,7 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/glslang\"",
"\"$(SRCROOT)/glslang/External/spirv-tools/include\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down
Binary file modified Templates/spirv-tools/build.zip
Binary file not shown.

0 comments on commit 8a06463

Please sign in to comment.