[Mesa-dev] [PATCH] [RFC] program: fix out of bounds array accesses and other bad things

2011-12-09 Thread nobled
;, /* FRAG_RESULT_DATA0 (named for GLSL's gl_FragData) */ "result.color[1]", "result.color[2]", - "result.color[3]" + "result.color[3]", + "result.color[4]", + "result.color[5]", + "result.color[6]"

[Mesa-dev] [PATCH] gen_matypes: eliminate printf warnings

2011-12-09 Thread nobled
e %s\t0x%"PRIx64"\n", s, (uint64_t) d ); -- 1.7.4.1 From f88d54fde18f4109b5af5d90e513ef761e4021bd Mon Sep 17 00:00:00 2001 From: nobled Date: Thu, 8 Dec 2011 20:53:25 + Subject: [PATCH 2/4] gen_matypes: eliminate printf warnings The VERT_BIT_* defines are 64-bit values since commit f364ac1da10ff67eba51

[Mesa-dev] [PATCH] configure: Don't use $CLANG since it will collide with the static analyzer.

2011-12-09 Thread nobled
From: Jeremy Huddleston Date: Thu, 5 May 2011 14:08:57 -0700 We just prefix the $CLANG environment variable in configure.ac with acv_mesa_ Found by: tinderbox Signed-off-by: Jeremy Huddleston --- Originally posted here: http://lists.freedesktop.org/archives/mesa-dev/2011-May/007411.html conf

[Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2011-12-22 Thread nobled
The error was erroneously removed in this commit: 719909698c67c287a393d2380278e7b7495ae018 "mesa: Rewrite the way uniforms are tracked and handled" You also aren't even supposed to truncate the output to 'bufSize', so just return like before. Also fixup an old comment and add an assert. --- (Thi

[Mesa-dev] [PATCH] gallivm: add IABS opcode support

2012-01-11 Thread nobled
--- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c |1 + src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index a021efd..88

[Mesa-dev] [PATCH 1/4] glapi: remove non-existent parameter references

2012-01-16 Thread nobled
glGetTexImage, for example, has no width/height/depth parameters. Also, copy some missing parameter info from the original versions of certain functions over to their ARB_robustness counterparts. --- src/mapi/glapi/gen/ARB_robustness.xml | 26 +- src/mapi/glapi/gen/gl_AP

[Mesa-dev] [PATCH 2/4] glapi: sort ARB extensions by number

2012-01-16 Thread nobled
And add comments to fill in for extensions that aren't there. Noticed the comment about "ARB extensions sorted by extension number" didn't extend to the directives when it became clear GL_ARB_texture_rg was missing, going by the error message seen here: https://bugs.freedesktop.org/show_bug.cgi?

[Mesa-dev] [PATCH 3/4] glapi: add ARB_texture_rg

2012-01-16 Thread nobled
Noticed it was missing based on the lack of a descriptive enum name from this bug's error message: https://bugs.freedesktop.org/show_bug.cgi?id=44039 This moves two enums out of GL3x.xml. Though since this and GL_ARB_texture_compression_rgtc are both strict subsets of GL3, both extensions could h

[Mesa-dev] [PATCH 4/4] glapi: add GL_ARB_texture_compression_rgtc

2012-01-16 Thread nobled
Noticed this was missing when writing the "glapi: sort ARB extensions by number" commit, which at least shows it was effective. --- .../glapi/gen/ARB_texture_compression_rgtc.xml | 15 +++ src/mapi/glapi/gen/Makefile|1 + src/mapi/glapi/gen/gl_API.xml

Re: [Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2012-01-16 Thread nobled
ping? On Thu, Dec 22, 2011 at 4:34 PM, nob...@dreamwidth.org wrote: > The error was erroneously removed in this commit: > > 719909698c67c287a393d2380278e7b7495ae018 > "mesa: Rewrite the way uniforms are tracked and handled" > > You also aren't even supposed to truncate the output to 'bufSize', > s

Re: [Mesa-dev] [PATCH 1/4] glapi: remove non-existent parameter references

2012-01-18 Thread nobled
On Tue, Jan 17, 2012 at 6:10 PM, Brian Paul wrote: > On 01/16/2012 04:45 PM, nobled wrote: >> >> glGetTexImage, for example, has no width/height/depth parameters. >> >> Also, copy some missing parameter info from the original versions >> of certain funct

Re: [Mesa-dev] [PATCH 1/4] glapi: remove non-existent parameter references

2012-01-24 Thread nobled
On Tue, Jan 17, 2012 at 6:10 PM, Brian Paul wrote: > On 01/16/2012 04:45 PM, nobled wrote: >> >> glGetTexImage, for example, has no width/height/depth parameters. >> >> Also, copy some missing parameter info from the original versions >> of certain funct

Re: [Mesa-dev] [PATCH 4/4] glapi: add GL_ARB_texture_compression_rgtc

2012-01-24 Thread nobled
On Thu, Jan 19, 2012 at 1:46 PM, Eric Anholt wrote: > On Mon, 16 Jan 2012 18:50:44 -0500, nobled wrote: >> Noticed this was missing when writing the "glapi: sort ARB extensions >> by number" commit, which at least shows it was effective. >> --- >>  .../glapi

Re: [Mesa-dev] [PATCH] intel: Fix accum buffer mapping since the swrast rework.

2012-01-24 Thread nobled
On Tue, Jan 24, 2012 at 6:59 PM, Eric Anholt wrote: > A pure swrast-allocated buffer gets an irb of NULL, so we segfaulted > in the clear-accum test.  Just look at the swrast renderbuffer pointer > for handling swrast rbs. > --- >  src/mesa/drivers/dri/intel/intel_fbo.c |   12 +++- >  1 fi

Re: [Mesa-dev] [PATCH 1/2] autoconf: Make the build fail on missing prototypes when possible.

2012-01-24 Thread nobled
On Tue, Jan 24, 2012 at 1:09 PM, Eric Anholt wrote: > You don't want to continue on when you've used something that is > probably a typo of a real symbol, or maybe just using the wrong > signature. > --- -Werror=implicit would help cover this from the caller side of things, too. >  configure.ac

[Mesa-dev] [PATCH] texgetimage: add missing return on error

2011-10-19 Thread nobled
Missed this back in the arb_robustness branch <6b329b9274b18c50f4177eef7ee087d50ebc1525>. --- src/mesa/main/texgetimage.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index f911886..e6edb45 100644 --- a/src/mesa/

[Mesa-dev] [PATCH 1/4] mesa/image: delete dead store

2011-10-19 Thread nobled
The return value here is a) always zero, b) never used. --- src/mesa/main/image.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 7d95dd6..ca5771c 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1

