diff --git a/docs/features.txt b/docs/features.txt index a284bf1f6be..35a7f1901b0 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -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 diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index 56b062cf522..f96530ea7b6 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -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,