As the spec allows for {server,client}_wait_sync to be called without
currently bound context, while our implementation requires context
pointer.UNTESTED. Cc: Chad Versace <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Chih-Wei Huang <[email protected]> Cc: Mauro Rossi <[email protected]> Cc: 10.6 11.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> --- Upon second thought I'm leaning that we should move this to the API specific library (i.e. libEGL) rather than keeping it here. It will give us remove API specific from the DRI extension, plus it'll give us better mix'n'match (loader+dri module) compatibility. How do you guys feel on the topic ? -Emil src/mesa/drivers/dri/i965/intel_syncobj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_syncobj.c b/src/mesa/drivers/dri/i965/intel_syncobj.c index c44c4be..3e359a5 100644 --- a/src/mesa/drivers/dri/i965/intel_syncobj.c +++ b/src/mesa/drivers/dri/i965/intel_syncobj.c @@ -45,6 +45,7 @@ #include "intel_reg.h" struct brw_fence { + struct brw_context *brw; /** The fence waits for completion of this batch. */ drm_intel_bo *batch_bo; @@ -214,6 +215,7 @@ intel_dri_create_fence(__DRIcontext *ctx) if (!fence) return NULL; + fence->brw = brw; brw_fence_insert(brw, fence); return fence; @@ -232,19 +234,17 @@ static GLboolean intel_dri_client_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags, uint64_t timeout) { - struct brw_context *brw = ctx->driverPrivate; struct brw_fence *fence = driver_fence; - return brw_fence_client_wait(brw, fence, timeout); + return brw_fence_client_wait(fence->brw, fence, timeout); } static void intel_dri_server_wait_sync(__DRIcontext *ctx, void *driver_fence, unsigned flags) { - struct brw_context *brw = ctx->driverPrivate; struct brw_fence *fence = driver_fence; - brw_fence_server_wait(brw, fence); + brw_fence_server_wait(fence->brw, fence); } const __DRI2fenceExtension intelFenceExtension = { -- 2.5.0 _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
