From 4cd4f327dfdcc7bf85f8ce9a0b9a374be47ef5ea Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 16 Jul 2019 15:54:22 -0400
Subject: [PATCH] P4 to Git Change 1968576 by cpaquot@cpaquot-ocl-lc-lnx on
2019/07/16 15:48:18
SWDEV-145570 - [HIP] update code after header change
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#12 edit
[ROCm/hip commit: fd89a62ac3f505d7418415ee254f8624db1b2f72]
---
projects/hip/api/hip/hip_memory.cpp | 13 ++++++-------
projects/hip/api/hip/hip_texture.cpp | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/projects/hip/api/hip/hip_memory.cpp b/projects/hip/api/hip/hip_memory.cpp
index f638381b39..a591c9ecd3 100644
--- a/projects/hip/api/hip/hip_memory.cpp
+++ b/projects/hip/api/hip/hip_memory.cpp
@@ -437,22 +437,21 @@ hipError_t hipArrayCreate(hipArray** array, const HIP_ARRAY_DESCRIPTOR* pAllocat
}
*array = (hipArray*)malloc(sizeof(hipArray));
- array[0]->drvDesc = *pAllocateArray;
- array[0]->width = pAllocateArray->width;
- array[0]->height = pAllocateArray->height;
+ array[0]->width = pAllocateArray->Width;
+ array[0]->height = pAllocateArray->Height;
array[0]->isDrv = true;
array[0]->textureType = hipTextureType2D;
void** ptr = &array[0]->data;
cl_channel_order channelOrder;
cl_channel_type channelType;
- getDrvChannelOrderAndType(pAllocateArray->format, pAllocateArray->numChannels,
+ getDrvChannelOrderAndType(pAllocateArray->Format, pAllocateArray->NumChannels,
&channelOrder, &channelType);
const cl_image_format image_format = { channelOrder, channelType };
- size_t size = pAllocateArray->width;
- if (pAllocateArray->height > 0) {
- size = size * pAllocateArray->height;
+ size_t size = pAllocateArray->Width;
+ if (pAllocateArray->Height > 0) {
+ size = size * pAllocateArray->Height;
}
size_t pitch = 0;
diff --git a/projects/hip/api/hip/hip_texture.cpp b/projects/hip/api/hip/hip_texture.cpp
index f1ed3580b3..e8fd421470 100644
--- a/projects/hip/api/hip/hip_texture.cpp
+++ b/projects/hip/api/hip/hip_texture.cpp
@@ -577,5 +577,5 @@ hipError_t hipTexRefSetAddress2D(textureReference* tex, const HIP_ARRAY_DESCRIPT
}
size_t offset;
- HIP_RETURN(ihipBindTexture(CL_MEM_OBJECT_IMAGE2D, &offset, tex, devPtr, nullptr, desc->width, desc->height, pitch));
+ HIP_RETURN(ihipBindTexture(CL_MEM_OBJECT_IMAGE2D, &offset, tex, devPtr, nullptr, desc->Width, desc->Height, pitch));
}