Merge pull request #1074 from cdavis5e/layered-subpass-input

MVKPipeline: Use arrayed textures for layered subpass input.
This commit is contained in:
Bill Hollings 2020-09-25 14:20:17 -04:00 committed by GitHub
commit f319e9bd68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1059,6 +1059,9 @@ bool MVKGraphicsPipeline::addFragmentShaderToPipeline(MTLRenderPipelineDescripto
if (pCreateInfo->pMultisampleState && pCreateInfo->pMultisampleState->pSampleMask && pCreateInfo->pMultisampleState->pSampleMask[0] != 0xffffffff) {
shaderContext.options.mslOptions.additional_fixed_sample_mask = pCreateInfo->pMultisampleState->pSampleMask[0];
}
if (std::any_of(shaderOutputs.begin(), shaderOutputs.end(), [](const SPIRVShaderOutput& output) { return output.builtin == spv::BuiltInLayer; })) {
shaderContext.options.mslOptions.arrayed_subpass_input = true;
}
addPrevStageOutputToShaderConverterContext(shaderContext, shaderOutputs);
MVKMTLFunction func = ((MVKShaderModule*)_pFragmentSS->module)->getMTLFunction(&shaderContext, _pFragmentSS->pSpecializationInfo, _pipelineCache);
@ -1921,7 +1924,8 @@ namespace SPIRV_CROSS_NAMESPACE {
opt.enable_clip_distance_user_varying,
opt.multi_patch_workgroup,
opt.vertex_for_tessellation,
opt.vertex_index_type);
opt.vertex_index_type,
opt.arrayed_subpass_input);
}
template<class Archive>