[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #13 from Michel Dänzer --- Does it still happen with the Radeon card with a 3.19-rc kernel? -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing l

[Mesa-dev] [PATCH] i965/gen6: Fix crash with VS+TF after rendering with GS

2015-01-07 Thread Iago Toral Quiroga
Rendering with a GS and then using transform feedback with a program that does not have a GS can crash in gen6. The reason for this is that brw_begin_transform_feedback checks brw->geometry_program to decide if there is a GS program, but this is not correct: brw->geometry_program is updated when is

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

2015-01-07 Thread Joonas Lahtinen
This is still awaiting for comments. I'd rather hear what are the desirable modifications than try guessing. On ma, 2014-11-10 at 15:18 +0200, Joonas Lahtinen wrote: > Hi, > > On pe, 2014-11-07 at 17:40 -0800, Eric Anholt wrote: > > Ian Romanick writes: > > > > > On 11/06/2014 06:16 PM, Michel

[Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
From: Marek Olšák set_shader_resources is unused. set_shader_buffers should support shader atomic counter buffers and shader storage buffers from OpenGL. The plan is to use slots 0..15 for atomic counters and slots 16..31 for storage buffers. Atomic counters are planned to be supported first.

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-07 Thread Marek Olšák
How about the attached patch? Marek On Wed, Jan 7, 2015 at 1:23 AM, Tom Stellard wrote: > On Wed, Jan 07, 2015 at 01:13:37AM +0100, Marek Olšák wrote: >> Neither. It's because we use DX10_CLAMP, which converts NaNs to 0. >> > > Ok, could we add a dx10_clamp bit to si_shader and make this attribu

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
On 07/01/2015 10:24, Joonas Lahtinenwrote : This is still awaiting for comments. I'd rather hear what are the desirable modifications than try guessing. Well, ideally you would implement DRI3/Present support instead of complementing DRI2 support with Present. Why improve the old solution, i

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #14 from Gustaw Smolarczyk --- If you are using 3.18 kernel, you could also try the previous one (3.17.x). I have a similar problem on radeon (though it's TAHITI, so radeonsi) and found that it is a kernel regression. In my case, I c

Re: [Mesa-dev] [PATCH v3 14/24] mesa: Autogenerate most of format_pack.c

2015-01-07 Thread Samuel Iglesias Gonsálvez
On Monday, December 15, 2014 12:30:27 PM Samuel Iglesias Gonsálvez wrote: > On Thursday, December 11, 2014 11:55:10 AM Jason Ekstrand wrote: > > On Tue, Dec 9, 2014 at 4:06 AM, Iago Toral Quiroga > > wrote: > > > > [snip] > > > > > new file mode 100644 > > > index 000..5f6809e > > > --- /dev

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 5:56 AM, Marek Olšák wrote: > From: Marek Olšák > > set_shader_resources is unused. > > set_shader_buffers should support shader atomic counter buffers and shader > storage buffers from OpenGL. > > The plan is to use slots 0..15 for atomic counters and slots 16..31 > for st

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Aditya Avinash
Hi, Sounds great but, do you think a separate buffer pipe is required for this? Changing Constant buffer to a generic buffer (with alu+load+store) can help. What about for R600? Do we have to add r600_init_atom(rctx, &rctx->shaderbuf_state[PIPE_SHADER_VERTEX].atom, id++, r600_emit_vs_shader_buffe

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-07 Thread Alex Deucher
On Wed, Jan 7, 2015 at 6:58 AM, Marek Olšák wrote: > How about the attached patch? Reviewed-by: Alex Deucher > > Marek > > On Wed, Jan 7, 2015 at 1:23 AM, Tom Stellard wrote: >> On Wed, Jan 07, 2015 at 01:13:37AM +0100, Marek Olšák wrote: >>> Neither. It's because we use DX10_CLAMP, which conv

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
On Wed, Jan 7, 2015 at 2:41 PM, Ilia Mirkin wrote: > On Wed, Jan 7, 2015 at 5:56 AM, Marek Olšák wrote: >> From: Marek Olšák >> >> set_shader_resources is unused. >> >> set_shader_buffers should support shader atomic counter buffers and shader >> storage buffers from OpenGL. >> >> The plan is to

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Aditya Avinash
On Wed, Jan 7, 2015 at 4:56 AM, Marek Olšák wrote: > From: Marek Olšák > > set_shader_resources is unused. > > set_shader_buffers should support shader atomic counter buffers and shader > storage buffers from OpenGL. > > The plan is to use slots 0..15 for atomic counters and slots 16..31 > for s

Re: [Mesa-dev] [PATCH v3 14/24] mesa: Autogenerate most of format_pack.c

2015-01-07 Thread Jason Ekstrand
On Jan 7, 2015 4:45 AM, "Samuel Iglesias Gonsálvez" wrote: > > On Monday, December 15, 2014 12:30:27 PM Samuel Iglesias Gonsálvez wrote: > > On Thursday, December 11, 2014 11:55:10 AM Jason Ekstrand wrote: > > > On Tue, Dec 9, 2014 at 4:06 AM, Iago Toral Quiroga > > > wrote: > > > > > > [snip] >

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
On Wed, Jan 7, 2015 at 3:44 PM, Aditya Avinash wrote: > > > On Wed, Jan 7, 2015 at 4:56 AM, Marek Olšák wrote: >> >> From: Marek Olšák >> >> set_shader_resources is unused. >> >> set_shader_buffers should support shader atomic counter buffers and shader >> storage buffers from OpenGL. >> >> The

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Aditya Avinash
Oh. So, we get better performance if we use atomic counters as buffers rather than textures (images) [manipulating views are expensive]. Am I right? On Wed, Jan 7, 2015 at 8:52 AM, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 3:44 PM, Aditya Avinash > wrote: > > > > > > On Wed, Jan 7, 2015 at 4

Re: [Mesa-dev] [PATCH 06/16] glsl: fix assignment of multiple scalar and vecs to matrices.

2015-01-07 Thread Samuel Iglesias Gonsálvez
This is still awaiting for comments. Sam On Thursday, December 11, 2014 11:34:12 PM Eduardo Lima Mitev wrote: > From: Samuel Iglesias Gonsalvez > > When a vec has more elements than row components in a matrix, the > code could end up failing an assert inside assign_to_matrix_column(). > > This

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 9:35 AM, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 2:41 PM, Ilia Mirkin wrote: >> On Wed, Jan 7, 2015 at 5:56 AM, Marek Olšák wrote: >>> From: Marek Olšák >>> >>> set_shader_resources is unused. >>> >>> set_shader_buffers should support shader atomic counter buffers and

Re: [Mesa-dev] [PATCH 118/133] nir: Add a sampler index indirect to nir_tex_instr

2015-01-07 Thread Connor Abbott
On Tue, Jan 6, 2015 at 6:36 PM, Jason Ekstrand wrote: > > > On Mon, Jan 5, 2015 at 10:45 PM, Connor Abbott wrote: >> >> I created nir_tex_src_sampler_index for exactly this purpose, which >> fits in with the "stick all the sources in an array so we can easily >> iterate over them" philosophy. If

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-07 Thread Tom Stellard
On Wed, Jan 07, 2015 at 12:58:12PM +0100, Marek Olšák wrote: > How about the attached patch? > Looks good, thanks. Reviewed-by: Tom Stellard > Marek > > On Wed, Jan 7, 2015 at 1:23 AM, Tom Stellard wrote: > > On Wed, Jan 07, 2015 at 01:13:37AM +0100, Marek Olšák wrote: > >> Neither. It's bec

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
On Wed, Jan 7, 2015 at 2:42 PM, Aditya Avinash wrote: > Hi, > Sounds great but, do you think a separate buffer pipe is required for this? > Changing Constant buffer to a generic buffer (with alu+load+store) can help. No, constant buffers should remain unchanged. > > What about for R600? Do we ha

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Alex Deucher
On Wed, Jan 7, 2015 at 11:29 AM, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 2:42 PM, Aditya Avinash > wrote: >> Hi, >> Sounds great but, do you think a separate buffer pipe is required for this? >> Changing Constant buffer to a generic buffer (with alu+load+store) can help. > > No, constant buf

[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 Signed-off-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- src/gallium/s

[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 Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/basetexture9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/basetexture

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

2015-01-07 Thread Axel Davy
The implicit swapchains are destroyed when the device instance is destroyed. However for non-implicit swapchains, it is not the case, and the application can have kept an reference on the swapchain buffers to reuse them. Fixes problems with battle.net launcher. Cc: "10.4" Tested-by: Nick Sarnie

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

2015-01-07 Thread Axel Davy
From: David Heidelberg Signed-off-by: David Heidelberg Reviewed-by: Axel Davy --- 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/query9.c index 6df4ead..466b4ba 100644 --- a

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

2015-01-07 Thread Axel Davy
From: xavier It's done by testing the existence of the point sprite output register *after* parsing the vertex shader. Reviewed-by: David Heidelberg Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 6 +++--- 1 file change

[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
From: Stanislaw Halik Buffers in the MANAGED pool are supposed to have the content in a ram buffer, a copy in VRAM if there is enough memory (driver manages memory and decide when to delete the buffer in VRAM). This is not implemented properly in nine, and a VRAM copy is going to be created when

[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 Cc: "10.4" --- src/gallium/state_trackers/nine/device9.c| 35 +--- src/gallium/state_trackers/nine/device9.h| 6 ++--- src/gallium/state_trackers/nine/nine_state.c | 13 +++ 3 fil

[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 Cc: "10.4" --- src/gallium/state_trackers/nine/adapter9.c | 4 +++- 1 file changed, 3 insertions(+), 1 d

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

2015-01-07 Thread Axel Davy
From: xavier Reviewed-by: David Heidelberg Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- include/D3D9/d3d9types.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/D3D9/d3d9types.h b/include/D3D9/d3d9types.h index 0a8f9e5..e53e389 100644 --- a/in

[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
Reviewed-by: David Heidelberg Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 8 src/gallium/state_trackers/nine/texture9.c | 9 - src/gallium/state_trackers/nine/volumetexture9.c | 10 +- 3 files changed, 25 insertions(+), 2 delet

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

2015-01-07 Thread Axel Davy
Most of the patches of this serie are fixes, that's why most of them are CC 10.4 The patches can be retrived here: https://github.com/iXit/Mesa-3D/tree/submit_mesa Some of them may not appear directly as fixes, so little explanation is required: "st/nine: Add ATI1 and ATI2 support" These two co

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

2015-01-07 Thread Axel Davy
Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- include/D3D9/d3d9types.h| 3 +++ src/gallium/state_trackers/nine/nine_pipe.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/D3D9/d3d9types.h b/include/D3D9/d3d9types.h index e53e389..456a

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

2015-01-07 Thread Axel Davy
From: xavier Reviewed-by: David Heidelberg Reviewed-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- include/D3D9/d3d9.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/D3D9/d3d9.h b/include/D3D9/d3d9.h index f872be7..e8b5214 100644 --- a/include/D3D9/d3d9

[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 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/s

[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 Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_

[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 --- src/gallium/state_trackers/nine/nine_shader.c | 41 +++ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/gallium/state_t

[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 Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 46 +-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/gallium/

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

2015-01-07 Thread Axel Davy
Relative addressing needs the constant buffer to get all the correct constants, even those defined by the shader. The code to copy the shader constants to the constant buffer was enabled only for debug build. Enable it always. Cc: "10.4" Reviewed-by: David Heidelberg Signed-off-by: Axel Davy -

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- 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/nine_shader.c index c484e7c..02fb69e 100644 ---

[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 Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/basetexture9.c | 11 ++- src/gallium/state_trackers/nine/surface9.c | 10 +- 2 files chan

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- 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 index a6bd360..d2b30f8 100644 --- a/src/gallium/stat

[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 Cc: "10.4" --- 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(+), 6 deletions(-) diff --git a/src/gallium/state

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- 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/state_trackers/nine/nine_shader.c index 440f6f7..ac86

[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 Cc: "10.4" --- src/gallium/state_trackers/nine/device9.c | 65 --- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/src/gall

[Mesa-dev] [PATCH 23/53] st/nine: Fix POW implementation

2015-01-07 Thread Axel Davy
POW doesn't match directly TGSI, since we should take the absolute value of src0. Fixes black textures in some games Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 13 - 1 file changed, 12 insertions(+), 1 del

[Mesa-dev] [PATCH 36/53] st/nine: Fix TEXM3x3 and implement TEXM3x3VSPEC

2015-01-07 Thread Axel Davy
The fix is that this line: "src[s] = tx->regs.vT[s];" is wrong if s doesn't start from 0. Instead access tx->regs.vT directly when needed. Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 53 ++- 1 file changed, 36 insertions(+), 17

[Mesa-dev] [PATCH 31/53] st/nine: Clamp ps 1.X constants

2015-01-07 Thread Axel Davy
This is wine (and windows) behaviour. Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 3fefce4..f

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

2015-01-07 Thread Axel Davy
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. Reviewed-by: David Heidelberg Signed-off-by: Axel Dav

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Signed-off-by: Tiziano Bacocco Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader

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

2015-01-07 Thread Axel Davy
ps3 allows definitions of the inputs like: DCL_TEXCOORD0 v0.xy; DCL_NORMAL2 v0.z; DCL_NORMAL3 v0.w; Nine wouldn't have handled this situation properly. Apparently very few applications use this feature. Still remain an issue with this new implementation: It is allowed to do indirect addressing o

[Mesa-dev] [PATCH 21/53] st/nine: Correctly declare NineTranslateInstruction_Mkxn inputs

2015-01-07 Thread Axel Davy
Let's say we have c1 and c2 declared in the shader and c0 given by the app Then here we would have read c0, c1 and c2 given by the app, instead of the correct c0, c1, c2. This correction fixes several issues in some games. Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nin

[Mesa-dev] [PATCH 45/53] st/nine: Correct rules for relative adressing and constants.

2015-01-07 Thread Axel Davy
relative adressing for constants is possible only for vs float constants. Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src

[Mesa-dev] [PATCH 40/53] st/nine: Implement TEXDEPTH

2015-01-07 Thread Axel Davy
Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_s

[Mesa-dev] [PATCH 46/53] st/nine: Remove unused code for ps

2015-01-07 Thread Axel Davy
Since constant indirect adressing is not allowed for ps, we can remove our code to handle that. Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_state.c | 43 +++--- src/gallium/state_trackers/nine/pixelshader9.c | 10 +++--- src/gallium/state_t

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

2015-01-07 Thread Axel Davy
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 Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 13 - 1 file changed, 12 insertions(+), 1 del

[Mesa-dev] [PATCH 53/53] st/nine: Correctly handle when ff vs should have no texture coord input/output

2015-01-07 Thread Axel Davy
Previous code semantic was: . if ff ps will not run a ff stage, then do not output texture coords for this stage for vs . if XYZRHW is used (position_t), use only the mode where input coordinates are copied to the outputs. Problem is when apps don't give texture inputs. When apps precise PASSTH

[Mesa-dev] [PATCH 22/53] st/nine: Fix typo for M4x4

2015-01-07 Thread Axel Davy
Cc: "10.4" Reviewed-by: David Heidelberg Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 0b378d5..6

[Mesa-dev] [PATCH 38/53] st/nine: Implement TEXM3x2TEX

2015-01-07 Thread Axel Davy
Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shad

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

2015-01-07 Thread Axel Davy
Previous implementation didn't work well with nested loops. Instead of using several address registers, put a0 and aL into normal registers, and copy them to one address register when we need to use them. Wine tests loop_index_test() and nested_loop_test() now pass correctly. Fixes r600g crash w

[Mesa-dev] [PATCH 51/53] st/nine: Explicit nine requirements

2015-01-07 Thread Axel Davy
This patch raises nine requirements and disables nine for old hw that don't match them. It would be possible to make a lot of things work with these hw, though not everything, but it needs special care for them in the code, and since they are very old, it's better to drop explicitly support for th

[Mesa-dev] [PATCH 39/53] st/nine: Implement TEXM3x3SPEC

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 20a8e8a..3b29

[Mesa-dev] [PATCH 26/53] st/nine: Correct LOG on negative values

2015-01-07 Thread Axel Davy
We should take the absolute value of the input. Also return -FLT_MAX instead of -Inf for an input of 0. Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-)

[Mesa-dev] [PATCH 50/53] st/nine: Allocate vs constbuf buffer for indirect addressing once.

2015-01-07 Thread Axel Davy
When the shader does indirect addressing on the constants, we allocate a temporary constant buffer to which we copy the constants from the app given user constants and the constants filled in the shader. This patch makes this buffer be allocated once. Signed-off-by: Axel Davy Signed-off-by: Tizi

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

2015-01-07 Thread Axel Davy
texcoord for ps < 1_4 should clamp between 0 and 1 the values. texcrd (texcoord ps 1_4) does not clamp and can be used with two modifiers _dw and _dz that means the channels are divided by w or z. Implement those in shared code, since the same modifiers can be used for texld ps 1_4. Signed-off-by

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy --- 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 09b4401..99173fa 100644 --- a/src/gallium/st

[Mesa-dev] [PATCH 33/53] st/nine: Fix CALLNZ implementation

2015-01-07 Thread Axel Davy
Nothing seems to indicates the negation modifier would be stored in the instruction flags instead of the source modifier. tx_src_param has already handled it if it is in the source modifier. In addition, when the card supports native integers, the boolean are stored in 32 bits int and are equal to

[Mesa-dev] [PATCH 30/53] st/nine: Remove duplicated code for ps texcoord input declaration

2015-01-07 Thread Axel Davy
Reviewed-by: David Heidelberg Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 8bcf67b..

[Mesa-dev] [PATCH 43/53] st/nine: Implement TEXREG2AR, TEXREG2GB and TEXREG2RGB

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 794a1db..9d4

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

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- 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/state_trackers/nine/nine_shader.c index fcc1c68..8b96673

[Mesa-dev] [PATCH 20/53] st/nine: Saturate oFog and oPts vs outputs

2015-01-07 Thread Axel Davy
According to docs and Wine, these two vs outputs have to be saturated. Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/ni

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

2015-01-07 Thread Axel Davy
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 Signed-off-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- src/gallium/state_trackers/nine/adapter9.c | 3 +++ src

[Mesa-dev] [PATCH 42/53] st/nine: Implement TEXDP3TEX

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_shader.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 02fb69e..794a1db 100

[Mesa-dev] [PATCH 25/53] st/nine: Handle NRM with input of null norm

2015-01-07 Thread Axel Davy
When the input's xyz are 0.0, the output should be 0.0. This is due to the fact that Inf * 0 = 0 for dx9. To handle this case, cap the result of RSQ to FLT_MAX. We have FLT_MAX * 0 = 0. Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/nine_

[Mesa-dev] [PATCH 49/53] st/nine: Allocate the correct size for the user constant buffer

2015-01-07 Thread Axel Davy
Signed-off-by: Axel Davy Cc: "10.4" --- src/gallium/state_trackers/nine/device9.c| 6 +++--- src/gallium/state_trackers/nine/nine_state.c | 7 --- src/gallium/state_trackers/nine/nine_state.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gallium/state_tracker

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
Yes. I expect lower overhead on SI. This interface should have no impact on r600g. Marek On Wed, Jan 7, 2015 at 3:59 PM, Aditya Avinash wrote: > Oh. So, we get better performance if we use atomic counters as buffers > rather than textures (images) [manipulating views are expensive]. > > Am I rig

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Aditya Avinash
Thank you! On Wednesday, January 7, 2015, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 2:42 PM, Aditya Avinash > wrote: > > Hi, > > Sounds great but, do you think a separate buffer pipe is required for > this? > > Changing Constant buffer to a generic buffer (with alu+load+store) can > help. > >

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > From: xavier Would be nice to fix up the from name... you can do this with 'git commit --amend --author asdf' or by reimporting the patch. > > Reviewed-by: David Heidelberg > Reviewed-by: Axel Davy > Signed-off-by: Xavier Bouchoux > > Cc: "

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > 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 > > Cc: "10.4" > --- > src/gallium/state_tr

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Reviewed-by: David Heidelberg > Signed-off-by: Axel Davy > --- > src/gallium/state_trackers/nine/cubetexture9.c | 8 > src/gallium/state_trackers/nine/texture9.c | 9 - > src/gallium/state_trackers/nine/volumetexture

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, 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 Heidelberg >

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

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 wrote: 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 Cc: "10.4"

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
On Wed, Jan 7, 2015 at 4:39 PM, Ilia Mirkin wrote: > On Wed, Jan 7, 2015 at 9:35 AM, Marek Olšák wrote: >> On Wed, Jan 7, 2015 at 2:41 PM, Ilia Mirkin wrote: >>> On Wed, Jan 7, 2015 at 5:56 AM, Marek Olšák wrote: From: Marek Olšák set_shader_resources is unused. set_sh

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Convert them to shader booleans at earlier stage Why? What's wrong with the conversion as it is now? > > Signed-off-by: Axel Davy > > Cc: "10.4" > --- > src/gallium/state_trackers/nine/device9.c| 35 > +--- > src

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Signed-off-by: Axel Davy > Cc: "10.4" > --- > 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

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy 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 > Signed-off-by: Axel Davy > Signed-off-by: Xavier Bouchoux > > Cc: "10.4"

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Roland Scheidegger
Hmm I'm not quite sure what to think of it. Apparently set_shader_resources was a closer match to what d3d does (seems to use UAVs for everything as far as I can tell, plus they are global and not per stage - I guess another reason why they were set together with RTs). I guess set_shader_buffers wo

Re: [Mesa-dev] [PATCH 118/133] nir: Add a sampler index indirect to nir_tex_instr

2015-01-07 Thread Jason Ekstrand
On Wed, Jan 7, 2015 at 7:55 AM, Connor Abbott wrote: > On Tue, Jan 6, 2015 at 6:36 PM, Jason Ekstrand > wrote: > > > > > > On Mon, Jan 5, 2015 at 10:45 PM, Connor Abbott > wrote: > >> > >> I created nir_tex_src_sampler_index for exactly this purpose, which > >> fits in with the "stick all the s

Re: [Mesa-dev] [PATCH 118/133] nir: Add a sampler index indirect to nir_tex_instr

2015-01-07 Thread Jason Ekstrand
On Wed, Jan 7, 2015 at 9:58 AM, Jason Ekstrand wrote: > > > On Wed, Jan 7, 2015 at 7:55 AM, Connor Abbott wrote: > >> On Tue, Jan 6, 2015 at 6:36 PM, Jason Ekstrand >> wrote: >> > >> > >> > On Mon, Jan 5, 2015 at 10:45 PM, Connor Abbott >> wrote: >> >> >> >> I created nir_tex_src_sampler_index

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy 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 > Signed-off-by: Axel Davy > > Cc: "10.4" > --- > src/gallium/state_trackers/nine/nine_

Re: [Mesa-dev] [PATCH 25/53] st/nine: Handle NRM with input of null norm

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > When the input's xyz are 0.0, the output > should be 0.0. This is due to the fact that > Inf * 0 = 0 for dx9. To handle this case, > cap the result of RSQ to FLT_MAX. We have > FLT_MAX * 0 = 0. > > Reviewed-by: David Heidelberg > Signed-off-by:

Re: [Mesa-dev] [PATCH 25/53] st/nine: Handle NRM with input of null norm

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 1:11 PM, Ilia Mirkin wrote: > On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: >> When the input's xyz are 0.0, the output >> should be 0.0. This is due to the fact that >> Inf * 0 = 0 for dx9. To handle this case, >> cap the result of RSQ to FLT_MAX. We have >> FLT_MAX *

[Mesa-dev] [RFC] mesa/st: Avoid passing a NULL buffer to the drivers

2015-01-07 Thread Tobias Klausmann
If we capture transform feedback from n stream in (n-1) buffers we face a NULL buffer, use the buffer (n-1) to capture the output of stream n. This fixes one piglit test with nvc0: arb_gpu_shader5-xfb-streams-without-invocations Signed-off-by: Tobias Klausmann --- src/mesa/state_tracker/st_c

Re: [Mesa-dev] [PATCH] mesa: Add mesa SHA-1 functions

2015-01-07 Thread Carl Worth
On Wed, Jan 07 2015, Jose Fonseca wrote: > I lost bit track of email over the Christmas period. Just noticed I had > flagged this one for replay. Sorry. No worries. Thanks for following up now. :-) > Do you still need me to test anything on Windows? If so are the patches > in some pull-able gi

[Mesa-dev] [PATCH] radeonsi: Fix crash when destroying si_screen

2015-01-07 Thread Tom Stellard
We need to dispose the cached LLVMTargetMachine before calling r600_destory_common_screen(), because this function frees the si_screen object which invalidates LLVMTargetMachine pointer. https://bugs.freedesktop.org/show_bug.cgi?id=88170 --- src/gallium/drivers/radeonsi/si_pipe.c | 6 -- 1 fi

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #15 from almos --- I tried l4d2 again with mesa 10.5-dev (git-1829f9c), and still nothing. Kernel is the same as before (3.17.7). Do I need to underclock my CPU to see the lag spikes? -- You are receiving this mail because: You are

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #16 from Stéphane Travostino --- Is it possible there's a weird interaction with PRIME? @almos, does your system have a muxless setup? My CPU isn't underclocked nor undervolted, and using the performance governor doesn't help in any

Re: [Mesa-dev] [PATCH 01/13] radeonsi: reduce the size of si_pm4_state

2015-01-07 Thread Tom Stellard
On Mon, Jan 05, 2015 at 12:18:40AM +0100, Marek Olšák wrote: > From: Marek Olšák > > - the relocs array is unused, remove it > - ndw is at most 115 (init), set 140 as the maximum > - compute needs 4 buffers per state, graphics only needs 1; set 4 as the > maximum The number of buffers per state

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

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Previous implementation was fine, > just instead of having increasing counter, > have a decreasing counter. > > Signed-off-by: Axel Davy > --- > src/gallium/state_trackers/nine/nine_shader.c | 41 > +++ > 1 file changed

  1   2   >