[Mesa-stable] [PATCH 3/3] i915: store reference to the context within struct intel_fence
Mauro Rossi
issor.oruam at gmail.com
Thu Jul 14 03:33:17 UTC 2016
Porting of the corresponding experimental patch for i965,
i.e. commit 67adb45 in external/mesa project branch x86/marshmallow-x86
in Android-x86 repo.
Here follows the original commit message by Emil Velikov:
"As the spec allows for {server,client}_wait_sync to be called without
currently bound context, while our implementation requires context pointer.
Untested"
Now the changes have been tested for some months.
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
---
src/mesa/drivers/dri/i915/intel_syncobj.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c
index 18d1546..39bb9ee 100644
--- a/src/mesa/drivers/dri/i915/intel_syncobj.c
+++ b/src/mesa/drivers/dri/i915/intel_syncobj.c
@@ -46,6 +46,7 @@
#include "intel_reg.h"
struct intel_fence {
+ struct intel_context *intel;
/** The fence waits for completion of this batch. */
drm_intel_bo *batch_bo;
@@ -215,6 +216,7 @@ intel_dri_create_fence(__DRIcontext *ctx)
if (!fence)
return NULL;
+ fence->intel = intel;
intel_fence_insert(intel, fence);
return fence;
@@ -233,19 +235,17 @@ static GLboolean
intel_dri_client_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags,
uint64_t timeout)
{
- struct intel_context *intel = ctx->driverPrivate;
struct intel_fence *fence = driver_fence;
- return intel_fence_client_wait(intel, fence, timeout);
+ return intel_fence_client_wait(fence->intel, fence, timeout);
}
static void
intel_dri_server_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags)
{
- struct intel_context *intel = ctx->driverPrivate;
struct intel_fence *fence = driver_fence;
- intel_fence_server_wait(intel, fence);
+ intel_fence_server_wait(fence->intel, fence);
}
const __DRI2fenceExtension intelFenceExtension = {
--
2.7.4
More information about the mesa-stable
mailing list