rusticl: Enable cl_intel_subgroups if you ask nicely
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Definitely not fully working yet but works well when it does.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31772>
This commit is contained in:
Adam Jackson 2025-05-23 11:13:02 -04:00 committed by Marge Bot
parent 96e99d47e7
commit 2249ba9fa3
2 changed files with 10 additions and 0 deletions

View file

@ -850,6 +850,7 @@ Rusticl extensions that are not part of any OpenCL version:
cl_khr_work_group_uniform_arithmetic not started
cl_arm_non_uniform_work_group_size not started
cl_arm_shared_virtual_memory in progress (nvc0)
cl_intel_subgroups in progress (available with RUSTICL_FEATURES=intel)
cl_intel_unified_shared_memory not started

View file

@ -724,6 +724,10 @@ impl Device {
// we have lowering in `nir_lower_subgroups`, drivers can just use that
add_ext(1, 0, 0, "cl_khr_subgroup_shuffle");
add_ext(1, 0, 0, "cl_khr_subgroup_shuffle_relative");
if self.intel_subgroups_supported() {
add_ext(1, 0, 0, "cl_intel_subgroups");
add_spirv(c"SPV_INTEL_subgroups");
}
}
if self.svm_supported() {
@ -868,6 +872,10 @@ impl Device {
self.screen.caps().doubles
}
pub fn intel_subgroups_supported(&self) -> bool {
Platform::features().intel && self.subgroups_supported()
}
pub fn is_gl_sharing_supported(&self) -> bool {
self.screen.caps().cl_gl_sharing
&& self.screen.caps().dmabuf != 0
@ -1178,6 +1186,7 @@ impl Device {
images_read_write: self.caps.has_rw_images,
images_write_3d: self.caps.has_3d_image_writes,
integer_dot_product: true,
intel_subgroups: self.intel_subgroups_supported(),
subgroups: subgroups_supported,
subgroups_shuffle: subgroups_supported,
subgroups_shuffle_relative: subgroups_supported,