mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Add support for tiling mode selection to VA sharing
Change-Id: I459c472a4b8d74dba70df54c9da29865672114eb Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2243fc950b
commit
b13bd16665
@@ -79,7 +79,7 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo
|
||||
GraphicsAllocation *alloc = nullptr;
|
||||
if (surfaceInfo->shared_handle) {
|
||||
isSharedResource = true;
|
||||
AllocationProperties allocProperties(&imgInfo, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
AllocationProperties allocProperties(nullptr, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
alloc = context->getMemoryManager()->createGraphicsAllocationFromSharedHandle((osHandle)((UINT_PTR)surfaceInfo->shared_handle), allocProperties,
|
||||
false);
|
||||
updateImgInfo(alloc->getDefaultGmm(), imgInfo, imgDesc, oclPlane, 0u);
|
||||
|
||||
@@ -68,7 +68,7 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
|
||||
alloc = context->getMemoryManager()->createGraphicsAllocationFromNTHandle(sharedHandle);
|
||||
} else {
|
||||
sharingFcns->getSharedHandle(textureStaging, &sharedHandle);
|
||||
AllocationProperties allocProperties(&imgInfo, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
AllocationProperties allocProperties(nullptr, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
alloc = context->getMemoryManager()->createGraphicsAllocationFromSharedHandle((osHandle)((UINT_PTR)sharedHandle), allocProperties, false);
|
||||
}
|
||||
DEBUG_BREAK_IF(!alloc);
|
||||
@@ -126,7 +126,7 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
|
||||
alloc = context->getMemoryManager()->createGraphicsAllocationFromNTHandle(sharedHandle);
|
||||
} else {
|
||||
sharingFcns->getSharedHandle(textureStaging, &sharedHandle);
|
||||
AllocationProperties allocProperties(&imgInfo, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
AllocationProperties allocProperties(nullptr, false, GraphicsAllocation::AllocationType::SHARED_IMAGE);
|
||||
alloc = context->getMemoryManager()->createGraphicsAllocationFromSharedHandle((osHandle)((UINT_PTR)sharedHandle), allocProperties, false);
|
||||
}
|
||||
DEBUG_BREAK_IF(!alloc);
|
||||
|
||||
@@ -61,10 +61,6 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
||||
|
||||
auto alloc = memoryManager->createGraphicsAllocationFromSharedHandle(sharedHandle, properties, false);
|
||||
|
||||
Gmm *gmm = new Gmm(imgInfo);
|
||||
DEBUG_BREAK_IF(alloc->getDefaultGmm());
|
||||
alloc->setDefaultGmm(gmm);
|
||||
|
||||
imgDesc.image_row_pitch = imgInfo.rowPitch;
|
||||
imgDesc.image_slice_pitch = 0u;
|
||||
imgInfo.slicePitch = 0u;
|
||||
|
||||
Reference in New Issue
Block a user