anv/pipeline: Fix setting per sample shading in pixel shader
authorAnuj Phogat <anuj.phogat@gmail.com>
Thu, 28 Jul 2016 16:36:26 +0000 (09:36 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 28 Jul 2016 20:11:12 +0000 (13:11 -0700)
We should use the persample_dispatch variable in prog_data.

Fixes all (~60) the DEQP sample shading tests. Many tests exited with
VK_ERROR_OUT_OF_DEVICE_MEMORY without this patch.

V2: Use the shader key bits set in brw_compile_fs (Jason)

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/gen8_pipeline.c

index cc10d3a085a190a27b3d73c16522d334bc51f172..67ffca6199ad7aebfde59086b2ac8522d0d4bc35 100644 (file)
@@ -365,16 +365,13 @@ genX(graphics_pipeline_create)(
             wm_prog_data->dispatch_grf_start_reg_2;
       }
 
-      bool per_sample_ps = pCreateInfo->pMultisampleState &&
-                           pCreateInfo->pMultisampleState->sampleShadingEnable;
-
       anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PS_EXTRA), ps) {
          ps.PixelShaderValid              = true;
          ps.PixelShaderKillsPixel         = wm_prog_data->uses_kill;
          ps.PixelShaderComputedDepthMode  = wm_prog_data->computed_depth_mode;
          ps.AttributeEnable               = wm_prog_data->num_varying_inputs > 0;
          ps.oMaskPresenttoRenderTarget    = wm_prog_data->uses_omask;
-         ps.PixelShaderIsPerSample        = per_sample_ps;
+         ps.PixelShaderIsPerSample        = wm_prog_data->persample_dispatch;
          ps.PixelShaderUsesSourceDepth    = wm_prog_data->uses_src_depth;
          ps.PixelShaderUsesSourceW        = wm_prog_data->uses_src_w;
 #if GEN_GEN >= 9