v3dv: implement VK_EXT_shader_demote_to_helper_invocation
Demoting means that we don't execute any writes to memory but otherwise the invocation continues to execute. Particularly, subgroup operations and derivatives must work. Our implementation of discard does exactly this by using setmsf to prevent writes for the affected invocations, the only difference for us is that with discard/terminate we want to be more careful with emitting quad loads for tmu operations, since the invocations are not supposed to be running any more and load offsets may not be valid, but with demote the invocations are not terminated and thus we should emit memory reads for them to ensure quad operations and derivatives from invocations that have not been demoted still work. Since we use the sample mask to implement demotes we can't tell whether a particular helper invocation was originally such (gl_HelperInvocation in GLSL) or was later demoted (OpIsHelperInvocationEXT added with SPV_EXT_demote_to_helper_invocation), so we use nir_lower_is_helper_invocation to take care of this. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26949>
This commit is contained in:
committed by
Marge Bot
parent
658ce711d5
commit
5c42d6c62f
+1
-1
@@ -492,7 +492,7 @@ Vulkan 1.3 -- all DONE: anv, radv, tu, lvp, vn
|
||||
VK_EXT_pipeline_creation_feedback DONE (anv, hasvk, lvp, radv, tu, v3dv, vn)
|
||||
VK_EXT_private_data DONE (anv, hasvk, lvp, nvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_EXT_image_robustness DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
|
||||
VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_subgroup_size_control DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
|
||||
VK_EXT_texel_buffer_alignment DONE (anv, hasvk, lvp, nvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_EXT_texture_compression_astc_hdr DONE (vn)
|
||||
|
||||
Reference in New Issue
Block a user