From: Serge Martin Date: Tue, 19 May 2020 13:56:15 +0000 (+0200) Subject: clover: add more cl_mem_object_type to pipe_texture_target mapping X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fea109d40ff8c0bd0f90675fe5b9799cc88240eb;p=mesa.git clover: add more cl_mem_object_type to pipe_texture_target mapping It avoid unnecessary CL_INVALID_VALUE return from clGetSupportedImageFormats Reviewed-by: Francisco Jerez Part-of: --- diff --git a/src/gallium/frontends/clover/core/format.cpp b/src/gallium/frontends/clover/core/format.cpp index dee1872c829..16a5767b934 100644 --- a/src/gallium/frontends/clover/core/format.cpp +++ b/src/gallium/frontends/clover/core/format.cpp @@ -122,11 +122,18 @@ namespace clover { translate_target(cl_mem_object_type type) { switch (type) { case CL_MEM_OBJECT_BUFFER: + case CL_MEM_OBJECT_IMAGE1D_BUFFER: return PIPE_BUFFER; + case CL_MEM_OBJECT_IMAGE1D: + return PIPE_TEXTURE_1D; case CL_MEM_OBJECT_IMAGE2D: return PIPE_TEXTURE_2D; case CL_MEM_OBJECT_IMAGE3D: return PIPE_TEXTURE_3D; + case CL_MEM_OBJECT_IMAGE1D_ARRAY: + return PIPE_TEXTURE_1D_ARRAY; + case CL_MEM_OBJECT_IMAGE2D_ARRAY: + return PIPE_TEXTURE_2D_ARRAY; default: throw error(CL_INVALID_VALUE); }