[Mesa-dev] [PATCH] nouveau: Explicitly upcast operands so mulitplication is 64-bit.

2013-08-29 Thread Vinson Lee
Fixes "Unintentional integer overflow" defects reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/nouveau_vp3_video.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.h b/src/gallium/drivers/nouvea

Re: [Mesa-dev] [PATCH 21/22] i965/gen7: Generalize gen7_vs_state in preparation for GS.

2013-08-29 Thread Kenneth Graunke
On 08/29/2013 04:06 PM, Eric Anholt wrote: The struct argument is what makes me cringe. If upload_vs_state() was: static void upload_vs_state(struct brw_context *brw) { struct gl_context *ctx = &brw->ctx; uint32_t floating_point_mode = 0; const int max_threads_shift = brw->is_haswell

Re: [Mesa-dev] [PATCH 08/22] i965/gs: Allocate URB space for use by GS.

2013-08-29 Thread Chad Versace
On 08/26/2013 03:12 PM, Paul Berry wrote: + /* VS always requires at least 32 URB entries */ Haswell GT2 and GT3 require at least 64 URB entries. + unsigned vs_chunks = + ALIGN(32 * vs_entry_size_bytes, chunk_size_bytes) / chunk_size_bytes; + unsigned vs_wants = + ALIGN(brw->

Re: [Mesa-dev] [PATCH 01/22] i965: rename legacy gs structs and functions to ff_gs.

2013-08-29 Thread Chad Versace
@@ -208,7 +209,7 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c, * the allocated URB entry (which will be needed by the URB_WRITE meesage that * follows). */ -static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim) +static void brw_ff_gs_ff_sync(struct brw_ff_gs_

Re: [Mesa-dev] [PATCH 01/22] i965: rename legacy gs structs and functions to ff_gs.

2013-08-29 Thread Paul Berry
On 29 August 2013 15:56, Chad Versace wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> "ff" is for "fixed function". This frees up the name "gs" to refer to >> user-defined geometry shaders. >> --- >> src/mesa/drivers/dri/i965/brw_**context.h | 14 +-- >> src/mesa/drivers/dri/i96

Re: [Mesa-dev] [PATCH 21/22] i965/gen7: Generalize gen7_vs_state in preparation for GS.

2013-08-29 Thread Eric Anholt
Kenneth Graunke writes: > On 08/26/2013 03:12 PM, Paul Berry wrote: >> --- >> src/mesa/drivers/dri/i965/brw_state.h | 41 ++ >> src/mesa/drivers/dri/i965/gen7_vs_state.c | 123 >> -- >> 2 files changed, 122 insertions(+), 42 deletions(-) >> >> diff --

Re: [Mesa-dev] [PATCH 07/22] i965: Make CACHE_NEW_GS_PROG.

2013-08-29 Thread Chad Versace
Patches 6-7 are Reviewed-by: Chad Versace ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 05/22] i965: Move data from brw->vs into a base class if gs will also need it.

2013-08-29 Thread Chad Versace
On 08/29/2013 03:51 PM, Paul Berry wrote: On 29 August 2013 15:46, Eric Anholt wrote: Kenneth Graunke writes: On 08/26/2013 03:12 PM, Paul Berry wrote: This paves the way for sharing the code that will set up the vertex and geometry shader pipeline state. --- src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 04/22] i965/gs: Update defines related to GS surface organization.

2013-08-29 Thread Chad Versace
Patches 2-4 are Reviewed-by: Chad Versace ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 01/22] i965: rename legacy gs structs and functions to ff_gs.

2013-08-29 Thread Chad Versace
On 08/26/2013 03:12 PM, Paul Berry wrote: "ff" is for "fixed function". This frees up the name "gs" to refer to user-defined geometry shaders. --- src/mesa/drivers/dri/i965/brw_context.h | 14 +-- src/mesa/drivers/dri/i965/brw_gs.c | 42 src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH 05/22] i965: Move data from brw->vs into a base class if gs will also need it.

2013-08-29 Thread Paul Berry
On 29 August 2013 15:46, Eric Anholt wrote: > Kenneth Graunke writes: > > > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> This paves the way for sharing the code that will set up the vertex > >> and geometry shader pipeline state. > >> --- > >> src/mesa/drivers/dri/i965/brw_context.h

