v3dv: implement VK_KHR_shader_terminate_invocation
The semantics for this matches those of discard. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
This commit is contained in:

committed by
Marge Bot

parent
d0f75fdeab
commit
5057eb90a1
@@ -481,7 +481,7 @@ Vulkan 1.3 -- all DONE: anv, radv, tu, lvp, vn
|
||||
VK_KHR_maintenance4 DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_shader_integer_dot_product DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_shader_non_semantic_info DONE (anv, hasvk, nvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_shader_terminate_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
|
||||
VK_KHR_shader_terminate_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_synchronization2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_zero_initialize_workgroup_memory DONE (anv, hasvk, lvp, radv, tu, v3dv, vn)
|
||||
VK_EXT_4444_formats DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
|
@@ -3428,6 +3428,7 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
|
||||
break;
|
||||
|
||||
case nir_intrinsic_discard:
|
||||
case nir_intrinsic_terminate:
|
||||
ntq_flush_tmu(c);
|
||||
|
||||
if (vir_in_nonuniform_control_flow(c)) {
|
||||
@@ -3443,7 +3444,8 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
|
||||
c->emitted_discard = true;
|
||||
break;
|
||||
|
||||
case nir_intrinsic_discard_if: {
|
||||
case nir_intrinsic_discard_if:
|
||||
case nir_intrinsic_terminate_if: {
|
||||
ntq_flush_tmu(c);
|
||||
|
||||
enum v3d_qpu_cond cond = ntq_emit_bool_to_cond(c, instr->src[0]);
|
||||
|
@@ -170,6 +170,7 @@ get_device_extensions(const struct v3dv_physical_device *device,
|
||||
.KHR_timeline_semaphore = true,
|
||||
.KHR_uniform_buffer_standard_layout = true,
|
||||
.KHR_shader_integer_dot_product = true,
|
||||
.KHR_shader_terminate_invocation = true,
|
||||
.KHR_synchronization2 = true,
|
||||
.KHR_workgroup_memory_explicit_layout = true,
|
||||
#ifdef V3DV_USE_WSI_PLATFORM
|
||||
@@ -440,6 +441,9 @@ get_features(const struct v3dv_physical_device *physical_device,
|
||||
|
||||
/* VK_EXT_multi_draw */
|
||||
.multiDraw = true,
|
||||
|
||||
/* VK_KHR_shader_terminate_invocation */
|
||||
.shaderTerminateInvocation = true,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user