Merge pull request #1162 from cdavis5e/min-sample-shading
MVKGraphicsPipeline: Handle minSampleShading.
This commit is contained in:
commit
2b8bc02106
@ -1090,9 +1090,12 @@ bool MVKGraphicsPipeline::addFragmentShaderToPipeline(MTLRenderPipelineDescripto
|
|||||||
shaderContext.options.mslOptions.view_mask_buffer_index = _viewRangeBufferIndex.stages[kMVKShaderStageFragment];
|
shaderContext.options.mslOptions.view_mask_buffer_index = _viewRangeBufferIndex.stages[kMVKShaderStageFragment];
|
||||||
shaderContext.options.entryPointName = _pFragmentSS->pName;
|
shaderContext.options.entryPointName = _pFragmentSS->pName;
|
||||||
shaderContext.options.mslOptions.capture_output_to_buffer = false;
|
shaderContext.options.mslOptions.capture_output_to_buffer = false;
|
||||||
if (pCreateInfo->pMultisampleState && pCreateInfo->pMultisampleState->pSampleMask && pCreateInfo->pMultisampleState->pSampleMask[0] != 0xffffffff) {
|
if (pCreateInfo->pMultisampleState) {
|
||||||
|
if (pCreateInfo->pMultisampleState->pSampleMask && pCreateInfo->pMultisampleState->pSampleMask[0] != 0xffffffff) {
|
||||||
shaderContext.options.mslOptions.additional_fixed_sample_mask = pCreateInfo->pMultisampleState->pSampleMask[0];
|
shaderContext.options.mslOptions.additional_fixed_sample_mask = pCreateInfo->pMultisampleState->pSampleMask[0];
|
||||||
}
|
}
|
||||||
|
shaderContext.options.mslOptions.force_sample_rate_shading = pCreateInfo->pMultisampleState->sampleShadingEnable && pCreateInfo->pMultisampleState->minSampleShading != 0.0f;
|
||||||
|
}
|
||||||
if (std::any_of(shaderOutputs.begin(), shaderOutputs.end(), [](const SPIRVShaderOutput& output) { return output.builtin == spv::BuiltInLayer; })) {
|
if (std::any_of(shaderOutputs.begin(), shaderOutputs.end(), [](const SPIRVShaderOutput& output) { return output.builtin == spv::BuiltInLayer; })) {
|
||||||
shaderContext.options.mslOptions.arrayed_subpass_input = true;
|
shaderContext.options.mslOptions.arrayed_subpass_input = true;
|
||||||
}
|
}
|
||||||
@ -2000,7 +2003,8 @@ namespace SPIRV_CROSS_NAMESPACE {
|
|||||||
opt.arrayed_subpass_input,
|
opt.arrayed_subpass_input,
|
||||||
opt.ios_use_simdgroup_functions,
|
opt.ios_use_simdgroup_functions,
|
||||||
opt.emulate_subgroups,
|
opt.emulate_subgroups,
|
||||||
opt.vertex_index_type);
|
opt.vertex_index_type,
|
||||||
|
opt.force_sample_rate_shading);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Archive>
|
template<class Archive>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user