mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
overwrite offsets for shared images
Change-Id: Id21eb40bc9a2e067f42094a989291d6339e753ac Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
This commit is contained in:
@@ -87,6 +87,8 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
||||
imgDesc.image_width /= 2;
|
||||
imgDesc.image_height /= 2;
|
||||
imgInfo.offset = vaImage.offsets[1];
|
||||
imgInfo.yOffset = 0;
|
||||
imgInfo.xOffset = 0;
|
||||
imgInfo.yOffsetForUVPlane = static_cast<uint32_t>(imgInfo.offset / vaImage.pitches[0]);
|
||||
}
|
||||
sharingFunctions->destroyImage(vaImage.image_id);
|
||||
|
||||
@@ -168,6 +168,8 @@ TEST_F(VaSharingTests, givenMockVaWhenVaSurfaceIsCreatedWithNotAlignedWidthAndHe
|
||||
vaSurface->getSurfaceOffsets(surfaceOffsets);
|
||||
EXPECT_EQ(alignedHeight, surfaceOffsets.yOffsetForUVplane);
|
||||
EXPECT_EQ(alignedOffset, surfaceOffsets.offset);
|
||||
EXPECT_EQ(0u, surfaceOffsets.yOffset);
|
||||
EXPECT_EQ(0u, surfaceOffsets.xOffset);
|
||||
|
||||
delete vaSurface;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user