Add image1DMaxWidth_ for maxTexture1D property
Needed by SWDEV-254068
Change-Id: Ic650dfb6e5b38d7544ba647c53de52deda39b92d
[ROCm/clr commit: c0f8b52f06]
Этот коммит содержится в:
@@ -432,6 +432,9 @@ struct Info : public amd::EmbeddedObject {
|
||||
//! Returns the list of built-in kernels, supported by the device
|
||||
const char* builtInKernels_;
|
||||
|
||||
//! Returns max number of pixels for a 1D image
|
||||
size_t image1DMaxWidth_;
|
||||
|
||||
//! Returns max number of pixels for a 1D image created from a buffer object
|
||||
size_t imageMaxBufferSize_;
|
||||
|
||||
|
||||
@@ -541,6 +541,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
|
||||
// OpenCL1.2 device info fields
|
||||
info_.builtInKernels_ = "";
|
||||
info_.imageMaxBufferSize_ = MaxImageBufferSize;
|
||||
info_.image1DMaxWidth_ = maxTextureSize;
|
||||
info_.imageMaxArraySize_ = MaxImageArraySize;
|
||||
info_.preferredInteropUserSync_ = true;
|
||||
info_.printfBufferSize_ = PrintfDbg::WorkitemDebugSize * info().maxWorkGroupSize_;
|
||||
|
||||
@@ -619,6 +619,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
|
||||
// OpenCL1.2 device info fields
|
||||
info_.builtInKernels_ = "";
|
||||
info_.imageMaxBufferSize_ = MaxImageBufferSize;
|
||||
info_.image1DMaxWidth_ = maxTextureSize;
|
||||
info_.imageMaxArraySize_ = MaxImageArraySize;
|
||||
info_.preferredInteropUserSync_ = true;
|
||||
info_.printfBufferSize_ = PrintfDbg::WorkitemDebugSize * info().maxWorkGroupSize_;
|
||||
|
||||
@@ -1341,6 +1341,15 @@ bool Device::populateOCLDeviceConstants() {
|
||||
|
||||
info_.imageMaxArraySize_ = max_array_size;
|
||||
|
||||
uint32_t max_image1d_width = 0;
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
hsa_agent_get_info(_bkendDevice,
|
||||
static_cast<hsa_agent_info_t>(HSA_EXT_AGENT_INFO_IMAGE_1D_MAX_ELEMENTS),
|
||||
&max_image1d_width)) {
|
||||
return false;
|
||||
}
|
||||
info_.image1DMaxWidth_ = max_image1d_width;
|
||||
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
hsa_agent_get_info(_bkendDevice,
|
||||
static_cast<hsa_agent_info_t>(HSA_EXT_AGENT_INFO_IMAGE_1DB_MAX_ELEMENTS),
|
||||
|
||||
Ссылка в новой задаче
Block a user