On 26/11/14 09:52 PM, Nathan Kidd wrote:
> On 26/11/14 09:38 PM, Nathan Kidd wrote:
>> Incidentally, my current code works around the whole
>> xcb_get_extension_data issue by simply not faking it at all.  Exceed
>> onDemand and Exceed Turbo VA X  always support GLX (unless you
>> explicitly turn it off), so there's no pressing need to pretend it exists.
> 
> A work-around for other proxies would be to make the faked function
> query the asked-for connection first, and only supply fake information
> if the extension is not found.  All the 2D-Xserver GLX queries should be
> checking if GLX is available anyway, and would not occur if the
> extension isn't there.  I think this change would push the "we need a
> TLS flag" issue into, if not theoretical, at least unnecessary-for-now
> territory.

And the patch that does this attached.

-Nathan

>From 488d1377cd8300292f63f407401a387094be0947 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nk...@opentext.com>
Date: Wed, 26 Nov 2014 22:50:13 -0500
Subject: [PATCH] Only fake xcb_get_extension_data if query on original
 connection fails

This fixes EOD-1328
---
 server/faker-xcb.cpp |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/server/faker-xcb.cpp b/server/faker-xcb.cpp
index 97cbc16..c4ad3a9 100644
--- a/server/faker-xcb.cpp
+++ b/server/faker-xcb.cpp
@@ -55,9 +55,12 @@ const xcb_query_extension_reply_t *
 	__vgl_print_xcb_warnings();
 	if(fconfig.fakexcb && ext && !strcmp(ext->name, "GLX"))
 	{
-		xcb_connection_t *conn3D=_XGetXCBConnection(_localdpy);
-		if(conn3D!=NULL)
-			reply=_xcb_get_extension_data(conn3D, __xcb_glx_id);
+		reply=_xcb_get_extension_data(conn, ext);
+		if (!reply || !reply->present) {
+			xcb_connection_t *conn3D=_XGetXCBConnection(_localdpy);
+			if(conn3D!=NULL)
+				reply=_xcb_get_extension_data(conn3D, __xcb_glx_id);
+		}
 
 	}
 	else
-- 
1.7.10.4


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
VirtualGL-Devel mailing list
VirtualGL-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-devel

Reply via email to