[Mesa-dev] [PATCH 41/43] gallium/targets/d3dadapter9: Release the pipe_screen at destruction.

2015-01-30 Thread Axel Davy
We weren't releasing hal and ref, causing some issues (threads not released, etc) Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/targets/d3dadapter9/drm.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b

[Mesa-dev] [PATCH 22/43] st/nine: Missing sanity check for CALLOC return E_OUTOFMEMORY if allocation of usage_map fails

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers/nine/vertexdeclaration9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 36/43] st/nine: Fix multisampling support detection

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 12 +--- src/gallium/state_trackers/nine/nine_pipe.h | 25 - 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b

[Mesa-dev] [PATCH 40/43] gallium/targets/d3dadapter9: Fix device detection for render-nodes

2015-01-30 Thread Axel Davy
cap to determine the vendor and device id from the driver. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/targets/d3dadapter9/drm.c | 59 +-- 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src

[Mesa-dev] [PATCH 42/43] gallium/targets/d3dadapter9: Free card device

2015-01-30 Thread Axel Davy
The drm fd wasn't released, causing a crash for wine tests on nouveau, which seems to have a bug when a lot of device descriptors are open. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/targets/d3dadapter9/drm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions

[Mesa-dev] [PATCH 13/43] st/nine: Improve CheckDeviceFormat debug output

2015-01-30 Thread Axel Davy
can always retrieve that info by hand. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c

[Mesa-dev] [PATCH 39/43] st/nine: Dummy sampler should have a=1

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c| 39 +++ src/gallium/state_trackers/nine/device9.h| 3 + src/gallium/state_trackers/nine/nine_ff.c| 7 ++ src/gallium/state_trackers/nine/nine_state.c | 155

[Mesa-dev] [PATCH 34/43] st/nine: Fix depth stencil formats bindings flags.

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 26 ++ src/gallium/state_trackers/nine/device9.c| 4 ++- src/gallium/state_trackers/nine/nine_pipe.h | 51 src/gallium/state_trackers/nine/swapchain9.c | 20

[Mesa-dev] [PATCH 28/43] st/nine: Fix present_buffers allocation

2015-01-30 Thread Axel Davy
If has_present_buffers was false at first, but after a device reset, it turns true (for example if we begin to render to a multisampled back buffer), there was a crash due to present_buffers being uninitialised. This patch fixes it. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium

[Mesa-dev] [PATCH 32/43] st/nine: SetResourceResize should track nr_samples too

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/surface9.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c index 21a4707..f1b4aa9 100644 --- a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 10/43] st/nine: Do not leak private data in volume9.

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org This-data was allocated by nine, but not freed. Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers/nine/volume9.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium

[Mesa-dev] [PATCH 19/43] st/nine: Add D3DFMT_DF16 support

2015-01-30 Thread Axel Davy
add support for DF24 yet, because it implies support for FETCH4, which we don't support for now. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/basetexture9.c | 12 ++-- src/gallium/state_trackers/nine/nine_pipe.h| 6 -- 2 files changed, 14 insertions

[Mesa-dev] [PATCH 24/43] st/nine: Remove duplicated debug message

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Likely a rebase error Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers/nine/resource9.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 16/43] st/nine: Implement fallback for D3DFMT_D24S8, D3DFMT_D24X8 and D3DFMT_INTZ

2015-01-30 Thread Axel Davy
Some drivers support PIPE_FORMAT_S8_UINT_Z24_UNORM, some others PIPE_FORMAT_Z24_UNORM_S8_UINT, some both. It doesn't matter which one we use, since the d3d formats they map to aren't lockable (app can read it directly). Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers

[Mesa-dev] [PATCH 38/43] st/nine: Fix update_framebuffer binding cbufs the pixel shader wouldn't render to

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c| 8 src/gallium/state_trackers/nine/nine_state.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium

[Mesa-dev] [PATCH 21/43] st/nine: Implement ATOC hack

2015-01-30 Thread Axel Davy
ATOC is an hack for Alpha to coverage that is supported by NV and Intel. You need to check the support for it with CheckDeviceFormat. Signed-off-by: Axel Davy axel.d...@ens.fr --- include/D3D9/d3d9types.h | 1 + src/gallium/state_trackers/nine/adapter9.c | 4 src/gallium