Re: [Mesa-dev] [PATCH 05/22] i965: Move data from brw->vs into a base class if gs will also need it.

2013-08-29 Thread Eric Anholt
Kenneth Graunke writes: > On 08/26/2013 03:12 PM, Paul Berry wrote: >> This paves the way for sharing the code that will set up the vertex >> and geometry shader pipeline state. >> --- >> src/mesa/drivers/dri/i965/brw_context.h | 47 >> ++-- >> src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Marek Olšák
Thank you! Marek On Fri, Aug 30, 2013 at 12:06 AM, Tom Stellard wrote: > On Wed, Aug 28, 2013 at 07:17:30PM +0200, Marek Olšák wrote: >> This series contains the changes my transform feedback work depends on, but >> there are some useful fixes too, making it worth comitting earlier. >> >> The l

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Tom Stellard
On Wed, Aug 28, 2013 at 07:17:30PM +0200, Marek Olšák wrote: > This series contains the changes my transform feedback work depends on, but > there are some useful fixes too, making it worth comitting earlier. > > The last patch is the most important one, because it fixes the issues we had > with

Re: [Mesa-dev] [PATCH] radeonsi: Early return if no depth or stencil on release builds.

2013-08-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Aug 29, 2013 at 10:18 PM, Vinson Lee wrote: > Fixes "Missing break in switch" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/gallium/drivers/radeonsi/r600_blit.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium

Re: [Mesa-dev] [PATCH 11/22] i965: generalize brw_vs_pull_constants in preparation for GS.

2013-08-29 Thread Paul Berry
On 29 August 2013 10:46, Kenneth Graunke wrote: > On 08/29/2013 10:39 AM, Paul Berry wrote: > >> On 28 August 2013 18:06, Kenneth Graunke > **> wrote: >> >> On 08/26/2013 03:12 PM, Paul Berry wrote: >> >> --- >>src/mesa/drivers/dri/i965/brw_**

[Mesa-dev] [PATCH] nv30: Clear dirty bit for processed samplers.

2013-08-29 Thread Vinson Lee
Otherwise, the while(dirty) loop will never exit. Fixes "Infinite loop" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nv30/nv40_verttex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nv30/nv40_verttex.c b/src/gallium/drivers/nv30/nv

[Mesa-dev] [PATCH] radeonsi: Early return if no depth or stencil on release builds.

2013-08-29 Thread Vinson Lee
Fixes "Missing break in switch" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/radeonsi/r600_blit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/r600_blit.c b/src/gallium/drivers/radeonsi/r600_blit.c index 396ee01..692e00b 1006

[Mesa-dev] [PATCH 2/2] gallivm: (trivial) don't pass sampler_unit variable down to filtering funcs

2013-08-29 Thread sroland
From: Roland Scheidegger The only reason this was needed was because the fetch texel function had to get the (dynamic) border color, but this is now done much earlier. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 62 - 1 file changed, 22 insertions(+), 40 deletio

[Mesa-dev] [PATCH 1/2] gallivm: don't use AoS path if min/mag filter are different with multiple lods

2013-08-29 Thread sroland
From: Roland Scheidegger Instead of enhancing the AoS path so it can deal with it, just use SoA. Fixing AoS path wouldn't be all that difficult (use all the same logic as SoA) but considered not worth it for now. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |7 ++- 1 file change

Re: [Mesa-dev] [PATCH 12/15] i965: Add support for ir_triop_cond_sel.

2013-08-29 Thread Matt Turner
On Fri, Aug 23, 2013 at 9:24 AM, Paul Berry wrote: > On 22 August 2013 16:08, Matt Turner wrote: >> >> --- >> src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp | 1 + >> src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 ++ >> src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

Re: [Mesa-dev] [PATCH] glsl: Allow precision qualifiers for sampler types

2013-08-29 Thread Anuj Phogat
On Wed, Aug 28, 2013 at 4:56 PM, Ian Romanick wrote: > On 08/27/2013 12:52 PM, Anuj Phogat wrote: >> On Tue, Aug 27, 2013 at 11:53 AM, Ian Romanick wrote: >>> On 08/27/2013 10:45 AM, Anuj Phogat wrote: GLSL 1.30 doesn't allow precision qualifiers on sampler types, but in GLSL ES, s

