Re: [Mesa-dev] [PATCH] clover: Handle NULL devs argument in clBuildProgram

2012-07-01 Thread Francisco Jerez
Tom Stellard  writes:

> On Fri, Jun 29, 2012 at 12:18:15AM +0200, Francisco Jerez wrote:
>> Tom Stellard  writes:
>> 
>> > If devs is NULL, then the kernel should be compiled for all devices
>> > associated with the program's context.
>> > ---
>> >  src/gallium/state_trackers/clover/api/program.cpp |   16 ++--
>> >  1 files changed, 10 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/src/gallium/state_trackers/clover/api/program.cpp 
>> > b/src/gallium/state_trackers/clover/api/program.cpp
>> > index e874c51..e863e00 100644
>> > --- a/src/gallium/state_trackers/clover/api/program.cpp
>> > +++ b/src/gallium/state_trackers/clover/api/program.cpp
>> > @@ -142,12 +142,16 @@ clBuildProgram(cl_program prog, cl_uint count, const 
>> > cl_device_id *devs,
>> > (!pfn_notify && user_data))
>> >throw error(CL_INVALID_VALUE);
>> >  
>> > -   if (any_of([&](const cl_device_id dev) {
>> > -return !prog->ctx.has_device(dev);
>> > - }, devs, devs + count))
>> > -  throw error(CL_INVALID_DEVICE);
>> > -
>> > -   prog->build({ devs, devs + count });
>> > +   if (devs) {
>> > +  if (any_of([&](const cl_device_id dev) {
>> > +   return !prog->ctx.has_device(dev);
>> > +}, devs, devs + count))
>> > + throw error(CL_INVALID_DEVICE);
>> > +
>> > +  prog->build({ devs, devs + count });
>> > +   } else {
>> > +  prog->build({ prog->ctx.devs.begin(), prog->ctx.devs.end() });
>> 
>> How about 'prog->build(prog->ctx.devs);'?
>> 
>> The spec doesn't seem very clear on what should happen in that case, but
>> isn't this wrong for programs created with 'clCreateProgramWithBinary'
>> that are associated with a specific subset of devices from the program
>> context?
>>
>
> The way I read the spec is that clBuildProgram should 'build' the binaries
> as well.  I guess depending on the binary format, this could either be
> a noop or maybe a conversion from one binary format to another.  In any
> case, it seems like the program should know what to do when the build
> method is called.
>
OK, for now I've pushed this patch (with a minor style change) and the
fix for the event handling segfault you had seen.

Thanks.


pgpW1OUh925hi.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 49039] Gnome 3.4 ArchLinux Beta Testing

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49039

Emil Velikov  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #10 from Emil Velikov  2012-07-01 
06:57:09 PDT ---


*** This bug has been marked as a duplicate of bug 48441 ***

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 48441] gnome-control-center crashes

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=48441

Emil Velikov  changed:

   What|Removed |Added

 CC||gm5...@gmail.com

--- Comment #23 from Emil Velikov  2012-07-01 
06:57:09 PDT ---
*** Bug 49039 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 43520] CoreBreach: Static lighting broken in Mesa 7.11

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43520

Javier Jardón  changed:

   What|Removed |Added

 CC||jjar...@gnome.org

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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 -0600
>
> mesa: #define fprintf to be __mingw_fprintf() on Mingw32
>
> So that formats such as "%llx" are understood.

Can't you just use the PRIx64 portability macro (and the others) instead?