[Mesa-dev] [PATCH 26/43] st/nine: Fix bufferoverflow in {Get|Set}PixelShaderConstantF

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Previous code wasn't checking against the correct limit: 224 for sm3 hardware, but 256. Fixes wine test test_pixel_shader_constant() Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers

[Mesa-dev] [PATCH 23/43] st/nine: Return E_FAIL for unused vertexdeclaration type

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Add returncode E_FAIL. Return E_FAIL for any vertexdeclaration element with type unused. Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- include/D3D9/d3d9types.h | 1 + src/gallium

[Mesa-dev] [PATCH 37/43] st/nine: Clear: better behave if rt_mask is different to the one of the framebuffer bound

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c | 40 +-- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index c6bd052

[Mesa-dev] [PATCH 14/43] st/nine: Refactor nine_d3d9_to_pipe_format_map

2015-01-30 Thread Axel Davy
The order of the format is changed to have an increasing ordering of the d3d9 format values. Some missing formats are added and matched to PIPE_FORMAT_NONE Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_pipe.c | 123 ++-- 1 file

[Mesa-dev] [PATCH 02/43] st/nine: Refactor how user constbufs sizes are calculated

2015-01-30 Thread Axel Davy
Count explicitly the slots for float, int and bool constants, and deduce the constbuf size in nine_shader. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_shader.c | 17 ++--- src/gallium/state_trackers/nine/nine_shader.h | 22

[Mesa-dev] [PATCH 11/43] st/nine: fix early basetexture destruction

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/basetexture9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c index 5134de2..8d183e6 100644

[Mesa-dev] [PATCH 27/43] st/nine: Check for aligned offset in each vertex element

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Fixes wine test test_vertex_declaration_alignment() Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers/nine/vertexdeclaration9.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[Mesa-dev] [PATCH 20/43] st/nine: Implement AMD alpha to coverage

2015-01-30 Thread Axel Davy
This D3D hack is supposed to be supported by all AMD SM2+ cards. Apps use it without checking if they are on AMD. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c| 17 +++-- src/gallium/state_trackers/nine/nine_pipe.c | 2 +- src/gallium

[Mesa-dev] [PATCH 09/43] st/nine: Check block alignment for compressed textures in NineSurface9_CopySurface

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium/state_trackers/nine/surface9.c | 24 1 file changed, 24 insertions(+) diff --git a/src/gallium/state_trackers/nine/surface9

[Mesa-dev] [PATCH 05/43] st/nine: Introduce failure handling for shader parsing.

2015-01-30 Thread Axel Davy
Instead of crashing on buggy shaders, we should return an error. This patch introduces this behaviour in the case of invalid constant access Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_shader.c | 38 +-- 1 file changed, 30 insertions

[Mesa-dev] [PATCH 15/43] st/nine: Refactor format d3d9 to pipe conversion

2015-01-30 Thread Axel Davy
Move the checks of whether the format is supported into a common place. The advantage is that allows to handle when a d3d9 format can be mapped to several formats, and that cards don't support all of them. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c

[Mesa-dev] [PATCH 03/43] st/nine: Declare constants only up to the maximum needed.

2015-01-30 Thread Axel Davy
reduce the amount of constants needed, and that it is restricted to 256 constant slots. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_shader.c | 38 --- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 12/43] st/nine: Implement RESZ hack

2015-01-30 Thread Axel Davy
will be reworked. For now the current behaviour is ok, since apps use the D3DCREATE_PUREDEVICE flag when creating the device, which means they won't read states and in exchange get better performance. Signed-off-by: Axel Davy axel.d...@ens.fr --- This patch requires gallium: Add MULTISAMPLE_Z_RESOLVE cap

[Mesa-dev] [PATCH 17/43] st/nine: NineDevice9_SetClipPlane: pPlane must be non-NULL

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index e4b2c90..a446c8f 100644 --- a/src

[Mesa-dev] [PATCH 18/43] st/nine: Change the value of some advertised caps

2015-01-30 Thread Axel Davy
These values are taken from wine. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c index

[Mesa-dev] [PATCH 31/43] st/nine: D3DRS_FILLMODE set to 0 is D3DFILL_SOLID

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco tizb...@gmail.com Reviewed-by: Axel Davy axel.d...@ens.fr Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Tiziano Bacocco tizb...@gmail.com --- include/D3D9/d3d9types.h| 1 + src/gallium/state_trackers/nine/nine_pipe.h | 1 + 2 files changed