Re: [Mesa-dev] [PATCH 20/22] i965/gen7: merge defines for 3DSTATE{VS, GS, WM} dword 2

2013-08-29 Thread Paul Berry
On 28 August 2013 20:16, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> Dword 2 of all 3DSTATE commands is the same, so there's no need tohave >> > > Well, not -all- 3DSTATE commands...just these :) > > It's weird that you decided to share the bits for 3DSTATE_VS, 3DSTATE

Re: [Mesa-dev] [PATCH 11/22] i965: generalize brw_vs_pull_constants in preparation for GS.

2013-08-29 Thread Kenneth Graunke
On 08/29/2013 10:39 AM, Paul Berry wrote: On 28 August 2013 18:06, Kenneth Graunke mailto:kenn...@whitecape.org>> wrote: On 08/26/2013 03:12 PM, Paul Berry wrote: --- src/mesa/drivers/dri/i965/brw___state.h| 8 +++ src/mesa/drivers/dri/i965/brw___vs

Re: [Mesa-dev] [PATCH 11/22] i965: generalize brw_vs_pull_constants in preparation for GS.

2013-08-29 Thread Paul Berry
On 28 August 2013 18:06, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> --- >> src/mesa/drivers/dri/i965/brw_**state.h| 8 +++ >> src/mesa/drivers/dri/i965/brw_**vs_surface_state.c | 66 >> +++- >> 2 files changed, 50 insertions(+), 24

Re: [Mesa-dev] [PATCH 1/2] mesa: Rip out more extension checking from texformat.c.

2013-08-29 Thread Kenneth Graunke
On 08/29/2013 08:45 AM, Eric Anholt wrote: You should only be flagging the formats as supported if you support them anyway. --- src/mesa/main/texformat.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) These look reasonable to me. Reviewed-by: Kenneth Graunke Do you

Re: [Mesa-dev] [PATCH 10/22] i965: Make sure constants re-sent after constant buffer reallocation.

2013-08-29 Thread Paul Berry
On 28 August 2013 17:38, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> The hardware requires that after constant buffers for a stage are >> allocated using a 3DSTATE_PUSH_CONSTANT_ALLOC_{**VS,HS,DS,GS,PS} >> command, and prior to execution of a 3DPRIMITIVE, the correspon

Re: [Mesa-dev] [PATCH 09/22] i965/gs: Allocate push constant space for use by GS.

2013-08-29 Thread Paul Berry
On 28 August 2013 17:58, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> Previously, we would always use the same push constant allocation >> regardless of what shader programs were being run: the available push >> constant space was split into 2 equal size partitions, one

Re: [Mesa-dev] [PATCH 8/8] i965: Avoid flushing the batch for every blorp op.

2013-08-29 Thread Paul Berry
On 28 August 2013 15:31, Eric Anholt wrote: > Paul Berry writes: > > > On 27 August 2013 15:21, Eric Anholt wrote: > > > >> This brings over the batch-wrap-prevention and aperture space checking > >> code from the normal brw_draw.c path, so that we don't need to flush the > >> batch every time.

[Mesa-dev] [PATCH 2/2] mesa: Don't choose S3TC for generic compression if we can't compress.

2013-08-29 Thread Eric Anholt
If the app is asking us to do GL_COMPRESSED_RGBA, then the app obviously doesn't have pre-compressed data to hand us. So don't choose a storage format that we won't actually be able to compress and store. Fixes black screen in warzone2100 when libtxc_dxtn is not present. Also 66 piglit tests. R

[Mesa-dev] [PATCH 1/2] mesa: Rip out more extension checking from texformat.c.

2013-08-29 Thread Eric Anholt
You should only be flagging the formats as supported if you support them anyway. --- src/mesa/main/texformat.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index c2f9257..fdbf695 100644 --- a/src/mesa/main

Re: [Mesa-dev] [PATCH 08/22] i965/gs: Allocate URB space for use by GS.

2013-08-29 Thread Paul Berry
On 28 August 2013 21:00, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> Previously, we gave all of the URB space (other than the small amount >> that is used for push constants) to the vertex shader. However, when >> a geometry shader is active, we need to divide it up b