[Mesa-dev] [PATCH 2/4] mesa/image: assert on bad format

2011-10-19 Thread nobled
sgit.0 From adb592410ca506107b5294222eadd84c35584ed5 Mon Sep 17 00:00:00 2001 From: nobled Date: Mon, 17 Oct 2011 21:34:44 + Subject: [PATCH 2/4] mesa/image: assert on bad format NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as

[Mesa-dev] [PATCH 3/4] mesa: add _mesa_image_offset()

2011-10-19 Thread nobled
const struct gl_pixelstore_attrib *packing, -- 1.7.6.msysgit.0 From bc1cc2c4c0e03f764d2812ebd5b0c7c3e00bb3cc Mon Sep 17 00:00:00 2001 From: nobled Date: Tue, 18 Oct 2011 20:50:16 + Subject: [PATCH 8/9] mesa: add _mesa_image_offset() --- src/mesa/main/

[Mesa-dev] [PATCH 4/4] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread nobled
From 0fec8cecad17894d77d6cd677bd7b2ec7773 Mon Sep 17 00:00:00 2001 From: nobled Date: Wed, 19 Oct 2011 06:35:53 + Subject: [PATCH 9/9] mesa,intel: use _mesa_image_offset() for PBOs This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It als

[Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-19 Thread nobled
NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also matches the code in the non-GL_BITMAP codepa

[Mesa-dev] [PATCH 4/4 v2] mesa, intel: use _mesa_image_offset() for PBOs

2011-10-19 Thread nobled
This avoids forming invalid pointers needlessly, which even if never dereferenced is undefined behavior. It also makes _mesa_validate_pbo_access() more comprehensible. --- v2: Now rebased on top of the recent commit 9024d8af0ae. src/mesa/drivers/dri/intel/intel_pixel_read.c |5 ++- src/mesa/m

[Mesa-dev] [PATCH 1/4 dri] st/dri: factor out software texbuffer code

2011-10-19 Thread nobled
--- src/gallium/state_trackers/dri/sw/dri_drawable.c | 72 -- 1 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c b/src/gallium/state_trackers/dri/sw/dri_drawable.c index 05c64b6..66997fb 100644 --- a/src/gallium/s

[Mesa-dev] [PATCH 2/4 dri] st/dri: add copy_drawable() callback

2011-10-19 Thread nobled
eateContext = dri_create_context, + .CreateContext = drisw_create_context, .DestroyContext = dri_destroy_context, .CreateBuffer = drisw_create_buffer, .DestroyBuffer = dri_destroy_buffer, -- 1.7.6.msysgit.0 From f0ba9fe7da311a0764a807e030f189388331bd2a Mon Sep 17 00:00:00 2001 From: nobled Date: Wed, 12 Oct 20

[Mesa-dev] [PATCH 3/4 dri] st/dri: sync the sw/ changes to dri_drawable.c

2011-10-19 Thread nobled
The sw copy needs to go away. It's already missing several new patches to the original. --- .../state_trackers/dri/common/dri_drawable.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/sta

[Mesa-dev] [PATCH 4/4 dri] Revert "Duplicate state_tracker/dri/sw/dri_drawable.c"

2011-10-19 Thread nobled
This reverts commit 569bde1fa7d03fb7688d0d391b32e61e857ad44e. --- src/gallium/state_trackers/dri/sw/dri_drawable.c | 274 +- 1 files changed, 1 insertions(+), 273 deletions(-) mode change 100644 => 12 src/gallium/state_trackers/dri/sw/dri_drawable.c diff --git a/src/gall

Re: [Mesa-dev] Mesa (master): mesa: #define fprintf to be __mingw_fprintf() on Mingw32

2012-07-01 Thread nobled
On Fri, Jun 22, 2012 at 11:26 PM, Brian Paul wrote: > Module: Mesa > Branch: master > Commit: cbffaf20e9e6154310ba68bb2b44adc37ba83bcd > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbffaf20e9e6154310ba68bb2b44adc37ba83bcd > > Author: Brian Paul > Date: Fri Jun 22 10:16:25 2012 -

Re: [Mesa-dev] [PATCH 2/2] gles2: Add GL_NV_read_buffer extension

2012-07-01 Thread nobled
On Fri, Jun 15, 2012 at 7:44 PM, Kristian Høgsberg wrote: > This lets us select the front buffer for reading under GLES2. > --- > src/mapi/glapi/gen/es_EXT.xml |7 +++ > src/mapi/glapi/gen/gles_api.py |2 ++ > src/mesa/main/APIspec.xml | 13 + > src/mesa/main/exten

[Mesa-dev] [PATCH 1/4] glapi/gen: fix out of tree build

2012-07-01 Thread nobled
Add "-f $(srcdir)/gl_API.xml" to the arguments of all the scripts that by default look for gl_API.xml in the working directory when run with no arguments, and prepend $(srcdir) to those scripts that are already using an explicit -f argument. --- src/mapi/glapi/gen/Makefile.am | 52 ++

[Mesa-dev] [PATCH 2/4] mesa: fix api source gen for out-of-tree builds

2012-07-01 Thread nobled
Add $(srcdir) where needed. --- src/mesa/Makefile.am |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index e52678d..44ec619 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -78,10 +78,12 @@ main/api_exec_es2_re

[Mesa-dev] [PATCH 3/4] mesa: fix parser source gen for out-of-tree builds

2012-07-01 Thread nobled
--- src/mesa/Makefile.am |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index 44ec619..5736c5d 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -86,9 +86,11 @@ main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIsp

[Mesa-dev] [PATCH 4/4] mesa: point to Makefile.old in the srcdir

2012-07-01 Thread nobled
Gets out-of-tree builds slightly closer to working. --- src/mesa/Makefile.am |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index 5736c5d..bada760 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -94,13 +94,13

[Mesa-dev] [PATCH] egl: fix copy/pasted misnomer

2012-07-01 Thread nobled
This is a long-standing typo that propagated from the wayland code, confusing drm_magic_t and wayland object IDs. --- src/egl/drivers/dri2/egl_dri2.h|2 +- src/egl/drivers/dri2/platform_drm.c|4 ++-- src/egl/drivers/dri2/platform_wayland.c|

Re: [Mesa-dev] [PATCH 1/9] automake: convert libOSmesa building

2012-07-09 Thread nobled
On Mon, Jul 9, 2012 at 11:41 AM, Jon TURNEY wrote: > From: Laurent Carlier > > This also currently fix the installation of libOSmesa. > > v2: Remove old Makefile, libOSmesa is now versioned, fix typos > v3: Keep config substitution alphabetized > v4: Update .gitignore > > Reviewed-by: Jon TURNEY

Re: [Mesa-dev] [PATCH 1/8] __DRIimage: version 5, add new formats and createSubImage

2012-07-09 Thread nobled
On Sat, Jul 7, 2012 at 1:40 AM, Kristian Høgsberg wrote: > On Fri, Jul 06, 2012 at 02:10:57PM -0700, Eric Anholt wrote: >> Kristian Høgsberg writes: >> >> > The additions in version 5 enables creating EGLImages for different planes >> > of a YUV buffer. createImageFromName is still used to creat

[Mesa-dev] [PATCH 1/2] mapi: use a path prefix for sources variable

2012-07-19 Thread nobled
This makes it possible to share sources.mak with the Android build again. --- Still todo: sharing this with the SConscript build, which still duplicates the list of sources. src/mapi/glapi/Makefile.am|4 +++- src/mapi/mapi/sources.mak | 25 ++--- src/map

[Mesa-dev] [PATCH 2/2] mapi: share sources.mak with Android again

2012-07-19 Thread nobled
This (sort of) reverts commit 5154b45217695e5daf24110bcff043fa1959d0a5 "mapi: Fix Android build" --- src/mapi/Android.mk | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mapi/Android.mk b/src/mapi/Android.mk index d1749a2..9d54210 100644 --- a/src/mapi/And

Re: [Mesa-dev] [PATCH 1/4] mapi: use a path prefix for sources variable

2012-07-19 Thread nobled
This makes it possible to share sources.mak with the Android build again. v2: Keep $(TOP) variable that is actually used by an included Makefile. --- src/mapi/glapi/Makefile.am|5 +++-- src/mapi/mapi/sources.mak | 25 ++--- src/mapi/shared-glapi/Makefile.

[Mesa-dev] [PATCH 3/4] autoconf: add $(TOP_SRCDIR) substitution

2012-07-19 Thread nobled
Useful while the static Makefiles are still alive. --- configs/current.in |4 +++- configure.ac | 15 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configs/current.in b/configs/current.in index dc0dea8..ea926d5 100644 --- a/configs/current.in +++ b/con

[Mesa-dev] [PATCH 4/4] mapi: drop use of $(TOP)

2012-07-19 Thread nobled
Use $(TOP_SRCDIR) in the static Makefile, but use a more specific variable for glapi_gen.mk now. --- src/mapi/es1api/Makefile |4 ++-- src/mapi/glapi/gen/glapi_gen.mk | 14 +++--- src/mapi/shared-glapi/Makefile.am |2 -- 3 files changed, 9 insertions(+), 11 deletions(-

[Mesa-dev] [PATCH 1/2] mesa: set CORE profile by default

2012-07-27 Thread nobled
a) Per the OpenGL 3.2 spec, this is the default value unless the user overrides it at context creation; b) The client can't query this state until Mesa exposes OpenGL 3.2 anyway, so it doesn't really matter yet. --- src/mesa/main/context.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[Mesa-dev] [PATCH 2/2] mesa: add _mesa_feature_removed() helper

2012-07-27 Thread nobled
And a more trivial _mesa_feature_deprecated(). --- src/mesa/main/context.c | 29 + src/mesa/main/context.h | 14 ++ 2 files changed, 43 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 18a9ac8..1a025e8 100644 --- a/src

Re: [Mesa-dev] [PATCH v2 7/7] mesa: don't enable legacy GL functions when using API_OPENGL_CORE

2012-07-27 Thread nobled
On Fri, Jul 27, 2012 at 6:43 AM, Jordan Justen wrote: > Signed-off-by: Jordan Justen > --- > src/mesa/main/api_exec.c | 227 > -- > src/mesa/main/api_exec.h |3 +- > src/mesa/main/context.c |2 +- > src/mesa/main/vtxfmt.c | 167 ++

Re: [Mesa-dev] [PATCH 1/2] i965: Report the failure message when failing to compile the fragment shader.

2012-02-12 Thread nobled
On Fri, Feb 10, 2012 at 12:42 AM, Eric Anholt wrote: > We just abort later, but at least this should result in more > informative bug reports. > --- >  src/mesa/drivers/dri/i965/brw_fs.cpp |    3 +++ >  1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw

Re: [Mesa-dev] [PATCH] configure.ac: Enable GLX_USE_TLS if possible.

2012-02-12 Thread nobled
On Wed, Feb 8, 2012 at 8:11 PM, Zhigang Gong wrote: > On Wed, Feb 08, 2012 at 02:46:42PM -0800, Eric Anholt wrote: >> On Wed,  8 Feb 2012 16:19:38 +0800, zhigang.g...@linux.intel.com wrote: >> > From: Zhigang Gong >> > >> > If the system support tls, we prefer to enable it by default >> > just as

Re: [Mesa-dev] [PATCH v2 1/2] configure.ac: Enable GLX_USE_TLS if possible.

2012-02-15 Thread nobled
On Mon, Feb 13, 2012 at 5:10 AM, Zhigang Gong wrote: > On Sun, Feb 12, 2012 at 09:02:44AM -0500, nobled wrote: >> Judging by the patch that tried to change the tls_model: >> https://bugs.freedesktop.org/show_bug.cgi?id=35268 >> It looks like we'd need to disable e

[Mesa-dev] [PATCH] nouveau_vieux: don't use nested functions

2012-03-04 Thread nobled
It's a GNU extension that isn't supported by clang right now: http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Nested-Functions.html http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc With this, clang now compiles the nouveau classic driver. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id

Re: [Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2012-03-13 Thread nobled
ping x2 Also an 8.0 candidate, now that 8.0 exists. On Mon, Jan 16, 2012 at 6:52 PM, nobled wrote: > ping? > > On Thu, Dec 22, 2011 at 4:34 PM, nob...@dreamwidth.org wrote: >> The error was erroneously removed in this commit: >> >> 719909698c67c287a393d2380278e7b7495

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread nobled
On Mon, Mar 12, 2012 at 8:05 PM, Jakob Bornecrantz wrote: > Hi all > > We well over due for a 8.0.1 release, so I thought > we do it aggressively this week. A quick rc tomorrow > and a release on Thursday or Friday? Is that okay with > people, comments please? This should be cherry-picked, right?

Re: [Mesa-dev] [PATCH] intel: Fix a case when mapping large texture fails

2012-03-15 Thread nobled
On Thu, Mar 15, 2012 at 2:26 PM, Anuj Phogat wrote: > > > On Wed, Mar 7, 2012 at 4:28 PM, Anuj Phogat wrote: >> >> On Mon 27 Feb 2012 11:45:46 AM PST, Anuj Phogat wrote: >> > This patch handles a case when mapping a large texture fails >> > in drm_intel_gem_bo_map_gtt(). These changes avoid asser

Re: [Mesa-dev] Mesa (master): mesa: add back glGetnUniform*v() overflow error reporting

2012-03-15 Thread nobled
On Thu, Mar 15, 2012 at 5:27 PM, Ian Romanick wrote: > On 03/15/2012 01:18 PM, Kenneth Graunke wrote: >> >> On 03/15/2012 11:26 AM, Ian Romanick wrote: >>> >>> On 03/13/2012 11:35 AM, Dylan Noblesmith wrote: Module: Mesa Branch: master Commit: b536ac6b2bc54ad9bb6e58fbd307055e41

[Mesa-dev] [PATCH 1/2] glapi: add GL_ARB_depth_buffer_float

2012-03-23 Thread nobled
--- These are based on the sorting-the-xml patches I forgot to push a while back: http://lists.freedesktop.org/archives/mesa-dev/2012-January/017610.html Which I'll push along with these if they're okay to commit. src/mapi/glapi/gen/ARB_depth_buffer_float.xml | 15 +++ src/mapi/glap

[Mesa-dev] [PATCH 2/2] glapi: add GL_ARB_texture_float

2012-03-23 Thread nobled
And add some missing core GL 3.0 enums that came from this extension, too. --- src/mapi/glapi/gen/ARB_texture_float.xml | 36 ++ src/mapi/glapi/gen/GL3x.xml |7 + src/mapi/glapi/gen/Makefile |1 + src/mapi/glapi/gen/gl_API.xml

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-26 Thread nobled
On Tue, Mar 13, 2012 at 10:28 AM, Jakob Bornecrantz wrote: > - Original Message - >> On Mon, Mar 12, 2012 at 8:05 PM, Jakob Bornecrantz wrote: >> > Hi all >> > >> > We well over due for a 8.0.1 release, so I thought >> > we do it aggressively this week. A quick rc tomorrow >> > and a rele

[Mesa-dev] [PATCH 1/9] util: fix undefined behavior

2012-04-01 Thread nobled
container_of() can legally return anything, even invalid addresses that cause segfaults, when 'sample' is an uninitialized pointer. Bug exposed by clang. NOTE: This is a candidate for the 8.0 branch. --- src/gallium/auxiliary/util/u_double_list.h | 15 ++- 1 files changed, 10 inser

[Mesa-dev] [PATCH 2/9] util: fix uninitialized table

2012-04-01 Thread nobled
Most of the 256 values in the 'generic_to_slot' table were supposed to be initialized with the default value 0xff, but were left at zero (from CALLOC_STRUCT()) instead. Noticed by clang: u_linkage.h:60:31: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination;

[Mesa-dev] [PATCH 3/9] egl: fix uninitialized values

2012-04-01 Thread nobled
Noticed by clang: eglimage.c:48:28: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] memset(attrs, 0, sizeof(attrs)); ~^ NOTE: This is a candidate for the 8.0 bra

[Mesa-dev] [PATCH 4/9] mesa: delete tautological compare

2012-04-01 Thread nobled
Noticed by clang: main/extensions.c:934:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (index < 0) ~ ^ ~ Also don't cast away const needlessly in this function. --- src/mesa/main/extensions.c |5 + 1 files changed, 1 insertion

[Mesa-dev] [PATCH 5/9] mesa: fix truncated value warning

2012-04-01 Thread nobled
Silences a clang warning: format_pack.c:2546:30: warning: implicit conversion from 'int' to 'GLubyte' (aka 'unsigned char') changes value from 65535 to 255 [-Wconstant-conversion] d[i] = d[i] ? 0x : 0x0; ~ ^~ --- src/mesa/main/format_pack.c |2

[Mesa-dev] [PATCH 6/9] i965: fix typo

2012-04-01 Thread nobled
Noticed by clang: brw_wm_surface_state.c:330:30: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [MESA_FORMAT_Z24_S8] = 0, ^ brw_wm_surface_state.c:326:30: note: previous initialization is here [MESA_FORMAT_Z2

[Mesa-dev] [PATCH 7/9] st/vega: silence enum cast warnings

2012-04-01 Thread nobled
clang warns on these: stroker.c:626:19: warning: implicit conversion from enumeration type 'VGPathCommand' to different enumeration type 'VGPathSegment' [-Wconversion] No change in the underlying value. --- src/gallium/state_trackers/vega/stroker.c |9 + 1 files changed, 5 insertions

[Mesa-dev] [PATCH 8/9] st/vega: fix uninitialized values

2012-04-01 Thread nobled
C still treats array arguments exactly like pointer arguments. By sheer coincidence, this still worked fine on 64-bit machines where 2 * sizeof(float) == sizeof(void*), but not on 32-bit. Noticed by clang: text.c:76:51: warning: sizeof on array function parameter will return size of 'const VGfloa

[Mesa-dev] [PATCH 9/9] egl-static: fix printf warning

2012-04-01 Thread nobled
Noticed by clang: egl_st.c:57:50: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat] ret = util_snprintf(path, sizeof(path), "%.*s/%s" UTIL_DL_EXT, ~~^~ NOTE: This is a candidate for

Re: [Mesa-dev] [PATCH 1/9] util: fix undefined behavior

2012-04-06 Thread nobled
On Mon, Apr 2, 2012 at 7:40 AM, Tolga Dalman wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > > On 02.04.2012 00:24, nobled wrote: >>  #define LIST_FOR_EACH_ENTRY(pos, head, member)                               >> \ >> -   for (pos =

Re: [Mesa-dev] [PATCH 1/9] util: fix undefined behavior

2012-04-08 Thread nobled
On Sun, Apr 8, 2012 at 4:28 AM, Tolga Dalman wrote: > On 06.04.2012 17:38, nobled wrote: >> On Mon, Apr 2, 2012 at 7:40 AM, Tolga Dalman >> wrote: >> Hi, >> >> >> On 02.04.2012 00:24, nobled wrote: >>>&

[Mesa-dev] [PATCH] autoconf: add AM_PROG_CC_C_O

2012-04-13 Thread nobled
Prevents this error with Automake 1.9: src/gallium/drivers/Makefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac' autoreconf: automake failed with exit status: 1 --- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure

[Mesa-dev] [PATCH 1/9] glsl: consolidate code

2012-04-13 Thread nobled
This function is about to get longer. --- src/glsl/glsl_parser_extras.cpp | 29 +++-- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index ae7a365..d14124f 100644 --- a/src/glsl/glsl_parse

[Mesa-dev] [PATCH 2/9] mesa: add _mesa_shader_error()

2012-04-13 Thread nobled
--- src/mesa/main/errors.c | 19 +++ src/mesa/main/errors.h |4 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index fcf873f..f03ebd3 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -106

[Mesa-dev] [PATCH 3/9] glsl: add gl_context member

2012-04-13 Thread nobled
--- src/glsl/glsl_parser_extras.cpp |3 ++- src/glsl/glsl_parser_extras.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index d14124f..aade2e1 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src

[Mesa-dev] [PATCH 4/9] glsl: report errors via GL_ARB_debug_output

2012-04-13 Thread nobled
--- src/glsl/glsl_parser_extras.cpp | 14 ++ src/glsl/standalone_scaffolding.cpp |6 ++ src/glsl/standalone_scaffolding.h |4 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index

[Mesa-dev] [PATCH 5/9] glcpp: consolidate error/warning code

2012-04-13 Thread nobled
--- src/glsl/glcpp/pp.c | 33 +++-- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c index 3640896..b0afed4 100644 --- a/src/glsl/glcpp/pp.c +++ b/src/glsl/glcpp/pp.c @@ -27,21 +27,32 @@ #include "glcpp.h" #i

[Mesa-dev] [PATCH 6/9] glsl: consolidate error/warning code

2012-04-13 Thread nobled
--- src/glsl/linker.cpp | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 49b6b8f..e2a5ef9 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -172,14 +172,23 @@ private: }; +static void +linker_ms

