[Mesa-dev] [PATCH shader-db 3/3] intel_stub: Return a non-zero context ID.
Kenneth Graunke
kenneth at whitecape.org
Thu May 4 02:44:23 UTC 2017
Recent Mesa has started detecting a hardware context ID of zero (which
is bogus - it's the default context ID) and failing GL context creation.
Previously it saw that the ioctl returned success and happily proceeded.
Don't bother assigning a real ID, but do assign a non-zero value.
---
intel_stub.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/intel_stub.c b/intel_stub.c
index bbaceb4..7b6d193 100644
--- a/intel_stub.c
+++ b/intel_stub.c
@@ -221,6 +221,11 @@ ioctl(int fd, unsigned long request, ...)
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
return 0;
}
+
+ case DRM_IOCTL_I915_GEM_CONTEXT_CREATE: {
+ struct drm_i915_gem_context_create *cc = argp;
+ cc->ctx_id = 1; /* must be non-zero */
+ }
default:
return 0;
}
--
2.12.2
More information about the mesa-dev
mailing list