[Mesa-dev] [PATCH 1/2] anv: pipeline: gen7: fix assert in debug mode

Lionel Landwerlin llandwerlin at gmail.com
Thu Aug 11 17:25:09 UTC 2016


SampleMask is only 8bits long on gen7.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
---
 src/intel/vulkan/genX_pipeline_util.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/intel/vulkan/genX_pipeline_util.h b/src/intel/vulkan/genX_pipeline_util.h
index 64b89cd..d56eeb8 100644
--- a/src/intel/vulkan/genX_pipeline_util.h
+++ b/src/intel/vulkan/genX_pipeline_util.h
@@ -462,7 +462,11 @@ emit_ms_state(struct anv_pipeline *pipeline,
     *
     * 3DSTATE_SAMPLE_MASK.SampleMask is 16 bits.
     */
+#if GEN_GEN >= 8
    uint32_t sample_mask = 0xffff;
+#else
+   uint32_t sample_mask = 0xff;
+#endif
 
    if (info) {
       samples = info->rasterizationSamples;
-- 
2.8.1



More information about the mesa-dev mailing list