vtn: Add a cap for CL drivers to support read-write images

This is a required CL2.0, optional CL3.0 feature

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181>
This commit is contained in:
Jesse Natalie 2021-04-11 14:09:58 -07:00 committed by Marge Bot
parent 9f82399bf9
commit c04b36de39
2 changed files with 5 additions and 1 deletions

View File

@ -67,6 +67,7 @@ struct spirv_supported_capabilities {
bool integer_functions2;
bool kernel;
bool kernel_image;
bool kernel_image_read_write;
bool literal_sampler;
bool min_lod;
bool multiview;

View File

@ -4349,11 +4349,14 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(kernel_image, cap);
break;
case SpvCapabilityImageReadWrite:
spv_check_supported(kernel_image_read_write, cap);
break;
case SpvCapabilityLiteralSampler:
spv_check_supported(literal_sampler, cap);
break;
case SpvCapabilityImageReadWrite:
case SpvCapabilityImageMipmap:
case SpvCapabilityPipes:
case SpvCapabilityDeviceEnqueue: