Re: [Mesa3d-dev] Problem using an Mesa based App with recent xorg/mesa/xf86-video-intel (loop?)

2010-03-03 Thread Francisco Jerez
Florian Mickler flor...@mickler.org writes: [...] p.s.: my software stack is git master of libdrm, mesa and xf86-video-intel as well as xserver-master + krh's pull request, so that it looks light that: 90b6ab4c5f057737b5396f987fdea7dd5716b086 glx/dri2: Notify the driver when its buffers

Re: [Mesa3d-dev] [PATCH] Nouveau_vieux fixes

2010-02-28 Thread Francisco Jerez
randrianas...@gmail.com writes: Hello all! After unsuccesfull battle with git-send-email I just send these two patches from Kmail. Botch as attachments and inlin, but inline version probably will be damaged in process. Thanks, both patches pushed (after some minor reformatting:

[Mesa3d-dev] [dri2proto patch v4] Define an event to notify clients about the validity of their buffers.

2010-02-08 Thread Francisco Jerez
Bumps the protocol and package versions. Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac |2 +- dri2proto.h | 19 +-- dri2proto.txt | 31 --- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/configure.ac

[Mesa3d-dev] [xserver patch v4 5/5] dri2: Support the DRI2InvalidateBuffers event.

2010-02-08 Thread Francisco Jerez
Bumps the supported DRI2 protocol version. Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac|2 +- hw/xfree86/dri2/dri2.c | 109 +++ hw/xfree86/dri2/dri2.h |5 ++ hw/xfree86/dri2/dri2ext.c | 35

[Mesa3d-dev] [mesa patch v4 1/3] dri2: Event driven buffer validation.

2010-02-08 Thread Francisco Jerez
When a buffer invalidation event is received from the X server, the invalidate hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the pStamp sequence number in __DRIdrawableRec. For old servers not supporting buffer

[Mesa3d-dev] [mesa patch v4 3/3] st/dri2: Use event-driven buffer validation.

2010-02-08 Thread Francisco Jerez
--- src/gallium/state_trackers/dri/dri_context.c |6 +-- src/gallium/state_trackers/dri/dri_drawable.c | 13 ++ src/gallium/state_trackers/dri/dri_screen.c | 12 ++ src/mesa/SConscript |1 - src/mesa/sources.mak |1 -

Re: [Mesa3d-dev] [xserver patch v4 4/5] glx/dri2: Notify the driver when its buffers become invalid.

2010-02-08 Thread Francisco Jerez
of some #ifdefs in the changes. That's one of the reasons of the last rebase, see the comments in [mesa patch v4 1/3] dri2: Event driven buffer validation.. Keith On Mon, 2010-02-08 at 10:25 -0800, Francisco Jerez wrote: Signed-off-by: Francisco Jerez curroje...@riseup.net --- glx/glxdri2

[Mesa3d-dev] [xserver patch v4 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.

2010-02-08 Thread Francisco Jerez
The spec says (regarding glXCreateWindow): If there is already a GLXFBConfig associated with win (as a result of a previous glXCreateWindow call), then a BadAlloc error is generated.. It will also come useful to implement DRI2InvalidateBuffers for the indirect case. Signed-off-by: Francisco Jerez

Re: [Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-02-08 Thread Francisco Jerez
Francisco Jerez curroje...@riseup.net writes: Francisco Jerez curroje...@riseup.net writes: The current buffer validation approach (AKA the DRI2 glViewport hack) is both incorrect (because a compliant OpenGL application may opt for the identity as viewport transform and work with window

Re: [Mesa3d-dev] [xserver patch v4 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.

2010-02-08 Thread Francisco Jerez
Kristian Høgsberg k...@bitplanet.net writes: On Mon, Feb 8, 2010 at 1:25 PM, Francisco Jerez curroje...@riseup.net wrote: The spec says (regarding glXCreateWindow): If there is already a GLXFBConfig associated with win (as a result of a previous glXCreateWindow call), then a BadAlloc error

[Mesa3d-dev] [PATCH] glx: Fix SwapBuffers regression introduced by 01923fb72d.

2010-02-08 Thread Francisco Jerez
After that commit, some dri2 protocol symbols were being checked from places that weren't including dri2proto.h, effectively disabling some valuable SwapBuffers codepaths. --- src/glx/x11/dri2_glx.c |1 + src/glx/x11/glxext.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff

[Mesa3d-dev] [xserver patch v5 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.

2010-02-08 Thread Francisco Jerez
The spec says (regarding glXCreateWindow): If there is already a GLXFBConfig associated with win (as a result of a previous glXCreateWindow call), then a BadAlloc error is generated.. It will also come useful to implement DRI2InvalidateBuffers for the indirect case. Signed-off-by: Francisco Jerez

[Mesa3d-dev] [PATCHv2 3/3] vbo: Fix up in-place splitting for non-contiguous/indexed primitives.

2010-02-03 Thread Francisco Jerez
The in-place splitting code wasn't dealing with index buffers at all (and it was being called from vbo_split_prims for too big index buffers, causing some occasional corruption). Additionally, it wasn't taking into account primitives arrays with non-contiguous indices (e.g. given prim[0].start =

[Mesa3d-dev] [PATCH 2/3] mesa: Add a BITSET_FFS function.

2010-02-02 Thread Francisco Jerez
It will be useful for the nouveau DRI driver and IMHO there's no reason to keep it private. --- src/mesa/main/bitset.h | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index 8bd4526..f2709ab 100644

[Mesa3d-dev] [PATCH 1/3] mesa: Factor out the fb initialization details from _mesa_new_framebuffer.

2010-02-02 Thread Francisco Jerez
This should make things easier for drivers wanting to work with a subclass of gl_framebuffer. The complementary _mesa_initialize_framebuffer function is now called _mesa_initialize_unnamed_framebuffer for the sake of symmetry. --- src/mesa/drivers/directfb/idirectfbgl_mesa.c |2 +-

[Mesa3d-dev] [PATCH 3/3] vbo: Fix up in-place splitting for non-contiguous/indexed primitives.

2010-02-02 Thread Francisco Jerez
The in-place splitting code wasn't dealing with index buffers at all (and it was being called from vbo_split_prims for too big index buffers, causing some occasional corruption). Additionally, it wasn't taking into account primitives arrays with non-contiguous indices (e.g. given prim[0].start =

Re: [Mesa3d-dev] [PATCH 3/3] vbo: Fix up in-place splitting for non-contiguous/indexed primitives.

2010-02-02 Thread Francisco Jerez
log. Keith On Tue, 2010-02-02 at 03:07 -0800, Francisco Jerez wrote: The in-place splitting code wasn't dealing with index buffers at all (and it was being called from vbo_split_prims for too big index buffers, causing some occasional corruption). Additionally, it wasn't taking

Re: [Mesa3d-dev] [PATCH 1/3] mesa: Factor out the fb initialization details from _mesa_new_framebuffer.

2010-02-02 Thread Francisco Jerez
Brian Paul bri...@vmware.com writes: Francisco Jerez wrote: This should make things easier for drivers wanting to work with a subclass of gl_framebuffer. The complementary _mesa_initialize_framebuffer function is now called _mesa_initialize_unnamed_framebuffer for the sake of symmetry. I

Re: [Mesa3d-dev] [mesa patch 1/3] dri2: Event driven buffer validation.

2010-01-22 Thread Francisco Jerez
Michel Dänzer mic...@daenzer.net writes: On Fri, 2010-01-22 at 00:10 +0100, Francisco Jerez wrote: Michel Dänzer mic...@daenzer.net writes: On Sat, 2010-01-16 at 23:01 +0100, Francisco Jerez wrote: When a buffer invalidation event is received from the X server, the invalidate hook

Re: [Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-01-22 Thread Francisco Jerez
Francisco Jerez curroje...@riseup.net writes: The current buffer validation approach (AKA the DRI2 glViewport hack) is both incorrect (because a compliant OpenGL application may opt for the identity as viewport transform and work with window coordinates directly) and inefficient (some

[Mesa3d-dev] [xserver patch v3 5/5] dri2: Support the DRI2InvalidateBuffers event.

2010-01-22 Thread Francisco Jerez
Bumps the supported DRI2 protocol version. Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac|2 +- hw/xfree86/dri2/dri2.c | 109 +++ hw/xfree86/dri2/dri2.h |5 ++ hw/xfree86/dri2/dri2ext.c | 35

[Mesa3d-dev] [xserver patch v3 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.

2010-01-22 Thread Francisco Jerez
The spec says (regarding glXCreateWindow): If there is already a GLXFBConfig associated with win (as a result of a previous glXCreateWindow call), then a BadAlloc error is generated.. It will also come useful to implement DRI2InvalidateBuffers for the indirect case. Signed-off-by: Francisco Jerez

[Mesa3d-dev] [xserver patch v3 2/5] dri2: No need to blit from front on DRI2GetBuffers if they're just being reused.

2010-01-22 Thread Francisco Jerez
It can be quite an expensive operation, so we're better off not doing it unless it's totally required. Signed-off-by: Francisco Jerez curroje...@riseup.net --- hw/xfree86/dri2/dri2.c | 42 +++--- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git

[Mesa3d-dev] [xserver patch v3 4/5] glx/dri2: Notify the driver when its buffers become invalid.

2010-01-22 Thread Francisco Jerez
Signed-off-by: Francisco Jerez curroje...@riseup.net --- glx/glxdri2.c | 31 --- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 69fd39b..5cb15d9 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -67,6 +67,7

[Mesa3d-dev] [xserver patch v3 1/5] Add a PreConfigureWindow hook.

2010-01-22 Thread Francisco Jerez
Executed from the ConfigureWindow request, right before sending ConfigureNotify to the clients. This commit breaks the ScreenRec ABI. Signed-off-by: Francisco Jerez curroje...@riseup.net --- dix/window.c |4 hw/xfree86/common/xf86Module.h |6 +++--- include

[Mesa3d-dev] [mesa patch v3 2/3] dri/nouveau: Use event driven buffer validation.

2010-01-22 Thread Francisco Jerez
--- src/mesa/drivers/dri/nouveau/nouveau_context.c | 49 --- src/mesa/drivers/dri/nouveau/nouveau_context.h |7 +++ src/mesa/drivers/dri/nouveau/nouveau_driver.c |3 + src/mesa/drivers/dri/nouveau/nouveau_render_t.c |2 +

[Mesa3d-dev] [mesa patch v3 3/3] st/dri2: Use event-driven buffer validation.

2010-01-22 Thread Francisco Jerez
--- src/gallium/state_trackers/dri/dri_context.c |6 +-- src/gallium/state_trackers/dri/dri_drawable.c | 13 ++ src/gallium/state_trackers/dri/dri_screen.c | 13 ++ src/mesa/SConscript |1 - src/mesa/sources.mak |1 -

[Mesa3d-dev] [mesa patch v3 1/3] dri2: Event driven buffer validation.

2010-01-22 Thread Francisco Jerez
When a buffer invalidation event is received from the X server, the invalidate hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the pStamp sequence number in __DRIdrawableRec. For old servers not supporting buffer

[Mesa3d-dev] [dri2proto patch v3] Define an event to notify clients about the validity of their buffers.

2010-01-22 Thread Francisco Jerez
Bumps the protocol and package versions. Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac |2 +- dri2proto.h | 19 +-- dri2proto.txt | 31 --- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/configure.ac

Re: [Mesa3d-dev] [mesa patch 1/3] dri2: Event driven buffer validation.

2010-01-22 Thread Francisco Jerez
Keith Whitwell kei...@vmware.com writes: It's a very rare application that can render half a frame to one sized framebuffer and the other half to another and expect to have a meaningful result. It's also incredibly difficult to write a driver that produces any sensible result when the

Re: [Mesa3d-dev] [xserver patch 1/6] Add a PreConfigureWindow hook.

2010-01-21 Thread Francisco Jerez
Michel Dänzer mic...@daenzer.net writes: On Sat, 2010-01-16 at 23:00 +0100, Francisco Jerez wrote: Executed from the ConfigureWindow request, right before sending ConfigureNotify to the clients. This commit breaks the ScreenRec ABI. Signed-off-by: Francisco Jerez curroje...@riseup.net

Re: [Mesa3d-dev] [xserver patch 2/6] dri2: No need to blit from front on DRI2GetBuffers if they're just being reused.

2010-01-21 Thread Francisco Jerez
Michel Dänzer mic...@daenzer.net writes: On Sat, 2010-01-16 at 23:00 +0100, Francisco Jerez wrote: It can be quite an expensive operation, so we're better off not doing it unless it's totally required. Signed-off-by: Francisco Jerez curroje...@riseup.net --- hw/xfree86/dri2/dri2.c

Re: [Mesa3d-dev] [mesa patch 1/3] dri2: Event driven buffer validation.

2010-01-21 Thread Francisco Jerez
Michel Dänzer mic...@daenzer.net writes: On Sat, 2010-01-16 at 23:01 +0100, Francisco Jerez wrote: When a buffer invalidation event is received from the X server, the invalidate hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided

[Mesa3d-dev] [xserver patch 6/6 v2] dri2: Support the DRI2InvalidateBuffers event.

2010-01-19 Thread Francisco Jerez
Bumps the supported DRI2 protocol version to 1.3. Signed-off-by: Francisco Jerez curroje...@riseup.net --- v1 was evil because the multiple clients rendering to the same drawable case wasn't handled correctly (sometimes it crashed). Seems to work now. hw/xfree86/dri2/dri2.c | 109

Re: [Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-01-18 Thread Francisco Jerez
Kristian Høgsberg k...@bitplanet.net writes: On Sun, Jan 17, 2010 at 11:18 PM, Francisco Jerez curroje...@riseup.net wrote: Kristian Høgsberg k...@bitplanet.net writes: No, it sounds good, I'm happy that you're looking into this.  I'll have a closer look tomorrow, but what I've had in mind

Re: [Mesa3d-dev] Inter-StateTracker communication

2010-01-18 Thread Francisco Jerez
be from the application's point of view. It seems to me that some heuristics are assumed in DRI2 drivers because of performance concern. I think the DRI2 patches Francisco Jerez sent yesterday can solve the issue. (CCed Francisco so that he could provide some insights) Right, that's what I

Re: [Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-01-17 Thread Francisco Jerez
Luca Barbieri luca.barbi...@gmail.com writes: How about just having GLX open another connection to the X server and use that to receive ConfigureNotify? Since we are using direct rendering, we must be on the same machine, so it's just a unix/TCP loopback connection and should always work.

Re: [Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-01-17 Thread Francisco Jerez
Kristian Høgsberg k...@bitplanet.net writes: On Sat, Jan 16, 2010 at 4:58 PM, Francisco Jerez curroje...@riseup.net wrote: The current buffer validation approach (AKA the DRI2 glViewport hack) is both incorrect (because a compliant OpenGL application may opt for the identity as viewport

[Mesa3d-dev] [dri2proto patch 1/3] Define an event to notify clients about the validity of their buffers.

2010-01-16 Thread Francisco Jerez
Bumps the protocol version. Signed-off-by: Francisco Jerez curroje...@riseup.net --- dri2proto.h | 19 +-- dri2proto.txt | 31 --- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/dri2proto.h b/dri2proto.h index 43152c2..9708a4a

[Mesa3d-dev] [dri2proto patch 3/3] Bump the package version.

2010-01-16 Thread Francisco Jerez
Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index fc96197..c5affe3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.57]) -AC_INIT([DRI2Proto

[Mesa3d-dev] [RFC] Event-based buffer validation for DRI2.

2010-01-16 Thread Francisco Jerez
The current buffer validation approach (AKA the DRI2 glViewport hack) is both incorrect (because a compliant OpenGL application may opt for the identity as viewport transform and work with window coordinates directly) and inefficient (some programs have the habit of calling glViewport several

[Mesa3d-dev] [dri2proto patch 2/3] More useful names for the DRI2_*_COMPLETE tokens.

2010-01-16 Thread Francisco Jerez
The same names could be reused for e.g. GLX_OML_swap_control, and the COMPLETE suffix doesn't make so much sense there. Signed-off-by: Francisco Jerez curroje...@riseup.net --- This patch isn't strictly necessary for buffer validation events, but it makes some of the X server code nicer

[Mesa3d-dev] [xserver patch 2/6] dri2: No need to blit from front on DRI2GetBuffers if they're just being reused.

2010-01-16 Thread Francisco Jerez
It can be quite an expensive operation, so we're better off not doing it unless it's totally required. Signed-off-by: Francisco Jerez curroje...@riseup.net --- hw/xfree86/dri2/dri2.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86

[Mesa3d-dev] [xserver patch 6/6] dri2: Support the DRI2InvalidateBuffers event.

2010-01-16 Thread Francisco Jerez
Bumps the supported DRI2 protocol version to 1.3. Signed-off-by: Francisco Jerez curroje...@riseup.net --- hw/xfree86/dri2/dri2.c | 82 +++ hw/xfree86/dri2/dri2.h |4 ++ hw/xfree86/dri2/dri2ext.c | 22 +++ include/protocol

[Mesa3d-dev] [xserver patch 4/6] glx: Enforce a 1:1 correspondence between GLX and X11 windows.

2010-01-16 Thread Francisco Jerez
The spec says (regarding glXCreateWindow): If there is already a GLXFBConfig associated with win (as a result of a previous glXCreateWindow call), then a BadAlloc error is generated.. It will also come useful to implement DRI2InvalidateBuffers for the indirect case. Signed-off-by: Francisco Jerez

[Mesa3d-dev] [xserver patch 5/6] glx/dri2: Notify the driver when its buffers become invalid.

2010-01-16 Thread Francisco Jerez
Signed-off-by: Francisco Jerez curroje...@riseup.net --- glx/glxdri2.c | 28 +--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/glx/glxdri2.c b/glx/glxdri2.c index c5e7b0b..0ac6900 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -67,6 +67,7 @@ struct

[Mesa3d-dev] [xserver patch 3/6] dri2: Add a type parameter to SwapBuffers.

2010-01-16 Thread Francisco Jerez
It helps to determine if buffers need to be invalidated or not, and it makes sense for e.g. GLX_OML_swap_control. Note that this patch bumps the DRI2InfoRec version and the minimum required dri2proto version. Signed-off-by: Francisco Jerez curroje...@riseup.net --- configure.ac

[Mesa3d-dev] [mesa patch 2/3] dri/nouveau: Use event driven buffer validation.

2010-01-16 Thread Francisco Jerez
--- This driver isn't in master yet, but I thought that maybe this patch could be interesting. src/mesa/drivers/dri/nouveau/nouveau_context.c | 38 +++--- src/mesa/drivers/dri/nouveau/nouveau_context.h |3 ++ src/mesa/drivers/dri/nouveau/nouveau_driver.c |1 +

[Mesa3d-dev] [mesa patch 3/3] st/dri2: Use event-driven buffer validation.

2010-01-16 Thread Francisco Jerez
--- src/gallium/state_trackers/dri/dri_context.c |6 +-- src/gallium/state_trackers/dri/dri_drawable.c | 13 ++ src/gallium/state_trackers/dri/dri_screen.c | 12 ++ src/mesa/SConscript |1 - src/mesa/sources.mak |1 -

[Mesa3d-dev] [mesa patch 1/3] dri2: Event driven buffer validation.

2010-01-16 Thread Francisco Jerez
When a buffer invalidation event is received from the X server, the invalidate hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the pStamp sequence number in __DRIdrawableRec. For old servers not supporting buffer