mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Fix image type support and flag usage in va api sharing
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
68e01dd736
commit
e9e78e85ad
@@ -98,12 +98,13 @@ cl_int VASharingFunctions::getSupportedFormats(cl_mem_flags flags,
|
||||
cl_uint numEntries,
|
||||
VAImageFormat *formats,
|
||||
cl_uint *numImageFormats) {
|
||||
if (flags != CL_MEM_READ_ONLY && flags != CL_MEM_WRITE_ONLY && flags != CL_MEM_READ_WRITE) {
|
||||
if (flags != CL_MEM_READ_ONLY && flags != CL_MEM_WRITE_ONLY && flags != CL_MEM_READ_WRITE &&
|
||||
flags != CL_MEM_KERNEL_READ_AND_WRITE) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
if (imageType != CL_MEM_OBJECT_IMAGE2D) {
|
||||
return CL_INVALID_VALUE;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
if (numImageFormats != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user