diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm index 6abce41f..dc056f02 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm @@ -1834,7 +1834,10 @@ MVKComputePipeline::MVKComputePipeline(MVKDevice* device, if (mtlFunc) { MTLComputePipelineDescriptor* plDesc = [MTLComputePipelineDescriptor new]; // temp retain plDesc.computeFunction = mtlFunc; - plDesc.maxTotalThreadsPerThreadgroup = _mtlThreadgroupSize.width * _mtlThreadgroupSize.height * _mtlThreadgroupSize.depth; + // Only available macOS 10.14+ + if ([plDesc respondsToSelector:@selector(setMaxTotalThreadsPerThreadgroup:)]) { + plDesc.maxTotalThreadsPerThreadgroup = _mtlThreadgroupSize.width * _mtlThreadgroupSize.height * _mtlThreadgroupSize.depth; + } plDesc.threadGroupSizeIsMultipleOfThreadExecutionWidth = mvkIsAnyFlagEnabled(pCreateInfo->stage.flags, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT); // Metal does not allow the name of the pipeline to be changed after it has been created,