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

2015-04-18 Thread Axel Davy
patch creates a per-context xcb connection to solve these issues. Solves: https://bugs.freedesktop.org/show_bug.cgi?id=84252 Tested-by: Tobias Jakobi Signed-off-by: Axel Davy --- src/glx/dri3_glx.c | 56 - src/glx/dri3_priv.h | 1 + 2 files

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

2015-04-18 Thread Axel Davy
: 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 --- There's a strange issue with xcb_get_geometry: If I use th

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

2015-04-19 Thread Axel Davy
: 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

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 GL

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

2015-04-21 Thread Axel Davy
Le 20/04/2015 07:08, Axel Davy a écrit : 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

[Mesa-dev] [PATCH 15/16] st/nine: Fix update_vertex_elements bad rebase

2015-04-24 Thread Axel Davy
This code was supposed to be removed, but a rebase seems to have made it stay. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 06/16] st/nine: Fix comment in update_viewport

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 6c7eab3..27800c6 100644 --- a/src/gallium

[Mesa-dev] [PATCH 08/16] st/nine: Change x86 FPU Control word on device creation as on wined3d and windows

2015-04-24 Thread Axel Davy
From: Tiziano Bacocco Signed-off-by: Tiziano Bacocco --- src/gallium/state_trackers/nine/device9.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 1a776a7..4ef02bb 100644 --- a/src/

[Mesa-dev] [PATCH 08/11] st/nine: util_gen_mipmap doesn't need we reset states.

2015-04-24 Thread Axel Davy
util_gen_mipmap uses pipe->blit, and thus doesn't need we restore all states after using it. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src

[Mesa-dev] [PATCH 06/11] st/nine: Fix NineBaseTexture9_PreLoad

2015-04-24 Thread Axel Davy
It wasn't uploading the texture when the lod had changed. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers

[Mesa-dev] [PATCH 11/16] st/nine: Ignore D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING when D3DUSAGE_RENDERTARGET is specified

2015-04-24 Thread Axel Davy
From: Xavier Bouchoux This behaviour matches windows drivers. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/adapter9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium

[Mesa-dev] [PATCH 09/16] st/nine: Fix D3DQUERYTYPE_TIMESTAMPFREQ query

2015-04-24 Thread Axel Davy
PIPE_QUERY_TIMESTAMP value is updated. It isn't always 10. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/query9.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/query9.c b/src/ga

[Mesa-dev] [PATCH 11/11] st/nine: Remove Managed texture hack.

2015-04-24 Thread Axel Davy
. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c index b868019..17a8f44 100644 --- a/src/gallium

[Mesa-dev] [PATCH 02/16] st/nine: Fix wrong assert in nine_shader

2015-04-24 Thread Axel Davy
The sampler src index was wrong for texldl and texldd Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 10/16] st/nine: Improve D3DQUERYTYPE_TIMESTAMP

2015-04-24 Thread Axel Davy
From: Xavier Bouchoux Avoid blocking when retrieving D3DQUERYTYPE_TIMESTAMP result with NineQuery9_GetData(), when D3DGETDATA_FLUSH is not specified. This mimics Win behaviour and gives slightly better performance for some games. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src

[Mesa-dev] [PATCH 12/16] st/nine: Fix computation of const_used_size

2015-04-24 Thread Axel Davy
From: Xavier Bouchoux Was sometimes too large for PS. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/nine_shader.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src

[Mesa-dev] [PATCH 00/16] Some Gallium Nine fixes

2015-04-24 Thread Axel Davy
This serie should be harder to review, while the 16 independent patches should be easier to review. Axel Davy (9): st/nine: Handle special LIT case st/nine: Fix wrong assert in nine_shader st/nine: Workaround barycentrics issue on some cards st/nine: Fix comment in update_viewport st/ni

[Mesa-dev] [PATCH 04/16] st/nine: Clear struct pipe_blit_info before use.

2015-04-24 Thread Axel Davy
From: Xavier Bouchoux render_condition_enable was uninitialized. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/device9.c| 2 ++ src/gallium/state_trackers/nine/swapchain9.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gallium

[Mesa-dev] [PATCH 13/16] st/nine: Rework update_vertex_buffers

2015-04-24 Thread Axel Davy
were calling set_vertex_buffers on a buffer with vtxbuf->buffer = NULL. It works on some drivers, but not on all of them, because it isn't in Gallium spec. This patch fixes that. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 15 --- 1 file changed,

[Mesa-dev] [PATCH 01/16] st/nine: Handle special LIT case

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 2ba625e..0fd3d37 100644 --- a

[Mesa-dev] [PATCH 09/11] st/nine: Some D3DUSAGE_AUTOGENMIPMAP fixes

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 14 +- src/gallium/state_trackers/nine/surface9.c | 2 +- src/gallium/state_trackers/nine/surface9.h | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 07/11] st/nine: D3DUSAGE_AUTOGENMIPMAP is forbidden for volumes

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/volume9.c| 3 --- src/gallium/state_trackers/nine/volumetexture9.c | 14 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers

[Mesa-dev] [PATCH 05/16] st/nine: Workaround barycentrics issue on some cards

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c| 4 +++- src/gallium/state_trackers/nine/device9.h| 4 src/gallium/state_trackers/nine/nine_state.c | 24 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 07/16] st/nine: Do not advertise D3DDEVCAPS_TEXTURESYSTEMMEMORY

2015-04-24 Thread Axel Davy
No major vendor advertises it, and we weren't supporting it. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/adapter9.c | 2 +- src/gallium/state_trackers/nine/device9.c | 10 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gallium/state_tra

[Mesa-dev] [PATCH 10/11] st/nine: Enforce LOD 0 for D3DUSAGE_AUTOGENMIPMAP

2015-04-24 Thread Axel Davy
For D3DUSAGE_AUTOGENMIPMAP textures, applications can only lock/copy from/get surface descriptor for/etc the first level. Thus it makes sense to restrict the LOD to 0, and use only the first level to generate the sublevels. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 02/11] st/nine: Remove impossible cases with Managed textures

2015-04-24 Thread Axel Davy
Copying to/from a Managed texture is forbidden. Rendering to a Managed texture is forbidden. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/surface9.c | 23 +-- src/gallium/state_trackers/nine/volume9.c | 19 +++ 2 files changed, 8 insertions

[Mesa-dev] [PATCH 04/11] st/nine: Bound the dirty regions to resource size

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 4 src/gallium/state_trackers/nine/texture9.c | 3 +++ src/gallium/state_trackers/nine/volumetexture9.c | 9 + 3 files changed, 16 insertions(+) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 05/11] st/nine: Rewrite Managed texture uploads

2015-04-24 Thread Axel Davy
That part of the code was quite obscure. This new implementation tries to make it clearer by separating the differents parts, and commenting more. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 221 ++--- 1 file changed, 125 insertions(+), 96

[Mesa-dev] [PATCH 01/11] st/nine: Encapsulate variables for MANAGED resource

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 82 src/gallium/state_trackers/nine/basetexture9.h | 19 +++--- src/gallium/state_trackers/nine/cubetexture9.c | 2 +- src/gallium/state_trackers/nine/device9.c| 2 +- src

[Mesa-dev] [PATCH 03/11] st/nine: Simplify Surface9 Managed resources implementation

2015-04-24 Thread Axel Davy
xture updates in corner cases. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 15 ++-- src/gallium/state_trackers/nine/nine_pipe.h| 11 --- src/gallium/state_trackers/nine/surface9.c | 108 ++--- src/gallium/state_trackers/nine/surfa

[Mesa-dev] [PATCH 14/16] st/nine: Add debug warning when application uses sw processing

2015-04-24 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 3 +++ src/gallium/state_trackers/nine/device9.c| 5 + src/gallium/state_trackers/nine/indexbuffer9.c | 14 -- src/gallium/state_trackers/nine/texture9.c | 5 + src/gallium

[Mesa-dev] [PATCH 16/16] st/nine: Rework texture data allocation

2015-04-24 Thread Axel Davy
Some applications assume the memory for multilevel textures is allocated per continuous blocks. This patch implements that behaviour. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 42 -- src/gallium/state_trackers/nine/cubetexture9.h | 1

[Mesa-dev] [PATCH 03/16] st/nine: NineDevice9_Clear skip fastpath for bigger depth-buffers

2015-04-24 Thread Axel Davy
This fixes failing WINE test visual.c:depth_buffer_test() Signed-off-by: Patrick Rudolph Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c

Re: [Mesa-dev] [PATCH 01/16] st/nine: Handle special LIT case

2015-04-24 Thread Axel Davy
Le 24/04/2015 23:04, Ilia Mirkin a écrit : On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy wrote: Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 03/16] st/nine: NineDevice9_Clear skip fastpath for bigger depth-buffers

2015-04-24 Thread Axel Davy
Le 24/04/2015 23:10, Ilia Mirkin a écrit : What if the depth buffer is smaller than the color RT? I'd assume that the fb would be reduced in that case as well... or does This->state.fb.width/height only represent the min of the color RT's sizes? It is forbidden by the spec to have depth buffer

Re: [Mesa-dev] [PATCH 11/16] st/nine: Ignore D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING when D3DUSAGE_RENDERTARGET is specified

2015-04-24 Thread Axel Davy
:09 PM, Axel Davy wrote: From: Xavier Bouchoux This behaviour matches windows drivers. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/adapter9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 16/16] st/nine: Rework texture data allocation

2015-04-24 Thread Axel Davy
Le 25/04/2015 00:02, Ilia Mirkin a écrit : I'm having trouble understanding what you're changing here... perhaps a better commit description could go a ways to clearing things up? Were you allocating it a level at a time before? How did that work, I don't see a per-level structure... I'm guessin

Re: [Mesa-dev] [PATCH 08/16] st/nine: Change x86 FPU Control word on device creation as on wined3d and windows

2015-04-25 Thread Axel Davy
Le 24/04/2015 23:42, Henri Verbeet a écrit : On 24 April 2015 at 22:09, Axel Davy wrote: +static void nine_setup_fpu(void) +{ +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) +WORD cw; +__asm__ volatile ("fnstcw %0" : "=m" (cw)); +

Re: [Mesa-dev] [PATCH 08/16] st/nine: Change x86 FPU Control word on device creation as on wined3d and windows

2015-04-25 Thread Axel Davy
Le 25/04/2015 10:15, Henri Verbeet a écrit : The comment is misleading, because the code does more than that. (Hint: What happens to rounding and precision control?) But really, please either explicitly tell people they can't look at Wine (D3D related) source if they want to contribute to st/ni

Re: [Mesa-dev] [PATCH 03/11] st/nine: Simplify Surface9 Managed resources implementation

2015-04-26 Thread Axel Davy
On 25/04/2015 22:53, Ilia Mirkin wrote : On Fri, Apr 24, 2015 at 4:11 PM, Axel Davy wrote: +if (damaged) { +box = *damaged; +box.z = This->layer; +box.depth = 1; +} else { +box.x = 0; +box.y = 0; +box.z = This->layer; +box

Re: [Mesa-dev] [PATCH 16/16] st/nine: Rework texture data allocation

2015-04-26 Thread Axel Davy
Le 25/04/2015 00:21, Ilia Mirkin a écrit : On Fri, Apr 24, 2015 at 6:13 PM, Axel Davy wrote: Le 25/04/2015 00:02, Ilia Mirkin a écrit : I'm having trouble understanding what you're changing here... perhaps a better commit description could go a ways to clearing things up? Were you

Re: [Mesa-dev] [PATCH 09/16] st/nine: Fix D3DQUERYTYPE_TIMESTAMPFREQ query

2015-04-26 Thread Axel Davy
On 24/04/2015 23:26, Ilia Mirkin wrote : >From https://msdn.microsoft.com/en-us/library/windows/desktop/bb172594%28v=vs.85%29.aspx D3DQUERYTYPE_TIMESTAMPFREQ This query result is TRUE if the values from D3DQUERYTYPE_TIMESTAMP queries cannot be guaranteed to be continuous throughout the duration

Re: [Mesa-dev] [PATCH 12/16] st/nine: Fix computation of const_used_size

2015-04-26 Thread Axel Davy
On 24/04/2015 23:40, Ilia Mirkin wrote : On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy wrote: From: Xavier Bouchoux Was sometimes too large for PS. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- src/gallium/state_trackers/nine/nine_shader.c | 8 +--- 1 file changed, 5

Re: [Mesa-dev] [PATCH 05/16] st/nine: Workaround barycentrics issue on some cards

2015-04-26 Thread Axel Davy
Le 24/04/2015 23:19, Ilia Mirkin a écrit : On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy wrote: Might I suggest either describing the bug or the solution to the bug? e.g. boolean shift_viewport; Perhaps there's another different buggy barycentric problem which is solved in an entirely diff

[Mesa-dev] [PATCH 08/16 v2] st/nine: Change x86 FPU Control word on device creation

2015-04-26 Thread Axel Davy
From: Tiziano Bacocco As on wined3d and windows, when D3DCREATE_FPU_PRESERVE is not specified, change the fpu control word to all exceptions masked, single precision, round to nearest. Signed-off-by: Axel Davy Signed-off-by: Tiziano Bacocco --- src/gallium/state_trackers/nine/device9.c | 31

[Mesa-dev] [PATCH 11/16 v2] st/nine: Fix behaviour of D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING

2015-04-26 Thread Axel Davy
From: Xavier Bouchoux Ignore D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING when D3DUSAGE_RENDERTARGET is not specified. This behaviour matches windows drivers. Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux --- v2: fix commit message src/gallium/state_trackers/nine/adapter9.c | 3 ++- 1

[Mesa-dev] [PATCH 1/2] util/macros: Move DIV_ROUND_UP to util/macros.h

2015-04-26 Thread Axel Davy
Move DIV_ROUND_UP to a shared location accessible everywhere Signed-off-by: Axel Davy --- I want to use DIV_ROUND_UP in a galliumm nine patch src/gallium/auxiliary/util/u_math.h | 1 - src/gallium/drivers/svga/include/svga3d_surfacedefs.h | 3 +-- src/mesa/main/macros.h

[Mesa-dev] [PATCH 2/2] gallium/svga: Remove useless ARRAY_SIZE declaration

2015-04-26 Thread Axel Davy
This is already declared in util/macros.h Signed-off-by: Axel Davy --- src/gallium/drivers/svga/include/svga3d_surfacedefs.h | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/drivers/svga/include/svga3d_surfacedefs.h b/src/gallium/drivers/svga/include/svga3d_surfacedefs.h

Re: [Mesa-dev] [PATCH 1/2] util/macros: Move DIV_ROUND_UP to util/macros.h

2015-04-26 Thread Axel Davy
On 26/04/2015 23:23, Axel Davy wrote : Move DIV_ROUND_UP to a shared location accessible everywhere Signed-off-by: Axel Davy --- I want to use DIV_ROUND_UP in a galliumm nine patch src/gallium/auxiliary/util/u_math.h | 1 - src/gallium/drivers/svga/include

Re: [Mesa-dev] [PATCH 1/2] util/macros: Move DIV_ROUND_UP to util/macros.h

2015-04-27 Thread Axel Davy
On 27/04/2015 15:52, Brian Paul wrote : On 04/26/2015 03:23 PM, Axel Davy wrote: */ #include "svga3d_reg.h" +#include "util/macros.h" Actually, it looks like this #include may not be needed. We get ARRAY_SIZE via including svga3d_reg.h, which includes svga_typ

[Mesa-dev] [PATCH v2] st/nine: Rework texture data allocation

2015-04-27 Thread Axel Davy
Some applications assume the memory for multilevel textures is allocated per continuous blocks. This patch implements that behaviour. v2: cache offsets Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 46 ++- src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 2/2] st/nine: Use position input helper for ps3 declared inputs

2016-02-21 Thread Axel Davy
When the semantic is position (which can happen with index 0 only), use the helper to get position input. Signed-off-by: Axel Davy --- The other changes of the initial patch (forbid POSITION0, etc) will be part of another serie. src/gallium/state_trackers/nine/nine_shader.c | 7 +++ 1 file

[Mesa-dev] [PATCH 1/2] st/nine: Introduce helper for Position shader input

2016-02-21 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 31 +-- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index a7a7da2..f0c5236

Re: [Mesa-dev] [PATCH 1/2] gallium: add usage flags to resource_get_handle

2016-02-24 Thread Axel Davy
On 25/02/2016 00:10, Marek Olšák wrote: From: Marek Olšák This will help differentiate between window-system framebuffers and other buffers. PIPE_HANDLE_USAGE_EXPLICIT_FLUSH should yield higher performance (e.g. allows delayed clears), but PIPE_HANDLE_USAGE_COHERENT is more flexible. Sadly, i

[Mesa-dev] [PATCH 2/3] st/nine: Fix Multithreading issue with MANAGED buffers

2016-02-27 Thread Axel Davy
things to upload (We move it from Lock time to Unlock time). Cc: "11.2" Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/buffer9.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/buffer9.c b/src/gallium/stat

[Mesa-dev] [PATCH 1/3] st/nine: Handle READONLY for buffer MANAGED pool

2016-02-27 Thread Axel Davy
READONLY won't trigger an upload. Cc: "11.2" Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/buffer9.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gallium/state_trackers/nine/buffer9.c b/src/gallium/state_trackers

[Mesa-dev] [PATCH 0/3] gallium nine MANAGED buffers fixed

2016-02-27 Thread Axel Davy
ore any draw call needing the data, implementing the behaviour would also fix the problem. However as it needs a bit of work, I plan to merge for now these fixes, and implement later the correct behaviour. Axel Davy (3): st/nine: Handle READONLY for buffer MANAGED pool st/nine: Fix Multithr

[Mesa-dev] [PATCH 3/3] st/nine: Fix second Multithreading issue with MANAGED buffers

2016-02-27 Thread Axel Davy
upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced by cc0114f30b587a10766ec212afb3ad356099ef23: "st/nine: Implement Managed vertex/index buffers" Cc: "11.2" Signed-off-by: Axel Davy --- src/gallium/state_tr

[Mesa-dev] [PATCH 3/3 v2] st/nine: Fix second Multithreading issue with MANAGED buffers

2016-02-27 Thread Axel Davy
upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced by cc0114f30b587a10766ec212afb3ad356099ef23: "st/nine: Implement Managed vertex/index buffers" v2: fixed small compilation issue. Cc: "11.2" Signed-off-by: Ax

Re: [Mesa-dev] [PATCH 2/2] gallium: add external_usage flags to resource_from(get)_handle (v2)

2016-03-01 Thread Axel Davy
creen *_screen, img->layer = 0; img->dri_format = format; img->dri_components = 0; + img->use = use; This looks ok to me (except the minor nitpick). You can add my Rb: Reviewed-by: Axel Davy For the first patch, I think it would be better to

Re: [Mesa-dev] [PATCH] st/nine: specify WINAPI only for i386 and amd64

2016-03-21 Thread Axel Davy
Hi, This looks good to me, but I'm not expert it compilers at all, could someone with more experience look at it ? Axel On 17/03/2016 20:12, Christian Schmidbauer wrote : Currently mesa fails building with the x32 abi as ms_abi is not defined in such a case. The patch uses ms_abi only for amd

Re: [Mesa-dev] [PATCH] target/d3dadapter9: make sure strings are null-terminated

2016-05-31 Thread Axel Davy
The drvid structure seems to be memset in read_descriptor, thus I don't think we need to set 0 for the last table slot. Axel Davy On 31/05/2016 03:21, Eric Engestrom wrote: From strncpy's man page: Warning: If there is no null byte among the first n bytes of src, the string

Re: [Mesa-dev] [PATCH] st/mesa: change SQRT lowering to fix the game Risen

2016-06-05 Thread Axel Davy
if abs is not inserted in the source glsl, that's a wine bug, not a mesa bug, Thus I don't think doing this is a good idea. On 05/06/2016 17:17, Ilia Mirkin wrote: On Mon, May 30, 2016 at 7:19 PM, Marek Olšák wrote: From: Marek Olšák Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94

Re: [Mesa-dev] [PATCH 4/4] radeonsi: force non-displayable tiling based on surface dimensions

2016-06-06 Thread Axel Davy
On 06/06/2016 11:37, Michel Dänzer wrote : With DRI3, st/dri could (re-)allocate buffers with the scanout flag first and after any window geometry changes, then re-allocate without the flag if the present complete event indicates that page flipping couldn't be used. That sounds like a bad id

Re: [Mesa-dev] [PATCH 4/4] radeonsi: force non-displayable tiling based on surface dimensions

2016-06-06 Thread Axel Davy
Le 06/06/2016 12:28, Marek Olšák a écrit : On Mon, Jun 6, 2016 at 12:24 PM, Marek Olšák wrote: On Mon, Jun 6, 2016 at 11:47 AM, Michel Dänzer wrote: On 06.06.2016 18:44, Axel Davy wrote: On 06/06/2016 11:37, Michel Dänzer wrote : With DRI3, st/dri could (re-)allocate buffers with the

Re: [Mesa-dev] [PATCH v2] egl/x11_dri3: stop restricting support to render nodes unnecessarily

2016-06-10 Thread Axel Davy
tion seems more adapted than a hack based on whether wayland support is built. I favor however just not advertising the extension when render-nodes aren't available (+ add a noop authenticate with warning to have that extension properly implemented). Yours, Axel Davy On 10/06/2016 18:35, Fr

[Mesa-dev] [PATCH 2/8] radeonsi: Emit poly_offset states together

2016-06-14 Thread Axel Davy
Emit PA_SU_POLY_OFFSET_DB_FMT_CNTL with rasterizer poly_offset states. This will be useful to implement PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. Signed-off-by: Axel Davy --- src/gallium/drivers/radeonsi/si_state.c | 31 --- 1 file changed, 8 insertions(+), 23

[Mesa-dev] [PATCH 1/8] gallium: Add a cap for offset_units_unscaled

2016-06-14 Thread Axel Davy
D3D9 has a different behaviour for depth bias. For OGL/D3D1X, the depth bias unit is the minimal resolvable value for the depth buffer, which depends on the format (and has different behaviour for float depth buffers). For D3D9, the depth bias unit is 1.0f. Signed-off-by: Axel Davy --- src

[Mesa-dev] [PATCH 4/8] r600g: Emit poly_offset states together

2016-06-14 Thread Axel Davy
Emit PA_SU_POLY_OFFSET_DB_FMT_CNTL with the other poly_offset states. This will be useful to implement PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. Signed-off-by: Axel Davy --- src/gallium/drivers/r600/evergreen_state.c | 36 ++ 1 file changed, 12 insertions(+), 24

[Mesa-dev] [PATCH 3/8] r600: Emit poly_offset states together

2016-06-14 Thread Axel Davy
Emit PA_SU_POLY_OFFSET_DB_FMT_CNTL with the other poly_offset states. This will be useful to implement PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. Signed-off-by: Axel Davy --- src/gallium/drivers/r600/r600_state.c | 35 --- 1 file changed, 12 insertions(+), 23

[Mesa-dev] [PATCH 6/8] radeonsi: Implement POLYGON_OFFSET_UNITS_UNSCALED

2016-06-14 Thread Axel Davy
PA_SU_POLY_OFFSET_DB_FMT_CNTL (ie setting the unorm depth bias behaviour with a scale of 2^0 = 1.0f) gives the unscaled behaviour. Signed-off-by: Axel Davy --- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- src/gallium/drivers/radeonsi/si_state.c | 32 ++-- 2 files changed, 19 insertions

[Mesa-dev] [PATCH 8/8] st/nine: Use offset_units_unscaled

2016-06-14 Thread Axel Davy
offset_units_unscaled enables proper support for depth bias for gallium nine. Use it if available. Solves issues with some games using depth bias. For example: https://github.com/iXit/Mesa-3D/issues/220 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c| 1 + src

[Mesa-dev] [PATCH 5/8] radeon: Remove useless pa_su_poly_offset_db_fmt_cntl

2016-06-14 Thread Axel Davy
pa_su_poly_offset_db_fmt_cntl usages were removed in previous patches. Signed-off-by: Axel Davy --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h

[Mesa-dev] [PATCH 7/8] r600, r600g: Implement POLYGON_OFFSET_UNITS_UNSCALED

2016-06-14 Thread Axel Davy
PA_SU_POLY_OFFSET_DB_FMT_CNTL (ie setting the unorm depth bias behaviour with a scale of 2^0 = 1.0f) gives the unscaled behaviour. Signed-off-by: Axel Davy --- src/gallium/drivers/r600/evergreen_state.c | 39 +++- src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/r600

Re: [Mesa-dev] [PATCH 1/8] gallium: Add a cap for offset_units_unscaled

2016-06-14 Thread Axel Davy
On 15/06/2016 00:21, Roland Scheidegger wrote: Am 14.06.2016 um 23:33 schrieb Axel Davy: diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 396f563..7dce80a 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h

Re: [Mesa-dev] [PATCH 1/8] gallium: Add a cap for offset_units_unscaled

2016-06-14 Thread Axel Davy
On 15/06/2016 03:04, Roland Scheidegger wrote: Am 15.06.2016 um 01:08 schrieb Axel Davy: On 15/06/2016 00:21, Roland Scheidegger wrote: Am 14.06.2016 um 23:33 schrieb Axel Davy: diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 396f563..7dce80a 100644

Re: [Mesa-dev] [PATCH 1/3] egl/x11_dri3: disable WL_bind_wayland_display for devices without render nodes

2016-06-20 Thread Axel Davy
Hi, The three patches make sense to me. Reviewed-by: Axel Davy On 17/06/2016 19:41, Frank Binns wrote : Up until now, DRI3 was only used for devices that have render nodes, unless overridden via an environment variable, with it falling back to DRI2 otherwise. This limitation was there in

Re: [Mesa-dev] [PATCH 1/3] egl/x11_dri3: disable WL_bind_wayland_display for devices without render nodes

2016-06-20 Thread Axel Davy
Le 20/06/2016 11:48, Michel Dänzer a écrit : On 18.06.2016 02:41, Frank Binns wrote: Up until now, DRI3 was only used for devices that have render nodes, unless overridden via an environment variable, with it falling back to DRI2 otherwise. This limitation was there in order to support WL_bind_w

Re: [Mesa-dev] [PATCH 1/3] egl/x11_dri3: disable WL_bind_wayland_display for devices without render nodes

2016-06-20 Thread Axel Davy
On 21/06/2016 01:26, Michel Dänzer wrote: On 20.06.2016 20:06, Frank Binns wrote: On 20/06/16 10:48, Michel Dänzer wrote: On 18.06.2016 02:41, Frank Binns wrote: Up until now, DRI3 was only used for devices that have render nodes, unless overridden via an environment variable, with it falling

[Mesa-dev] [PATCH v2] r600g: move PA_SU_POLY_OFFSET_DB_FMT_CNTL to poly offset states for r600

2016-06-22 Thread Axel Davy
Emit PA_SU_POLY_OFFSET_DB_FMT_CNTL with the other poly_offset states. This will be useful to implement PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. v2: Increase the num_dw field for the poly offset atom Signed-off-by: Axel Davy --- src/gallium/drivers/r600/r600_state.c | 37

[Mesa-dev] [PATCH v2] r600g: move PA_SU_POLY_OFFSET_DB_FMT_CNTL to poly offset states for evergreen

2016-06-22 Thread Axel Davy
Emit PA_SU_POLY_OFFSET_DB_FMT_CNTL with the other poly_offset states. This will be useful to implement PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. v2: Increase the num_dw field for the poly offset atom Signed-off-by: Axel Davy --- src/gallium/drivers/r600/evergreen_state.c | 38

Re: [Mesa-dev] [PATCH] radeon: only suspend queries on flush if they haven't been suspended yet

2015-11-27 Thread Axel Davy
Tested-by: Axel Davy On 28/11/2015 00:24, Nicolai Hähnle wrote: From: Nicolai Hähnle Non-timer queries are suspended during blits. When the blits end, the queries are resumed, but this resume operation itself might run out of CS space and trigger a flush. When this happens, we must prevent

[Mesa-dev] Update the way we get descriptions about drirc options

2014-08-12 Thread Axel Davy
uld ignore the additional section. Yours, Axel Davy ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] r600g, radeonsi: add debug option which forces DMA for copy_region and blit

2014-09-08 Thread Axel Davy
Hi, When reading si_dma.c code, it looks like the requested width of the copy is ignored except for PIPE_BUFFER. Perhaps that explains the bugs observed ? Axel Davy On 06/09/2014 19:14, Andy Furniss wrote : Marek Olšák wrote: From: Marek Olšák --- Turn this on, run piglit, and pray for

Re: [Mesa-dev] [PATCH] r600g, radeonsi: add debug option which forces DMA for copy_region and blit

2014-09-08 Thread Axel Davy
On 08/09/2014 20:21, Grigori Goronzy wrote : On 08.09.2014 14:50, Axel Davy wrote: Hi, When reading si_dma.c code, it looks like the requested width of the copy is ignored except for PIPE_BUFFER. Perhaps that explains the bugs observed ? It isn't ignored. Partial DMA copies (i.e. opera

Re: [Mesa-dev] [PATCH] r600g, radeonsi: add debug option which forces DMA for copy_region and blit

2014-09-08 Thread Axel Davy
Le 08/09/2014 21:11, Grigori Goronzy a écrit : On 08.09.2014 21:07, Axel Davy wrote: On 08/09/2014 20:21, Grigori Goronzy wrote : On 08.09.2014 14:50, Axel Davy wrote: Hi, When reading si_dma.c code, it looks like the requested width of the copy is ignored except for PIPE_BUFFER. Perhaps

[Mesa-dev] [PATCH] st/nine: Fix a regression and syntax cleanup

2017-05-21 Thread Axel Davy
A few cleanups and in particular initializing properly the new pipe_draw_info fields. This should fix the regression caused by 330d0607ed60fd3edca192e54b4246310f06652f Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101088 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 3/4] gallium: remove pipe_index_buffer and set_index_buffer

2017-04-30 Thread Axel Davy
you don't upload the data (previously it would use index user buffer, but you remove support for it) Yours, Axel Davy On 29/04/2017 01:12, Marek Olšák wrote: diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 6390735..5dc24d6 100644 --

Re: [Mesa-dev] [PATCH 3/4] gallium: remove pipe_index_buffer and set_index_buffer

