Skip to content

Commit

Permalink
Merge pull request #844 from billhollings/master
Browse files Browse the repository at this point in the history
Update to latest SPIRV-Cross and Vulkan-Headers and fixes to pipeline cache loading.
  • Loading branch information
billhollings authored Mar 27, 2020
2 parents c0c9a66 + bd4e78d commit d04dc46
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Docs/Whats_New.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Released 2020/03/30
- Update the `README.md` and `MoltenVK_Runtime_UserGuide.md` documents to clarify that
**MoltenVK** is not a fully-compliant implementation of *Vulkan*.
- Support Xcode 11.4.
- Update dependency libraries to match *Vulkan SDK 1.2.135*.
- Update to latest SPIRV-Cross version:
- MSL: Support inline uniform blocks in argument buffers.
- MSL: Move inline uniform blocks to the end of the argument buffer.
- MSL: Remove old memory_scope flag from iOS barriers.
- MSL: Fixes to array handling.



Expand Down
2 changes: 1 addition & 1 deletion ExternalRevisions/SPIRV-Cross_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f9818f0804e6e73ec8afcc523b7e7f8bfc362632
9b3c5e12be12c55533f3bd3ab9cc617ec0f393d8
2 changes: 1 addition & 1 deletion ExternalRevisions/Vulkan-Headers_repo_revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
881bbb347a08d1b5aa77f61a52a30b506de9f2bf
fb7f9c9bcd1d1544ea203a1f3d4253d0e90c5a90
31 changes: 26 additions & 5 deletions MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ static VkFormat mvkFormatFromOutput(const SPIRVShaderOutput& output) {
if (NSSwapLittleIntToHost(hdrComponent) != pDevProps->deviceID) { return; }

reader(pcUUID); // Pipeline cache UUID
if (mvkAreEqual(pcUUID, pDevProps->pipelineCacheUUID, VK_UUID_SIZE)) { return; }
if ( !mvkAreEqual(pcUUID, pDevProps->pipelineCacheUUID, VK_UUID_SIZE) ) { return; }

bool done = false;
while ( !done ) {
Expand Down Expand Up @@ -1632,8 +1632,16 @@ void serialize(Archive & archive, CompilerMSL::Options& opt) {
opt.dispatch_base,
opt.texture_1D_as_2D,
opt.argument_buffers,
opt.enable_base_index_zero,
opt.pad_fragment_output_components,
opt.texture_buffer_native);
opt.ios_support_base_vertex_instance,
opt.ios_use_framebuffer_fetch_subpasses,
opt.invariant_float_math,
opt.emulate_cube_array,
opt.enable_decoration_binding,
opt.texture_buffer_native,
opt.force_active_argument_buffer_resources,
opt.force_native_arrays);
}

template<class Archive>
Expand Down Expand Up @@ -1671,9 +1679,19 @@ void serialize(Archive & archive, MSLConstexprSampler& cs) {
cs.lod_clamp_min,
cs.lod_clamp_max,
cs.max_anisotropy,
cs.planes,
cs.resolution,
cs.chroma_filter,
cs.x_chroma_offset,
cs.y_chroma_offset,
cs.swizzle,
cs.ycbcr_model,
cs.ycbcr_range,
cs.bpc,
cs.compare_enable,
cs.lod_clamp_enable,
cs.anisotropy_enable);
cs.anisotropy_enable,
cs.ycbcr_conversion_enable);
}

}
Expand Down Expand Up @@ -1721,7 +1739,9 @@ void serialize(Archive & archive, MSLResourceBinding& rb) {

template<class Archive>
void serialize(Archive & archive, SPIRVToMSLConversionConfiguration& ctx) {
archive(ctx.options, ctx.vertexAttributes, ctx.resourceBindings);
archive(ctx.options,
ctx.vertexAttributes,
ctx.resourceBindings);
}

template<class Archive>
Expand All @@ -1740,7 +1760,8 @@ void serialize(Archive & archive, SPIRVToMSLConversionResults& scr) {

template<class Archive>
void serialize(Archive & archive, MVKShaderModuleKey& k) {
archive(k.codeSize, k.codeHash);
archive(k.codeSize,
k.codeHash);
}


Expand Down

0 comments on commit d04dc46

Please sign in to comment.