summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-11-24 00:44:28 +0000
committerDave Airlie <[email protected]>2017-07-24 17:45:03 +1000
commitfeef47bb593306aee2854e9bd146543c44d68468 (patch)
tree817a095249e61b2dbc3555ce0ebd7ed37dd88f76 /src/amd/vulkan
parent486472a98db8dc8bd87f498970ead1cf6f5dfd02 (diff)
radv: enable sample shading
This calculates ps_iter_samples from the minSampleShading input Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_device.c2
-rw-r--r--src/amd/vulkan/radv_pipeline.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 111bc7e957f..497ef21c6c8 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -570,7 +570,7 @@ void radv_GetPhysicalDeviceFeatures(
.independentBlend = true,
.geometryShader = !is_gfx9,
.tessellationShader = !is_gfx9,
- .sampleRateShading = false,
+ .sampleRateShading = true,
.dualSrcBlend = true,
.logicOp = true,
.multiDrawIndirect = true,
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 84494647c02..496c06a1485 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1349,7 +1349,9 @@ radv_pipeline_init_multisample_state(struct radv_pipeline *pipeline,
else
ms->num_samples = 1;
- if (pipeline->shaders[MESA_SHADER_FRAGMENT]->info.fs.force_persample) {
+ if (vkms && vkms->sampleShadingEnable) {
+ ps_iter_samples = ceil(vkms->minSampleShading * ms->num_samples);
+ } else if (pipeline->shaders[MESA_SHADER_FRAGMENT]->info.fs.force_persample) {
ps_iter_samples = ms->num_samples;
}