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:
Mateusz Hoppe
2019-04-02 10:53:22 +02:00
committed by sys_ocldev
parent 2243fc950b
commit b13bd16665
12 changed files with 171 additions and 9 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;