Skip to content

Commit c50dc43

Browse files
Add new IGC interfaces
Related-To: NEO-4773 Change-Id: Ie6b2e2fa414c909c349b85279c4af9ee4f8433e8 Signed-off-by: Mateusz Hoppe <[email protected]>
1 parent e7bd82c commit c50dc43

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

opencl/test/unit_test/mocks/mock_compilers.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ IgcOclTranslationCtxBase *CIF_GET_INTERFACE_CLASS(IgcOclDeviceCtx, 1)::CreateTra
132132
return nullptr;
133133
}
134134

135+
bool CIF_GET_INTERFACE_CLASS(IgcOclDeviceCtx, 2)::GetSystemRoutine(IGC::SystemRoutineType::SystemRoutineType_t typeOfSystemRoutine,
136+
bool bindless,
137+
CIF::Builtins::BufferSimple *outSystemRoutineBuffer,
138+
CIF::Builtins::BufferSimple *stateSaveAreaHeaderInit) {
139+
return true;
140+
}
135141
// Platform stubs
136142
Platform<0>::~Platform() {}
137143

@@ -480,6 +486,13 @@ IGC::IgcOclTranslationCtxBase *MockIgcOclDeviceCtx::CreateTranslationCtxImpl(CIF
480486
return new MockIgcOclTranslationCtx;
481487
}
482488

489+
bool MockIgcOclDeviceCtx::GetSystemRoutine(IGC::SystemRoutineType::SystemRoutineType_t typeOfSystemRoutine,
490+
bool bindless,
491+
CIF::Builtins::BufferSimple *outSystemRoutineBuffer,
492+
CIF::Builtins::BufferSimple *stateSaveAreaHeaderInit) {
493+
return true;
494+
}
495+
483496
MockIgcOclTranslationCtx::MockIgcOclTranslationCtx() = default;
484497
MockIgcOclTranslationCtx::~MockIgcOclTranslationCtx() = default;
485498

opencl/test/unit_test/mocks/mock_compilers.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ struct MockOclTranslationOutput : MockCIF<IGC::OclTranslationOutputTagOCL> {
178178
MockCIFBuffer *debugData = nullptr;
179179
};
180180

181-
struct MockIgcOclDeviceCtx : MockCIF<IGC::IgcOclDeviceCtxTagOCL> {
181+
struct MockIgcOclDeviceCtx : MockCIF<IGC::IgcOclDeviceCtx<2>> {
182182
static CIF::ICIF *Create(CIF::InterfaceId_t intId, CIF::Version_t version);
183183

184184
MockIgcOclDeviceCtx();
@@ -209,6 +209,11 @@ struct MockIgcOclDeviceCtx : MockCIF<IGC::IgcOclDeviceCtxTagOCL> {
209209
IGC::CodeType::CodeType_t inType,
210210
IGC::CodeType::CodeType_t outType) override;
211211

212+
bool GetSystemRoutine(IGC::SystemRoutineType::SystemRoutineType_t typeOfSystemRoutine,
213+
bool bindless,
214+
CIF::Builtins::BufferSimple *outSystemRoutineBuffer,
215+
CIF::Builtins::BufferSimple *stateSaveAreaHeaderInit) override;
216+
212217
void SetDebugVars(MockCompilerDebugVars &debugVars) {
213218
this->debugVars = debugVars;
214219
}

0 commit comments

Comments
 (0)