diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 5b4ba006ebe..6683637d484 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1520,7 +1520,7 @@ anv_pipeline_compile_fs(const struct brw_compiler *compiler, .prog_data = &fs_stage->prog_data.wm, .allow_spilling = true, - .max_polygons = 1, + .max_polygons = UCHAR_MAX, }; if (prev_stage && prev_stage->stage == MESA_SHADER_MESH) { @@ -1530,9 +1530,11 @@ anv_pipeline_compile_fs(const struct brw_compiler *compiler, fs_stage->code = brw_compile_fs(compiler, ¶ms); - fs_stage->num_stats = (uint32_t)fs_stage->prog_data.wm.dispatch_8 + + fs_stage->num_stats = (uint32_t)!!fs_stage->prog_data.wm.dispatch_multi + + (uint32_t)fs_stage->prog_data.wm.dispatch_8 + (uint32_t)fs_stage->prog_data.wm.dispatch_16 + (uint32_t)fs_stage->prog_data.wm.dispatch_32; + assert(fs_stage->num_stats <= ARRAY_SIZE(fs_stage->stats)); } static void @@ -1641,7 +1643,8 @@ anv_pipeline_add_executables(struct anv_pipeline *pipeline, (const struct brw_wm_prog_data *)bin->prog_data; struct brw_compile_stats *stats = bin->stats; - if (wm_prog_data->dispatch_8) { + if (wm_prog_data->dispatch_8 || + wm_prog_data->dispatch_multi) { anv_pipeline_add_executable(pipeline, stage, stats++, 0); } diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 27264f3a0d0..a5f4cfa5dcf 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1577,6 +1577,18 @@ emit_3dstate_ps(struct anv_graphics_pipeline *pipeline, const bool persample = brw_wm_prog_data_is_persample(wm_prog_data, pipeline->fs_msaa_flags); +#if GFX_VER == 12 + assert(wm_prog_data->dispatch_multi == 0 || + (wm_prog_data->dispatch_multi == 16 && wm_prog_data->max_polygons == 2)); + ps.DualSIMD8DispatchEnable = wm_prog_data->dispatch_multi; + /* XXX - No major improvement observed from enabling + * overlapping subspans, but it could be helpful + * in theory when the requirements listed on the + * BSpec page for 3DSTATE_PS_BODY are met. + */ + ps.OverlappingSubspansEnable = false; +#endif + ps.KernelStartPointer0 = fs_bin->kernel.offset + brw_wm_prog_data_prog_offset(wm_prog_data, ps, 0); ps.KernelStartPointer1 = fs_bin->kernel.offset +