lavapipe: Implement VK_KHR_shader_subgroup_rotate
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31250>
This commit is contained in:

committed by
Marge Bot

parent
dfa314e805
commit
b33a29f61e
@@ -168,6 +168,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported =
|
||||
.KHR_shader_non_semantic_info = true,
|
||||
.KHR_shader_relaxed_extended_instruction = true,
|
||||
.KHR_shader_subgroup_extended_types = true,
|
||||
.KHR_shader_subgroup_rotate = true,
|
||||
.KHR_shader_terminate_invocation = true,
|
||||
.KHR_spirv_1_4 = true,
|
||||
.KHR_storage_buffer_storage_class = true,
|
||||
@@ -736,6 +737,10 @@ lvp_get_features(const struct lvp_physical_device *pdevice,
|
||||
|
||||
/* VK_KHR_shader_relaxed_extended_instruction */
|
||||
.shaderRelaxedExtendedInstruction = true,
|
||||
|
||||
/* VK_KHR_shader_subgroup_rotate */
|
||||
.shaderSubgroupRotate = true,
|
||||
.shaderSubgroupRotateClustered = true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1205,7 +1210,7 @@ lvp_get_properties(const struct lvp_physical_device *device, struct vk_propertie
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
p->subgroupSupportedOperations |= VK_SUBGROUP_FEATURE_SHUFFLE_BIT | VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT | VK_SUBGROUP_FEATURE_QUAD_BIT |
|
||||
VK_SUBGROUP_FEATURE_CLUSTERED_BIT;
|
||||
VK_SUBGROUP_FEATURE_CLUSTERED_BIT | VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR | VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR;
|
||||
#endif
|
||||
|
||||
/* Vulkan 1.2 */
|
||||
|
@@ -366,6 +366,7 @@ lvp_shader_lower(struct lvp_device *pdevice, struct lvp_pipeline *pipeline, nir_
|
||||
subgroup_opts.ballot_components = 1;
|
||||
subgroup_opts.ballot_bit_size = 32;
|
||||
subgroup_opts.lower_inverse_ballot = true;
|
||||
subgroup_opts.lower_rotate_to_shuffle = true;
|
||||
NIR_PASS_V(nir, nir_lower_subgroups, &subgroup_opts);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_FRAGMENT)
|
||||
|
Reference in New Issue
Block a user