[Mesa-dev] [PATCH 29/43] st/nine: Implement fallback behaviour when rts and ds don't match

2015-01-30 Thread Axel Davy
This seems to be the behaviour on Win. Previous behaviour led to different issues depending on the driver. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_state.c | 46 +--- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git

[Mesa-dev] [PATCH 04/43] st/nine: Print warnings for r500 when shader is likely to go wrong

2015-01-30 Thread Axel Davy
r500 hasn't enough float constants for vs to fill all needs. Overlapping issues can happen with complex shaders. The fix would be to recompile shaders to include the integer and boolean constants, instead of reserving slots for them. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium

[Mesa-dev] [PATCH 08/43] st/nine: Commit sampler views again if srgb state changed.

2015-01-30 Thread Axel Davy
-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/device9.c| 3 +++ src/gallium/state_trackers/nine/nine_state.c | 5 +++-- src/gallium/state_trackers/nine/nine_state.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c b

[Mesa-dev] [PATCH 07/43] st/nine: Fix use of D3DSP_NOSWIZZLE

2015-01-30 Thread Axel Davy
D3DSP_NOSWIZZLE already contains the shift. Detected with Clang. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers

[Mesa-dev] [PATCH 30/43] st/nine: Setting D3DRS_ALPHAFUNC to 0 means D3DCMP_NEVER

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco tizb...@gmail.com Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Tiziano Bacocco tizb...@gmail.com --- include/D3D9/d3d9types.h| 1 + src/gallium/state_trackers/nine/nine_pipe.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/D3D9

[Mesa-dev] [PATCH 35/43] st/nine: Fix enabled lights in stateblocks

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco tizb...@gmail.com Signed-off-by: Tiziano Bacocco tizb...@gmail.com --- src/gallium/state_trackers/nine/device9.c | 4 +++- src/gallium/state_trackers/nine/stateblock9.c | 6 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 01/43] st/nine: Explicit nine requirements

2015-01-30 Thread Axel Davy
integer and boolean constants in the shader. Eventually when this is done, we can reintroduce support for older cards. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 106 + src/gallium/state_trackers/nine/device9.c | 9 +-- 2

[Mesa-dev] [PATCH 25/43] st/nine: Set [out] argument to NULL for some functions

2015-01-30 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org Wine tests, and probably some apps, check for errors by checking for NULL instead of error codes. Fixes wine test test_surface_blocks() Reviewed-by: Axel davy axel.d...@ens.fr Signed-off-by: Patrick Rudolph s...@das-labor.org --- src/gallium

[Mesa-dev] [PATCH 43/43] st/nine: Implement dummy vbo behaviour when vs is missing inputs

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco tizb...@gmail.com Use a dummy vertex buffer object when vs inputs have no corresponding entries in the vertex declaration. This dummy buffer will give to the shader float4(0,0,0,0). This fixes several artifacts on some games. Signed-off-by: Axel Davy axel.d...@ens.fr

Re: [Mesa-dev] [PATCH 36/43] st/nine: Fix multisampling support detection

2015-01-30 Thread Axel Davy
recommend not using PIPE_BIND_TRANSFER_READ/WRITE. Transfers with multisample textures should be supported, but the mapped texture is always a resolved single-sample copy, so it's not really an MSAA transfer. Marek On Fri, Jan 30, 2015 at 9:34 PM, Axel Davy axel.d...@ens.fr wrote: Signed-off-by: Axel

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Axel Davy
(either to a integer directly if card supports it, or to float). Axel Davy On 29/01/2015 22:20, Roland Scheidegger wrote : Hi, the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes that indirections can only be done through the address reg and has quite some extra code

Re: [Mesa-dev] [PATCH v2] gallium: Add MULTISAMPLE_Z_RESOLVE cap

2015-01-19 Thread Axel Davy
On 19/01/2015 23:23, Ilia Mirkin wrote : On Mon, Jan 19, 2015 at 5:17 PM, Axel Davy axel.d...@ens.fr wrote: Resolving a multisampled depth texture into a single sampled texture is supported on = SM4.1 hw. It is possible some previous hw support it. The ability was tested on radeonsi and nvc0

[Mesa-dev] [PATCH v2] gallium: Add MULTISAMPLE_Z_RESOLVE cap

