[Mesa-dev] [PATCH] i965: Fix virtual_grf_interferes() between calculate_live_intervals() and DCE.

2012-09-05 Thread Eric Anholt
This fixes the blue zombies bug in l4d2. NOTE: This is a candidate for the 9.0 branch. --- .../drivers/dri/i965/brw_fs_live_variables.cpp | 24 1 file changed, 24 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH] build/glsl: Add missing extension for builtin_compiler.

2012-09-05 Thread Vinson Lee
Signed-off-by: Vinson Lee --- src/glsl/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am index 20639c9..f9c8671 100644 --- a/src/glsl/Makefile.am +++ b/src/glsl/Makefile.am @@ -93,7 +93,7 @@ BUILT_SOURCES = glsl_parser.h

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Oliver McFadden
On Wed, Sep 05, 2012 at 08:11:55AM -0600, Brian Paul wrote: > On 09/05/2012 03:38 AM, Oliver McFadden wrote: > > On Tue, Sep 04, 2012 at 12:41:12PM -0600, Brian Paul wrote: > >> On 09/04/2012 12:08 PM, Ian Romanick wrote: > >>> On 09/04/2012 08:16 AM, Brian Paul wrote: > >> > >> > Most of the

Re: [Mesa-dev] [PATCH 1/2] main: add _mesa_is_gles1() and _mesa_is_gles2() inline functions.

2012-09-05 Thread Oliver McFadden
On Wed, Sep 05, 2012 at 08:50:11AM -0700, Matt Turner wrote: > On Wed, Sep 5, 2012 at 2:29 AM, Oliver McFadden > wrote: > > Dependencies > > Requires OpenGL ES 2.0. > > The extension is written against the OpenGL ES 2.0 specification. > > > > I am unsure whether that means "equal to" or "greater t

Re: [Mesa-dev] [PATCH 1/4] mesa: s/CONST/const/ in math/ files

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 7:27 PM, Brian Paul wrote: > From: Brian Paul > > The CONST macro hack will go away soon. > --- Series is Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/lis

[Mesa-dev] [PATCH 4/4] mesa: remove #undef CONST in get.c

2012-09-05 Thread Brian Paul
From: Brian Paul --- src/mesa/main/get.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index fe1035b..24d2a18 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -61,8 +61,6 @@ * is about as concise as the specific

[Mesa-dev] [PATCH 3/4] mesa: remove now unused CONST macro

2012-09-05 Thread Brian Paul
From: Brian Paul --- src/mesa/main/compiler.h | 11 --- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 94484d8..32efe84 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -161,17 +161,6 @@ e

[Mesa-dev] [PATCH 2/4] mesa: s/CONST/const/ in a comment

