diff --git a/shared/source/device_binary_format/zebin_decoder.cpp b/shared/source/device_binary_format/zebin_decoder.cpp index b23341b9ec..1509795724 100644 --- a/shared/source/device_binary_format/zebin_decoder.cpp +++ b/shared/source/device_binary_format/zebin_decoder.cpp @@ -48,14 +48,14 @@ bool validateTargetDevice(const TargetDevice &targetDevice, Elf::ELF_IDENTIFIER_ return false; } - if (gfxCore == IGFX_UNKNOWN_CORE && productFamily == IGFX_UNKNOWN && productConfig == AOT::UNKNOWN_ISA) { + if (productConfig != AOT::UNKNOWN_ISA) { + return targetDevice.aotConfig.value == productConfig; + } + + if (gfxCore == IGFX_UNKNOWN_CORE && productFamily == IGFX_UNKNOWN) { return false; } - if (productConfig != AOT::UNKNOWN_ISA) { - if (targetDevice.aotConfig.value != productConfig) { - return false; - } - } + if (gfxCore != IGFX_UNKNOWN_CORE) { if (targetDevice.coreFamily != gfxCore) { return false; diff --git a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp index fb2faaf86d..738f2ac622 100644 --- a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp @@ -5570,15 +5570,14 @@ TEST(ValidateTargetDeviceTests, givenMismatchedGfxCoreWhenValidatingTargetDevice TEST(ValidateTargetDeviceTests, givenSteppingBiggerThanMaxHwRevisionWhenValidatingTargetDeviceThenReturnFalse) { TargetDevice targetDevice; targetDevice.maxPointerSizeInBytes = 8u; - auto aotConfigValue = 0x00001234u; - targetDevice.aotConfig.value = aotConfigValue; + targetDevice.coreFamily = renderCoreFamily; targetDevice.stepping = 2u; Elf::ZebinTargetFlags targetMetadata; targetMetadata.validateRevisionId = true; targetMetadata.maxHwRevisionId = 1u; - auto res = validateTargetDevice(targetDevice, Elf::EI_CLASS_64, IGFX_UNKNOWN, IGFX_UNKNOWN_CORE, static_cast(aotConfigValue), targetMetadata); + auto res = validateTargetDevice(targetDevice, Elf::EI_CLASS_64, IGFX_UNKNOWN, renderCoreFamily, AOT::UNKNOWN_ISA, targetMetadata); EXPECT_FALSE(res); }