2015-01-19 Thread Axel Davy
it to the drivers. It is advertised for drivers for which it is sure the ability is supported. Signed-off-by: Axel Davy axel.d...@ens.fr --- v2: Add mention of the first sample to the definition. Remove comment about possible support for drivers that don't support MSAA yet. src/gallium/docs/source

Re: [Mesa-dev] [PATCH] gallium: add MULTISAMPLE_Z_RESOLVE cap

2015-01-19 Thread Axel Davy
to say this behaviour is what happens with a pipe_blit, since it is different than the ability to read the texture in a shader, like the is_format_supported would indicate. Axel Davy ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [PATCH v3 13/51] st/nine: NineBaseTexture9: update sampler view creation

2015-01-19 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- Since last version, we have tested precisely Win behaviour for depth buffer formats src/gallium/state_trackers/nine/basetexture9.c | 45 ++ 1 file changed, 32 insertions(+), 13

Re: [Mesa-dev] [PATCH] gallium: add MULTISAMPLE_Z_RESOLVE cap

2015-01-18 Thread Axel Davy
and nouveau the check for the support of the sample count and the bind flag are separated. On 17/01/2015 14:44, Axel Davy wrote : Resolving a multisampled depth texture into a single sampled texture is supported on = SM4.1 hw. It is possible some previous hw support it. The ability was tested

Re: [Mesa-dev] [PATCH] gallium: add MULTISAMPLE_Z_RESOLVE cap

2015-01-18 Thread Axel Davy
would be to fix is_format_supported in drivers, and check if a multisampled buffer can be sampled in a shader. Axel Davy On 18/01/2015 20:23, Ilia Mirkin wrote : I'm confused by what this flag is allowing. Are we talking about a blit from MS - non-MS? texelFetch(sampler2DMS) for a depth buffer

Re: [Mesa-dev] [PATCH 12/53] st/nine: NineBaseTexture9: update sampler view creation

2015-01-18 Thread Axel Davy
. I'm going to update the patch. On 07/01/2015 17:36, Axel Davy wrote : While previous code was having the correct behaviour in general, this new code is more readable (without checking all gallium formats manually) and has a more defined behaviour for depth stencil resources. Reviewed-by: David

[Mesa-dev] [PATCH] gallium: add MULTISAMPLE_Z_RESOLVE cap

2015-01-17 Thread Axel Davy
it to the drivers. It is advertised for drivers for which it is sure the ability is supported. A comment was added for drivers for which the feature is probably supported. Signed-off-by: Axel Davy axel.d...@ens.fr --- This feature corresponds to the RESZ d3d9 hack. d3d9 hacks are equivalent to GL

[Mesa-dev] [PATCH] egl: Soften several HAVE_DRM_PLATFORM to HAVE_LIBDRM

2015-01-14 Thread Axel Davy
to be built. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/egl/drivers/dri2/egl_dri2.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 86e5f24..6306483 100644 --- a/src/egl/drivers/dri2/egl_dri2

Re: [Mesa-dev] [PATCH v2 50/52] st/nine: Explicit nine requirements

2015-01-13 Thread Axel Davy
boost from unplayable 10 fps to 20-25fps fps. As in previous conversation we had, I'd prefer pushing this patch only at moment, when it's already required by some rework or something which completly disallow r500 to work. I'm ok with dropping this patch for now. Axel Davy

Re: [Mesa-dev] [PATCH v2 28/52] st/nine: Match REP implementation to LOOP

2015-01-11 Thread Axel Davy
. On Sat, Jan 10, 2015 at 5:42 AM, Axel Davy axel.d...@ens.fr wrote: Previous implementation was fine, just instead of having increasing counter, have a decreasing counter. Didn't you have some other reason to do this? Why are there all these changes which are basically just like Well, I

Re: [Mesa-dev] [PATCH 19/53] st/nine: Clamp color inputs for ps = 2.0 at ps level instead of vs

2015-01-11 Thread Axel Davy
On 07/01/2015 17:36, Axel Davy wrote : Nine code was clamping color outputs for vs 3, but msdn docs says it is done in the ps. Wine seems to clamp them at the vs level. It makes more sense to clamp at vs level for performance, but according to doc, ps 2.x shouldn't see clamping. We have

[Mesa-dev] [PATCH v3 33/51] st/nine: Implement TEXCOORD special behaviours

2015-01-11 Thread Axel Davy
DIV by RCP + MUL v3: Remove an useless MOV Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH v2 11/52] st/nine: Return D3DERR_INVALIDCALL when trying to create a texture of bad format

2015-01-10 Thread Axel Davy
Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/cubetexture9.c | 10 +- src/gallium/state_trackers/nine/texture9.c | 9 - src/gallium/state_trackers/nine/volumetexture9.c | 10 +- 3 files

[Mesa-dev] [PATCH v2 50/52] st/nine: Explicit nine requirements

2015-01-10 Thread Axel Davy
for them. We are already having hard time supporting r500, which is the most flexible dx9-only card apparently. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 106 + src/gallium/state_trackers/nine/device9.c | 9 +-- 2 files

Re: [Mesa-dev] [PATCH 44/53] st/nine: Implement ps3 advanced input definition feature

2015-01-10 Thread Axel Davy
On 08/01/2015 05:01, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: ps3 allows definitions of the inputs like: DCL_TEXCOORD0 v0.xy; Could this be .xw? I assume not... but if it can, that's not handled in this change. I think this patch should

Re: [Mesa-dev] [PATCH 12/53] st/nine: NineBaseTexture9: update sampler view creation

2015-01-10 Thread Axel Davy
On 07/01/2015 18:16, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: While previous code was having the correct behaviour in general, this new code is more readable (without checking all gallium formats manually) and has a more defined behaviour for depth

[Mesa-dev] [PATCH v2 34/52] st/nine: Implement TEXCOORD special behaviours

2015-01-10 Thread Axel Davy
-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 33 +++ 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers

[Mesa-dev] [PATCH v2 29/52] st/nine: Fix CND implementation

2015-01-10 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Signed-off-by: Tiziano Bacocco tizb...@gmail.com Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH v2 03/52] st/nine: Additional defines to d3dtypes.h

2015-01-10 Thread Axel Davy
From: Xavier Bouchoux xavi...@gmail.com Reviewed-by: Ilia Mirkin imir...@alum.mit.edu Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi...@gmail.com Cc: 10.4 mesa-sta...@lists.freedesktop.org --- include/D3D9/d3d9types.h | 10

[Mesa-dev] [PATCH v2 04/52] st/nine: Add missing c++ declaration for IDirect3DVolumeTexture9

2015-01-10 Thread Axel Davy
From: Xavier Bouchoux xavi...@gmail.com Reviewed-by: Ilia Mirkin imir...@alum.mit.edu Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi...@gmail.com Cc: 10.4 mesa-sta...@lists.freedesktop.org --- include/D3D9/d3d9.h | 10

[Mesa-dev] [PATCH v2 51/52] st/nine: Change comment relating to vertex shader inputs not matching declaration

2015-01-10 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_state.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 1187a20..dad6651 100644

[Mesa-dev] [PATCH v2 06/52] st/nine: Fix D3DRS_POINTSPRITE support

2015-01-10 Thread Axel Davy
From: Xavier Bouchoux xavi...@gmail.com It's done by testing the existence of the point sprite output register *after* parsing the vertex shader. Reviewed-by: Ilia Mirkin imir...@alum.mit.edu Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off

[Mesa-dev] [PATCH v2 18/52] st/nine: Remove some shader unused code

2015-01-10 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium

[Mesa-dev] [PATCH v2 16/52] st/nine: Rework of boolean constants

2015-01-10 Thread Axel Davy
Convert them to shader booleans at earlier stage. Previous code is fine, but later patch will make integers being converted at earlier stage, so do the same for booleans Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine

[Mesa-dev] [PATCH v2 27/52] st/nine: Rewrite LOOP implementation, and a0 aL handling

2015-01-10 Thread Axel Davy
while loading Bioshock - bug https://bugs.freedesktop.org/show_bug.cgi?id=85696 Tested-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 163 -- 1 file

Re: [Mesa-dev] [PATCH 48/53] st/nine: Add variables containing the size of the constant buffers

2015-01-08 Thread Axel Davy
On 08/01/2015 05:08, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/device9.c | 10 ++ src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 15/53] st/nine: Add ATI1 and ATI2 support