Re: [Mesa-dev] [PATCH 05/22] i965: Move data from brw->vs into a base class if gs will also need it.

2013-08-29 Thread Paul Berry
On 28 August 2013 17:12, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> This paves the way for sharing the code that will set up the vertex >> and geometry shader pipeline state. >> --- >> src/mesa/drivers/dri/i965/brw_**context.h | 47 >> ++

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Christian König
Am 29.08.2013 12:38, schrieb Marek Olšák: On Thu, Aug 29, 2013 at 12:20 PM, Christian König wrote: Am 28.08.2013 19:17, schrieb Marek Olšák: This series contains the changes my transform feedback work depends on, but there are some useful fixes too, making it worth comitting earlier. The las

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Marek Olšák
On Thu, Aug 29, 2013 at 12:20 PM, Christian König wrote: > Am 28.08.2013 19:17, schrieb Marek Olšák: > >> This series contains the changes my transform feedback work depends on, >> but there are some useful fixes too, making it worth comitting earlier. >> >> The last patch is the most important on

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Christian König
Am 28.08.2013 19:17, schrieb Marek Olšák: This series contains the changes my transform feedback work depends on, but there are some useful fixes too, making it worth comitting earlier. The last patch is the most important one, because it fixes the issues we had with the emission of resource d

Re: [Mesa-dev] [PATCH 0/6] radeonsi: Minor cleanups and improvements

2013-08-29 Thread Michel Dänzer
On Mit, 2013-08-28 at 19:17 +0200, Marek Olšák wrote: > This series contains the changes my transform feedback work depends > on, but there are some useful fixes too, making it worth comitting > earlier. > > The last patch is the most important one, because it fixes the issues > we had with the em

Re: [Mesa-dev] [PATCH 21/22] i965/gen7: Generalize gen7_vs_state in preparation for GS.

2013-08-29 Thread Paul Berry
On 28 August 2013 20:40, Kenneth Graunke wrote: > On 08/26/2013 03:12 PM, Paul Berry wrote: > >> --- >> src/mesa/drivers/dri/i965/brw_**state.h | 41 ++ >> src/mesa/drivers/dri/i965/**gen7_vs_state.c | 123 >> -- >> 2 files changed, 122 insertions(+),

Re: [Mesa-dev] [PATCH 6/6] mesa: Rename gl_context::swtnl_im to vbo_context; use proper type.

2013-08-29 Thread Kenneth Graunke
On 08/28/2013 11:17 PM, Pohjolainen, Topi wrote: On Wed, Aug 28, 2013 at 04:49:14PM -0700, Kenneth Graunke wrote: The main GL context's swtnl_im field is the VBO module's vbo_context structure. Using the name "swtnl" in the name is confusing since some drivers use hardware texturing and lightin

Re: [Mesa-dev] [PATCH 6/6] mesa: Rename gl_context::swtnl_im to vbo_context; use proper type.

2013-08-29 Thread Pohjolainen, Topi
On Wed, Aug 28, 2013 at 04:49:14PM -0700, Kenneth Graunke wrote: > The main GL context's swtnl_im field is the VBO module's vbo_context > structure. Using the name "swtnl" in the name is confusing since > some drivers use hardware texturing and lighting, but still rely on the > VBO module for draw

Re: [Mesa-dev] [PATCH 1/2] i965: Remove never used RSR and RSL opcodes.

2013-08-29 Thread Matt Turner
On Wed, Aug 28, 2013 at 9:14 PM, Kenneth Graunke wrote: > On 08/28/2013 05:22 PM, Matt Turner wrote: >> >> Existed since the initial import, but appear to never have actually >> existed. >> --- >> Rotate? >> >> src/mesa/drivers/dri/i965/brw_defines.h | 2 -- >> src/mesa/drivers/dri/i965/brw_eu

Re: [Mesa-dev] obtain def-use chain in glsl s-expression

2013-08-29 Thread Liu Xin
On 08/28/2013 11:17 PM, Kenneth Graunke wrote: On 08/27/2013 11:34 PM, Liu Xin wrote: Hi, Mesa community, I am not familiar with S-expression or other forms of lisp languages. That's OK - the IR has no resemblance to actual Scheme or Lisp programming. We just print and read the () syntax