mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
refactor: correct naming of enum class constants 8/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
269009c299
commit
dd1b9d6abc
@@ -55,7 +55,7 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo
|
||||
|
||||
sharingFcns->updateDevice(surfaceInfo->resource);
|
||||
|
||||
imgInfo.imgDesc.imageType = ImageType::Image2D;
|
||||
imgInfo.imgDesc.imageType = ImageType::image2D;
|
||||
|
||||
D3D9SurfaceDesc surfaceDesc = {};
|
||||
sharingFcns->getTexture2dDesc(&surfaceDesc, surfaceInfo->resource);
|
||||
|
||||
@@ -34,7 +34,7 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
|
||||
cl_uint arrayIndex = 0u;
|
||||
McsSurfaceInfo mcsSurfaceInfo = {};
|
||||
ImageInfo imgInfo = {};
|
||||
imgInfo.imgDesc.imageType = ImageType::Image2D;
|
||||
imgInfo.imgDesc.imageType = ImageType::image2D;
|
||||
|
||||
D3DTexture2dDesc textureDesc = {};
|
||||
sharingFcns->getTexture2dDesc(&textureDesc, d3dTexture);
|
||||
@@ -136,7 +136,7 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
|
||||
void *sharedHandle = nullptr;
|
||||
McsSurfaceInfo mcsSurfaceInfo = {};
|
||||
ImageInfo imgInfo = {};
|
||||
imgInfo.imgDesc.imageType = ImageType::Image3D;
|
||||
imgInfo.imgDesc.imageType = ImageType::image3D;
|
||||
|
||||
D3DTexture3dDesc textureDesc = {};
|
||||
sharingFcns->getTexture3dDesc(&textureDesc, d3dTexture);
|
||||
|
||||
@@ -74,7 +74,7 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl
|
||||
}
|
||||
|
||||
imgInfo.imgDesc.imageWidth = imgDesc.image_width;
|
||||
imgInfo.imgDesc.imageType = ImageType::Image2D;
|
||||
imgInfo.imgDesc.imageType = ImageType::image2D;
|
||||
imgInfo.imgDesc.imageHeight = imgDesc.image_height;
|
||||
|
||||
if (target == GL_RENDERBUFFER_EXT) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -22,8 +22,8 @@ namespace NEO {
|
||||
|
||||
bool UnifiedSharingContextBuilder::processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue) {
|
||||
switch (propertyType) {
|
||||
case static_cast<cl_context_properties>(UnifiedSharingContextType::DeviceHandle):
|
||||
case static_cast<cl_context_properties>(UnifiedSharingContextType::DeviceGroup):
|
||||
case static_cast<cl_context_properties>(UnifiedSharingContextType::deviceHandle):
|
||||
case static_cast<cl_context_properties>(UnifiedSharingContextType::deviceGroup):
|
||||
this->contextData = std::make_unique<UnifiedCreateContextProperties>();
|
||||
return true;
|
||||
default:
|
||||
|
||||
@@ -41,11 +41,11 @@ GraphicsAllocation *UnifiedSharing::createGraphicsAllocation(Context *context, U
|
||||
GraphicsAllocation *UnifiedSharing::createGraphicsAllocation(Context *context, UnifiedSharingMemoryDescription description, ImageInfo *imgInfo, AllocationType allocationType) {
|
||||
auto memoryManager = context->getMemoryManager();
|
||||
switch (description.type) {
|
||||
case UnifiedSharingHandleType::Win32Nt: {
|
||||
case UnifiedSharingHandleType::win32Nt: {
|
||||
return memoryManager->createGraphicsAllocationFromNTHandle(description.handle, context->getDevice(0)->getRootDeviceIndex(), allocationType);
|
||||
}
|
||||
case UnifiedSharingHandleType::LinuxFd:
|
||||
case UnifiedSharingHandleType::Win32Shared: {
|
||||
case UnifiedSharingHandleType::linuxFd:
|
||||
case UnifiedSharingHandleType::win32Shared: {
|
||||
const AllocationProperties properties{context->getDevice(0)->getRootDeviceIndex(),
|
||||
false, // allocateMemory
|
||||
imgInfo,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,14 +14,14 @@ namespace NEO {
|
||||
using UnifiedSharingMemoryProperties = uint64_t;
|
||||
|
||||
enum class UnifiedSharingContextType {
|
||||
DeviceHandle = 0x300B,
|
||||
DeviceGroup = 0x300C
|
||||
deviceHandle = 0x300B,
|
||||
deviceGroup = 0x300C
|
||||
};
|
||||
|
||||
enum class UnifiedSharingHandleType {
|
||||
LinuxFd = 1,
|
||||
Win32Shared = 2,
|
||||
Win32Nt = 3
|
||||
linuxFd = 1,
|
||||
win32Shared = 2,
|
||||
win32Nt = 3
|
||||
};
|
||||
|
||||
struct UnifiedSharingMemoryDescription {
|
||||
|
||||
@@ -189,7 +189,7 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sharedSurfaceInfo.imgInfo.imgDesc.imageType = ImageType::Image2D;
|
||||
sharedSurfaceInfo.imgInfo.imgDesc.imageType = ImageType::image2D;
|
||||
|
||||
bool supportOcl21 = context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user