SWDEV-465162 - Fix some issue with image support
Fix some small issues regarding image and mipmap support
Change-Id: I8e64223d44f37c2dbb115cbb343441a48021ba7b
[ROCm/clr commit: 1566ff7639]
Dieser Commit ist enthalten in:
@@ -921,7 +921,7 @@ amd::Image* ihipImageCreate(const cl_channel_order channelOrder,
|
||||
const std::vector<amd::Device*>& devices = context.devices();
|
||||
if (!devices[0]->info().imageSupport_) {
|
||||
LogPrintfError("Device: 0x%x does not support image", devices[0]);
|
||||
status = hipErrorInvalidValue;
|
||||
status = hipErrorNotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,22 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject,
|
||||
// If hipResourceDesc::resType is set to hipResourceTypeMipmappedArray,
|
||||
// hipResourceDesc::res::mipmap::mipmap must be set to a valid HIP mipmapped array handle
|
||||
// and hipTextureDesc::normalizedCoords must be set to true.
|
||||
if ((pResDesc->resType == hipResourceTypeMipmappedArray) &&
|
||||
((pResDesc->res.mipmap.mipmap == nullptr) || (pTexDesc->normalizedCoords == 0))) {
|
||||
return hipErrorInvalidValue;
|
||||
if (pResDesc->resType == hipResourceTypeMipmappedArray) {
|
||||
bool mipMapSupport = true;
|
||||
amd::Context& context = *hip::getCurrentDevice()->asContext();
|
||||
const std::vector<amd::Device*>& devices = context.devices();
|
||||
for (auto& dev : devices) {
|
||||
if (!dev->settings().checkExtension(ClKhrMipMapImage)) {
|
||||
mipMapSupport = false; // Now PAL-backend can support mipmap, Rocm-backend cannot.
|
||||
}
|
||||
}
|
||||
if (mipMapSupport == false) {
|
||||
LogInfo("Mipmap not supported on the device");
|
||||
return hipErrorNotSupported;
|
||||
}
|
||||
if (pResDesc->res.mipmap.mipmap == nullptr || pTexDesc->normalizedCoords == 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
}
|
||||
|
||||
// If hipResourceDesc::resType is set to hipResourceTypeLinear,
|
||||
|
||||
@@ -393,7 +393,7 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
|
||||
enableExtension(ClKhrSubGroups);
|
||||
enableExtension(ClKhrDepthImages);
|
||||
|
||||
if (GPU_MIPMAP) {
|
||||
if (GPU_MIPMAP && imageSupport_) {
|
||||
enableExtension(ClKhrMipMapImage);
|
||||
enableExtension(ClKhrMipMapImageWrites);
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren