[Mesa-dev] [PATCH 1/2] clover: make llvm >= 3.5.0 and c++11 mandatory

2015-04-19 Thread EdB
Clover not longer compile with llvm <= 3.5.0 since e1d363b3
e1d363b3 implies c++11 and llvm 3.5.0 CXXFLAGS provided it
No one seems to have noticed it. It's now official.
---
 configure.ac  | 32 ---
 src/gallium/state_trackers/clover/Makefile.am |  6 ++---
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 325b936..ff4eef3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1865,6 +1865,13 @@ strip_unwanted_llvm_flags() {
-e 's/-fstack-protector-strong\>//g'
 }
 
+llvm_check_for() {
+if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt 
"${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}${LLVM_REQUIRED_VERSION_PATCH}";
 then
+AC_MSG_ERROR([LLVM 
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR.$LLVM_REQUIRED_VERSION_PATCH
 or newer is required for $1])
+fi
+}
+
+
 
 if test -z "$with_gallium_drivers"; then
 enable_gallium_llvm=no
@@ -1919,22 +1926,13 @@ if test "x$enable_gallium_llvm" = xyes; then
 fi
 
 if test "x$enable_opencl" = xyes; then
+LLVM_REQUIRED_VERSION_MAJOR="3"
+LLVM_REQUIRED_VERSION_MINOR="5"
+LLVM_REQUIRED_VERSION_PATCH="0"
+llvm_check_for "opencl"
+
 LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker 
instrumentation"
-# LLVM 3.3 >= 177971 requires IRReader
-if $LLVM_CONFIG --components | grep -qw 'irreader'; then
-LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
-fi
-# LLVM 3.4 requires Option
-if $LLVM_CONFIG --components | grep -qw 'option'; then
-LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
-fi
-# Current OpenCL/Clover and LLVM 3.5 require ObjCARCOpts and 
ProfileData
-if $LLVM_CONFIG --components | grep -qw 'objcarcopts'; then
-LLVM_COMPONENTS="${LLVM_COMPONENTS} objcarcopts"
-fi
-if $LLVM_CONFIG --components | grep -qw 'profiledata'; then
-LLVM_COMPONENTS="${LLVM_COMPONENTS} profiledata"
-fi
+LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts 
profiledata"
 fi
 DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT 
-DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
 MESA_LLVM=1
@@ -2061,9 +2059,7 @@ radeon_llvm_check() {
 LLVM_REQUIRED_VERSION_MAJOR="3"
 LLVM_REQUIRED_VERSION_MINOR="4"
 LLVM_REQUIRED_VERSION_PATCH="2"
-if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt 
"${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}${LLVM_REQUIRED_VERSION_PATCH}";
 then
-AC_MSG_ERROR([LLVM 
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR.$LLVM_REQUIRED_VERSION_PATCH
 or newer is required for $1])
-fi
+llvm_check_for $1
 if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then
 AC_MSG_ERROR([LLVM R600 Target not enabled.  You can enable it when 
building the LLVM
   sources with the --enable-experimental-targets=R600
diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index 62c13fa..3a45b9c 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 include Makefile.sources
 
 AM_CPPFLAGS = \
+-std=c++11 \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
-I$(top_srcdir)/include \
@@ -35,7 +36,6 @@ endif
 noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
 
 libcltgsi_la_CXXFLAGS = \
-   -std=c++0x \
$(VISIBILITY_CXXFLAGS)
 
 libcltgsi_la_SOURCES = $(TGSI_SOURCES)
@@ -48,10 +48,10 @@ libclllvm_la_CXXFLAGS = \
-DLIBCLC_LIBEXECDIR=\"$(LIBCLC_LIBEXECDIR)/\" \
-DCLANG_RESOURCE_DIR=\"$(CLANG_RESOURCE_DIR)\"
 
-libclllvm_la_SOURCES = $(LLVM_SOURCES)
+libclllvm_la_SOURCES = \
+$(LLVM_SOURCES)
 
 libclover_la_CXXFLAGS = \
-   -std=c++11 \
$(VISIBILITY_CXXFLAGS)
 
 libclover_la_LIBADD = \
-- 
2.3.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] clover: remove pre llvm 3.5.0 compatibility code

2015-04-19 Thread EdB
---
 .../state_trackers/clover/llvm/invocation.cpp  | 23 ++
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp 
b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 4da62b9..e07d95b 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -29,21 +29,14 @@
 #include 
 #include 
 #include 
-#if HAVE_LLVM < 0x0305
-#include 
-#else
 #include 
 #include 
 #include 
-#endif
 #include 
 #include 
 #include 
 #include 
 #include 
-#if HAVE_LLVM < 0x0305
-#include 
-#endif
 #if HAVE_LLVM >= 0x0307
 #include 
 #else
@@ -328,9 +321,7 @@ namespace {
  llvm::Function *kernel = *I;
  export_list.push_back(kernel->getName().data());
   }
-#if HAVE_LLVM < 0x0305
-  PM.add(new llvm::DataLayout(mod));
-#elif HAVE_LLVM < 0x0306
+#if HAVE_LLVM < 0x0306
   PM.add(new llvm::DataLayoutPass(mod));
 #elif HAVE_LLVM < 0x0307
   PM.add(new llvm::DataLayoutPass());
@@ -356,11 +347,7 @@ namespace {
   compat::vector args;
   llvm::Function *kernel_func = mod->getFunction(kernel_name);
 
-#if HAVE_LLVM < 0x0305
- llvm::DataLayout TD(kernel_func->getParent()->getDataLayout());
-#else
- llvm::DataLayout TD(mod);
-#endif
+  llvm::DataLayout TD(mod);
 
   for (llvm::Function::const_arg_iterator I = kernel_func->arg_begin(),
   E = kernel_func->arg_end(); I != E; ++I) 
{
@@ -651,8 +638,6 @@ namespace {
   return m;
}
 
-#if HAVE_LLVM >= 0x0305
-
void
diagnostic_handler(const llvm::DiagnosticInfo &di, void *data) {
   if (di.getSeverity() == llvm::DS_Error) {
@@ -667,8 +652,6 @@ namespace {
   }
}
 
-#endif
-
void
init_targets() {
   static bool targets_initialized = false;
@@ -721,9 +704,7 @@ clover::compile_program_llvm(const compat::string &source,
llvm::LLVMContext llvm_ctx;
unsigned optimization_level;
 
-#if HAVE_LLVM >= 0x0305
llvm_ctx.setDiagnosticHandler(diagnostic_handler, &r_log);
-#endif
 
if (get_debug_flags() & DBG_CLC)
   debug_log(source, ".cl");
-- 
2.3.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 89018] Civilization: Beyond Earth terrain section not rendered

2015-04-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89018

Ernst Sjöstrand  changed:

   What|Removed |Added

 CC||ern...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glx/dri3: Use a separate xcb connection for Present events

2015-04-19 Thread Daniel Stone
Hi,

On Saturday, April 18, 2015, Axel Davy  wrote:
>
> There's a strange issue with xcb_get_geometry: If I use the new xcb
> connection
> it fails and the error is a drawable error. If I use the Xlib xcb
> connection (what
> I did in this patch) it works. If anyone knows why, please tell. We use
> xcb_get_geometry
> with gallium nine with a different xcb connection than Xlib and it works
> without
>

Not all that surprising I guess. If a client creates a window and then
immediately creates a surface with it, nothing guarantees that the window
creation request on the other display actually ever got processed.

You'd need to pepper this with XSync on the display the client passed in to
recreate the synchronisation that was previously implicit in having both
client and Mesa requests ordered within the same connection.

Cheers,
Daniel
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallivm: Fix build against LLVM 3.7 SVN r235265

2015-04-19 Thread Nick Sarnie
LLVM removed JITEmitDebugInfo from TargetOptions since they weren't used

Signed-off-by: Nick Sarnie 
---
 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 +-
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 65d2896..381e1fa 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -270,7 +270,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
}

TargetOptions options;
-#if defined(DEBUG)
+#if defined(DEBUG) && HAVE_LLVM < 0x307
options.JITEmitDebugInfo = true;
 #endif
 #if defined(PIPE_ARCH_X86)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 4ede90b..5e8a634 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -429,7 +429,7 @@
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
 #endif
 #endif

-#if defined(DEBUG)
+#if defined(DEBUG) && HAVE_LLVM < 0x0307
options.JITEmitDebugInfo = true;
 #endif

-- 
2.3.5
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v4] glx/dri3: Use a separate xcb connection for Present events

2015-04-19 Thread Axel Davy
Previously glx was using the xcb connection from Xlib.
It is a problem because there are issues if Xlib is used
in another thread (Present event lost)

This patch creates a per-context xcb connection to solve this issue.

Solves: https://bugs.freedesktop.org/show_bug.cgi?id=84252

Tested-by: Tobias Jakobi 
Signed-off-by: Axel Davy 

v2: use xcb_connection_has_error to check if connection failed, instead
of comparing to NULL (xcb_connect never returns NULL)
v3: put the xcb_connection in dri3_screen, instead of dri3_context
v4: add XSync before the xcb_get_geometry call to prevent drawable errors
---
 src/glx/dri3_glx.c  | 59 -
 src/glx/dri3_priv.h |  2 ++
 2 files changed, 38 insertions(+), 23 deletions(-)

diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 1ddc723..921fb3d 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -285,7 +285,7 @@ dri3_destroy_drawable(__GLXDRIdrawable *base)
 {
struct dri3_screen *psc = (struct dri3_screen *) base->psc;
struct dri3_drawable *pdraw = (struct dri3_drawable *) base;
-   xcb_connection_t *c = XGetXCBConnection(pdraw->base.psc->dpy);
+   xcb_connection_t *c = psc->xcb_connection;
int i;
 
(*psc->core->destroyDrawable) (pdraw->driDrawable);
@@ -455,8 +455,9 @@ dri3_handle_present_event(struct dri3_drawable *priv, 
xcb_present_generic_event_
 static bool
 dri3_wait_for_event(__GLXDRIdrawable *pdraw)
 {
-   xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
struct dri3_drawable *priv = (struct dri3_drawable *) pdraw;
+   struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc;
+   xcb_connection_t *c = psc->xcb_connection;
xcb_generic_event_t *ev;
xcb_present_generic_event_t *ge;
 
@@ -478,8 +479,9 @@ static int
 dri3_wait_for_msc(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
   int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
 {
-   xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
struct dri3_drawable *priv = (struct dri3_drawable *) pdraw;
+   struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc;
+   xcb_connection_t *c = psc->xcb_connection;
uint32_t msc_serial;
 
/* Ask for the an event for the target MSC */
@@ -578,7 +580,8 @@ dri3_drawable_gc(struct dri3_drawable *priv)
 {
if (!priv->gc) {
   uint32_t v;
-  xcb_connection_t *c = XGetXCBConnection(priv->base.psc->dpy);
+  struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc;
+  xcb_connection_t *c = psc->xcb_connection;
 
   v = 0;
   xcb_create_gc(c,
@@ -637,7 +640,7 @@ dri3_copy_sub_buffer(__GLXDRIdrawable *pdraw, int x, int y,
struct dri3_drawable *priv = (struct dri3_drawable *) pdraw;
struct dri3_screen *psc = (struct dri3_screen *) pdraw->psc;
struct dri3_context *pcp = (struct dri3_context *) __glXGetCurrentContext();
-   xcb_connection_t *c = XGetXCBConnection(priv->base.psc->dpy);
+   xcb_connection_t *c = psc->xcb_connection;
struct dri3_buffer *back;
 
unsigned flags = __DRI2_FLUSH_DRAWABLE;
@@ -701,7 +704,7 @@ static void
 dri3_copy_drawable(struct dri3_drawable *priv, Drawable dest, Drawable src)
 {
struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc;
-   xcb_connection_t *c = XGetXCBConnection(priv->base.psc->dpy);
+   xcb_connection_t *c = psc->xcb_connection;
 
dri3_flush(psc, priv, __DRI2_FLUSH_DRAWABLE, 0);
 
@@ -838,10 +841,9 @@ dri3_alloc_render_buffer(struct glx_screen *glx_screen, 
Drawable draw,
  unsigned int format, int width, int height, int depth)
 {
struct dri3_screen *psc = (struct dri3_screen *) glx_screen;
-   Display *dpy = glx_screen->dpy;
struct dri3_buffer *buffer;
__DRIimage *pixmap_buffer;
-   xcb_connection_t *c = XGetXCBConnection(dpy);
+   xcb_connection_t *c = psc->xcb_connection;
xcb_pixmap_t pixmap;
xcb_sync_fence_t sync_fence;
struct xshmfence *shm_fence;
@@ -979,7 +981,7 @@ static void
 dri3_free_render_buffer(struct dri3_drawable *pdraw, struct dri3_buffer 
*buffer)
 {
struct dri3_screen   *psc = (struct dri3_screen *) pdraw->base.psc;
-   xcb_connection_t *c = XGetXCBConnection(pdraw->base.psc->dpy);
+   xcb_connection_t *c = psc->xcb_connection;
 
if (buffer->own_pixmap)
   xcb_free_pixmap(c, buffer->pixmap);
@@ -999,7 +1001,8 @@ dri3_free_render_buffer(struct dri3_drawable *pdraw, 
struct dri3_buffer *buffer)
 static void
 dri3_flush_present_events(struct dri3_drawable *priv)
 {
-   xcb_connection_t *c = XGetXCBConnection(priv->base.psc->dpy);
+   struct dri3_screen *psc = (struct dri3_screen *) priv->base.psc;
+   xcb_connection_t *c = psc->xcb_connection;
 
/* Check to see if any configuration changes have occurred
 * since we were last invoked
@@ -1024,7 +1027,8 @@ static int
 dri3_update_drawable(__DRIdrawable *driDrawable, void *loaderPrivate)
 {
struct dri3_drawable *priv = loaderPrivate;
-   xcb_connection_t 

Re: [Mesa-dev] [PATCH v3] glx/dri3: Use a separate xcb connection for Present events

2015-04-19 Thread Michel Dänzer
On 19.04.2015 06:17, Axel Davy wrote:
> 
> v3: put the xcb_connection in dri3_screen, instead of dri3_context

What's the rationale for that? Couldn't that result in the same
xcb_connection being used in several threads again (for several GLX
contexts using the same screen)?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallivm: Fix build against LLVM 3.7 SVN r235265

2015-04-19 Thread Aaron Watry
On Sun, Apr 19, 2015 at 1:15 PM, Nick Sarnie 
wrote:

> LLVM removed JITEmitDebugInfo from TargetOptions since they weren't used
>
> Signed-off-by: Nick Sarnie 
> ---
>  src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 +-
>  src/gallium/auxiliary/gallivm/lp_bld_misc.cpp  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> index 65d2896..381e1fa 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> @@ -270,7 +270,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
> }
>
> TargetOptions options;
> -#if defined(DEBUG)
> +#if defined(DEBUG) && HAVE_LLVM < 0x307
>

This patch works just fine for me (didn't build before, does now).

The only thing that stuck out is that we're being inconsistent in this
patch about how we check the LLVM version.  This one uses 0x307, the next
one uses 0x0307.

We should probably be consistent, even if the leading zero gets dropped
anyway.

--Aaron


> options.JITEmitDebugInfo = true;
>  #endif
>  #if defined(PIPE_ARCH_X86)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> index 4ede90b..5e8a634 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> @@ -429,7 +429,7 @@
> lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
>  #endif
>  #endif
>
> -#if defined(DEBUG)
> +#if defined(DEBUG) && HAVE_LLVM < 0x0307
> options.JITEmitDebugInfo = true;
>  #endif
>
> --
> 2.3.5
>
>
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallivm: Fix build against LLVM 3.7 SVN r235265

2015-04-19 Thread Nick Sarnie
LLVM removed JITEmitDebugInfo from TargetOptions since they weren't used

v2: Be consistent with the LLVM version check (Aaron Watry)

Signed-off-by: Nick Sarnie 
---
 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 +-
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 65d2896..be3e834 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -270,7 +270,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
}

TargetOptions options;
-#if defined(DEBUG)
+#if defined(DEBUG) && HAVE_LLVM < 0x0307
options.JITEmitDebugInfo = true;
 #endif
 #if defined(PIPE_ARCH_X86)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 4ede90b..5e8a634 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -429,7 +429,7 @@
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
 #endif
 #endif

-#if defined(DEBUG)
+#if defined(DEBUG) && HAVE_LLVM < 0x0307
options.JITEmitDebugInfo = true;
 #endif

-- 
2.3.5
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v3] glx/dri3: Use a separate xcb connection for Present events

2015-04-19 Thread Axel Davy

Le 20/04/2015 03:58, Michel Dänzer a écrit :

On 19.04.2015 06:17, Axel Davy wrote:

v3: put the xcb_connection in dri3_screen, instead of dri3_context

What's the rationale for that? Couldn't that result in the same
xcb_connection being used in several threads again (for several GLX
contexts using the same screen)?


One problem is that the dri3_context structure is not always accessible 
(for example when you bind
the context, dri3_get_buffers is called, but the context is not current 
yet).


It seemed more natural to put the connection in dri3_drawable, and then 
in dri3_screen, since it seemed ok to have several dri3_drawable using 
the same connection as long as the event queue was protected (the 
'special_event' queue makes you listen to the events of one window in 
particular).


But yes, there may still be a problem if you use two threads with same 
connection: in particular if one is waiting for present events while the 
other one is sending a present request. I observed with gallium nine the 
event is lost in that case. The solution was to use another connection 
to send the events.


One way is to have one xcb_connection to listen to present events, which 
can be in dri3_screen, while we could have a second xcb_connection in 
dri3_context, that would be used to send the present requests.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallivm: Fix build against LLVM 3.7 SVN r235265

2015-04-19 Thread Michel Dänzer
On 20.04.2015 12:51, Nick Sarnie wrote:
> LLVM removed JITEmitDebugInfo from TargetOptions since they weren't used
> 
> v2: Be consistent with the LLVM version check (Aaron Watry)

Pushed, thanks.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev