mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
use image offsets from libva instead of Gmmlib
Change-Id: I6f5fcfa1eb41e53abbc64e52ce38c81b7337e027 Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
4e802fdb93
commit
33ec97148d
@@ -71,8 +71,6 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
||||
|
||||
imgSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat);
|
||||
|
||||
sharingFunctions->destroyImage(vaImage.image_id);
|
||||
|
||||
sharingFunctions->extGetSurfaceHandle(surface, &sharedHandle);
|
||||
|
||||
auto alloc = memoryManager->createGraphicsAllocationFromSharedHandle(sharedHandle, false, true);
|
||||
@@ -88,7 +86,10 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
||||
if (plane == 1) {
|
||||
imgDesc.image_width /= 2;
|
||||
imgDesc.image_height /= 2;
|
||||
imgInfo.offset = vaImage.offsets[1];
|
||||
imgInfo.yOffsetForUVPlane = static_cast<uint32_t>(imgInfo.offset / vaImage.pitches[0]);
|
||||
}
|
||||
sharingFunctions->destroyImage(vaImage.image_id);
|
||||
|
||||
auto vaSurface = new VASurface(sharingFunctions, imageId, plane, surface, context->getInteropUserSyncEnabled());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user