[Mesa-dev] [PATCH 7/9] glcpp: pass gl_context to preprocess()

2012-04-13 Thread nobled
--- src/glsl/glcpp/glcpp.c|2 +- src/glsl/glcpp/glcpp.h|4 +++- src/glsl/glcpp/pp.c |3 ++- src/glsl/glsl_parser_extras.h |2 +- src/glsl/linker.cpp |2 -- src/glsl/main.cpp |2 +- src/glsl/test_optpass.cpp |2 +- 7 fi

[Mesa-dev] [PATCH 8/9] glcpp: add gl_context to glcpp_parser_t

2012-04-13 Thread nobled
--- src/glsl/glcpp/glcpp-parse.y |5 - src/glsl/glcpp/glcpp.h |5 ++--- src/glsl/glcpp/pp.c |3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 47ba54d..dd90a34 100644 --- a/src/glsl

[Mesa-dev] [PATCH 9/9] glcpp: report errors via GL_ARB_debug_output

2012-04-13 Thread nobled
--- src/glsl/glcpp/glcpp.c |7 +++ src/glsl/glcpp/pp.c| 14 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c index bd6344b..3f20b2b 100644 --- a/src/glsl/glcpp/glcpp.c +++ b/src/glsl/glcpp/glcpp.c @@ -25,6

