[Mesa3d-dev] Redundant assertions: unsigned >= 0, remove?

2010-01-06 Thread Roel Kluin
I also found several tests on unsigned variables which do nothing. should they be removed or changed otherwise? Roel backref 3: src_x ---[ vi src/gallium/auxiliary/util/u_rect.c +30 ]--- void util_copy_rect(ubyte * dst, enum pipe_format format, unsigned dst_stride,

Re: [Mesa3d-dev] [PATCH] test index bounds before array element

2010-01-06 Thread roel kluin
On Wed, Jan 6, 2010 at 5:49 PM, Brian Paul wrote: > Roel Kluin wrote: >> >> Check whether the index is within bounds before accessing the array. > > Applied to 7.7 branch. > > -Brian > > I just realized the last one (affecting src/mesa/shader/prog_optimize.c) is

[Mesa3d-dev] [PATCH] test index bounds before array element

2010-01-06 Thread Roel Kluin
Check whether the index is within bounds before accessing the array. Signed-off-by: Roel Kluin --- src/mesa/drivers/dri/tdfx/tdfx_dd.c |2 +- src/mesa/shader/nvfragparse.c |2 +- src/mesa/shader/prog_optimize.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

[Mesa3d-dev] [PATCH] win32_menu: add missing parentheses in mapMenu()

2010-01-06 Thread Roel Kluin
`|' has higher precedence than `?'. Signed-off-by: Roel Kluin --- src/glut/glx/win32_menu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glut/glx/win32_menu.c b/src/glut/glx/win32_menu.c index 5ce264d..d8e336c 100644 --- a/src/glut/glx/win32_menu.c

[Mesa3d-dev] [PATCH] nv50: add missing parentheses in nv50_query_result()

2010-01-06 Thread Roel Kluin
NOUVEAU_BO_RD is defined (1 << 2), and `|' has higher precedence than `?' so the second argument of nouveau_bo_map was always 0. Signed-off-by: Roel Kluin --- src/gallium/drivers/nv50/nv50_query.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gall

Re: [Mesa3d-dev] [PATCH] condition always evaluates to false

2010-01-06 Thread roel kluin
On Tue, Jan 5, 2010 at 11:51 PM, Brian Paul wrote: > Roel Kluin wrote: >> >> These can never be true. >> >> Signed-off-by: Roel Kluin >> --- >>  src/gallium/drivers/i965/brw_wm_emit.c  |    2 +- >>  src/mesa/drivers/dri/i915/intel_tris.c  |    2 +

[Mesa3d-dev] [PATCH] condition always evaluates to false

2010-01-05 Thread Roel Kluin
These can never be true. Signed-off-by: Roel Kluin --- src/gallium/drivers/i965/brw_wm_emit.c |2 +- src/mesa/drivers/dri/i915/intel_tris.c |2 +- src/mesa/drivers/dri/i965/brw_wm_emit.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) see commit

Re: [Mesa3d-dev] [PATCH] condition always evaluates to false in SetupDoubleTexEnvVoodoo3()

2010-01-05 Thread roel kluin
>> This can never be true. > Thanks.  Committed to the Mesa 7.7 branch. > > BTW, are you actually using the tdfx driver?  I've been tempted to nuke it > along with the glide driver. > > -Brian > No, just doing some static code analysis. Thanks, Roel -

[Mesa3d-dev] [PATCH] condition always evaluates to false in SetupDoubleTexEnvVoodoo3()

2010-01-05 Thread Roel Kluin
This can never be true. Signed-off-by: Roel Kluin --- src/mesa/drivers/dri/tdfx/tdfx_texstate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c index bbd2c8c..3f73787 100644 --- a