[Mesa-dev] [PATCH] st/dri: Add fence extension to SW path
Gurchetan Singh
gurchetansingh at chromium.org
Fri May 5 19:56:23 UTC 2017
From: Gurchetan Singh <gurchetansingh at chromium.org>
Use the same fence implementation for drisw.c as dri2.c by
making dri2FenceExtension an external variable. This is desirable
for synchronization in virtual machines.
---
src/gallium/state_trackers/dri/dri2.c | 2 +-
src/gallium/state_trackers/dri/dri_drawable.h | 1 +
src/gallium/state_trackers/dri/drisw.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index ed6004f836..2556777b67 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1604,7 +1604,7 @@ dri2_server_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags)
ctx->fence_server_sync(ctx, fence->pipe_fence);
}
-static __DRI2fenceExtension dri2FenceExtension = {
+const __DRI2fenceExtension dri2FenceExtension = {
.base = { __DRI2_FENCE, 2 },
.create_fence = dri2_create_fence,
diff --git a/src/gallium/state_trackers/dri/dri_drawable.h b/src/gallium/state_trackers/dri/dri_drawable.h
index 1f9842ea54..0c3e19563a 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.h
+++ b/src/gallium/state_trackers/dri/dri_drawable.h
@@ -123,6 +123,7 @@ dri_flush(__DRIcontext *cPriv,
extern const __DRItexBufferExtension driTexBufferExtension;
extern const __DRI2throttleExtension dri2ThrottleExtension;
+extern const __DRI2fenceExtension dri2FenceExtension;
#endif
/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c
index b85a73c57d..bc5fbae040 100644
--- a/src/gallium/state_trackers/dri/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -369,6 +369,7 @@ static const __DRIextension *drisw_screen_extensions[] = {
&driTexBufferExtension.base,
&dri2RendererQueryExtension.base,
&dri2ConfigQueryExtension.base,
+ &dri2FenceExtension.base,
NULL
};
--
2.12.2
More information about the mesa-dev
mailing list