>
> Reviewed-by: Kenneth Graunke 
>
> ---
>
>  src/mesa/main/imports.h |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
> index c0b6cec..9fb6ae8 100644
> --- a/src/mesa/main/imports.h
> +++ b/src/mesa/main/imports.h
> @@ -646,6 +646,16 @@ _mesa_vsnprintf(char *str, size_t size, const char *fmt, 
> va_list arg);
>  #endif
>
>
> +/**
> + * On Mingw32 we need to use __mingw_fprintf() to parse formats such
> + * as "0x%llx", and possibly others
> + */
> +#ifdef __MINGW32__
> +#define fprintf __mingw_fprintf
> +#endif
> +
> +
> +
>  #ifdef __cplusplus
>  }
>  #endif
>
> ___
> mesa-commit mailing list
> mesa-com...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-commit
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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/extensions.c |1 +
>  src/mesa/main/get.c|   20 +++-
>  src/mesa/main/mtypes.h |1 +
>  6 files changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
> index c7e7d07..b26cac5 100644
> --- a/src/mapi/glapi/gen/es_EXT.xml
> +++ b/src/mapi/glapi/gen/es_EXT.xml
> @@ -627,4 +627,11 @@
>  
>  
>
> +
> +
> +
> +
> +
> +
> +
>  
> diff --git a/src/mapi/glapi/gen/gles_api.py b/src/mapi/glapi/gen/gles_api.py
> index 0116ba4..70ae2e3 100644
> --- a/src/mapi/glapi/gen/gles_api.py
> +++ b/src/mapi/glapi/gen/gles_api.py
> @@ -451,4 +451,6 @@ es2_api = es2_core + (
>  'ProgramBinaryOES',
>  # GL_NV_draw_buffers
>  'DrawBuffersNV',
> +# GL_NV_read_buffer
> +'ReadBufferNV',
>  )
> diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
> index f23857a..64e666e 100644
> --- a/src/mesa/main/APIspec.xml
> +++ b/src/mesa/main/APIspec.xml
> @@ -3534,6 +3534,13 @@
> 
>  
>
> +
> +   
> +   
> +   
> +   
> +
> +
>  
> 
>
> @@ -3810,6 +3817,9 @@
>   template="EGLImageTargetRenderbufferStorage"/>
>
> 
> +
> +   
> +
>  
>
>  
> @@ -4150,7 +4160,10 @@
>  
>
> 
> +   
> +
> 
> +   
>
> 
>
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 2688f7a..0e81783 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -300,6 +300,7 @@ static const struct extension extension_table[] = {
> { "GL_NV_packed_depth_stencil", 
> o(EXT_packed_depth_stencil),GL, 2000 },
> { "GL_NV_point_sprite", o(NV_point_sprite),   
>   GL, 2001 },
> { "GL_NV_primitive_restart",o(NV_primitive_restart),  
>   GL, 2002 },
> +   { "GL_NV_read_buffer",  o(dummy_true),
>   ES2,2011 },
This is always advertised, but...


> { "GL_NV_texgen_reflection",o(NV_texgen_reflection),  
>   GL, 1999 },
> { "GL_NV_texture_barrier",  o(NV_texture_barrier),
>   GL, 2009 },
> { "GL_NV_texture_env_combine4", 
> o(NV_texture_env_combine4), GL, 1999 },
> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> index a8e1d86..969b55b 100644
> --- a/src/mesa/main/get.c
> +++ b/src/mesa/main/get.c
> @@ -131,6 +131,7 @@ enum value_extra {
> EXTRA_VERSION_30,
> EXTRA_VERSION_31,
> EXTRA_VERSION_32,
> +   EXTRA_API_GL,
> EXTRA_API_ES2,
> EXTRA_NEW_BUFFERS,
> EXTRA_NEW_FRAG_CLAMP,
> @@ -369,6 +370,13 @@ extra_ARB_vertex_program_api_es2[] = {
> EXTRA_END
>  };
>
> +static const int
> +extra_NV_read_buffer_api_gl[] = {
> +   EXT(NV_read_buffer),
> +   EXTRA_API_GL,
> +   EXTRA_END
> +};
> +
>  #define API_OPENGL_BIT (1 << API_OPENGL)
>  #define API_OPENGLES_BIT (1 << API_OPENGLES)
>  #define API_OPENGLES2_BIT (1 << API_OPENGLES2)
> @@ -750,6 +758,11 @@ static const struct value_desc values[] = {
> /* GL_ARB_fragment_program/OES_standard_derivatives */
> { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB,
>   CONTEXT_ENUM(Hint.FragmentShaderDerivative), extra_ARB_fragment_shader 
> },
> +
> +   /* GL_NV_read_buffer */
> +   { GL_READ_BUFFER,
> + LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, extra_NV_read_buffer_api_gl },
> +
The query only actually works when this newly-added extension field is
set to true... which is never, right?

>  #endif /* FEATURE_GL || FEATURE_ES2 */
>
>  #if FEATURE_ES2
> @@ -884,7 +897,6 @@ static const struct value_desc values[] = {
> { GL_POLYGON_SMOOTH, CONTEXT_BOOL(Polygon.SmoothFlag), NO_EXTRA },
> { GL_POLYGON_SMOOTH_HINT, CONTEXT_ENUM(Hint.PolygonSmooth), NO_EXTRA },
> { GL_POLYGON_STIPPLE, CONTEXT_BOOL(Polygon.StippleFlag), NO_EXTRA },
> -   { GL_READ_BUFFER, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
> { GL_RED_BIAS, CONTEXT_FLOAT(Pixel.RedBias), NO_EXTRA },
> { GL_RED_SCALE, CONTEXT_FLOAT(Pixel.RedScale), NO_EXTRA },
> { GL_RENDER_MODE, CONTEXT_ENUM(RenderMode), NO_EXTRA },
> @@ -1814,6 +1826,12 @@ check_extra(struct gl_context *ctx, const char *func, 
> const struct value_desc *d
> enabled++;
>  }
>  break;
> +  case EXTRA_API_GL:
> +if (ctx->API == API_OPENGL) {
> +   total++;
> +   enabled++;
> +}
> +break;
>case EXTRA_NEW_BUFFERS:

[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 ++--
 1 file changed, 29 insertions(+), 23 deletions(-)

diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index d0d0a7b..d3a82e4 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -159,82 +159,88 @@ $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h:
$(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES)
--printer glapi --mode lib gl_and_es_API.xml > $@

 $(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 $(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 $(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 $(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 ##

 $(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 $(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 ##

 $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES)
-   $(PYTHON_GEN) $< -f gl_and_es_API.xml > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_and_es_API.xml > $@

 $(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON)
-   $(PYTHON_GEN) $< -m remap_table > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m remap_table > $@

 $(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
-   $(PYTHON_GEN) $< > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@

 ##

 $(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m proto \
+ | $(INDENT) $(INDENT_FLAGS) > $@

 $(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m init_h > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_h > $@

 $(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m init_c > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_c > $@

 $(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h:
glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h --only-set \
+   -h _INDIRECT_SIZE_H_ \
  | $(INDENT) $(INDENT_FLAGS) > $@

 $(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m size_c --only-set \
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c --only-set \
  | $(INDENT) $(INDENT_FLAGS) > $@

 ##

 $(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m dispatch_c > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c > $@

 $(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m dispatch_c -s > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c -s > $@

 $(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py
gl_and_glX_API.xml $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
+   $(PYTHON_GEN) $< -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s > $@

 $(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h \
+  --only-get -h '_INDIRECT_SIZE_GET_H_' \
  | $(INDENT) $(INDENT_FLAGS) > $@

 $(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c \
+ | $(INDENT) $(INDENT_FLAGS) > $@

 $(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+   $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m reqsize_h \
+  --only-g

[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_remap_helper.h:
$(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_d
 main/api_exec_es2.o: main/api_exec_es2_dispatch.h
main/api_exec_es2_remap_helper.h

 main/api_exec_es1.c: main/APIspec.xml main/es_generator.py
main/APIspecutil.py main/APIspec.py
-   $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml
-V GLES1.1 > $@
+   $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
+ -S $(srcdir)/main/APIspec.xml -V GLES1.1 > $@

 main/api_exec_es2.c: main/APIspec.xml main/es_generator.py
main/APIspecutil.py main/APIspec.py
-   $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml
-V GLES2.0 > $@
+   $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
+ -S $(srcdir)/main/APIspec.xml -V GLES2.0 > $@

 program/program_parse.tab.c program/program_parse.tab.h:
program/program_parse.y
$(YACC) -v -d --output=program/program_parse.tab.c $<
-- 
1.7.9.5
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[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/APIspecutil.py m
  -S $(srcdir)/main/APIspec.xml -V GLES2.0 > $@

 program/program_parse.tab.c program/program_parse.tab.h:
program/program_parse.y
+   mkdir -p program
$(YACC) -v -d --output=program/program_parse.tab.c $<

 program/lex.yy.c: program/program_lexer.l
+   mkdir -p program
$(LEX) --never-interactive --outfile=$@ $<

 all-local:
-- 
1.7.9.5
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[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 @@ program/lex.yy.c: program/program_lexer.l
$(LEX) --never-interactive --outfile=$@ $<

 all-local:
-   $(MAKE) -f Makefile.old
+   $(MAKE) -f $(srcdir)/Makefile.old

 install-exec-local:
-   $(MAKE) -f Makefile.old install
+   $(MAKE) -f $(srcdir)/Makefile.old install

 clean-local:
-   $(MAKE) -f Makefile.old clean
+   $(MAKE) -f $(srcdir)/Makefile.old clean

 pkgconfigdir = $(libdir)/pkgconfig

-- 
1.7.9.5
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[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|4 ++--
 src/egl/drivers/dri2/platform_x11.c|4 ++--
 .../wayland/wayland-drm/protocol/wayland-drm.xml   |2 +-
 src/egl/wayland/wayland-drm/wayland-drm.c  |4 ++--
 src/egl/wayland/wayland-drm/wayland-drm.h  |2 +-
 src/gallium/state_trackers/egl/x11/x11_screen.c|4 ++--
 src/gallium/state_trackers/egl/x11/x11_screen.h|2 +-
 9 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index c30e230..97b88a5 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -127,7 +127,7 @@ struct dri2_egl_display
int  formats;
 #endif

-   int (*authenticate) (_EGLDisplay *disp, uint32_t id);
+   int (*authenticate) (_EGLDisplay *disp, uint32_t magic);
 };

 struct dri2_egl_context
diff --git a/src/egl/drivers/dri2/platform_drm.c
b/src/egl/drivers/dri2/platform_drm.c
index 54067ff..8a6d385 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -382,11 +382,11 @@ dri2_drm_create_image_khr(_EGLDriver *drv,
_EGLDisplay *disp,
 }

 static int
-dri2_drm_authenticate(_EGLDisplay *disp, uint32_t id)
+dri2_drm_authenticate(_EGLDisplay *disp, uint32_t magic)
 {
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);

-   return drmAuthMagic(dri2_dpy->fd, id);
+   return drmAuthMagic(dri2_dpy->fd, magic);
 }

 EGLBoolean
diff --git a/src/egl/drivers/dri2/platform_wayland.c
b/src/egl/drivers/dri2/platform_wayland.c
index d291f0f..3423236 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -692,14 +692,14 @@ dri2_wayland_create_image_khr(_EGLDriver *drv,
_EGLDisplay *disp,
 }

 static int
-dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
+dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t magic)
 {
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
int ret = 0;

dri2_dpy->authenticated = 0;

-   wl_drm_authenticate(dri2_dpy->wl_drm, id);
+   wl_drm_authenticate(dri2_dpy->wl_drm, magic);
wl_display_roundtrip(dri2_dpy->wl_dpy);

if (!dri2_dpy->authenticated)
diff --git a/src/egl/drivers/dri2/platform_x11.c
b/src/egl/drivers/dri2/platform_x11.c
index 7486a91..f4629bf 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -564,7 +564,7 @@ dri2_connect(struct dri2_egl_display *dri2_dpy)
 }

 static int
-dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
+dri2_x11_authenticate(_EGLDisplay *disp, uint32_t magic)
 {
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
xcb_dri2_authenticate_reply_t *authenticate;
@@ -574,7 +574,7 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)

s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
authenticate_cookie =
-  xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, id);
+  xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, magic);
authenticate =
   xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);

diff --git a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
index 89fd8f0..5ed307e 100644
--- a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
+++ b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
@@ -105,7 +105,7 @@
  DRIAuthConnection() call.  This authentication must be
  completed before create_buffer could be used. -->
 
-  
+  
 

 

[Mesa-dev] [Bug 51629] New: [swrast] piglit fbo-1d regression

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=51629

 Bug #: 51629
   Summary: [swrast] piglit fbo-1d regression
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Other
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: v...@freedesktop.org
CC: mar...@gmail.com


mesa: 1d21bd057a6b1701dd44a79e82259c0f3ded2b70

Run piglit fbo-1d on swrast.

$ ./bin/fbo-1d -auto
Probe at (10,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (11,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (12,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (13,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (14,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (15,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (16,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (17,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (18,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (19,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (20,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (21,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (22,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (23,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (24,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (25,10)
  Expected: 1.00 0.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (26,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (27,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (28,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (29,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (30,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (31,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (32,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (33,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (34,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (35,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (36,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (37,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (38,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (39,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (40,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
Probe at (41,10)
  Expected: 0.00 1.00 0.00
  Observed: 1.00 1.00 1.00
PIGLIT: {'result': 'fail' }


62b971673950148eb949ba23d7fdc47debea16f0 is the first bad commit
commit 62b971673950148eb949ba23d7fdc47debea16f0
Author: Marek Olšák 
Date:   Wed Jun 27 06:10:30 2012 +0200

vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around

Reviewed-by: Brian Paul 

:04 04 56d4884d4678c5f664f1e296fe25b9e24dd3224c
bf047b310c7d9a19aace765b22d7095527db2d99 Msrc
bisect run success

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51366] [llvmpipe] src/gallium/auxiliary/draw/draw_llvm.c:1475:draw_llvm_generate: Assertion `0' failed.

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=51366

Vinson Lee  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #3 from Vinson Lee  2012-07-01 14:29:46 PDT 
---
mesa: ca8fa0230896727af81ee54197f6e2233d49481d

The crash still occurs.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51364] piglit fs-clip-distance-interpolated regression

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=51364

Vinson Lee  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #4 from Vinson Lee  2012-07-01 14:31:26 PDT 
---
mesa: 1d21bd057a6b1701dd44a79e82259c0f3ded2b70 (master)

piglit fs-clip-distance-interpolated is still failing on softpipe.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2012-07-01 Thread Kenneth Graunke
On 07/01/2012 11:10 AM, nobled wrote:
> 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 
> ++--
>  1 file changed, 29 insertions(+), 23 deletions(-)
> 
> diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
> index d0d0a7b..d3a82e4 100644
> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -159,82 +159,88 @@ $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h:
> $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES)
>   --printer glapi --mode lib gl_and_es_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  ##
> 
>  $(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  ##
> 
>  $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES)
> - $(PYTHON_GEN) $< -f gl_and_es_API.xml > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_and_es_API.xml > $@
> 
>  $(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON)
> - $(PYTHON_GEN) $< -m remap_table > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m remap_table > $@
> 
>  $(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
> - $(PYTHON_GEN) $< > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
> 
>  ##
> 
>  $(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m proto \
> +   | $(INDENT) $(INDENT_FLAGS) > $@
> 
>  $(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m init_h > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_h > $@
> 
>  $(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m init_c > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_c > $@
> 
>  $(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h:
> glX_proto_size.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h --only-set \
> + -h _INDIRECT_SIZE_H_ \
> | $(INDENT) $(INDENT_FLAGS) > $@
> 
>  $(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m size_c --only-set \
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c --only-set \
> | $(INDENT) $(INDENT_FLAGS) > $@
> 
>  ##
> 
>  $(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m dispatch_c > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c > $@
> 
>  $(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m dispatch_c -s > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c -s > $@
> 
>  $(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py
> gl_and_glX_API.xml $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
> + $(PYTHON_GEN) $< -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s > $@
> 
>  $(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h \
> +--only-get -h '_INDIRECT_SIZE_GET_H_' \
> | $(INDENT) $(INDENT_FLAGS) > $@
> 
>  $(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
> - $(PYTHON_GEN) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
> + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c \
> +   | $(INDENT) $(INDENT_FLAGS) > $@
> 
>  $(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py 

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

2012-07-01 Thread Kenneth Graunke
On 07/01/2012 11:10 AM, nobled wrote:
> 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_remap_helper.h:
> $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_d
>  main/api_exec_es2.o: main/api_exec_es2_dispatch.h
> main/api_exec_es2_remap_helper.h
> 
>  main/api_exec_es1.c: main/APIspec.xml main/es_generator.py
> main/APIspecutil.py main/APIspec.py
> - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml
> -V GLES1.1 > $@
> + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
> +   -S $(srcdir)/main/APIspec.xml -V GLES1.1 > $@
> 
>  main/api_exec_es2.c: main/APIspec.xml main/es_generator.py
> main/APIspecutil.py main/APIspec.py
> - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml
> -V GLES2.0 > $@
> + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
> +   -S $(srcdir)/main/APIspec.xml -V GLES2.0 > $@
> 
>  program/program_parse.tab.c program/program_parse.tab.h:
> program/program_parse.y
>   $(YACC) -v -d --output=program/program_parse.tab.c $<

Patches 2-4 look fine too.
Reviewed-by: Kenneth Graunke 


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] i965: fix transform feedback with primitive restart

2012-07-01 Thread Kenneth Graunke
On 06/28/2012 04:12 PM, Jordan Justen wrote:
> When querying GL_PRIMITIVES_GENERATED, if primitive restart
> is also used, then take the software primitive restart
> path so GL_PRIMITIVES_GENERATED is returned correctly.
> 
> GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN is also updated
> since it will also affected by the same issue.
> 
> As noted in brw_primitive_restart.c, with further work we
> should be able to move this situation back to a hardware
> handled path.
> 
> Signed-off-by: Jordan Justen 
> ---
>  src/mesa/drivers/dri/i965/brw_context.h   |2 ++
>  src/mesa/drivers/dri/i965/brw_primitive_restart.c |   12 
>  src/mesa/drivers/dri/i965/brw_queryobj.c  |4 
>  3 files changed, 18 insertions(+)

Wow.  This was a lot simpler than I thought.  Nice interim solution;
hopefully we can get the actual hardware counters working though.

Reviewed-by: Kenneth Graunke 


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Remove unused ir_loop_jump::loop pointer.

2012-07-01 Thread Kenneth Graunke
Commit 0c005bd7 intended to make ir_loop_jump::mode public, but also
accidentally added a new pointer to the enclosing loop.  Furthermore, it
tried to initialize the new field by adding "this->loop = loop;" to the
constructor, but since there is no loop parameter, this only initialized
the field to itself---so it will likely be a garbage pointer.

A lot of code, such as lower_jumps, allocates new loop jumps without
setting this field appropriately, so any uses would probably just crash.

Thankfully, there were none, so we can just delete the field.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574
Cc: Ian Romanick 
Cc: Eric Anholt 
Cc: tha...@chromium.org
---
 src/glsl/ir.h |4 
 1 file changed, 4 deletions(-)

NAK on Ian's patch.  I'd rather just eliminate the garbage pointer; if we
want a pointer to the containing loop, we can go ahead and add that properly
in the future.

This patch replaces it.

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 014f363..992c654 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1245,7 +1245,6 @@ public:
{
   this->ir_type = ir_type_loop_jump;
   this->mode = mode;
-  this->loop = loop;
}
 
virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const;
@@ -1269,9 +1268,6 @@ public:
 
/** Mode selector for the jump instruction. */
enum jump_mode mode;
-private:
-   /** Loop containing this break instruction. */
-   ir_loop *loop;
 };
 
 /**
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glx/tests: Fix off-by-one error in allocating extension string buffer

2012-07-01 Thread Kenneth Graunke
On 06/29/2012 01:58 PM, Ian Romanick wrote:
> From: Ian Romanick 
> 
> NOTE: This is a candidate for the 8.0 release branch.
> 
> Signed-off-by: Ian Romanick 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621
> Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161
> Cc: Markus Oehme 
> ---
>  src/glx/tests/fake_glx_screen.h |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/glx/tests/fake_glx_screen.h b/src/glx/tests/fake_glx_screen.h
> index 2151522..6aa6cb6 100644
> --- a/src/glx/tests/fake_glx_screen.h
> +++ b/src/glx/tests/fake_glx_screen.h
> @@ -40,7 +40,7 @@ public:
>this->display = glx_dpy;
>this->dpy = (glx_dpy != NULL) ? glx_dpy->dpy : NULL;
>  
> -  this->serverGLXexts = new char[strlen(ext)];
> +  this->serverGLXexts = new char[strlen(ext) + 1];
>strcpy((char *) this->serverGLXexts, ext);
> }

Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/9] mesa: re-order, update comments on lighting-related structs

2012-07-01 Thread Kenneth Graunke
Patches 1-7 are:
Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] i965/fs: Allow copy propagation on uniforms.

2012-07-01 Thread Kenneth Graunke
On 06/08/2012 01:01 PM, Eric Anholt wrote:
> This is a big win for savage2, hon and yofrankie.  62 new programs for
> savage2/hon get 16-wide mode, along with one for humus demos and two
> for tropics.  Even a few shaders from tropics see reductions of 15% or
> more.
> 
> total instructions in shared programs: 216536 -> 207353 (-4.24%)
> instructions in affected programs: 123941 -> 114758 (-7.41%)

Wow, nice improvement!  Sorry for spacing on this.  The series is:
Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51641] New: GLU_TESS_COMBINE callback called with NULL data pointers, conflicting documentation.

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=51641

 Bug #: 51641
   Summary: GLU_TESS_COMBINE callback called with NULL data
pointers, conflicting documentation.
Classification: Unclassified
   Product: Mesa
   Version: 8.0
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: GLU
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: carlchatfi...@gmail.com


According to http://www.opengl.org/sdk/docs/man/xhtml/gluTessCallback.xml
(don't know if this is official or not.):

void combine( GLdouble coords[3], void *vertex_data[4], 
  GLfloat weight[4], void **outData );

All vertex pointers are valid even when some of the weights are 0. coords gives
the location of the new vertex.

The following example code is also given:
void myCombine( GLdouble coords[3], VERTEX *d[4],
GLfloat w[4], VERTEX **dataOut )
{
   VERTEX *new = new_vertex();

   new->x = coords[0];
   new->y = coords[1];
   new->z = coords[2];
   new->r = w[0]*d[0]->r + w[1]*d[1]->r + w[2]*d[2]->r + w[3]*d[3]->r;
   new->g = w[0]*d[0]->g + w[1]*d[1]->g + w[2]*d[2]->g + w[3]*d[3]->g;
   new->b = w[0]*d[0]->b + w[1]*d[1]->b + w[2]*d[2]->b + w[3]*d[3]->b;
   new->a = w[0]*d[0]->a + w[1]*d[1]->a + w[2]*d[2]->a + w[3]*d[3]->a;
   *dataOut = new;
}

Implying that all vertex pointers are indeed valid.

However, in the function

static void SpliceMergeVertices( GLUtesselator *tess, GLUhalfEdge *e1,
 GLUhalfEdge *e2 )
/*
 * Two vertices with idential coordinates are combined into one.
 * e1->Org is kept, while e2->Org is discarded.
 */
{
  void *data[4] = { NULL, NULL, NULL, NULL };
  GLfloat weights[4] = { 0.5, 0.5, 0.0, 0.0 };

  data[0] = e1->Org->data;
  data[1] = e2->Org->data;
  CallCombine( tess, e1->Org, data, weights, FALSE );
  if ( !__gl_meshSplice( e1, e2 ) ) longjmp(tess->env,1);
}

data[3] and data[4] are NULL. Thus if an application expects the pointers to be
valid, they will crash.

A possible fix:

  data[0] = data[2] = e1->Org->data;
  data[1] = data[3] = e2->Org->data;

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] i965: we want 64bit writes for depth count

2012-07-01 Thread Kenneth Graunke
On 06/26/2012 07:28 AM, Daniel Vetter wrote:
> ... and the hardware seems to take the lenght of the pipe control
> command to indicate whether the write is 64bit or 32bit. Which makes
> sense for immediate writes.
> 
> I've discovered this by writing a pattern into the query object bo and
> noticing that the high 32bits are left intact, even on those pipe
> control writes that seemingly worked.

I can't find any documentation or other justification for this, but if
you think it's useful, adding the extra 0 shouldn't hurt anything.

Minor bikeshed below.

> ---
>  src/mesa/drivers/dri/i965/brw_queryobj.c |   10 ++
>  src/mesa/drivers/dri/intel/intel_reg.h   |1 +
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c 
> b/src/mesa/drivers/dri/i965/brw_queryobj.c
> index d7870d1..dae7af0 100644
> --- a/src/mesa/drivers/dri/i965/brw_queryobj.c
> +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
> @@ -333,7 +333,7 @@ brw_emit_query_begin(struct brw_context *brw)
>return;
>  
> if (intel->gen >= 6) {
> -   BEGIN_BATCH(12);
> +   BEGIN_BATCH(13);
>  
> /* Workaround: A non-zero post-sync op (i.e. the DEPTH_COUNT write 
> below
>   * needs a pipe control with CS_STALL set beforehand.
> @@ -346,13 +346,14 @@ brw_emit_query_begin(struct brw_context *brw)
> OUT_BATCH(0);
>  
> /* The actual DEPTH_COUNT write. */
> -   OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +   OUT_BATCH(_3DSTATE_PIPE_CONTROL_5);

I would really prefer this to be

   OUT_BATCH(_3DSTATE_PIPE_CONTROL | (5 - 2));

since this is what we do with every other state packet command.  I'm not
a fan of PIPE_CONTROL being the only command with a length baked into
the define.  (That said, I'm not suggesting removing the baked length
right now...but doing this will result in | 2 | 3 which is fine, since 3
includes all the bits for 2 anyway.)

Otherwise I have to wonder what a PIPE_CONTROL_5 is.

> OUT_BATCH(PIPE_CONTROL_WRITE_DEPTH_COUNT);
> OUT_RELOC(brw->query.bo,
>I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
>PIPE_CONTROL_GLOBAL_GTT_WRITE |
>((brw->query.index * 2) * sizeof(uint64_t)));
> OUT_BATCH(0);
> +   OUT_BATCH(0);
>  
> /* We need to emit depth stall to get the right value for the depth
>   * count. As a workaround this needs a preceeding pipe control with a
> @@ -403,7 +404,7 @@ brw_emit_query_end(struct brw_context *brw)
>return;
>  
> if (intel->gen >= 6) {
> -   BEGIN_BATCH(12);
> +   BEGIN_BATCH(13);
>  
> /* Workaround: A non-zero post-sync op (i.e. the DEPTH_COUNT write 
> below
>   * needs a pipe control with CS_STALL set beforehand.
> @@ -416,13 +417,14 @@ brw_emit_query_end(struct brw_context *brw)
> OUT_BATCH(0);
>  
> /* The actual DEPTH_COUNT write. */
> -   OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +   OUT_BATCH(_3DSTATE_PIPE_CONTROL_5);

ditto

> OUT_BATCH(PIPE_CONTROL_WRITE_DEPTH_COUNT);
> OUT_RELOC(brw->query.bo,
>I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
>PIPE_CONTROL_GLOBAL_GTT_WRITE |
>((brw->query.index * 2 + 1) * sizeof(uint64_t)));
> OUT_BATCH(0);
> +   OUT_BATCH(0);
>  
> /* We need to emit depth stall to get the right value for the depth
>   * count. As a workaround this needs a preceeding pipe control with a
> diff --git a/src/mesa/drivers/dri/intel/intel_reg.h 
> b/src/mesa/drivers/dri/intel/intel_reg.h
> index e2a6ee2..04f7a8d 100644
> --- a/src/mesa/drivers/dri/intel/intel_reg.h
> +++ b/src/mesa/drivers/dri/intel/intel_reg.h
> @@ -59,6 +59,7 @@
>   * additional flushing control.
>   */
>  #define _3DSTATE_PIPE_CONTROL(CMD_3D | (3 << 27) | (2 << 24) 
> | 2)
> +#define _3DSTATE_PIPE_CONTROL_5  (CMD_3D | (3 << 27) | (2 << 24) 
> | 3)
>  #define PIPE_CONTROL_CS_STALL(1 << 20)
>  #define PIPE_CONTROL_GLOBAL_SNAPSHOT_COUNT_RESET (1 << 19)
>  #define PIPE_CONTROL_TLB_INVALIDATE  (1 << 18)
> 

and then no need to add this.

With that change, this is:
Acked-by: Kenneth Graunke 

Though, again, I'm not sure why it'd be necessary.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] i965: adjust gen6+ timestamp pipe_control writes

2012-07-01 Thread Kenneth Graunke
On 06/26/2012 07:28 AM, Daniel Vetter wrote:
> Similar treatment to the depth count pipe_control writes
> - Add the CS_STALL workaround, timestamp writes are non-zero post-sync
>   ops, too.
> - Also ensure that we write the full 64bits by using the 5 dword long
>   variant of pipe_control.
> ---
>  src/mesa/drivers/dri/i965/brw_queryobj.c |   32 ++---
>  1 files changed, 28 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c 
> b/src/mesa/drivers/dri/i965/brw_queryobj.c
> index dae7af0..36de43e 100644
> --- a/src/mesa/drivers/dri/i965/brw_queryobj.c
> +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
> @@ -131,14 +131,26 @@ brw_begin_query(struct gl_context *ctx, struct 
> gl_query_object *q)
>4096, 4096);
>  
>if (intel->gen >= 6) {
> -   BEGIN_BATCH(4);
> -   OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +   BEGIN_BATCH(9);
> +
> +  /* Workaround: A non-zero post-sync op (i.e. the DEPTH_COUNT write 
> below
> +   * needs a pipe control with CS_STALL set beforehand.
> +   * Workaround: CS_STALL can't be set alone, we pick 
> STALL_AT_SCOREBOARD
> +   * like the kernel. */

It's a timestamp write here, not depth count. :)  I would actually
prefer a comment along the lines of:

/* Workaround: A non-zero post-sync op (i.e. the timestamp write below)
 * must be preceded by a CS stall.  See rationale in the comments for
 * intel_emit_post_sync_nonzero_flush().
 */

The workaround chain is pretty well explained in the comments on that
function, and so may be more helpful than "like the kernel."

As for the substance of the patch (actually adding the CS stall), that
seems reasonable to me.  Odd though.  Normally failing to do this
results in GPU hangs.  Haven't seen any of those.  Still.

> +  OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +  OUT_BATCH(PIPE_CONTROL_CS_STALL |
> +PIPE_CONTROL_STALL_AT_SCOREBOARD);
> +  OUT_BATCH(0);
> +  OUT_BATCH(0);
> +
> +   OUT_BATCH(_3DSTATE_PIPE_CONTROL_5);

OUT_BATCH(_3DSTATE_PIPE_CONTROL | (5 - 2))

> OUT_BATCH(PIPE_CONTROL_WRITE_TIMESTAMP);
> OUT_RELOC(query->bo,
> I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
> PIPE_CONTROL_GLOBAL_GTT_WRITE |
> 0);
> OUT_BATCH(0);
> +   OUT_BATCH(0);
> ADVANCE_BATCH();
>
>} else {
> @@ -199,14 +211,26 @@ brw_end_query(struct gl_context *ctx, struct 
> gl_query_object *q)
> switch (query->Base.Target) {
> case GL_TIME_ELAPSED_EXT:
>if (intel->gen >= 6) {
> -   BEGIN_BATCH(4);
> -   OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +   BEGIN_BATCH(9);
> +
> +  /* Workaround: A non-zero post-sync op (i.e. the DEPTH_COUNT write 
> below
> +   * needs a pipe control with CS_STALL set beforehand.
> +   * Workaround: CS_STALL can't be set alone, we pick 
> STALL_AT_SCOREBOARD
> +   * like the kernel. */

ditto (comment)

> +  OUT_BATCH(_3DSTATE_PIPE_CONTROL);
> +  OUT_BATCH(PIPE_CONTROL_CS_STALL |
> +PIPE_CONTROL_STALL_AT_SCOREBOARD);
> +  OUT_BATCH(0);
> +  OUT_BATCH(0);
> +
> +   OUT_BATCH(_3DSTATE_PIPE_CONTROL_5);

ditto (5 - 2)

> OUT_BATCH(PIPE_CONTROL_WRITE_TIMESTAMP);
> OUT_RELOC(query->bo,
> I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
> PIPE_CONTROL_GLOBAL_GTT_WRITE |
> 8);
> OUT_BATCH(0);
> +   OUT_BATCH(0);
> ADVANCE_BATCH();
>
>} else {

With those changes,
Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51364] piglit fs-clip-distance-interpolated regression

2012-07-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=51364

Olivier Galibert  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Olivier Galibert  2012-07-01 21:50:22 
PDT ---
Patch is awaiting review.

http://lists.freedesktop.org/archives/mesa-dev/2012-June/023209.html

  OG.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev