From b8e9251eeb35b82ec28f54b705cfc6e89dc1b8b2 Mon Sep 17 00:00:00 2001 From: Maciej Godek Date: Mon, 24 Sep 2018 10:28:05 +0200 Subject: [PATCH] Rename D3DFMTCLImageFormat to D3DtoClFormatConversions Change-Id: Ie2be88e628963dd071272b03049a4d7586a4d5a1 --- runtime/os_interface/windows/api_win.cpp | 4 ++-- runtime/sharings/d3d/d3d_surface.cpp | 6 +++--- runtime/sharings/d3d/d3d_surface.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/os_interface/windows/api_win.cpp b/runtime/os_interface/windows/api_win.cpp index 1fac45277b..55290e456d 100644 --- a/runtime/os_interface/windows/api_win.cpp +++ b/runtime/os_interface/windows/api_win.cpp @@ -711,14 +711,14 @@ cl_int CL_API_CALL clGetSupportedDX9MediaSurfaceFormatsINTEL(cl_context context, } cl_uint i = 0; - for (auto format : D3DSurface::D3DFMTCLImageFormat) { + for (auto format : D3DSurface::D3DtoClFormatConversions) { if (i >= numEntries) { break; } dx9Formats[i++] = format.first; } - *numImageFormats = static_cast(D3DSurface::D3DFMTCLImageFormat.size()); + *numImageFormats = static_cast(D3DSurface::D3DtoClFormatConversions.size()); return CL_SUCCESS; } \ No newline at end of file diff --git a/runtime/sharings/d3d/d3d_surface.cpp b/runtime/sharings/d3d/d3d_surface.cpp index 2189a7a5e9..286ca9ebd2 100644 --- a/runtime/sharings/d3d/d3d_surface.cpp +++ b/runtime/sharings/d3d/d3d_surface.cpp @@ -168,7 +168,7 @@ void D3DSurface::releaseResource(MemObj *memObject) { } } -const std::map D3DSurface::D3DFMTCLImageFormat = { +const std::map D3DSurface::D3DtoClFormatConversions = { {D3DFMT_R32F, {CL_R, CL_FLOAT}}, {D3DFMT_R16F, {CL_R, CL_HALF_FLOAT}}, {D3DFMT_L16, {CL_R, CL_UNORM_INT16}}, @@ -198,8 +198,8 @@ cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat oclPlane = OCLPlane::NO_PLANE; static const cl_image_format unknown_format = {0, 0}; - auto element = D3DFMTCLImageFormat.find(d3dFormat); - if (element == D3DFMTCLImageFormat.end()) { + auto element = D3DtoClFormatConversions.find(d3dFormat); + if (element == D3DtoClFormatConversions.end()) { imgFormat = unknown_format; return CL_INVALID_IMAGE_FORMAT_DESCRIPTOR; } diff --git a/runtime/sharings/d3d/d3d_surface.h b/runtime/sharings/d3d/d3d_surface.h index 0b5428a44b..e4eaba41da 100644 --- a/runtime/sharings/d3d/d3d_surface.h +++ b/runtime/sharings/d3d/d3d_surface.h @@ -24,7 +24,7 @@ class D3DSurface : public D3DSharing { public: static Image *create(Context *context, cl_dx9_surface_info_khr *surfaceInfo, cl_mem_flags flags, cl_dx9_media_adapter_type_khr adapterType, cl_uint plane, cl_int *retCode); - static const std::map D3DFMTCLImageFormat; + static const std::map D3DtoClFormatConversions; static cl_int findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat, cl_uint plane, OCLPlane &oclPlane); void synchronizeObject(UpdateData &updateData) override; void releaseResource(MemObj *memObject) override;