[Mesa-dev] [PATCH 2/3] anv/pipeline: add a sample_shading_enable field to anv_pipeline
Iago Toral Quiroga
itoral at igalia.com
Thu Mar 23 12:55:39 UTC 2017
We need to know if sample shading has been requested during shader
compilation since that affects the way fragment coordinates are
computed.
Notice that the semantics of fragment coordinates only depend on
whether sample shading has been requested, not on whether more
than one sample will actually be produced (that is,
minSampleShading and rasterizationSamples do not affect this
behavior).
---
src/intel/vulkan/anv_pipeline.c | 3 +++
src/intel/vulkan/anv_private.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 8ad2d48..ce9c889 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -1207,6 +1207,9 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
pipeline->depth_clamp_enable = pCreateInfo->pRasterizationState &&
pCreateInfo->pRasterizationState->depthClampEnable;
+ pipeline->sample_shading_enable = pCreateInfo->pMultisampleState &&
+ pCreateInfo->pMultisampleState->sampleShadingEnable;
+
pipeline->needs_data_cache = false;
/* When we free the pipeline, we detect stages based on the NULL status
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index fd82ce9..675c557 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1632,6 +1632,7 @@ struct anv_pipeline {
bool writes_stencil;
bool stencil_test_enable;
bool depth_clamp_enable;
+ bool sample_shading_enable;
bool kill_pixel;
struct {
--
2.7.4
More information about the mesa-dev
mailing list