mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix(ocl): handle gl sharing displayable textures
Displayable textures always need dc flush. Related-To: NEO-11694 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d1e56b4e1e
commit
76e8be5c39
@@ -405,6 +405,7 @@ Image *Image::createSharedImage(Context *context, SharingHandler *sharingHandler
|
||||
sharedImage->setSurfaceOffsets(imgInfo.offset, imgInfo.xOffset, imgInfo.yOffset, imgInfo.yOffsetForUVPlane);
|
||||
sharedImage->setMcsSurfaceInfo(mcsSurfaceInfo);
|
||||
sharedImage->setPlane(imgInfo.plane);
|
||||
sharedImage->setIsDisplayable(imgInfo.isDisplayable);
|
||||
return sharedImage;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,6 +171,8 @@ class Image : public MemObj {
|
||||
surfaceOffsets.yOffsetForUVplane = yOffsetForUVPlane;
|
||||
}
|
||||
void getSurfaceOffsets(SurfaceOffsets &surfaceOffsetsOut) { surfaceOffsetsOut = this->surfaceOffsets; }
|
||||
bool getIsDisplayable() const { return isDisplayable; }
|
||||
void setIsDisplayable(bool displayable) { this->isDisplayable = displayable; }
|
||||
|
||||
void setCubeFaceIndex(uint32_t index) { cubeFaceIndex = index; }
|
||||
uint32_t getCubeFaceIndex() { return cubeFaceIndex; }
|
||||
|
||||
@@ -275,6 +275,10 @@ bool MemObj::isMemObjUncacheableForSurfaceState() const {
|
||||
return isAnyBitSet(flagsIntel, CL_MEM_LOCALLY_UNCACHED_SURFACE_STATE_RESOURCE | CL_MEM_LOCALLY_UNCACHED_RESOURCE);
|
||||
}
|
||||
|
||||
bool MemObj::isMemObjDisplayable() const {
|
||||
return this->isDisplayable;
|
||||
}
|
||||
|
||||
GraphicsAllocation *MemObj::getGraphicsAllocation(uint32_t rootDeviceIndex) const {
|
||||
return multiGraphicsAllocation.getGraphicsAllocation(rootDeviceIndex);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -70,7 +70,7 @@ class MemObj : public BaseObject<_cl_mem> {
|
||||
MultiGraphicsAllocation &&multiGraphicsAllocation,
|
||||
bool zeroCopy,
|
||||
bool isHostPtrSVM,
|
||||
bool isObjectRedescrbied);
|
||||
bool isObjectRedescribed);
|
||||
~MemObj() override;
|
||||
|
||||
cl_int getMemObjectInfo(cl_mem_info paramName,
|
||||
@@ -103,6 +103,7 @@ class MemObj : public BaseObject<_cl_mem> {
|
||||
bool isMemObjWithHostPtrSVM() const;
|
||||
bool isMemObjUncacheable() const;
|
||||
bool isMemObjUncacheableForSurfaceState() const;
|
||||
bool isMemObjDisplayable() const;
|
||||
virtual void transferDataToHostPtr(MemObjSizeArray ©Size, MemObjOffsetArray ©Offset) { UNRECOVERABLE_IF(true); };
|
||||
virtual void transferDataFromHostPtr(MemObjSizeArray ©Size, MemObjOffsetArray ©Offset) { UNRECOVERABLE_IF(true); };
|
||||
|
||||
@@ -190,6 +191,7 @@ class MemObj : public BaseObject<_cl_mem> {
|
||||
bool isZeroCopy;
|
||||
bool isHostPtrSVM;
|
||||
bool isObjectRedescribed;
|
||||
bool isDisplayable{false};
|
||||
MemoryManager *memoryManager = nullptr;
|
||||
MultiGraphicsAllocation multiGraphicsAllocation;
|
||||
GraphicsAllocation *mcsAllocation = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user