File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -197,20 +197,15 @@ struct SurfaceMem {
197
197
void *HostPtr)
198
198
: Arrays(Context->Devices.size(), CUarray{0 }),
199
199
SurfObjs (Context->Devices.size(), CUsurfObject{0 }),
200
- OuterMemStruct{OuterMemStruct},
201
- ImageFormat{ImageFormat}, ImageDesc{ImageDesc}, HostPtr{HostPtr} {
200
+ OuterMemStruct{OuterMemStruct}, ImageDesc{ImageDesc}, ArrayDesc{},
201
+ HostPtr{HostPtr} {
202
202
// We have to use hipArray3DCreate, which has some caveats. The height and
203
203
// depth parameters must be set to 0 produce 1D or 2D arrays. image_desc
204
204
// gives a minimum value of 1, so we need to convert the answer.
205
205
ArrayDesc.NumChannels = 4 ; // Only support 4 channel image
206
- ArrayDesc.Flags = 0 ; // No flags required
207
206
ArrayDesc.Width = ImageDesc.width ;
208
- if (ImageDesc.type == UR_MEM_TYPE_IMAGE1D) {
209
- ArrayDesc.Height = 0 ;
210
- ArrayDesc.Depth = 0 ;
211
- } else if (ImageDesc.type == UR_MEM_TYPE_IMAGE2D) {
207
+ if (ImageDesc.type == UR_MEM_TYPE_IMAGE2D) {
212
208
ArrayDesc.Height = ImageDesc.height ;
213
- ArrayDesc.Depth = 0 ;
214
209
} else if (ImageDesc.type == UR_MEM_TYPE_IMAGE3D) {
215
210
ArrayDesc.Height = ImageDesc.height ;
216
211
ArrayDesc.Depth = ImageDesc.depth ;
You can’t perform that action at this time.
0 commit comments