Create a wrapper for drm_i915_gem_context_create_ext

Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-05-24 14:36:24 +00:00
committed by Compute-Runtime-Automation
parent bd5dc1524c
commit 51d1752a68
12 changed files with 41 additions and 33 deletions

View File

@@ -76,9 +76,8 @@ int DrmMock::ioctl(unsigned long request, void *arg) {
if ((request == DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT) && (arg != nullptr)) {
ioctlCount.contextCreate++;
auto create = static_cast<drm_i915_gem_context_create_ext *>(arg);
auto contextCreate = static_cast<drm_i915_gem_context_create *>(arg);
contextCreate->ctx_id = this->storedDrmContextId;
auto create = static_cast<GemContextCreateExt *>(arg);
create->contextId = this->storedDrmContextId;
this->receivedContextCreateFlags = create->flags;
if (create->extensions == 0) {
return this->storedRetVal;

View File

@@ -58,7 +58,7 @@ int DrmMockPrelimContext::handlePrelimRequest(unsigned long request, void *arg)
}
} break;
case DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT: {
auto create = static_cast<drm_i915_gem_context_create_ext *>(arg);
auto create = static_cast<GemContextCreateExt *>(arg);
auto setParam = reinterpret_cast<GemContextCreateExtSetParam *>(create->extensions);
if (setParam->param.param == PRELIM_I915_CONTEXT_PARAM_ACC) {
const auto paramAcc = reinterpret_cast<prelim_drm_i915_gem_context_param_acc *>(setParam->param.value);