Rename D3DFMTCLImageFormat to D3DtoClFormatConversions

Change-Id: Ie2be88e628963dd071272b03049a4d7586a4d5a1
This commit is contained in:
Maciej Godek
2018-09-24 10:28:05 +02:00
committed by sys_ocldev
parent 5aae5a3d62
commit b8e9251eeb
3 changed files with 6 additions and 6 deletions

View File

@@ -168,7 +168,7 @@ void D3DSurface::releaseResource(MemObj *memObject) {
}
}
const std::map<const D3DFORMAT, const cl_image_format> D3DSurface::D3DFMTCLImageFormat = {
const std::map<const D3DFORMAT, const cl_image_format> 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;
}

View File

@@ -24,7 +24,7 @@ class D3DSurface : public D3DSharing<D3DTypesHelper::D3D9> {
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<const D3DFORMAT, const cl_image_format> D3DFMTCLImageFormat;
static const std::map<const D3DFORMAT, const cl_image_format> 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;