Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression error in argument buffer runtime arrays. #2060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Python 3.12 removed distutils, which is used by glslang::update_glslang_sources.py called from fetchDependencies
- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Select Xcode version
run: sudo xcode-select -switch "${XCODE_DEV_PATH}"

Expand Down
3 changes: 3 additions & 0 deletions Docs/Whats_New.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ MoltenVK 1.2.7
Released TBD

- Reduce disk space consumed after running `fetchDependencies` script by removing intermediate file caches.
- Update to latest SPIRV-Cross:
- MSL: Fix regression error in argument buffer runtime arrays.



Expand Down Expand Up @@ -61,6 +63,7 @@ MoltenVK 1.2.5
Released 2023/08/15

- Add support for extensions:
- `VK_KHR_deferred_host_operations`
- `VK_KHR_incremental_present`
- `VK_KHR_shader_non_semantic_info`
- `VK_EXT_4444_formats`
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 @@
2de1265fca722929785d9acdec4ab728c47a0254
4818f7e7ef7b7078a3a7a5a52c4a338e0dda22f4
2 changes: 2 additions & 0 deletions MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,8 @@

if ([_mtlDevice respondsToSelector: @selector(argumentBuffersSupport)]) {
_metalFeatures.argumentBuffersTier = _mtlDevice.argumentBuffersSupport;
} else {
_metalFeatures.argumentBuffersTier = MTLArgumentBuffersTier1;
}

#define checkSupportsMTLCounterSamplingPoint(mtlSP, mvkSP) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "2.4"
argument = "3.1"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ bool MoltenVKShaderConverterTool::convertSPIRV(const vector<uint32_t>& spv,
mslContext.options.shouldFlipVertexY = _shouldFlipVertexY;
mslContext.options.mslOptions.argument_buffers = _useMetalArgumentBuffers;
mslContext.options.mslOptions.force_active_argument_buffer_resources = _useMetalArgumentBuffers;
mslContext.options.mslOptions.pad_argument_buffer_resources = _useMetalArgumentBuffers;
mslContext.options.mslOptions.pad_argument_buffer_resources = false;
mslContext.options.mslOptions.argument_buffers_tier = SPIRV_CROSS_NAMESPACE::CompilerMSL::Options::ArgumentBuffersTier::Tier2;
mslContext.options.mslOptions.replace_recursive_inputs = mvkOSVersionIsAtLeast(14.0, 17.0, 1.0);

SPIRVToMSLConverter spvConverter;
Expand Down Expand Up @@ -425,7 +426,10 @@ MoltenVKShaderConverterTool::MoltenVKShaderConverterTool(int argc, const char* a
_quietMode = false;
_useMetalArgumentBuffers = false;

if (mvkOSVersionIsAtLeast(13.0)) {
if (mvkOSVersionIsAtLeast(14.0)) {
_mslVersionMajor = 3;
_mslVersionMinor = 1;
} else if (mvkOSVersionIsAtLeast(13.0)) {
_mslVersionMajor = 3;
_mslVersionMinor = 0;
} else if (mvkOSVersionIsAtLeast(12.0)) {
Expand Down
4 changes: 4 additions & 0 deletions Scripts/runcts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ start_time=${SECONDS}

"${cts_vk_dir}/deqp-vk" \
--deqp-archive-dir="${cts_vk_dir}/.." \
--deqp-log-filename="/dev/null" \
--deqp-log-images=disable \
--deqp-log-shader-sources=disable \
--deqp-shadercache=disable \
--deqp-log-decompiled-spirv=disable \
--deqp-log-flush=disable \
--deqp-caselist-file="${caselist_file}" \
&> "${results_file}"

Expand Down