Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vk: Add sampleRateShading to the list of device enabled features #7045

Merged
merged 3 commits into from
Dec 4, 2019
Merged

vk: Add sampleRateShading to the list of device enabled features #7045

merged 3 commits into from
Dec 4, 2019

Conversation

scribam
Copy link
Contributor

@scribam scribam commented Dec 1, 2019

Because sampleShadingEnable is used, sampleRateShading needs to be set to VK_TRUE for the device:

ms.sampleShadingEnable = VK_TRUE;
ms.minSampleShading = shading_rate;

Fix the following messages when "Debug Output" is enabled:

E {RSX [0x0192250]} RSX: ERROR: [Validation] Code 0 :  [ VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784 ] Object: VK_NULL_HANDLE (Type = 0) | vkCreateGraphicsPipelines(): parameter pCreateInfos[0].pMultisampleState->sampleShadingEnable. The Vulkan spec states: If the sample rate shading feature is not enabled, sampleShadingEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784)
E {RSX [0x0192250]} RSX: ERROR: [Validation] Code 0 :  [ UNASSIGNED-CoreValidation-Shader-FeatureNotEnabled ] Object: VK_NULL_HANDLE (Type = 0) | Shader requires VkPhysicalDeviceFeatures::sampleRateShading but is not enabled on the device

@kd-11
Copy link
Contributor

kd-11 commented Dec 1, 2019

  1. We do not need it when MSAA is not being used. Remember drivers are allowed to reject the instance data if things are not supported.
  2. You need to check if the driver actually supports this feature before enabling it which brings us to the next point...
  3. Since it is crucial that it is enabled for MSAA to work properly (in theory anyway, in practice drivers seems to not care), you need to log error if the feature is missing and AA is enabled.

@kd-11 kd-11 merged commit 2eaaf5b into RPCS3:master Dec 4, 2019
@scribam scribam deleted the sample-rate-shading branch December 4, 2019 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants