rusticl: fix compiler features_macro

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
This commit is contained in:
Karol Herbst
2022-04-19 23:49:34 +02:00
committed by Marge Bot
parent 79b3c820cc
commit e867ae6bcc
+11 -8
View File
@@ -416,13 +416,7 @@ impl Device {
if self.image_supported() {
add_ext(1, 0, 0, "", "__opencl_c_images");
if !FORMATS
.iter()
.filter(|f| f.req_for_3d_image_write_ext)
.map(|f| self.formats.get(&f.cl_image_format).unwrap())
.map(|f| f.get(&CL_MEM_OBJECT_IMAGE3D).unwrap())
.any(|f| *f & cl_mem_flags::from(CL_MEM_WRITE_ONLY) == 0)
{
if self.image_3d_write_supported() {
add_ext(
1,
0,
@@ -536,6 +530,15 @@ impl Device {
self.image_2d_size() >= 2048
}
pub fn image_3d_write_supported(&self) -> bool {
!FORMATS
.iter()
.filter(|f| f.req_for_3d_image_write_ext)
.map(|f| self.formats.get(&f.cl_image_format).unwrap())
.map(|f| f.get(&CL_MEM_OBJECT_IMAGE3D).unwrap())
.any(|f| *f & cl_mem_flags::from(CL_MEM_WRITE_ONLY) == 0)
}
pub fn image_write_count(&self) -> cl_uint {
self.shader_param(pipe_shader_cap::PIPE_SHADER_CAP_MAX_SHADER_IMAGES) as cl_uint
}
@@ -637,7 +640,7 @@ impl Device {
int64: self.long_supported(),
images: self.image_supported(),
images_read_write: false,
images_write_3d: false,
images_write_3d: self.image_3d_write_supported(),
intel_subgroups: false,
subgroups: false,
}