diff options
author | Jason Ekstrand <[email protected]> | 2018-05-18 16:39:21 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-28 13:25:18 -0700 |
commit | b95b0e2918c052068caeb4f6c2802ba89be043a3 (patch) | |
tree | 7105f47f94d123c51aa54bf164601e8ea9f4d17e /src/intel/vulkan/genX_pipeline.c | |
parent | d5e028a57bb9e0da7cd31a043859038355236095 (diff) |
intel/anv,blorp,i965: Implement the SKL 16x MSAA SIMD32 workaround
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 15b1e0b3880..197899fb2e3 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1445,7 +1445,8 @@ is_dual_src_blend_factor(VkBlendFactor factor) static void emit_3dstate_ps(struct anv_pipeline *pipeline, - const VkPipelineColorBlendStateCreateInfo *blend) + const VkPipelineColorBlendStateCreateInfo *blend, + const VkPipelineMultisampleStateCreateInfo *multisample) { MAYBE_UNUSED const struct gen_device_info *devinfo = &pipeline->device->info; const struct anv_shader_bin *fs_bin = @@ -1492,6 +1493,20 @@ emit_3dstate_ps(struct anv_pipeline *pipeline, ps._16PixelDispatchEnable = wm_prog_data->dispatch_16; ps._32PixelDispatchEnable = wm_prog_data->dispatch_32; + /* From the Sky Lake PRM 3DSTATE_PS::32 Pixel Dispatch Enable: + * + * "When NUM_MULTISAMPLES = 16 or FORCE_SAMPLE_COUNT = 16, SIMD32 + * Dispatch must not be enabled for PER_PIXEL dispatch mode." + * + * Since 16x MSAA is first introduced on SKL, we don't need to apply + * the workaround on any older hardware. + */ + if (GEN_GEN >= 9 && !wm_prog_data->persample_dispatch && + multisample && multisample->rasterizationSamples == 16) { + assert(ps._8PixelDispatchEnable || ps._16PixelDispatchEnable); + ps._32PixelDispatchEnable = false; + } + ps.KernelStartPointer0 = fs_bin->kernel.offset + brw_wm_prog_data_prog_offset(wm_prog_data, ps, 0); ps.KernelStartPointer1 = fs_bin->kernel.offset + @@ -1733,7 +1748,8 @@ genX(graphics_pipeline_create)( emit_3dstate_sbe(pipeline); emit_3dstate_wm(pipeline, subpass, pCreateInfo->pColorBlendState, pCreateInfo->pMultisampleState); - emit_3dstate_ps(pipeline, pCreateInfo->pColorBlendState); + emit_3dstate_ps(pipeline, pCreateInfo->pColorBlendState, + pCreateInfo->pMultisampleState); #if GEN_GEN >= 8 emit_3dstate_ps_extra(pipeline, subpass, pCreateInfo->pColorBlendState); emit_3dstate_vf_topology(pipeline); |