From: Faith Ekstrand Date: Wed, 29 Mar 2023 15:02:15 +0000 (-0500) Subject: anv/pipeline: Use feedback loop flags for self-dependencies X-Git-Tag: upstream/23.3.3~10579 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8df8a3c19bcd18eac816c20e353c5c4202e88f89;p=platform%2Fupstream%2Fmesa.git anv/pipeline: Use feedback loop flags for self-dependencies Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h index cdb0542..e0b0369 100644 --- a/src/intel/vulkan/anv_genX.h +++ b/src/intel/vulkan/anv_genX.h @@ -38,8 +38,6 @@ struct intel_sample_positions; -typedef struct VkRenderingSelfDependencyInfoMESA VkRenderingSelfDependencyInfoMESA; - extern const uint32_t genX(vk_to_intel_cullmode)[]; extern const uint32_t genX(vk_to_intel_front_face)[]; diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index cefdf66..e78ff37 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1428,6 +1428,13 @@ emit_3dstate_gs(struct anv_graphics_pipeline *pipeline) } } +static bool +rp_has_ds_self_dep(const struct vk_render_pass_state *rp) +{ + return rp->pipeline_flags & + VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT; +} + static void emit_3dstate_wm(struct anv_graphics_pipeline *pipeline, const struct vk_input_assembly_state *ia, @@ -1570,8 +1577,7 @@ emit_3dstate_ps_extra(struct anv_graphics_pipeline *pipeline, * around to fetching from the input attachment and we may get the depth * or stencil value from the current draw rather than the previous one. */ - ps.PixelShaderKillsPixel = rp->depth_self_dependency || - rp->stencil_self_dependency || + ps.PixelShaderKillsPixel = rp_has_ds_self_dep(rp) || wm_prog_data->uses_kill; ps.PixelShaderComputesStencil = wm_prog_data->computed_stencil; @@ -1639,8 +1645,7 @@ compute_kill_pixel(struct anv_graphics_pipeline *pipeline, * of an alpha test. */ pipeline->kill_pixel = - rp->depth_self_dependency || - rp->stencil_self_dependency || + rp_has_ds_self_dep(rp) || wm_prog_data->uses_kill || wm_prog_data->uses_omask || (ms && ms->alpha_to_coverage_enable);