mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 17:00:59 +08:00
feature: initial support for media query api
Related-To: NEO-9777 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b7b45e1410
commit
31f3e3e81d
@@ -1055,6 +1055,10 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
|||||||
} else if (extendedProperties->stype == ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC) {
|
} else if (extendedProperties->stype == ZE_INTEL_STRUCTURE_TYPE_DEVICE_COMMAND_LIST_WAIT_ON_MEMORY_DATA_SIZE_EXP_DESC) {
|
||||||
auto cmdListWaitOnMemDataSize = reinterpret_cast<ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t *>(extendedProperties);
|
auto cmdListWaitOnMemDataSize = reinterpret_cast<ze_intel_device_command_list_wait_on_memory_data_size_exp_desc_t *>(extendedProperties);
|
||||||
cmdListWaitOnMemDataSize->cmdListWaitOnMemoryDataSizeInBytes = l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize();
|
cmdListWaitOnMemDataSize->cmdListWaitOnMemoryDataSizeInBytes = l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize();
|
||||||
|
} else if (extendedProperties->stype == ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES) {
|
||||||
|
auto deviceMediaProperties = reinterpret_cast<ze_intel_device_media_exp_properties_t *>(extendedProperties);
|
||||||
|
deviceMediaProperties->numDecoderCores = 0;
|
||||||
|
deviceMediaProperties->numEncoderCores = 0;
|
||||||
}
|
}
|
||||||
getAdditionalExtProperties(extendedProperties);
|
getAdditionalExtProperties(extendedProperties);
|
||||||
extendedProperties = static_cast<ze_base_properties_t *>(extendedProperties->pNext);
|
extendedProperties = static_cast<ze_base_properties_t *>(extendedProperties->pNext);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "shared/test/common/test_macros/hw_test.h"
|
#include "shared/test/common/test_macros/hw_test.h"
|
||||||
#include "shared/test/common/utilities/destructor_counted.h"
|
#include "shared/test/common/utilities/destructor_counted.h"
|
||||||
|
|
||||||
|
#include "level_zero/api/driver_experimental/public/zex_common.h"
|
||||||
#include "level_zero/core/source/cache/cache_reservation.h"
|
#include "level_zero/core/source/cache/cache_reservation.h"
|
||||||
#include "level_zero/core/source/cmdqueue/cmdqueue_imp.h"
|
#include "level_zero/core/source/cmdqueue/cmdqueue_imp.h"
|
||||||
#include "level_zero/core/source/context/context_imp.h"
|
#include "level_zero/core/source/context/context_imp.h"
|
||||||
@@ -5375,6 +5376,19 @@ TEST_F(DeviceTest, givenDeviceWhenQueryingCmdListMemWaitOnMemDataSizeThenReturnV
|
|||||||
EXPECT_EQ(l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize(), sizeProps.cmdListWaitOnMemoryDataSizeInBytes);
|
EXPECT_EQ(l0GfxCoreHelper.getCmdListWaitOnMemoryDataSize(), sizeProps.cmdListWaitOnMemoryDataSizeInBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(DeviceTest, givenDeviecWhenQueryingMediaPropertiesThenReturnZero) {
|
||||||
|
ze_device_properties_t devProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||||
|
ze_intel_device_media_exp_properties_t mediaProps = {ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES};
|
||||||
|
mediaProps.numDecoderCores = 123;
|
||||||
|
mediaProps.numEncoderCores = 456;
|
||||||
|
|
||||||
|
devProps.pNext = &mediaProps;
|
||||||
|
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zeDeviceGetProperties(device, &devProps));
|
||||||
|
EXPECT_EQ(0u, mediaProps.numDecoderCores);
|
||||||
|
EXPECT_EQ(0u, mediaProps.numEncoderCores);
|
||||||
|
}
|
||||||
|
|
||||||
struct RTASDeviceTest : public ::testing::Test {
|
struct RTASDeviceTest : public ::testing::Test {
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
debugManager.flags.CreateMultipleRootDevices.set(numRootDevices);
|
debugManager.flags.CreateMultipleRootDevices.set(numRootDevices);
|
||||||
|
|||||||
Reference in New Issue
Block a user