mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Do not obtain command stream if it will not be needed
Change-Id: Id7fa1c6b78e71a085084f8fcb66a7b8e873ad2bc Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5120
This commit is contained in:
committed by
sys_ocldev
parent
960860e4cb
commit
8fcd51c2c8
@@ -85,7 +85,7 @@ class CommandStreamReceiver {
|
||||
virtual void processEviction();
|
||||
void makeResidentHostPtrAllocation(GraphicsAllocation *gfxAllocation);
|
||||
|
||||
void ensureCommandBufferAllocation(LinearStream &commandStream, size_t minimumRequiredSize, size_t additionalAllocationSize);
|
||||
MOCKABLE_VIRTUAL void ensureCommandBufferAllocation(LinearStream &commandStream, size_t minimumRequiredSize, size_t additionalAllocationSize);
|
||||
|
||||
MemoryManager *getMemoryManager() const;
|
||||
|
||||
|
||||
@@ -8,12 +8,23 @@
|
||||
#include "shared/test/unit_test/test_macros/test_checks_shared.h"
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/unit_test/helpers/default_hw_info.h"
|
||||
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
bool NEO::TestChecks::supportsBlitter(const HardwareInfo *pHardwareInfo) {
|
||||
auto engines = HwHelper::get(::renderCoreFamily).getGpgpuEngineInstances(*pHardwareInfo);
|
||||
for (const auto &engine : engines) {
|
||||
if (engine.first == aub_stream::EngineType::ENGINE_BCS) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TestChecks::supportsSvm(const HardwareInfo *pHardwareInfo) {
|
||||
return pHardwareInfo->capabilityTable.ftrSvm;
|
||||
}
|
||||
@@ -46,4 +57,4 @@ HWTEST2_P(TestMacrosWithParamIfNotMatchTearDownCall, givenNotMatchPlatformWhenUs
|
||||
}
|
||||
INSTANTIATE_TEST_CASE_P(givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled,
|
||||
TestMacrosWithParamIfNotMatchTearDownCall,
|
||||
::testing::Values(0));
|
||||
::testing::Values(0));
|
||||
|
||||
@@ -15,6 +15,7 @@ class Device;
|
||||
struct HardwareInfo;
|
||||
|
||||
namespace TestChecks {
|
||||
bool supportsBlitter(const HardwareInfo *pHardwareInfo);
|
||||
bool supportsSvm(const HardwareInfo *pHardwareInfo);
|
||||
bool supportsSvm(const std::unique_ptr<HardwareInfo> &pHardwareInfo);
|
||||
bool supportsSvm(const Device *pDevice);
|
||||
@@ -26,3 +27,8 @@ bool supportsSvm(const Device *pDevice);
|
||||
if (NEO::TestChecks::supportsSvm(param) == false) { \
|
||||
GTEST_SKIP(); \
|
||||
}
|
||||
|
||||
#define REQUIRE_BLITTER_OR_SKIP(param) \
|
||||
if (NEO::TestChecks::supportsBlitter(param) == false) { \
|
||||
GTEST_SKIP(); \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user