Re: [Mesa-dev] [PATCH 4/9] glsl: report errors via GL_ARB_debug_output

2012-04-15 Thread nobled
On Fri, Apr 13, 2012 at 2:04 PM, Ian Romanick wrote: > On 04/13/2012 08:51 AM, nobled wrote: >> >> --- >>  src/glsl/glsl_parser_extras.cpp     |   14 ++ >>  src/glsl/standalone_scaffolding.cpp |    6 ++ >>  src/glsl/standalone_scaffolding.h   |

Re: [Mesa-dev] [PATCH 7/9] glcpp: pass gl_context to preprocess()

2012-04-15 Thread nobled
On Fri, Apr 13, 2012 at 2:04 PM, Ian Romanick wrote: > On 04/13/2012 08:52 AM, nobled wrote: >> >> --- >>  src/glsl/glcpp/glcpp.c        |    2 +- >>  src/glsl/glcpp/glcpp.h        |    4 +++- >>  src/glsl/glcpp/pp.c           |    3 ++- >>  src/glsl/glsl

Re: [Mesa-dev] [PATCH 1/9] glsl: consolidate code

2012-04-15 Thread nobled
On Fri, Apr 13, 2012 at 3:15 PM, Ian Romanick wrote: > On 04/13/2012 08:51 AM, nobled wrote: > > This just occurred to me... Wouldn't it be easier to push all the compiler / > linker error messages into the debug log in one shot *after* compilation (or > linking) is done?  Si

Re: [Mesa-dev] GLSL 1.40 and fixed function

2012-04-15 Thread nobled
On Fri, Apr 13, 2012 at 5:52 PM, Ian Romanick wrote: > On 04/13/2012 02:35 PM, Eric Anholt wrote: >> >> On Tue, 27 Mar 2012 10:41:09 -0700, Kenneth Graunke >>  wrote: >>> >>> On 03/27/2012 10:31 AM, Ian Romanick wrote: On 03/26/2012 01:35 PM, Eric Anholt wrote: > > I've got a que

Re: [Mesa-dev] GLSL 1.40 and fixed function

2012-04-16 Thread nobled
On Mon, Apr 16, 2012 at 1:01 PM, Paul Berry wrote: > On 16 April 2012 09:44, Ian Romanick wrote: >> >> On 04/15/2012 03:25 AM, nobled wrote: >> >>> I'm not sure if I'm missing something, but the non-compatibility >>> OpenGL 3.1 Specification seem

[Mesa-dev] [PATCH 1/3] autoconf: pass -Wall to automake

2012-04-22 Thread nobled
And fix these warning that appear at autoreconf time: "`:='-style assignments are not portable" --- configure.ac |2 +- src/gallium/drivers/r300/Makefile.sources |2 +- src/mesa/drivers/dri/i915/Makefile.sources |4 ++-- src/mesa/drivers/dri/i965/Makefile

[Mesa-dev] [PATCH 2/3] mesa: require GL_MAX_SAMPLES >= 4 for GL 3.0

2012-04-22 Thread nobled
As noted in commit be4e46b21a60cfdc826bf89d1078df54966115b1, this was missing before. NOTE: This is a candidate for the 8.0 branch. --- src/mesa/main/version.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 82cc54b.

[Mesa-dev] [PATCH 3/3] mesa: generate GL_INVALID_VALUE when bufSize < 0

2012-04-22 Thread nobled
Though not explicit in the GL_ARB_robustness extension, the GL standard says: If a negative number is provided where an argument of type sizei or sizeiptr is specified, the error INVALID_VALUE is generated. While the extension says that GL_INVALID_OPERATION is given when the required space is

Re: [Mesa-dev] [PATCH 3/3] mesa: generate GL_INVALID_VALUE when bufSize < 0

2012-04-29 Thread nobled
On Tue, Apr 24, 2012 at 9:29 AM, Ian Romanick wrote: > On 04/22/2012 09:44 AM, nobled wrote: >> >> Though not explicit in the GL_ARB_robustness extension, >> the GL standard says: >> >>   If a negative number is provided where an argument of type sizei or >

[Mesa-dev] [PATCH] mesa: reject immutable textures in glEGLImageTargetTexture2DOES()

