mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Fix image from subbuffer offsets
- change 32 bit offset to size_t to account for offsets bigger than 4 GB in SurfaceOffsets - change ImageInfo offset to size_t type - fix hostptr offseting in subbuffer creation - null hostptr shouldn't be offseted Change-Id: I18a5b8eacbd8c9e40c1f2effe5ded4fa8b453395
This commit is contained in:
committed by
sys_ocldev
parent
95e5aba86a
commit
d019638119
@@ -32,7 +32,7 @@ struct KernelInfo;
|
||||
struct SurfaceFormatInfo;
|
||||
|
||||
struct SurfaceOffsets {
|
||||
uint32_t offset;
|
||||
uint64_t offset;
|
||||
uint32_t xOffset;
|
||||
uint32_t yOffset;
|
||||
uint32_t yOffsetForUVplane;
|
||||
@@ -156,7 +156,7 @@ class Image : public MemObj {
|
||||
bool allowTiling() const override { return this->isTiledImage; }
|
||||
void setImageRowPitch(size_t rowPitch) { imageDesc.image_row_pitch = rowPitch; }
|
||||
void setImageSlicePitch(size_t slicePitch) { imageDesc.image_slice_pitch = slicePitch; }
|
||||
void setSurfaceOffsets(uint32_t offset, uint32_t xOffset, uint32_t yOffset, uint32_t yOffsetForUVPlane) {
|
||||
void setSurfaceOffsets(uint64_t offset, uint32_t xOffset, uint32_t yOffset, uint32_t yOffsetForUVPlane) {
|
||||
surfaceOffsets.offset = offset;
|
||||
surfaceOffsets.xOffset = xOffset;
|
||||
surfaceOffsets.yOffset = yOffset;
|
||||
@@ -225,7 +225,7 @@ class Image : public MemObj {
|
||||
size_t imageCount = 0;
|
||||
uint32_t cubeFaceIndex;
|
||||
cl_uint mediaPlaneType;
|
||||
SurfaceOffsets surfaceOffsets;
|
||||
SurfaceOffsets surfaceOffsets = {0};
|
||||
uint32_t baseMipLevel = 0;
|
||||
uint32_t mipCount = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user