2017-04-30 Thread Axel Davy
Hi Marek, Here is probably the second mistake: I guess you should change info.start to take into account the offset of the index buffer. Yours, Axel Davy On 29/04/2017 01:12, Marek Olšák wrote: CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive, ARG_VAL

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-07 Thread Axel Davy
Hi, There should be very few X11 calls while rendering (basically only at the beginning or end of a frame). Why not just always run these calls in the main thread (and wait for glthread work to finish) ? That's basically what we do for gallium nine. Yours, Axel On 05/05/2017 17:37, Grego

Re: [Mesa-dev] [PATCH 2/2] radeonsi: get rid of secondary input/output word

2017-05-10 Thread Axel Davy
Hi Nicolai and Marek, Gallium nine associates to every d3d usage/index a generic unique index. That should fit on a 16bits integer, but not for 32 values. We could fit in 32 indexes by recompiling vertex and pixel shaders to match, but one advantage of gallium nine is we don't need much recompi

Re: [Mesa-dev] [PATCH 2/2] radeonsi: get rid of secondary input/output word

2017-05-10 Thread Axel Davy
On 10/05/2017 09:17, Nicolai Hähnle wrote: On 10.05.2017 08:58, Axel Davy wrote: Hi Nicolai and Marek, Gallium nine associates to every d3d usage/index a generic unique index. That should fit on a 16bits integer, but not for 32 values. Hold on, you're saying the semantic index could

Re: [Mesa-dev] [PATCH 5/5] dri3: Use SwapBuffer flips for back- and fake front

2017-06-28 Thread Axel Davy
On 28/06/2017 20:40, Thomas Hellstrom wrote: On 06/28/2017 07:36 PM, Axel Davy wrote: Hi, To my knowledge, this is invalid to switch the front fake buffer with the back buffer. The front buffer is supposed to take into account what the app draws with the xserver commands, etc

Re: [Mesa-dev] [PATCH 5/5] dri3: Use SwapBuffer flips for back- and fake front

2017-06-28 Thread Axel Davy
tching may be incorrect relative to buffer size too. Yours, Axel Davy On 22/06/2017 12:42, Thomas Hellstrom wrote: Use flips for back- and fake front buffers. This might lead to fake front and real front being shared if the hardware is page-flip capable. In any case it will save a full-drawabl

Re: [Mesa-dev] [GSOC] DriConf Replacement

2018-01-18 Thread Axel Davy
Hi all, Don't hesitate to recycle parts of my old try at DriConf Replacement: https://github.com/axeldavy/driCenter It had automatic detection of prime system and of the device_id. It detected also on which card apps run, and running apps. Yours, Axel On 18/01/2018 11:07, Michel Dänzer wrot

Re: [Mesa-dev] [RFC] loader: Automatic PRIME detection

2016-12-27 Thread Axel Davy
. Yours, Axel Davy On 23/12/2016 21:36, Thierry Reding wrote: From: Thierry Reding If a device doesn't support rendering and support for PRIME isn't enabled via the DRI_PRIME environment variable or dri.conf, attempt to find a render node which can be used to offload rendering. Sig

Re: [Mesa-dev] [RFC] loader: Automatic PRIME detection

2017-01-03 Thread Axel Davy
On 02/01/2017 15:32, Thierry Reding wrote: On Tue, Dec 27, 2016 at 01:57:21PM +0100, Axel Davy wrote: Hi Thierry, Could you explain why in this situation default_fd would be a non-renderable device node ? This is preparatory work to allow drivers for split display/render setups to be tied

[Mesa-dev] [PATCH 6/7] st/nine: Flush the queue at device dtor

2017-01-06 Thread Axel Davy
Flush the queue to get refcounts right, and properly release the items, instead of throwing away all pending commands. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 1/7] st/nine: Don't call u_box_union_* when dirty region is empty

2017-01-06 Thread Axel Davy
From: Masanori Kakura When dirty region is empty, u_box_union_* incorrectly expands the new region. This fixes broken font rendering issue in WOLF RPG Editor v2.10 games. Signed-off-by: Masanori Kakura Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 12

[Mesa-dev] [PATCH 2/7] st/nine: Remove duplicated checks

2017-01-06 Thread Axel Davy
There is no need to check on csmt_active before calling nine_csmt_process, because the function checks already. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c| 3 +-- src/gallium/state_trackers/nine/nine_state.c | 14 ++ 2 files changed, 7 insertions

<    4   5   6   7   8   9   10   11   >