2012-04-29 Thread nobled
GL_ARB_texture_storage says: The commands eglBindTexImage, wglBindTexImageARB, glXBindTexImageEXT or EGLImageTargetTexture2DOES are not permitted on an immutable-format texture. They will generate the following errors: - EGLImageTargetTexture2DOES: INVALID_OPERATION - e

Re: [Mesa-dev] [PATCH 7/9] glcpp: pass gl_context to preprocess()

2012-04-29 Thread nobled
On Sun, Apr 15, 2012 at 6:08 AM, nobled wrote: > On Fri, Apr 13, 2012 at 2:04 PM, Ian Romanick wrote: >> On 04/13/2012 08:52 AM, nobled wrote: >>> >>> --- >>>  src/glsl/glcpp/glcpp.c        |    2 +- >>>  src/glsl/glcpp/glcpp.h        |    4 +

[Mesa-dev] [PATCH 1/4 v2] glsl: consolidate code

2012-05-01 Thread nobled
And lay the groundwork for GL_ARB_debug_output. --- src/glsl/glsl_parser_extras.cpp | 33 +++-- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index ae7a365..6a4ab4a 100644 --- a/src/g

[Mesa-dev] [PATCH 2/4 v2] mesa: add _mesa_shader_debug()

2012-05-01 Thread nobled
This should be the one entrypoint libglsl needs for GL_ARB_debug_output. --- src/mesa/main/errors.c | 34 ++ src/mesa/main/errors.h |4 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index f

[Mesa-dev] [PATCH 3/4 resend] glsl: add gl_context member

2012-05-01 Thread nobled
--- src/glsl/glsl_parser_extras.cpp |3 ++- src/glsl/glsl_parser_extras.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 6a4ab4a..3d99cc5 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src

[Mesa-dev] [PATCH 4/4 v2] glsl: report errors via GL_ARB_debug_output

2012-05-01 Thread nobled
--- src/glsl/glsl_parser_extras.cpp | 11 +++ src/glsl/standalone_scaffolding.cpp |6 ++ src/glsl/standalone_scaffolding.h |4 3 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 3d

[Mesa-dev] [PATCH 1/6] dri: add driWarnImmutableTexture()

2012-05-02 Thread nobled
This warns about trying to respecify a texture marked immutable by GL_ARB_texture_storage. --- src/mesa/drivers/dri/common/dri_util.c | 14 ++ src/mesa/drivers/dri/common/dri_util.h |3 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/commo

[Mesa-dev] [PATCH 2/6] swrast: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/swrast/swrast.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 22d71bf..70bbcb8 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swr

[Mesa-dev] [PATCH 3/6] intel: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/intel/intel_tex_image.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 094d3cd..264cfc1 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image

[Mesa-dev] [PATCH 4/6] nouveau_vieux: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/nouveau/nouveau_texture.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index a2e96aa..8954666 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau

[Mesa-dev] [PATCH 5/6] radeon: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/radeon/radeon_texstate.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index 87f12d5..932b706 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texs

[Mesa-dev] [PATCH 6/6] st/mesa: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/state_tracker/st_manager.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index d54b7ed..5a1fb73 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_

[Mesa-dev] [PATCH] st/egl: expose EGL_MESA_drm_image on x11 displays

2011-04-19 Thread nobled
Date: Sun, 13 Feb 2011 23:45:47 + This makes it useable with the egl_gallium driver in X11. It only works for the DRI2 backend, not ximage. --- src/gallium/state_trackers/egl/common/egl_g3d.c|3 ++ .../state_trackers/egl/common/native_buffer.h |3 +- src/gallium/state_tracke

Re: [Mesa-dev] Mesa (master): swrastg: Add __DRI_TEX_BUFFER support (patches}

2011-04-19 Thread nobled
x27;subtly broken' mean in this case? Is it related to this backtrace from August? Or the lack of GLX direct-rendering support? > http://cgit.freedesktop.org/mesa/mesa/commit/?id=c14b4371ed58859d264b7b2581cfedc9cfd8401f > 2010-08-13 19:58:11 (GMT) > > st/dri: move TFP code to dri_draw

[Mesa-dev] [PATCH 1/8] mesa: use is_bufferobj() helper function

2011-04-19 Thread nobled
--- src/mesa/drivers/x11/xm_dd.c |4 ++-- src/mesa/main/drawpix.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 3031b7b..1369946 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers

[Mesa-dev] [PATCH 2/8] mesa: add bounds-checking support for client memory buffers

2011-04-19 Thread nobled
This is the first step towards supporting the extension GL_ARB_robustness. --- src/mesa/drivers/dri/intel/intel_pixel_bitmap.c |2 +- src/mesa/drivers/x11/xm_dd.c|6 +- src/mesa/main/dlist.c |4 +- src/mesa/main/drawpix.c

  1   2   >