2012-09-05 Thread Brian Paul
From: Brian Paul --- src/mesa/x86/norm_args.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/x86/norm_args.h b/src/mesa/x86/norm_args.h index 5d35283..e22f8bb 100644 --- a/src/mesa/x86/norm_args.h +++ b/src/mesa/x86/norm_args.h @@ -36,10 +36,10 @@ /* Of

[Mesa-dev] [PATCH 1/4] mesa: s/CONST/const/ in math/ files

2012-09-05 Thread Brian Paul
From: Brian Paul The CONST macro hack will go away soon. --- src/mesa/math/m_trans_tmp.h | 16 src/mesa/math/m_translate.c | 34 +- src/mesa/math/m_translate.h | 18 +- src/mesa/math/m_xform.h | 16 4 f

Re: [Mesa-dev] Default CC list of mesa driver bug

2012-09-05 Thread Marek Olšák
On Tue, Sep 4, 2012 at 7:40 PM, Eric Anholt wrote: > Brian Paul writes: > >> On 09/02/2012 01:42 PM, Fabio Pedretti wrote: >>> I noticed that mesa bug report got CCed to mesa-dev list, while driver mesa >>> bug >>> went to dri-devel. >> >> That does seem kind of weird. >> >>> Is this intended, w

Re: [Mesa-dev] [PATCH 09/19] mesa: Don't set dispatch pointer for VAOs in ES2

2012-09-05 Thread Ian Romanick
On 09/05/2012 03:09 PM, Ian Romanick wrote: From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick Ignore this patch. GL_OES_vertex_array_object is supported, so these functions should be available. The unit test (added in the last patch) is just wro

[Mesa-dev] [PATCH] mesa/msaa: Allow X and Y flips in multisampled blits.

2012-09-05 Thread Paul Berry
>From the GL 4.3 spec, section 18.3.1 "Blitting Pixel Rectangles": If SAMPLE_BUFFERS for either the read framebuffer or draw framebuffer is greater than zero, no copy is performed and an INVALID_OPERATION error is generated if the dimensions of the source and destination rectangles

[Mesa-dev] New Project: gtk-glxinfo

2012-09-05 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I have started turning glxinfo into a GTK 3 application. While not the most exciting project in the world, some people might find it useful. Project Home: http://code.google.com/p/gtk-glxinfo/ If anyone wants to join the project feel free to c

[Mesa-dev] [PATCH] r600g: order atom emission

2012-09-05 Thread j . glisse
From: Jerome Glisse To avoid GPU lockup registers must be emited in a specific order (no kidding ...). This patch rework atom emission so order in which atom are emited in respect to each other is always the same. We don't have any informations on what is the correct order so order will need to b

[Mesa-dev] [PATCH 19/19] mesa/tests: Sanity check the ES2 dispatch table

2012-09-05 Thread Ian Romanick
From: Ian Romanick This test is only built when shared-glapi is used. Because of changes elsewhere in the tree that were necessary to make shared-glapi work correct with GLX, it's not feasible to make the test function both ways. Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c

[Mesa-dev] [PATCH 18/19] mesa/main: Make no-op dispatch function public

2012-09-05 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 6 +++--- src/mesa/main/context.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index c0e6bc7..7e74a38 100644 --- a/src/mesa/main/context.c +++

[Mesa-dev] [PATCH 17/19] mesa/tests: Move stub function to a separate file

2012-09-05 Thread Ian Romanick
From: Ian Romanick When building with shared-glapi, we can just use Mesa's _mesa_warning without problems. stubs.cpp is only used when shared-glapi is not used. Signed-off-by: Ian Romanick --- src/mesa/main/tests/Makefile.am | 14 -- src/mesa/main/tests/enum_strings.cpp | 11

[Mesa-dev] [PATCH 15/19] mesa: Don't set shaderapi dispatch pointers for many things in ES2 or core

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 2 +- src/mesa/main/dlist.c | 2 +- src/mesa/main/shaderapi.c | 50 +-- src/mesa/main/shaderapi.h | 3 ++- 4 files chan

[Mesa-dev] [PATCH 16/19] mesa: Don't set uniform dispatch pointers for many things in ES2 or core

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 2 +- src/mesa/main/uniforms.c | 70 +--- src/mesa/main/uniforms.h | 3 ++- 3 files changed, 39 insertions(+), 36 deletions(-

[Mesa-dev] [PATCH 14/19] mesa: Don't set vtxfmt dispatch pointers for many things in ES2 or core

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/vtxfmt.c | 126 - 1 file changed, 73 insertions(+), 53 deletions(-) diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index

[Mesa-dev] [PATCH 13/19] mesa: Don't set loopback dispatch pointers for most things in ES2 or core

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 2 +- src/mesa/main/api_loopback.c | 439 ++- src/mesa/main/api_loopback.h | 4 +- src/mesa/main/dlist.c| 2 +- 4

[Mesa-dev] [PATCH 12/19] mesa: Pass GL context to _mesa_create_save_table

2012-09-05 Thread Ian Romanick
From: Ian Romanick This isn't used by this patch, but it will be necessary for several follow-on patches. Separating this out will make it easier to reorder patches later. NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 2 +- src/mesa/ma

[Mesa-dev] [PATCH 11/19] mesa: Don't set dispatch pointer for glTexStorage in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index e593c11..102637a 100644 --- a/src/me

[Mesa-dev] [PATCH 10/19] mesa: Don't set dispatch pointer for glGetProgramivARB in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick This function is not the same as glGetProgramiv. NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c ind

[Mesa-dev] [PATCH 09/19] mesa: Don't set dispatch pointer for VAOs in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index c217ff7..9a73335 100644 --- a/src/

[Mesa-dev] [PATCH 08/19] mesa: Don't set dispatch pointer for glResizeBuffersMESA in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 5e06ba0..c217ff7 100644 --- a/src/mesa/main/

[Mesa-dev] [PATCH 07/19] mesa: Don't set dispatch pointers for glPointParameter[if][v] in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index e922c23..5e06ba0 100644 --- a/src/

[Mesa-dev] [PATCH 06/19] mesa: Don't set dispatch pointers for glClearDepth or glDepthRange in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 92b0bfa..e922c23 100644 --- a/src/me

[Mesa-dev] [PATCH 01/19] gles2: Alias glReadBufferNV with desktop glReadBuffer

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick Cc: Kristian Høgsberg --- src/mapi/glapi/gen/es_EXT.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index fc2ec62..

[Mesa-dev] [PATCH 05/19] mesa: Don't set dispatch pointer for glGetBufferSubData in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/bufferobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 728cc51..b4104ec 100644 --- a/src/mesa/ma

[Mesa-dev] [PATCH 04/19] mesa: Don't set dispatch pointer for glGetDoublev in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 12bb075..92b0bfa 100644 --- a/src/mesa/main/

[Mesa-dev] [PATCH 03/19] mesa: Don't set dispatch pointer for glPointSize in ES2

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick --- src/mesa/main/api_exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index c448189..12bb075 100644 --- a/src/mesa/main/

[Mesa-dev] [PATCH 02/19] mesa: Set dispatch pointer for glShaderBinary

2012-09-05 Thread Ian Romanick
From: Ian Romanick NOTE: This is a candiate for stable branches Signed-off-by: Ian Romanick --- src/mesa/main/shaderapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index d6acade..583778b 100644 --- a/src/mesa/main/shaderapi.c +++

[Mesa-dev] [PATCH 12/12] i965/blorp: Fix offsets and width/height for stencil blits.

2012-09-05 Thread Paul Berry
Fixes piglit test "framebuffer-blit-levels draw stencil". NOTE: This is a candidate for stable release branches. --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 46 +- 1 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_

[Mesa-dev] [PATCH 10/12] i965/blorp: don't reduce stencil alignment restrictions when multisampling.

2012-09-05 Thread Paul Berry
When blitting to a stencil buffer, we need to align the rectangle we send down the rendering pipeline, to account for the fact that the stencil buffer uses a W-tiled layout, but we are configuring its surface state as Y-tiled. Previously, when the stencil buffer was multisampled, we assumed that w

[Mesa-dev] [PATCH 11/12] i965/blorp: Reduce alignment restrictions for stencil blits.

2012-09-05 Thread Paul Berry
Previously, we aligned all stencil blit operations to multiples of the size of a tile, since stencil buffers use W-tiling, and blorp has to approximate this by configuring the 3D pipeline for Y-tiling and swizzling coordinates. However, this was unnecessarily conservative; it turns out that the di

[Mesa-dev] [PATCH 09/12] intel: Add map_stencil_as_y_tiled to intel_region_get_aligned_offset.

2012-09-05 Thread Paul Berry
This patch modifies intel_region_get_aligned_offset() to make the appropriate calculation when the blorp engine sets up a W-tiled stencil buffer using a Y-tiled SURFACE_STATE. NOTE: This is a candidate for stable release branches. --- src/mesa/drivers/dri/i965/brw_blorp.cpp |3 ++- src/me

[Mesa-dev] [PATCH 08/12] intel: Add map_stencil_as_y_tiled to intel_region_get_tile_masks.

2012-09-05 Thread Paul Berry
When the blorp engine is performing a blit from one stencil buffer to another, it sets up the surface state for these buffers as Y-tiled, so it needs to be able to force intel_region_get_tile_masks() to return the appropriate masks for a Y-tiled region. NOTE: This is a candidate for stable release

[Mesa-dev] [PATCH 07/12] i965/blorp: Account for offsets when emitting SURFACE_STATE.

2012-09-05 Thread Paul Berry
Fixes piglit tests "framebuffer-blit-levels {read,draw} depth". NOTE: This is a candidate for stable release branches. --- src/mesa/drivers/dri/i965/brw_blorp.cpp | 25 + src/mesa/drivers/dri/i965/brw_blorp.h|2 ++ src/mesa/drivers/dri/i965/gen6_blorp.cpp | 13

[Mesa-dev] [PATCH 06/12] i965/blorp: Thread level and layer through brw_blorp_blit_miptrees().

2012-09-05 Thread Paul Berry
Previously, when performing a blit using the blorp engine, we failed to account for the level and layer of the source and destination. As a result, all blits would occur between miplevel 0 and layer 0 of the corresponding textures, regardless of which level/layer was bound to the framebuffer. Thi

[Mesa-dev] [PATCH 05/12] i965/blorp: store x and y offsets in brw_blorp_mip_info.

2012-09-05 Thread Paul Berry
Currently, gen{6,7}_blorp_emit_surface_state assumes that the src and dst surfaces are mapped to miplevel 0 and layer 0 (thus no surface offset is required). This is a bug, since the user might try to blit to and from levels/layers other than 0. To fix this bug, it will not be sufficient to have

[Mesa-dev] [PATCH 04/12] i965/blorp: store surface width/height in brw_blorp_mip_info.

2012-09-05 Thread Paul Berry
Previously, gen{6,7}_blorp_emit_surface_state would look up the width and height of the surface at the time they set up the surface state, and then tweak it if necessary (it's necessary when a W-tiled surface is being mapped as Y-tiled). With this patch, we look up the width and height when settin

[Mesa-dev] [PATCH 03/12] i965/blorp: Change gl_renderbuffer* params to intel_renderbuffer*.

2012-09-05 Thread Paul Berry
This makes it more convenient for blorp functions to get access to Intel-specific data inside the renderbuffer objects. NOTE: This is a candidate for stable release branches. --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 60 ++ 1 files changed, 32 insertions(+), 28

[Mesa-dev] [PATCH 02/12] i965/blorp: Clarify why width/height must be adjusted for Gen6 IMS surfaces.

2012-09-05 Thread Paul Berry
Also add a clarifying comment for why the width/height doesn't need adjustment for Gen7. NOTE: This is a candidate for stable release branches. --- src/mesa/drivers/dri/i965/gen6_blorp.cpp |6 +- src/mesa/drivers/dri/i965/gen7_blorp.cpp |5 + 2 files changed, 10 insertions(+), 1 d

[Mesa-dev] [PATCH 01/12] i965/gen6+: Adjust stencil buffer size after computing miptree layout.

2012-09-05 Thread Paul Berry
Since Gen6+ stencil buffers use W-tiling (a tiling arrangement which drm and the kernel are not aware of) we need to round up the width and height of a stencil buffer to multiples of the W-tile size (64x64) before allocating a stencil buffer. Previously, we rounded up the size of the base miplevel

[Mesa-dev] [PATCH 00/12] i965/blorp: Fix blits between miplevels other than zero.

2012-09-05 Thread Paul Berry
This patch series addresses a bug Eric Anholt and Chad Versace noticed a few weeks ago: the blorp engine wasn't paying attention to miplevels and layers; as a result, all blits were occuring on miplevel/layer zero, regardless of which level and layer were bound to the framebuffer. Patch 01 fixes a

Re: [Mesa-dev] [PATCH 1/2] _mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

2012-09-05 Thread Anuj Phogat
On Wed, Sep 5, 2012 at 7:58 AM, Brian Paul wrote: > > On 09/04/2012 08:42 PM, Anuj Phogat wrote: >> >> glsl path of _mesa_meta_GenerateMipmap() function would require different >> fragment >> shaders depending on the texture target. This patch adds the code to generate >> appropriate fragment sha

Re: [Mesa-dev] [PATCH 5/9] Remove useless checks for NULL before freeing

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 7:33 AM, Brian Paul wrote: > On 09/05/2012 12:42 AM, Matt Turner wrote: >> >> This patch has been generated by the following Coccinelle semantic >> patch: >> >> // Remove useless checks for NULL before freeing >> // >> // free (NULL) is a no-op, so there is no need to avoid

Re: [Mesa-dev] [PATCH] intel: avoid undefined variable warnings in intel_screen.c

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 10:39 AM, Paul Berry wrote: > --- > src/mesa/drivers/dri/intel/intel_screen.c |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/intel/intel_screen.c > b/src/mesa/drivers/dri/intel/intel_screen.c > index 3470db6..ca6ac34

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 10:42 AM, Jose Fonseca wrote: > - Original Message - >> On 09/05/2012 12:42 AM, Matt Turner wrote: >> > This patch has been generated by the following Coccinelle semantic >> > patch: >> > >> > // Don't cast the return value of malloc/realloc. >> > // >> > // Casting

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Jose Fonseca
- Original Message - > On 09/05/2012 12:42 AM, Matt Turner wrote: > > This patch has been generated by the following Coccinelle semantic > > patch: > > > > // Don't cast the return value of malloc/realloc. > > // > > // Casting the return value of malloc/realloc only stands to hide > > // e

[Mesa-dev] [PATCH] intel: avoid undefined variable warnings in intel_screen.c

2012-09-05 Thread Paul Berry
--- src/mesa/drivers/dri/intel/intel_screen.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 3470db6..ca6ac34 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Brian Paul
On 09/05/2012 11:22 AM, Alan Coopersmith wrote: On 09/ 5/12 10:16 AM, Matt Turner wrote: On Wed, Sep 5, 2012 at 7:30 AM, Brian Paul wrote: So assigning a void pointer to a non-void pointer is legal in C and illegal in C++. I seem to recall some people compiling all of Mesa with C++ in some si

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Alan Coopersmith
On 09/ 5/12 10:16 AM, Matt Turner wrote: > On Wed, Sep 5, 2012 at 7:30 AM, Brian Paul wrote: >> So assigning a void pointer to a non-void pointer is legal in C and illegal >> in C++. I seem to recall some people compiling all of Mesa with C++ in some >> situations in the past. Also, there were s

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 7:30 AM, Brian Paul wrote: > So assigning a void pointer to a non-void pointer is legal in C and illegal > in C++. I seem to recall some people compiling all of Mesa with C++ in some > situations in the past. Also, there were some C compiler(s) years ago that > required th

Re: [Mesa-dev] [PATCH 1/2] main: add _mesa_is_gles1() and _mesa_is_gles2() inline functions.

2012-09-05 Thread Matt Turner
On Wed, Sep 5, 2012 at 2:29 AM, Oliver McFadden wrote: > Dependencies > Requires OpenGL ES 2.0. > The extension is written against the OpenGL ES 2.0 specification. > > I am unsure whether that means "equal to" or "greater than equal to" That usually (always?) means "greater than or equal to". GLE

Re: [Mesa-dev] [PATCH 7/8] i965: Support instruction compaction between control flow.

2012-09-05 Thread Eric Anholt
Paul Berry writes: > I'm running out of time to look at this today, so I had to stop reviewing > here. I think the stuff that follows is likely correct (because if it > weren't, it would probably fail spectacularly :)). I'll try to return to > it tomorrow just to make sure. I think I've incorpo

Re: [Mesa-dev] [PATCH 1/2] _mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

2012-09-05 Thread Brian Paul
On 09/04/2012 08:42 PM, Anuj Phogat wrote: glsl path of _mesa_meta_GenerateMipmap() function would require different fragment shaders depending on the texture target. This patch adds the code to generate appropriate fragment shader programs at run time. Fixes https://bugs.freedesktop.org/show_bu

Re: [Mesa-dev] [PATCH] Use the correct macro _WIN32 for Windows.

2012-09-05 Thread Brian Paul
On 09/05/2012 12:12 AM, Vinson Lee wrote: Signed-off-by: Vinson Lee --- src/gallium/auxiliary/util/u_snprintf.c |2 +- src/gallium/auxiliary/util/u_string.h |4 ++-- src/gallium/tests/graw/fs-test.c|2 +- src/gallium/tests/graw/gs-test.c|2 +- src/gallium/t

Re: [Mesa-dev] [PATCH 5/9] Remove useless checks for NULL before freeing

2012-09-05 Thread Brian Paul
On 09/05/2012 08:33 AM, Brian Paul wrote: On 09/05/2012 12:42 AM, Matt Turner wrote: This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + fr

Re: [Mesa-dev] [PATCH 9/9] Remove useless checks for NULL before freeing

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FR

Re: [Mesa-dev] [PATCH 8/9] Replace another malloc/memset-0 combination with calloc

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: --- src/glx/indirect_glx.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c index f3cc1e7..ff869e2 100644 --- a/src/glx/indirect_glx.c +++ b/src/glx/indirect_glx.c @@ -361,14 +3

Re: [Mesa-dev] [PATCH 7/9] Remove useless memset after calloc

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: --- src/glx/dri_glx.c |1 - src/glx/drisw_glx.c |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 3a727e5..03237d4 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -850

Re: [Mesa-dev] [PATCH 6/9] Use calloc instead of malloc/memset-0

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: This patch has been generated by the following Coccinelle semantic patch: @@ expression E; identifier I; @@ - I = malloc(E); + I = calloc(1, E); ... - memset(I, 0, sizeof *I); --- src/egl/drivers/dri2/egl_dri2.c |4 +--- src/egl/drivers/d

Re: [Mesa-dev] [PATCH 5/9] Remove useless checks for NULL before freeing

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NU

Re: [Mesa-dev] [PATCH 3/9] Don't cast the return value of malloc/realloc

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. So assigning a void pointer to a non-void point

Re: [Mesa-dev] [PATCH 2/9] glX_proto_send.py: Remove deprecated Xmalloc/Xfree calls

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: --- src/mapi/glapi/gen/glX_proto_send.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.fre

Re: [Mesa-dev] [PATCH 1/9] Remove Xcalloc/Xmalloc/Xfree calls

2012-09-05 Thread Brian Paul
On 09/05/2012 12:42 AM, Matt Turner wrote: These calls allowed Xlib to use a custom memory allocator, but Xlib has used the standard C library functions since at least its initial import into git in 2003. It seems unlikely that it will grow a custom memory allocator. The functions now just add ex

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Brian Paul
On 09/05/2012 03:38 AM, Oliver McFadden wrote: On Tue, Sep 04, 2012 at 12:41:12PM -0600, Brian Paul wrote: On 09/04/2012 12:08 PM, Ian Romanick wrote: On 09/04/2012 08:16 AM, Brian Paul wrote: Most of the patch is 'FEATURE_x' changes. I've been tempted to rip out all that stuff. The origin

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Kenneth Graunke
On 09/04/2012 04:53 AM, Oliver McFadden wrote: > diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c > b/src/mesa/drivers/dri/intel/intel_extensions.c > index 885e8a4..b8cf933 100755 > --- a/src/mesa/drivers/dri/intel/intel_extensions.c > +++ b/src/mesa/drivers/dri/intel/intel_extensions.c

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Kenneth Graunke
On 09/04/2012 10:33 AM, Eric Anholt wrote: > Brian Paul writes: >> Most of the patch is 'FEATURE_x' changes. I've been tempted to rip >> out all that stuff. >> >> The original idea was to make it easy for people to build smaller Mesa >> subsets (and the ES subset) by running the code through th

[Mesa-dev] [Bug 54557] New: Segfault calling eglWaitClient on EGL X11 platform with software rendering

2012-09-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=54557 Bug #: 54557 Summary: Segfault calling eglWaitClient on EGL X11 platform with software rendering Classification: Unclassified Product: Mesa Version: 8.0 Platform: All

Re: [Mesa-dev] [PATCH 5/8] i965: Prepare the uip/jip setting for compacted instructions in the program.

2012-09-05 Thread Eric Anholt
Paul Berry writes: > On 31 August 2012 11:32, Eric Anholt wrote: > >> The first cut at instruction compaction won't compact things that >> would change control flow jump distances, but we do need to still be >> able to walk the instruction stream, which involves jumping by 8 or 16 >> bytes betwe

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Oliver McFadden
On Tue, Sep 04, 2012 at 12:41:12PM -0600, Brian Paul wrote: > On 09/04/2012 12:08 PM, Ian Romanick wrote: > > On 09/04/2012 08:16 AM, Brian Paul wrote: > > > >> Most of the patch is 'FEATURE_x' changes. I've been tempted to rip out > >> all that stuff. > >> > >> The original idea was to make it e

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Oliver McFadden
On Tue, Sep 04, 2012 at 09:16:38AM -0600, Brian Paul wrote: > On 09/04/2012 05:53 AM, Oliver McFadden wrote: > > From: Oliver McFadden > > > > http://www.khronos.org/registry/gles/extensions/ANGLE/ANGLE_texture_compression_dxt.txt > > > > Signed-off-by: Oliver McFadden > > --- > > src/glx/glxexte

Re: [Mesa-dev] [PATCH 2/2] intel: add ANGLE_texture_compression_dxt extension support.

2012-09-05 Thread Oliver McFadden
On Tue, Sep 04, 2012 at 11:08:41AM -0700, Ian Romanick wrote: > On 09/04/2012 04:53 AM, Oliver McFadden wrote: > > From: Oliver McFadden > > > > http://www.khronos.org/registry/gles/extensions/ANGLE/ANGLE_texture_compression_dxt.txt > > > > Signed-off-by: Oliver McFadden > > --- > > src/glx/glx

Re: [Mesa-dev] [PATCH 1/2] main: add _mesa_is_gles1() and _mesa_is_gles2() inline functions.

2012-09-05 Thread Oliver McFadden
On Tue, Sep 04, 2012 at 10:37:58AM -0700, Matt Turner wrote: > On Tue, Sep 4, 2012 at 4:53 AM, Oliver McFadden > wrote: > > From: Oliver McFadden > > > > Signed-off-by: Oliver McFadden > > --- > > src/mesa/main/context.h | 20 > > 1 files changed, 20 insertions(+), 0 dele

Re: [Mesa-dev] [PATCH 1/2] main: add _mesa_is_gles1() and _mesa_is_gles2() inline functions.

2012-09-05 Thread Oliver McFadden
On Tue, Sep 04, 2012 at 11:09:21AM -0700, Ian Romanick wrote: > On 09/04/2012 04:53 AM, Oliver McFadden wrote: > > From: Oliver McFadden > > > > Signed-off-by: Oliver McFadden > > --- > > src/mesa/main/context.h | 20 > > 1 files changed, 20 insertions(+), 0 deletions(-)

[Mesa-dev] [Bug 44912] [bisected] WebGL conformance/textures/texture-mips tests fails

2012-09-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44912 Michel Dänzer changed: What|Removed |Added Component|Other |Mesa core -- Configure bugmail: https:/

[Mesa-dev] Signed/unsigned bug in r300 compiler

2012-09-05 Thread Matt Turner
Hi Tom, In playing with Coccinelle, I discovered a signed/unsigned bug in radeon_rename_regs.c:rc_rename_regs. unsigned new_index; unsigned writemask; struct rc_variable * var = var_ptr->Item; if (var->Inst->U.I.DstReg.File != RC_FILE_TEMPORARY) { continue; } new_index = rc_find_free_te