Skip to content

Commit

Permalink
Merge pull request #2408 from etang-cw/RemoveGLSL
Browse files Browse the repository at this point in the history
Remove NV_glsl_shader support
  • Loading branch information
billhollings authored Dec 10, 2024
2 parents f5cda47 + 24c3d53 commit 570b78e
Show file tree
Hide file tree
Showing 27 changed files with 89 additions and 5,329 deletions.
1 change: 0 additions & 1 deletion Docs/MoltenVK_Runtime_UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ In addition to core *Vulkan* functionality, **MoltenVK** also supports the foll
- `VK_INTEL_shader_integer_functions2`
- `VK_NV_fragment_shader_barycentric`
- *Requires Metal 2.2 on Mac or Metal 2.3 on iOS.*
- `VK_NV_glsl_shader`

In order to visibly display your content on *macOS*, *iOS*, or *tvOS*, you must enable the
`VK_EXT_metal_surface` extension, and use the function defined in that extension to create a
Expand Down
1 change: 1 addition & 0 deletions Docs/Whats_New.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Released TBD

- Fix _SPIRV-Cross_ namespace build error on some alternate build environments.
- Fix recent failure of `CI.yml` to upload release build artifacts to GitHub.
- Remove support for deprecated `VK_NV_glsl_shader` extension, and GLSL conversions using _**MoltenVKShaderConverter**_.



Expand Down
4,105 changes: 33 additions & 4,072 deletions ExternalDependencies.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions ExternalRevisions/SPIRV-Headers_repo_revision
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801
1 change: 1 addition & 0 deletions ExternalRevisions/SPIRV-Tools_repo_revision
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6dcc7e350a0b9871a825414d42329e44b0eb8109
1 change: 0 additions & 1 deletion ExternalRevisions/glslang_repo_revision

This file was deleted.

18 changes: 9 additions & 9 deletions MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3
"Fragment"
};
if (needsBuffer && index.stages[stage] < _descriptorBufferCounts.stages[stage]) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "%s shader requires %s buffer, but there is no free slot to pass it.", stageNames[stage], name));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "%s shader requires %s buffer, but there is no free slot to pass it.", stageNames[stage], name));
return false;
}
return true;
Expand Down Expand Up @@ -1287,11 +1287,11 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3
return false;
}
if (_needsTessCtlPatchOutputBuffer && _tessCtlPatchOutputBufferIndex < _descriptorBufferCounts.stages[kMVKShaderStageTessCtl]) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Tessellation control shader requires per-patch output buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Tessellation control shader requires per-patch output buffer, but there is no free slot to pass it."));
return false;
}
if (_tessCtlLevelBufferIndex < _descriptorBufferCounts.stages[kMVKShaderStageTessCtl]) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Tessellation control shader requires tessellation level output buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Tessellation control shader requires tessellation level output buffer, but there is no free slot to pass it."));
return false;
}
return true;
Expand Down Expand Up @@ -2062,7 +2062,7 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3
if (shouldFailOnPipelineCompileRequired()) {
setConfigurationResult(VK_PIPELINE_COMPILE_REQUIRED);
} else {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "%s shader function could not be compiled into pipeline. See previous logged error.", pStageName));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "%s shader function could not be compiled into pipeline. See previous logged error.", pStageName));
}
}
return func;
Expand Down Expand Up @@ -2179,16 +2179,16 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3

auto& mtlFeats = getMetalFeatures();
if (_needsSwizzleBuffer && _swizzleBufferIndex.stages[kMVKShaderStageCompute] > mtlFeats.maxPerStageBufferCount) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Compute shader requires swizzle buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Compute shader requires swizzle buffer, but there is no free slot to pass it."));
}
if (_needsBufferSizeBuffer && _bufferSizeBufferIndex.stages[kMVKShaderStageCompute] > mtlFeats.maxPerStageBufferCount) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Compute shader requires buffer size buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Compute shader requires buffer size buffer, but there is no free slot to pass it."));
}
if (_needsDynamicOffsetBuffer && _dynamicOffsetBufferIndex.stages[kMVKShaderStageCompute] > mtlFeats.maxPerStageBufferCount) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Compute shader requires dynamic offset buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Compute shader requires dynamic offset buffer, but there is no free slot to pass it."));
}
if (_needsDispatchBaseBuffer && _indirectParamsIndex.stages[kMVKShaderStageCompute] > mtlFeats.maxPerStageBufferCount) {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Compute shader requires dispatch base buffer, but there is no free slot to pass it."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Compute shader requires dispatch base buffer, but there is no free slot to pass it."));
}
}

Expand Down Expand Up @@ -2252,7 +2252,7 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3
if (shouldFailOnPipelineCompileRequired()) {
setConfigurationResult(VK_PIPELINE_COMPILE_REQUIRED);
} else {
setConfigurationResult(reportError(VK_ERROR_INVALID_SHADER_NV, "Compute shader function could not be compiled into pipeline. See previous logged error."));
setConfigurationResult(reportError(VK_ERROR_INITIALIZATION_FAILED, "Compute shader function could not be compiled into pipeline. See previous logged error."));
}
}
auto& funcRslts = func.shaderConversionResults;
Expand Down
Loading

0 comments on commit 570b78e

Please sign in to comment.