Re: [Mesa-dev] [PATCH] DD: Refactor BlitFramebuffer.

2015-01-30 Thread Jason Ekstrand
Quick question: Did you search for ReadBuffer and DrawBuffer as you went to make sure you didn't miss any? If the answer to the above is yes and the comment below is addressed, Reviewed-by: Jason Ekstrand This is going to help the PBO upload path a lot! --Jason On Fri, Jan 30, 2015 at 4:25 PM,

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

2015-01-30 Thread Axel Davy
The patch modifies the code used to check for format support. It needs to test for these flags for render targets because we create the back buffers with these. Probably these flags are not required for back buffers, I'll investigate. Axel On 31/01/2015 00:36, Marek Olšák wrote : I recommen

Re: [Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-30 Thread Jason Ekstrand
On Jan 30, 2015 7:58 PM, "Chris Forbes" wrote: > > With the new commit message, > > Reviewed-by: Chris Forbes I'll second that Reviewed-by: Jason Ekstrand > > On Sat, Jan 31, 2015 at 2:08 PM, Laura Ekstrand wrote: > > It's updated to: > > > > GL: Update glext.h to Khronos Revision 29537.

Re: [Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-30 Thread Chris Forbes
With the new commit message, Reviewed-by: Chris Forbes On Sat, Jan 31, 2015 at 2:08 PM, Laura Ekstrand wrote: > It's updated to: > > GL: Update glext.h to Khronos Revision 29537. > > Khronos Revision 29537 fixes ARB_direct_state_access function prototypes > that > had GLsizei where

[Mesa-dev] [PATCH] i965/pixel_read: Don't try to do a tiled_memcpy from a multisampled buffer

2015-01-30 Thread Jason Ekstrand
The GL spec guarantees that glGetTexImage will never get a multisampled texture, but this is not true for glReadPixels. If we get a multisampled buffer, we have to do a multisample resolve on it before we can pull the data down for the user. Since this isn't practical to handle in tiled_memcpy, w

[Mesa-dev] [PATCH 1/2] i965/vec4: Emit MADs from (x + -(y * z)).

2015-01-30 Thread Matt Turner
Same as commit c4fab711 to the fs backend. total instructions in shared programs: 5945998 -> 5945788 (-0.00%) instructions in affected programs: 74665 -> 74455 (-0.28%) helped:399 HURT: 180 It hurts some programs because we make

[Mesa-dev] [PATCH 2/2] i965/vec4: Emit MADs from (x + abs(y * z)).

2015-01-30 Thread Matt Turner
Same as commit 3654b6d4 to the fs backend. total instructions in shared programs: 5945788 -> 5945787 (-0.00%) instructions in affected programs: 36 -> 35 (-2.78%) helped:1 --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 18 +++--- 1 file change

Re: [Mesa-dev] [PATCH 2/5] i965: Add function to negate immediates.

2015-01-30 Thread Jason Ekstrand
On Fri, Jan 30, 2015 at 5:28 PM, Matt Turner wrote: > On Fri, Jan 30, 2015 at 4:02 PM, Jason Ekstrand > wrote: > > On Fri, Jan 30, 2015 at 3:54 PM, Matt Turner wrote: > >> --- > >> src/mesa/drivers/dri/i965/brw_shader.cpp | 37 > >> > >> src/mesa/drivers/dri/i9

Re: [Mesa-dev] r600g/sb: fix a bug in constants folding optimisation pass

2015-01-30 Thread Glenn Kennard
On Sat, 31 Jan 2015 01:36:30 +0100, Xavier B. wrote: r600g/sb: fix a bug in constants folding optimisation pass: ADD R6.y.1,R5.w.1, ~1|3f80 ADD R6.y.2,|R6.y.1|, -0.0001|b8d1b717 was wrongly being converted to ADD R6.y.1,R5.w.1, ~1|3f80 ADD

Re: [Mesa-dev] [PATCH 2/5] i965: Add function to negate immediates.

2015-01-30 Thread Matt Turner
On Fri, Jan 30, 2015 at 4:02 PM, Jason Ekstrand wrote: > On Fri, Jan 30, 2015 at 3:54 PM, Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_shader.cpp | 37 >> >> src/mesa/drivers/dri/i965/brw_shader.h | 1 + >> 2 files changed, 38 insertions(+) >> >>

Re: [Mesa-dev] [PATCH 08/21] main: Add entry point for NamedBufferSubData.

2015-01-30 Thread Laura Ekstrand
On Wed, Jan 21, 2015 at 6:42 PM, Ian Romanick wrote: > On 01/21/2015 05:40 PM, Laura Ekstrand wrote: > > --- > > src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ > > src/mesa/main/bufferobj.c | 150 > - > > src/mesa/main/bufferobj.h

Re: [Mesa-dev] [PATCH 03/21] GL: Correct function arguments for NamedBufferStorage.

2015-01-30 Thread Laura Ekstrand
There's a patch to replace these now: GL: Update glext.h to Khronos Revision 29537. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-30 Thread Laura Ekstrand
It's updated to: GL: Update glext.h to Khronos Revision 29537. Khronos Revision 29537 fixes ARB_direct_state_access function prototypes that had GLsizei where they should have had GLsizeiptr. The mainly affects functions related to buffer objects. _

Re: [Mesa-dev] [PATCH] r600g: add polygon stipple support

2015-01-30 Thread Marek Olšák
Hi Dave, R600 supports 18 samplers per shader, so you can use a fixed slot outside of the API range (16 or 17) and bind the stipple texture statically there. The motivation is that you won't have to read the shader to get the slot number, so it will be completely independent. You don't have to unb

[Mesa-dev] r600g/sb: fix a bug in constants folding optimisation pass

2015-01-30 Thread Xavier B.
r600g/sb: fix a bug in constants folding optimisation pass: ADD R6.y.1,R5.w.1, ~1|3f80 ADD R6.y.2,|R6.y.1|, -0.0001|b8d1b717 was wrongly being converted to ADD R6.y.1,R5.w.1, ~1|3f80 ADD R6.y.2,R5.w.1, -1.0001|bf800347 because abs() modif

[Mesa-dev] [bug 47201] r600g: fix abs() support on ALU 3-source-operands instructions

2015-01-30 Thread Xavier B.
Hi, Since alu does not support abs() modifier on source operands, spill and apply the modifiers to a temp register when needed. fixes https://bugs.freedesktop.org/show_bug.cgi?id=47201 I got hit by this bug while testing and debugging a game using the st/nine. And I made a tentative fix that wo

Re: [Mesa-dev] [PATCH] nir: Add an ALU op builder kind of like ir_builder.h

2015-01-30 Thread Connor Abbott
I mentioned this on IRC, but it would be good to add the ability to append the sequence of instructions before/after an instruction as well as at the beginning or end of a basic block. We would need to store the current basic block, the current instruction, and an enum consisting of "insert before

Re: [Mesa-dev] [PATCH 19/22] glsl: Add a saturate range optimization

2015-01-30 Thread Matt Turner
On Sat, Jan 3, 2015 at 2:16 PM, Matt Turner wrote: > On Sat, Jan 3, 2015 at 11:18 AM, Thomas Helland > wrote: >> This improves one shader from Brutal Legend. >> It does a lrp that yields a result larger than 1, >> that then gets saturated. This is replaced by a constant 1. > > Not a comment on yo

[Mesa-dev] [PATCH] DD: Refactor BlitFramebuffer.

2015-01-30 Thread Laura Ekstrand
In preparation for glBlitNamedFramebuffer, the DD table function BlitFramebuffer needs to accept two arbitrary framebuffer objects rather than assuming ctx->ReadBuffer and ctx->DrawBuffer. --- src/mesa/drivers/common/meta.c| 3 +- src/mesa/drivers/common/meta.h

Re: [Mesa-dev] [PATCH 2/5] i965: Add function to negate immediates.

2015-01-30 Thread Jason Ekstrand
On Fri, Jan 30, 2015 at 3:54 PM, Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_shader.cpp | 37 > > src/mesa/drivers/dri/i965/brw_shader.h | 1 + > 2 files changed, 38 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp > b/src/m

[Mesa-dev] [PATCH 4/5] i965/vec4: Use abs/negate functions in const propagation.

2015-01-30 Thread Matt Turner
No changes in shader-db. --- .../drivers/dri/i965/brw_vec4_copy_propagation.cpp | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp index bf159

[Mesa-dev] [PATCH 5/5] i965/fs: Add support for constant propagating into sources with modifiers.

2015-01-30 Thread Matt Turner
All but 16 of the programs helped were ARB fp programs. total instructions in shared programs: 5949286 -> 5945470 (-0.06%) instructions in affected programs: 275162 -> 271346 (-1.39%) helped:1197 GAINED:1 --- src/mesa/drivers/dri

[Mesa-dev] [PATCH 1/3] glsl: Add trunc() to ir_builder.

2015-01-30 Thread Matt Turner
--- src/glsl/ir_builder.cpp | 5 + src/glsl/ir_builder.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index a2f6f29..2872c51 100644 --- a/src/glsl/ir_builder.cpp +++ b/src/glsl/ir_builder.cpp @@ -246,6 +246,11 @@ ir_expression *borro

[Mesa-dev] [PATCH 1/5] i965: Mark UB/B immediates as unreachable.

2015-01-30 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 678390e..c393bfc 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/driv

[Mesa-dev] [PATCH 3/5] i965: Add function to take the abs of immediates.

2015-01-30 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 36 src/mesa/drivers/dri/i965/brw_shader.h | 1 + 2 files changed, 37 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index ff2edf3..81e9cca 100644 --

[Mesa-dev] [PATCH 2/5] i965: Add function to negate immediates.

2015-01-30 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 37 src/mesa/drivers/dri/i965/brw_shader.h | 1 + 2 files changed, 38 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index c393bfc..ff2edf3 100644 --

[Mesa-dev] [PATCH 2/3] glsl: Optimize round-half-up pattern.

2015-01-30 Thread Matt Turner
Hurts some Psychonauts shaders, but after the next patch (which this enables) they're fewer instructions than before this patch. --- src/glsl/opt_algebraic.cpp | 33 + 1 file changed, 33 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic

[Mesa-dev] [PATCH 3/3] glsl: Optimize (f2i(trunc x)) into (f2i x).

2015-01-30 Thread Matt Turner
total instructions in shared programs: 5950326 -> 5949286 (-0.02%) instructions in affected programs: 88264 -> 87224 (-1.18%) helped:692 --- src/glsl/opt_algebraic.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/

[Mesa-dev] [PATCH] i965: Add LINTERP/CINTERP to can_do_cmod().

2015-01-30 Thread Matt Turner
LINTERP is implemented as a PLN instruction or a LINE+MAC. PLN and MAC can do conditional mod. CINTERP is just a MOV. total instructions in shared programs: 5952103 -> 5950284 (-0.03%) instructions in affected programs: 324573 -> 322754 (-0.56%) helped:1819 We

Re: [Mesa-dev] [PATCH v2 1/2] teximage: Don't indent switch cases

2015-01-30 Thread Matt Turner
Both look good to me. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH v2 2/2] main: Add STENCIL_INDEX formats to base_tex_format

2015-01-30 Thread Jason Ekstrand
This fixes a bug on BDW when our meta-based stencil blit path assert-fails due to an invalid internal format even though we do support the ARB_stencil_texturing extension. --- src/mesa/main/teximage.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/me

[Mesa-dev] [Bug 88885] Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position

2015-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=5 Bug ID: 5 Summary: Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position Product: Mesa Version: git Hardware: x86-64 (AMD64)

[Mesa-dev] [PATCH v2 1/2] teximage: Don't indent switch cases

2015-01-30 Thread Jason Ekstrand
No functional change. --- src/mesa/main/teximage.c | 292 +++ 1 file changed, 146 insertions(+), 146 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 03264dd..e067078 100644 --- a/src/mesa/main/teximage.c +++ b/src/mes

[Mesa-dev] Fwd: [PATCH 06/21] main: Add entry point for NamedBufferData.

2015-01-30 Thread Laura Ekstrand
-- Forwarded message -- From: Laura Ekstrand Date: Fri, Jan 30, 2015 at 3:42 PM Subject: Re: [Mesa-dev] [PATCH 06/21] main: Add entry point for NamedBufferData. To: Ian Romanick On Wed, Jan 21, 2015 at 6:28 PM, Ian Romanick wrote: > On 01/21/2015 05:40 PM, Laura Ekstrand wro

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

2015-01-30 Thread Marek Olšák
I 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 wrote: > Signed-off-by: Axel Davy >

Re: [Mesa-dev] [PATCH] main: Add STENCIL_INDEX formats to base_tex_format

2015-01-30 Thread Matt Turner
On Fri, Jan 30, 2015 at 3:05 PM, Jason Ekstrand wrote: >> On Fri, Jan 30, 2015 at 3:03 PM, Matt Turner wrote: >> On Fri, Jan 30, 2015 at 2:27 PM, Jason Ekstrand >> wrote: >> > This fixes a bug on BDW when our meta-based stencil blit path >> > assert-fails >> > due to an invalid internal format e

Re: [Mesa-dev] [PATCH 2/2] intel/pixel_read: Properly flip the results for window system buffers

2015-01-30 Thread Matt Turner
On Wed, Jan 28, 2015 at 3:36 AM, Jason Ekstrand wrote: > https://bugs.freedesktop.org/show_bug.cgi?id=88841 Bugzilla: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] main: Add STENCIL_INDEX formats to base_tex_format

2015-01-30 Thread Jason Ekstrand
On Fri, Jan 30, 2015 at 3:03 PM, Matt Turner wrote: > On Fri, Jan 30, 2015 at 2:27 PM, Jason Ekstrand > wrote: > > This fixes a bug on BDW when our meta-based stencil blit path > assert-fails > > due to an invalid internal format even though we do support the > > ARB_stencil_texturing extension.

Re: [Mesa-dev] [PATCH] main: Add STENCIL_INDEX formats to base_tex_format

2015-01-30 Thread Matt Turner
On Fri, Jan 30, 2015 at 2:27 PM, Jason Ekstrand wrote: > This fixes a bug on BDW when our meta-based stencil blit path assert-fails > due to an invalid internal format even though we do support the > ARB_stencil_texturing extension. > --- > src/mesa/main/teximage.c | 10 ++ > 1 file chang

Re: [Mesa-dev] [PATCH 2/2] intel/pixel_read: Properly flip the results for window system buffers

2015-01-30 Thread Chad Versace
On 01/28/2015 03:36 AM, Jason Ekstrand wrote: > https://bugs.freedesktop.org/show_bug.cgi?id=88841 > --- > src/mesa/drivers/dri/i965/intel_pixel_read.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c > b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 1/2] i965/tiled_memcpy: Support a signed linear pitch

2015-01-30 Thread Chad Versace
On 01/28/2015 03:36 AM, Jason Ekstrand wrote: > Cc: Chad Versace > --- > src/mesa/drivers/dri/i965/intel_tiled_memcpy.c | 30 > +- > src/mesa/drivers/dri/i965/intel_tiled_memcpy.h | 4 ++-- > 2 files changed, 17 insertions(+), 17 deletions(-) > > diff --git a/src/mesa/d

[Mesa-dev] [PATCH] main: Add STENCIL_INDEX formats to base_tex_format

2015-01-30 Thread Jason Ekstrand
This fixes a bug on BDW when our meta-based stencil blit path assert-fails due to an invalid internal format even though we do support the ARB_stencil_texturing extension. --- src/mesa/main/teximage.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/me

[Mesa-dev] [Bug 67676] Transparent windows no longer work

2015-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67676 Chad Versace changed: What|Removed |Added Version|9.1 |git --- Comment #10 from Chad Versace --

Re: [Mesa-dev] [PATCH 1/4] main: make the intel driver obey drirc's force_glsl_version

2015-01-30 Thread Kenneth Graunke
On Friday, January 30, 2015 04:19:47 PM Martin Peres wrote: > Reviewed-by: Kenneth Graunke > Signed-off-by: Martin Peres > --- > src/mesa/drivers/dri/i915/intel_screen.c | 1 + > src/mesa/drivers/dri/i965/brw_context.c | 3 +++ > src/mesa/drivers/dri/i965/intel_screen.c | 1 + > 3 files changed

Re: [Mesa-dev] [PATCH 1/4] main: make the intel driver obey drirc's force_glsl_version

2015-01-30 Thread Marek Olšák
The commit message prefix should be "intel:" in this case. Marek On Fri, Jan 30, 2015 at 3:19 PM, Martin Peres wrote: > Reviewed-by: Kenneth Graunke > Signed-off-by: Martin Peres > --- > src/mesa/drivers/dri/i915/intel_screen.c | 1 + > src/mesa/drivers/dri/i965/brw_context.c | 3 +++ > src/

Re: [Mesa-dev] [PATCH 1/2] mesa: add a workaround for unigine Tropics

2015-01-30 Thread Marek Olšák
Thanks for adding Gallium support. Reviewed-by: Marek Olšák Marek On Thu, Jan 29, 2015 at 10:14 PM, Martin Peres wrote: > While trying to understand a GLSL pass, curro and I tried running Unigine > Tropics and the GLSL compilers would not compile the shaders. > > The reason is due to the fact

[Mesa-dev] [PATCH] nir: Add an ALU op builder kind of like ir_builder.h

2015-01-30 Thread Eric Anholt
v2: Rebase on the nir_opcodes.h python code generation support. v3: Use SSA values, and set an appropriate writemask on dot products. v4: Make the arguments be SSA references as well. This lets you stack up expressions in the arguments of other expressions, at the cost of having to insert

[Mesa-dev] [Bug 88880] glxextensions.c: buffer overflow and incorrect zeroing

2015-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=0 Heinrich Schuchardt changed: What|Removed |Added CC||xypron.g...@gmx.de -- You are rec

[Mesa-dev] [Bug 88880] glxextensions.c: buffer overflow and incorrect zeroing

2015-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=0 Bug ID: 0 Summary: glxextensions.c: buffer overflow and incorrect zeroing Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: nor

[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 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 Signed-off-by: Tiziano Bacocco --- sr

[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 --- 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/state_trackers/nin

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph This->data was allocated by nine, but not freed. Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/volume9.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trac

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

2015-01-30 Thread Axel Davy
This depth buffer format, like D3DFMT_INTZ, can be used to read the depth buffer values when bound to a shader. Some apps may use this format to get better performance when they don't need the precision of INTZ (24 bits for depth, 8 for stencil, whereas DF16 is just 16 bits for depth) We don't ad

[Mesa-dev] [PATCH 33/43] st/nine: Fix gpu memory leak in swapchain

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapchain9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c index a6e9c57..9db6ff4 100644 --- a/src/gallium/state_tracke

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph Likely a rebase error Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/resource9.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/resource9.c b/src/gallium/state_trackers/nine/resource9.c in

[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 --- src/gallium/state_trackers/nine/nine_pipe.h |

[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 --- src/gallium/state_trackers/nine/nine_pipe.c | 123 ++-- 1 file changed, 44 insertions(

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

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco Reviewed-by: Axel Davy Signed-off-by: Tiziano Bacocco --- include/D3D9/d3d9types.h| 1 + src/gallium/state_trackers/nine/nine_pipe.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/D3D9/d3d9types.h b/include/D3D9/d3d9types.h index 5020934

[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 --- src/gallium/targets/d3dadapter9/drm.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targe

[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 Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/vertexdeclaration9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/verte

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

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- 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/src/gallium/state_t

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

2015-01-30 Thread Axel Davy
When on a render node the unique ioctl doesn't work. This patch drops the code to detect the device, which relied on an ioctl, and replaces it by the mesa loader function. The mesa loader function is more complete and won't fail for render-nodes. Alternatively we could also have used the pipe cap

[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 --- src/gallium/targets/d3dadapter9/drm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/s

[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 --- 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..5eb9d54 100644 --- a/s

[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 --- src/gallium/state_trackers/nine/nine_state.c | 46 +--- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/gallium/stat

[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 --- src/gallium/state_trackers/nine/n

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

2015-01-30 Thread Axel Davy
This fixes a wine test and some minor visual issues on some games. The patch is not optimal, there is probably a more efficient way to fix this issue, but the code there already has some innefficiencies. There is plans to rewrite that part of the code to make it more efficient. Signed-off-by: Axe

[Mesa-dev] [PATCH 06/43] st/nine: Check for the correct number of constants.

2015-01-30 Thread Axel Davy
This removes unneeded hack for Anno 1404. This app is not checking the number of supporting constants, and rely on the shader compilation to fail if it puts too many constants. This patch also checks for the correct number of constants for ps. Note that we don't check the official limitations for

[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 --- src/gallium/state_trackers/nine/sw

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

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- 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/surface9.c +++ b

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph 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 Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/device9.c | 10 +- 1 file changed, 5 in

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph Add returncode E_FAIL. Return E_FAIL for any vertexdeclaration element with type unused. Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- include/D3D9/d3d9types.h | 1 + src/gallium/state_trackers/nine/vertexdeclaration9.c | 7 ---

[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 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/gall

[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 --- src/gallium/state_trackers/nine/adapter9.c | 87 +++

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

2015-01-30 Thread Axel Davy
This D3D hack allows to resolve a multisampled depth buffer into a single sampled one. Note that the implementation is slightly incorrect. When querying the content of D3DRS_POINTSIZE, it should return the resz code if it has been set. This behaviour will be implemented when state changes will be

[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 --- 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/gallium/state_trackers/

[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 --- 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 84469b1..84578ac 1006

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

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco Reviewed-by: Axel Davy Reviewed-by: David Heidelberg Signed-off-by: Tiziano Bacocco --- include/D3D9/d3d9types.h| 1 + src/gallium/state_trackers/nine/nine_pipe.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/D3D9/d3d9types.h b/include

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

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- 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 +++ src/gallium/state_t

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

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- 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 +-- 4 fi

[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 --- include/D3D9/d3d9types.h | 1 + src/gallium/state_trackers/nine/adapter9.c | 4 src/gallium/state_trackers/ni

[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 Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/surface9.c | 24 1 file changed, 24 insertions(+) diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c inde

[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 --- src/gallium/state_trackers/nine/nine_shader.c | 38 +-- 1 file changed, 30 insertions(+), 8 deletions(

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

2015-01-30 Thread Axel Davy
Because the debug output of this function was cut in two parts, sometimes the second part wasn't print when we would return earlier, whereas we would like to get it. The reason of the separation was that it's only at the end of the function we can print what we map to the d3d9 arguments, but we ca

[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 --- src/gallium/state_trackers/nine/nine_shader.c | 17 ++--- src/gallium/state_trackers/nine/nine_shader.h | 22 ++ src/gallium

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

2015-01-30 Thread Axel Davy
From: Tiziano Bacocco Signed-off-by: Tiziano Bacocco --- 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 a/src/gallium/state_trackers/nine/device9.c b/src/gallium/stat

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph Fixes wine test test_vertex_declaration_alignment() Reviewed-by: Axel Davy Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/vertexdeclaration9.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/verte

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

2015-01-30 Thread Axel Davy
Signed-off-by: Axel Davy --- 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 --- a/src/gallium/state_

[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 --- src/gallium/state_trackers/nine/device9.c| 17 +++-- src/gallium/state_trackers/nine/nine_pipe.c | 2 +- src/gallium/state_trackers/nin

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

2015-01-30 Thread Axel Davy
Previously 276 constants were declared everytime. This patch makes shaders declare constants up to the maximum constant needed and moves the moment we print the TGSI shader after the moment we declare the constants. This is needed for r500, since when indirect addressing is used, it cannot reduce

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

2015-01-30 Thread Axel Davy
This patch raises nine requirements and disables nine for old hw that don't match them. Currently for these cards only games that don't have tight requirements would work well with nine. However nine is missing several checks regarding these limitations. To make code and future patches less heavy,

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

2015-01-30 Thread Axel Davy
From: Patrick Rudolph 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 Signed-off-by: Patrick Rudolph --- src/gallium/state_trackers/nine/device9.c | 6 ++ 1 file changed, 6 inser

Re: [Mesa-dev] [PATCH 3/3] mesa: remove some dead display list code

2015-01-30 Thread Matt Turner
All three are Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 3/4] drirc: add workarounds for Unigine Tropics

2015-01-30 Thread Glenn Kennard
On Fri, 30 Jan 2015 15:19:49 +0100, Martin Peres wrote: Signed-off-by: Martin Peres --- src/mesa/drivers/dri/common/drirc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc index cecd6a9..073814e 100644 --- a/s

Re: [Mesa-dev] [PATCH 3/4] drirc: add workarounds for Unigine Tropics

2015-01-30 Thread Ilia Mirkin
On Fri, Jan 30, 2015 at 6:19 AM, Martin Peres wrote: > Signed-off-by: Martin Peres > --- > src/mesa/drivers/dri/common/drirc | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/mesa/drivers/dri/common/drirc > b/src/mesa/drivers/dri/common/drirc > index cecd6a9..073814e 100644 >

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

2015-01-30 Thread Roland Scheidegger
Am 29.01.2015 um 22:39 schrieb Axel Davy: > Hi, > > for Gallium Nine we use ARR and UARL. > > Do all cards supporting integers support indexing with an integer > register ? > If yes we could remove our UARL usage. The idea would indeed have been that drivers would just do that on their own if the

[Mesa-dev] [Bug 88662] unaligned access to gl_dlist_node

2015-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88662 Brian Paul changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

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

2015-01-30 Thread Roland Scheidegger
Am 30.01.2015 um 00:06 schrieb Brian Paul: > On 01/29/2015 02:20 PM, 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 to deal with this. Even t

[Mesa-dev] [PATCH 2/3] mesa: remove stale comment in dlist.c code

2015-01-30 Thread Brian Paul
sizeof(Node) is always 4 bytes. --- src/mesa/main/dlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 0f0d95c..0058a87 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -579,7 +579,7 @@ get_pointer(const No

[Mesa-dev] [PATCH 3/3] mesa: remove some dead display list code

2015-01-30 Thread Brian Paul
The size of a Node is always four bytes so no need for the old code that was used when sizeof(Node)==8. --- src/mesa/main/dlist.c | 91 +++ 1 file changed, 11 insertions(+), 80 deletions(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c

  1   2   >