mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Rename D3DFMTCLImageFormat to D3DtoClFormatConversions
Change-Id: Ie2be88e628963dd071272b03049a4d7586a4d5a1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user