[Mesa-dev] [PATCH] radv: enable sample shading
Dave Airlie
airlied at gmail.com
Thu Nov 24 00:51:52 UTC 2016
From: Dave Airlie <airlied at redhat.com>
This calculates ps_iter_samples from the minSampleShading input
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_device.c | 2 +-
src/amd/vulkan/radv_pipeline.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index aa2b021..a75ad27 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -370,7 +370,7 @@ void radv_GetPhysicalDeviceFeatures(
.independentBlend = true,
.geometryShader = false,
.tessellationShader = false,
- .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 652a2c4..6bec7c7 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1021,8 +1021,10 @@ radv_pipeline_init_multisample_state(struct radv_pipeline *pipeline,
ms->num_samples = vkms->rasterizationSamples;
- if (pipeline->shaders[MESA_SHADER_FRAGMENT]->info.fs.force_persample) {
- ps_iter_samples = vkms->rasterizationSamples;
+ if (vkms->sampleShadingEnable) {
+ ps_iter_samples = ms->num_samples * vkms->minSampleShading;
+ } else if (pipeline->shaders[MESA_SHADER_FRAGMENT]->info.fs.force_persample) {
+ ps_iter_samples = ms->num_samples;
}
ms->pa_sc_line_cntl = S_028BDC_DX10_DIAMOND_TEST_ENA(1);
--
2.7.4
More information about the mesa-dev
mailing list