2015-01-08 Thread Axel Davy
On 07/01/2015 23:18, Axel Davy wrote : On 07/01/2015 18:42, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Adds ATI1 and ATI2 support to nine. They map to PIPE_FORMAT_RGTC1_UNORM and PIPE_FORMAT_RGTC2_UNORM, but need special handling. Reviewed

Re: [Mesa-dev] [PATCH] egl: dri2: Use present extension. (Was: Re: [RFC] egl: Add DRI3 support to the EGL backend.)

2015-01-07 Thread Axel Davy
, instead of switching to the new one ? I know DRI3 is having a few issues to get support because of a few bugs in the stack, but if what you want is just small improvement to reduce overhead, then I woud think the answer is more implement that feature with DRI3. Axel Davy

Re: [Mesa-dev] [PATCH 15/53] st/nine: Add ATI1 and ATI2 support

2015-01-07 Thread Axel Davy
On 07/01/2015 18:42, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Adds ATI1 and ATI2 support to nine. They map to PIPE_FORMAT_RGTC1_UNORM and PIPE_FORMAT_RGTC2_UNORM, but need special handling. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off

Re: [Mesa-dev] [PATCH 28/53] st/nine: Match REP implementation to LOOP

2015-01-07 Thread Axel Davy
Le 07/01/2015 21:13, Ilia Mirkin a écrit : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Previous implementation was fine, just instead of having increasing counter, have a decreasing counter. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 16/53] st/nine: Rework of boolean constants

2015-01-07 Thread Axel Davy
On 07/01/2015 18:23, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Convert them to shader booleans at earlier stage Why? What's wrong with the conversion as it is now? The conversion is fine for booleans, but not for integers. I think it is cleaner

Re: [Mesa-dev] [PATCH 24/53] st/nine: Handle RSQ special cases

2015-01-07 Thread Axel Davy
Le 07/01/2015 19:09, Ilia Mirkin a écrit : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: We should use the absolute value of the input as input to ureg_RSQ. Moreover, an input of 0.0 should return FLT_MAX. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel

Re: [Mesa-dev] [PATCH 11/53] st/nine: Return D3DERR_INVALIDCALL when trying to create a texture of bad format

2015-01-07 Thread Axel Davy
On Wed, 7 Jan 2015, Ilia Mirkin wrote: On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy axel.d...@ens.fr wrote: Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/cubetexture9.c | 8 src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 07/53] st/nine: Correctly advertise D3DPMISCCAPS_CLIPTLVERTS

2015-01-07 Thread Axel Davy
The cap means D3DFVF_XYZRHW vertices will see clipping. This is not the case when PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION is supported, since it'll disable clipping. Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/adapter9

[Mesa-dev] [PATCH 03/53] st/nine: Additional defines to d3dtypes.h

2015-01-07 Thread Axel Davy
From: xavier xavi...@gmail.com Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi...@gmail.com Cc: 10.4 mesa-sta...@lists.freedesktop.org --- include/D3D9/d3d9types.h | 10 ++ 1 file changed, 10 insertions(+) diff

[Mesa-dev] [PATCH 00/53] Gallium Nine fixes

2015-01-07 Thread Axel Davy
please review :-) Axel Davy (48): st/nine: Fix clip state logic st/nine: Add new texture format strings st/nine: Correctly advertise D3DPMISCCAPS_CLIPTLVERTS st/nine: NineBaseTexture9: fix setting of last_layer st/nine: CubeTexture: fix GetLevelDesc st/nine: Fix crash when deleting non

[Mesa-dev] [PATCH 08/53] st/nine: NineBaseTexture9: fix setting of last_layer

2015-01-07 Thread Axel Davy
Use same similar settings as u_sampler_view_default_template Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/basetexture9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Mesa-dev] [PATCH 10/53] st/nine: Fix crash when deleting non-implicit swapchain

2015-01-07 Thread Axel Davy
...@lists.freedesktop.org Tested-by: Nick Sarnie commendsar...@gmail.com Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/swapchain9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 01/53] st/nine: query: remove unused variable (trivial)

2015-01-07 Thread Axel Davy
From: David Heidelberg da...@ixit.cz Signed-off-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/query9.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 06/53] st/nine: Fix D3DRS_POINTSPRITE support

2015-01-07 Thread Axel Davy
From: xavier xavi...@gmail.com It's done by testing the existence of the point sprite output register *after* parsing the vertex shader. Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi...@gmail.com Cc: 10.4 mesa-sta

