Fix build errors for PAL and GSL

The last commit to replace the cl_* types with standard types
failed to correct issues introduced in the PAL and GPU backend.

Change-Id: I926997234dfbe346fc165a7bc4e1b8aabab7bac5
このコミットが含まれているのは:
Laurent Morichetti
2020-02-13 11:24:03 -08:00
committed by Laurent Morichetti
コミット b81816f482
5個のファイルの変更21行の追加21行の削除
+9 -9
ファイルの表示
@@ -2206,7 +2206,7 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
dim = 3;
void* newpattern = const_cast<void*>(pattern);
uint32_t4 iFillColor;
uint32_t iFillColor[4];
bool rejected = false;
bool releaseView = false;
@@ -2232,11 +2232,11 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
// Converting a linear RGB floating-point color value to a 8-bit unsigned integer sRGB value
// because hw is not support write_imagef for sRGB.
float* fColor = static_cast<float*>(newpattern);
iFillColor.s[0] = sRGBmap(fColor[0]);
iFillColor.s[1] = sRGBmap(fColor[1]);
iFillColor.s[2] = sRGBmap(fColor[2]);
iFillColor.s[3] = (uint32_t)(fColor[3] * 255.0f);
newpattern = static_cast<void*>(&iFillColor);
iFillColor[0] = sRGBmap(fColor[0]);
iFillColor[1] = sRGBmap(fColor[1]);
iFillColor[2] = sRGBmap(fColor[2]);
iFillColor[3] = (uint32_t)(fColor[3] * 255.0f);
newpattern = static_cast<void*>(&iFillColor[0]);
for (uint i = 0; i < RejectedFormatChannelTotal; ++i) {
if (RejectedOrder[i].clOldType_ == newFormat.image_channel_order) {
newFormat.image_channel_order = RejectedOrder[i].clNewType_;
@@ -2281,9 +2281,9 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
// Program kernels arguments for the blit operation
Memory* mem = memView;
setArgument(kernels_[fillType], 0, sizeof(cl_mem), &mem);
setArgument(kernels_[fillType], 1, sizeof(float4), newpattern);
setArgument(kernels_[fillType], 2, sizeof(int32_t4), newpattern);
setArgument(kernels_[fillType], 3, sizeof(uint32_t4), newpattern);
setArgument(kernels_[fillType], 1, sizeof(float[4]), newpattern);
setArgument(kernels_[fillType], 2, sizeof(int32_t[4]), newpattern);
setArgument(kernels_[fillType], 3, sizeof(uint32_t[4]), newpattern);
int32_t fillOrigin[4] = {(int32_t)origin[0], (int32_t)origin[1], (int32_t)origin[2], 0};
int32_t fillSize[4] = {(int32_t)size[0], (int32_t)size[1], (int32_t)size[2], 0};
+1 -1
ファイルの表示
@@ -351,7 +351,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
info_.vramBusBitWidth_ = calAttr.memBusWidth;
info_.l2CacheSize_ = 0;
info_.maxParameterSize_ = 1024;
info_.minDataTypeAlignSize_ = sizeof(int64_t16);
info_.minDataTypeAlignSize_ = sizeof(int64_t[16]);
info_.singleFPConfig_ =
CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_INF_NAN | CL_FP_FMA;
+9 -9
ファイルの表示
@@ -2232,7 +2232,7 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
dim = 3;
void* newpattern = const_cast<void*>(pattern);
uint32_t4 iFillColor;
uint32_t iFillColor[4];
bool rejected = false;
bool releaseView = false;
@@ -2251,11 +2251,11 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
// Converting a linear RGB floating-point color value to a 8-bit unsigned integer sRGB value
// because hw is not support write_imagef for sRGB.
float* fColor = static_cast<float*>(newpattern);
iFillColor.s[0] = sRGBmap(fColor[0]);
iFillColor.s[1] = sRGBmap(fColor[1]);
iFillColor.s[2] = sRGBmap(fColor[2]);
iFillColor.s[3] = (uint32_t)(fColor[3] * 255.0f);
newpattern = static_cast<void*>(&iFillColor);
iFillColor[0] = sRGBmap(fColor[0]);
iFillColor[1] = sRGBmap(fColor[1]);
iFillColor[2] = sRGBmap(fColor[2]);
iFillColor[3] = (uint32_t)(fColor[3] * 255.0f);
newpattern = static_cast<void*>(&iFillColor[0]);
for (uint i = 0; i < RejectedFormatChannelTotal; ++i) {
if (RejectedOrder[i].clOldType_ == newFormat.image_channel_order) {
newFormat.image_channel_order = RejectedOrder[i].clNewType_;
@@ -2308,9 +2308,9 @@ bool KernelBlitManager::fillImage(device::Memory& memory, const void* pattern,
// Program kernels arguments for the blit operation
Memory* mem = memView;
setArgument(kernels_[fillType], 0, sizeof(cl_mem), &mem);
setArgument(kernels_[fillType], 1, sizeof(float4), newpattern);
setArgument(kernels_[fillType], 2, sizeof(int32_t4), newpattern);
setArgument(kernels_[fillType], 3, sizeof(uint32_t4), newpattern);
setArgument(kernels_[fillType], 1, sizeof(float[4]), newpattern);
setArgument(kernels_[fillType], 2, sizeof(int32_t[4]), newpattern);
setArgument(kernels_[fillType], 3, sizeof(uint32_t[4]), newpattern);
int32_t fillOrigin[4] = {(int32_t)origin[0], (int32_t)origin[1], (int32_t)origin[2], 0};
int32_t fillSize[4] = {(int32_t)size[0], (int32_t)size[1], (int32_t)size[2], 0};
+1 -1
ファイルの表示
@@ -72,7 +72,7 @@ bool ManagedBuffer::create(Resource::MemoryType type) {
// ================================================================================================
address ManagedBuffer::reserve(uint32_t size, uint64_t* gpu_address) {
// Align to the maximum data size available in OpenCL
static constexpr uint32_t MemAlignment = sizeof(double16);
static constexpr uint32_t MemAlignment = sizeof(double[16]);
// Align reserve size on the vector's boundary
uint32_t count = amd::alignUp(size, MemAlignment);
+1 -1
ファイルの表示
@@ -400,7 +400,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
info_.vramBusBitWidth_ = palProp.gpuMemoryProperties.performance.vramBusBitWidth;
info_.l2CacheSize_ = palProp.gfxipProperties.shaderCore.tccSizeInBytes;
info_.maxParameterSize_ = 1024;
info_.minDataTypeAlignSize_ = sizeof(int64_t16);
info_.minDataTypeAlignSize_ = sizeof(int64_t[16]);
info_.singleFPConfig_ =
CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO | CL_FP_ROUND_TO_INF | CL_FP_INF_NAN | CL_FP_FMA;