Merge pull request #606 from chrisforbes/bug_605

multisampling: only build the per-sample pipeline if the device supports it
This commit is contained in:
Sascha Willems 2019-09-06 17:28:43 +02:00 committed by GitHub
commit ec9f2243e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,6 +577,9 @@ public:
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.MSAA)); VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.MSAA));
if (vulkanDevice->features.sampleRateShading)
{
// MSAA with sample shading pipeline // MSAA with sample shading pipeline
// Sample shading enables per-sample shading to avoid shader aliasing and smooth out e.g. high frequency texture maps // Sample shading enables per-sample shading to avoid shader aliasing and smooth out e.g. high frequency texture maps
// Note: This will trade performance for are more stable image // Note: This will trade performance for are more stable image
@ -585,6 +588,7 @@ public:
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.MSAASampleShading)); VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.MSAASampleShading));
} }
}
// Prepare and initialize uniform buffer containing shader uniforms // Prepare and initialize uniform buffer containing shader uniforms
void prepareUniformBuffers() void prepareUniformBuffers()