D3D sharing: set isRenderCompressed for all 2d and 3d textures

- Dont check if resource is shared
- Check only gmm allocation capability
- Add missing support for 3d textures

Change-Id: I989533549087db74d5c238d639055462d5fea604
This commit is contained in:
Dunajski, Bartosz
2018-03-22 20:16:19 +01:00
committed by sys_ocldev
parent 049b202c6c
commit ef1f5a03a2
2 changed files with 64 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
imgInfo.surfaceFormat = findSurfaceFormatInfo(alloc->gmm->gmmResourceInfo->getResourceFormat(), flags);
}
if (alloc->gmm->unifiedAuxTranslationCapable() && sharedResource) {
if (alloc->gmm->unifiedAuxTranslationCapable()) {
alloc->gmm->isRenderCompressed = context->getMemoryManager()->mapAuxGpuVA(alloc);
}
@@ -150,6 +150,10 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
imgInfo.surfaceFormat = findSurfaceFormatInfo(alloc->gmm->gmmResourceInfo->getResourceFormat(), flags);
if (alloc->gmm->unifiedAuxTranslationCapable()) {
alloc->gmm->isRenderCompressed = context->getMemoryManager()->mapAuxGpuVA(alloc);
}
return Image::createSharedImage(context, d3dTextureObj, mcsSurfaceInfo, alloc, nullptr, flags, imgInfo, __GMM_NO_CUBE_MAP, 0);
}