vk: Emit 3DSTATE_SAMPLE_MASK
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 7 Jul 2015 05:21:51 +0000 (22:21 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 7 Jul 2015 06:54:12 +0000 (23:54 -0700)
This was missing and was causing the driver to not work with
execlists. Presumably we get a different initial hw context with
execlists enabled, that has sample mask 0 initially.

Set this to 0xffff for now.  When we add MS support, we need to take the
value from VkPipelineMsStateCreateInfo::sampleMask.

src/vulkan/pipeline.c

index bf8b3a0bea21b058be35234984881d46363f7919..5003156e914c53b20d0f37ef1c61b3b547f7474e 100644 (file)
@@ -538,6 +538,9 @@ anv_pipeline_create(
                   .PixelLocation = CENTER,
                   .NumberofMultisamples = log2_samples);
 
+   anv_batch_emit(&pipeline->batch, GEN8_3DSTATE_SAMPLE_MASK,
+                  .SampleMask = 0xffff);
+
    anv_batch_emit(&pipeline->batch, GEN8_3DSTATE_URB_VS,
                   .VSURBStartingAddress = pipeline->urb.vs_start,
                   .VSURBEntryAllocationSize = pipeline->urb.vs_size - 1,