[Mesa-dev] [PATCH 13/53] st/nine: Hack to generate resource if it doesn't exist when getting view

2015-01-07 Thread Axel Davy
the resource when we hit this case, which prevents crashing, but doesn't help with the resource content. This fixes several games crashing at launch. Acked-by: Axel Davy axel.d...@ens.fr Acked-by: David Heidelberg da...@ixit.cz Signed-off-by: Stanislaw Halik stha...@misaki.pl Cc: 10.4 mesa-sta

[Mesa-dev] [PATCH 16/53] st/nine: Rework of boolean constants

2015-01-07 Thread Axel Davy
Convert them to shader booleans at earlier stage Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/device9.c| 35 +--- src/gallium/state_trackers/nine/device9.h| 6 ++--- src/gallium

[Mesa-dev] [PATCH 12/53] st/nine: NineBaseTexture9: update sampler view creation

2015-01-07 Thread Axel Davy
While previous code was having the correct behaviour in general, this new code is more readable (without checking all gallium formats manually) and has a more defined behaviour for depth stencil resources. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc

[Mesa-dev] [PATCH 28/53] st/nine: Match REP implementation to LOOP

2015-01-07 Thread Axel Davy
Previous implementation was fine, just instead of having increasing counter, have a decreasing counter. Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_shader.c | 41 +++ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git

[Mesa-dev] [PATCH 35/53] st/nine: Fill missing dst and src number for some instructions.

2015-01-07 Thread Axel Davy
Not filling them correctly results in bad padding and later crash. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 46 +-- 1 file changed

[Mesa-dev] [PATCH 47/53] st/nine: Fix sm3 relative addressing for non-debug build

2015-01-07 Thread Axel Davy
Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_state.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 870b1b0..0137a78 100644 --- a/src

[Mesa-dev] [PATCH 41/53] st/nine: Implement TEXDP3

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 09/53] st/nine: CubeTexture: fix GetLevelDesc

2015-01-07 Thread Axel Davy
This-surfaces contains the surfaces associated to the levels and faces. This-surfaces[6*Level] is what we want here, since it gives us a face descriptor for the level 'Level'. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi

[Mesa-dev] [PATCH 04/53] st/nine: Add missing c++ declaration for IDirect3DVolumeTexture9

2015-01-07 Thread Axel Davy
From: xavier xavi...@gmail.com Reviewed-by: David Heidelberg da...@ixit.cz Reviewed-by: Axel Davy axel.d...@ens.fr Signed-off-by: Xavier Bouchoux xavi...@gmail.com Cc: 10.4 mesa-sta...@lists.freedesktop.org --- include/D3D9/d3d9.h | 10 ++ 1 file changed, 10 insertions(+) diff --git

[Mesa-dev] [PATCH 02/53] st/nine: Fix clip state logic

2015-01-07 Thread Axel Davy
The clip state was reset everytime, incurring an overhead. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/nine_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 05/53] st/nine: Add new texture format strings

2015-01-07 Thread Axel Davy
Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- include/D3D9/d3d9types.h| 3 +++ src/gallium/state_trackers/nine/nine_pipe.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include

[Mesa-dev] [PATCH 14/53] st/nine: Check if srgb format is supported before trying to use it.

2015-01-07 Thread Axel Davy
According to msdn, we must act as if user didn't ask srgb if we don't support it. Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/basetexture9.c | 11 ++- src/gallium

[Mesa-dev] [PATCH 32/53] st/nine: Fix some fixed function pipeline operation

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_ff.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c

[Mesa-dev] [PATCH 48/53] st/nine: Add variables containing the size of the constant buffers

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/device9.c | 10 ++ src/gallium/state_trackers/nine/device9.h | 2 ++ src/gallium/state_trackers/nine/stateblock9.c | 4 ++-- 3 files changed, 10 insertions

[Mesa-dev] [PATCH 37/53] st/nine: implement TEXM3x2DEPTH

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/nine_shader.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium

[Mesa-dev] [PATCH 17/53] st/nine: Convert integer constants to floats before storing them when cards don't support integers

2015-01-07 Thread Axel Davy
The shader code is already behaving as if they are floats when the the card doesn't support integers Signed-off-by: Axel Davy axel.d...@ens.fr Cc: 10.4 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/device9.c | 65 --- 1 file changed, 52

<    4   5   6   7   8   9   10   11   >