Re: [Mesa-dev] [PATCH 0/4] Update to GL_ARB_timer_query

2012-07-10 Thread Jose Fonseca
Hi Marek,

Please update src/gallium/docs for the gallium interface change, and implement 
the new function on galahad (I'm working towards getting galahad to support the 
full gallium interface and get it enabled by default on debug builds, as it is 
a shame not using it more).

Otherwise looks good to me.

Jose

- Original Message -
 Hi everyone,
 
 this series is a follow-up to the previous one sent on June 27.
 Here's only what's changed. All commits are here:
 http://cgit.freedesktop.org/~mareko/mesa/log/?h=timer-query
 
 Change log:
 - reimplemented glGet(GL_TIMESTAMP) as per Eric Anholt's comment
 - updated all gallium patches
 - added softpipe support
 
 The craziness with the cpu-gpu difference is gone. Softpipe
 (specifically the os_time_get function) uses gettimeofday instead of
 the proposed xserver's GetTimeInMillis function, but I don't
 consider that a big deal (especially if it's only softpipe using
 it).
 
 Please review.
 
 Marek Olšák (4):
   mesa: implement glGet(GL_TIMESTAMP) v2
   gallium: add QUERY_TIMESTAMP cap and get_timestamp screen
   function
   st/mesa: implement ARB_timer_query
   softpipe: implement get_timestamp and expose ARB_timer_query
 
  src/gallium/drivers/i915/i915_screen.c   |1 +
  src/gallium/drivers/llvmpipe/lp_screen.c |1 +
  src/gallium/drivers/nv30/nv30_screen.c   |1 +
  src/gallium/drivers/nv50/nv50_screen.c   |1 +
  src/gallium/drivers/nvc0/nvc0_screen.c   |1 +
  src/gallium/drivers/r300/r300_screen.c   |1 +
  src/gallium/drivers/r600/r600_pipe.c |1 +
  src/gallium/drivers/softpipe/sp_screen.c |   10 ++
  src/gallium/drivers/svga/svga_screen.c   |1 +
  src/gallium/include/pipe/p_defines.h |3 ++-
  src/gallium/include/pipe/p_screen.h  |7 +++
  src/mesa/main/dd.h   |6 ++
  src/mesa/main/get.c  |   17 -
  src/mesa/state_tracker/st_cb_queryobj.c  |   14 ++
  src/mesa/state_tracker/st_extensions.c   |5 +
  15 files changed, 68 insertions(+), 2 deletions(-)
 
 Marek
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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


Re: [Mesa-dev] [PATCH 04/22] gallium: add util_format_stencil helper function

2012-07-10 Thread Jose Fonseca
util_format_stencil seems a too generic. Some sort of qualifier would be more 
future proof, e.g., util_format_stencil_only.

- Original Message -
 used for stencil sampler views.
 ---
  src/gallium/auxiliary/util/u_format.h |   29
  +
  src/mesa/state_tracker/st_cb_drawpixels.c |   23
  ++-
  2 files changed, 31 insertions(+), 21 deletions(-)
 
 diff --git a/src/gallium/auxiliary/util/u_format.h
 b/src/gallium/auxiliary/util/u_format.h
 index e35e164..7995b57 100644
 --- a/src/gallium/auxiliary/util/u_format.h
 +++ b/src/gallium/auxiliary/util/u_format.h
 @@ -882,6 +882,35 @@ util_format_linear(enum pipe_format format)
  }
  
  /**
 + * Given a depth-stencil format, return the corresponding
 stencil-only format.
 + * For stencil-only formats, return the format unchanged.
 + */
 +static INLINE enum pipe_format
 +util_format_stencil(enum pipe_format format)
 +{
 +   switch (format) {
 +   /* mask out the depth component */
 +   case PIPE_FORMAT_Z24_UNORM_S8_UINT:
 +  return PIPE_FORMAT_X24S8_UINT;
 +   case PIPE_FORMAT_S8_UINT_Z24_UNORM:
 +  return PIPE_FORMAT_S8X24_UINT;
 +   case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 +  return PIPE_FORMAT_X32_S8X24_UINT;
 +
 +   /* stencil only formats */
 +   case PIPE_FORMAT_X24S8_UINT:
 +   case PIPE_FORMAT_S8X24_UINT:
 +   case PIPE_FORMAT_X32_S8X24_UINT:
 +   case PIPE_FORMAT_S8_UINT:
 +  return format;
 +
 +   default:
 +  assert(0);
 +  return PIPE_FORMAT_NONE;
 +   }
 +}
 +
 +/**
   * Return the number of components stored.
   * Formats with block size != 1x1 will always have 1 component (the
   block).
   */
 diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c
 b/src/mesa/state_tracker/st_cb_drawpixels.c
 index 2bcbada..727273b 100644
 --- a/src/mesa/state_tracker/st_cb_drawpixels.c
 +++ b/src/mesa/state_tracker/st_cb_drawpixels.c
 @@ -1165,27 +1165,8 @@ st_DrawPixels(struct gl_context *ctx, GLint x,
 GLint y,
   * The stencil is written using the shader stencil
   export
   * functionality. */
  if (write_stencil) {
 -   enum pipe_format stencil_format = PIPE_FORMAT_NONE;
 -
 -   switch (pt-format) {
 -   case PIPE_FORMAT_Z24_UNORM_S8_UINT:
 -   case PIPE_FORMAT_X24S8_UINT:
 -  stencil_format = PIPE_FORMAT_X24S8_UINT;
 -  break;
 -   case PIPE_FORMAT_S8_UINT_Z24_UNORM:
 -   case PIPE_FORMAT_S8X24_UINT:
 -  stencil_format = PIPE_FORMAT_S8X24_UINT;
 -  break;
 -   case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 -   case PIPE_FORMAT_X32_S8X24_UINT:
 -  stencil_format = PIPE_FORMAT_X32_S8X24_UINT;
 -  break;
 -   case PIPE_FORMAT_S8_UINT:
 -  stencil_format = PIPE_FORMAT_S8_UINT;
 -  break;
 -   default:
 -  assert(0);
 -   }
 +   enum pipe_format stencil_format =
 + util_format_stencil(pt-format);
  
 sv[1] =
 st_create_texture_sampler_view_format(st-pipe, pt,
   stencil_format);
 --
 1.7.9.5
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 22/22] r600g: fix uploading non-zero mipmap levels of depth textures

2012-07-10 Thread Michel Dänzer
On Mon, 2012-07-09 at 21:15 +0200, Marek Olšák wrote: 
 This fixes piglit/depth-level-clamp.
 ---
  src/gallium/drivers/r600/r600_texture.c |5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/src/gallium/drivers/r600/r600_texture.c 
 b/src/gallium/drivers/r600/r600_texture.c
 index a6a83ca..d16c252 100644
 --- a/src/gallium/drivers/r600/r600_texture.c
 +++ b/src/gallium/drivers/r600/r600_texture.c
 @@ -926,8 +926,9 @@ void r600_texture_transfer_destroy(struct pipe_context 
 *ctx,
  
   u_box_origin_2d(texture-width0, texture-height0, 
 sbox);
  
 - ctx-resource_copy_region(ctx, texture, 0, 0, 0, 0,
 -   rtransfer-staging-b.b, 0,
 + ctx-resource_copy_region(ctx, texture, transfer-level,
 +   0, 0, transfer-box.z,
 +   rtransfer-staging-b.b, 
 transfer-level,

Does this really need to take into account transfer-box.z, but not .x
and .y?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/9] automake: convert libmesa and libmesagallium

2012-07-10 Thread Jon TURNEY
On 09/07/2012 17:31, Eric Anholt wrote:
 Jon TURNEY jon.tur...@dronecode.org.uk writes:
 diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
 index bada760..08beaa6 100644
 --- a/src/mesa/Makefile.am
 +++ b/src/mesa/Makefile.am
 
 +libmesa_la_SOURCES = \
 +$(MESA_FILES) \
 +$(MESA_CXX_FILES) \
 +$(MESA_ASM_FILES_FOR_ARCH)
 +
 +libmesa_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
 +libmesa_la_LDFLAGS = -static
 
 Doesn't this -static result in relocations for static libs getting
 built, which would then be a problem for the linking into shared
 libraries later?  I don't really know this stuff well, but a -static in
 the middle of a shared lib build seems strange.
 
 The helper lib for the asm code in libdricore built a .a file without
 -static being specified.

Yes, this is entirely wrong.  I think I added the '-static' when reading
'mklib -static' and never came back to change it to a convenience library.

 Also, with this commit, did you test that git_sha1 depencies were
 working correctly and commit --amending would produce a new sha1 in your
 drivers?

This appears to work for me.

I can see I have removed a dependency of depend: on git_sha1.h, but
recomputing the dependencies every time that file changes seems a bit of
overkill to me.  The computed dependencies still include git_sha1.h and things
which depend on it are rebuilt when it changes.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 9/9] Don't explicitly link libOsmesa with libmesa's dependency libglapi

2012-07-10 Thread Jon TURNEY
On 09/07/2012 17:36, Eric Anholt wrote:
 We must either:
 (i) Not link libmesa with libglapi, and link anything that uses libmesa with
 libglapi as well, or
 (ii) Link libmesa with libglapi, and not link anything that uses libmesa with
 libglapi

 I choose (ii) just because it's least change, but I'm not sure it's right.

 Note that drivers/X11 makes libGL by linking with libmesa, but not libglapi,
 so it's a bit unclear to me how this was working correctly before in both 
 cases
 (It might be some sort of accidental side-effect of what mklib's 
 expand_archives()
 function does that this ever worked before?)
 ---
  src/mesa/drivers/osmesa/Makefile.am |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

 diff --git a/src/mesa/drivers/osmesa/Makefile.am 
 b/src/mesa/drivers/osmesa/Makefile.am
 index a91d9e2..cfba658 100644
 --- a/src/mesa/drivers/osmesa/Makefile.am
 +++ b/src/mesa/drivers/osmesa/Makefile.am
 @@ -40,8 +40,7 @@ lib@OSMESA_LIB@_la_SOURCES = osmesa.c
  lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ 
 -shared
  lib@OSMESA_LIB@_la_LIBADD = \
  $(top_srcdir)/src/mesa/libmesa.la \
 -$(top_srcdir)/src/mapi/glapi/libglapi.la \
 -$(top_srcdir)/src/glsl/libglsl.la
 +$(top_srcdir)/src/mapi/glapi/libglapi.la
 
 This commit actually looks like it drops linking with libglsl.  What's
 up?

Sorry, I had some kind of brain spasm when writing the comment for this
commit, it should of course say libglsl everywhere it says libglapi.

The libmesa convenience library is linked with the libglsl convenience
library.  libOsmesa is linked with libmesa, and also directly with libglsl.
This gives rise to duplicate symbol errors.

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


Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-10 Thread Jose Fonseca
Yep. The interfaces are busted.

Without native integers we get

   DCL SV[0], INSTANCEID
   ...
   ARL ADDR[0].x, SV[0].

and with integers we get

   DCL SV[0], INSTANCEID
   ...
   UARL ADDR[0].x, SV[0].

Olivier's fix is incorrect. It works on the above cases by guessing the type, 
but if we have:

   DCL SV[0], INSTANCEID
   ...
   MOV TEMP[0].x, SV[0].
   ARL ADDR[0].x, TEMP[0].

and

   DCL SV[0], INSTANCEID
   ...
   MOV TEMP[0].x, SV[0].
   UARL ADDR[0].x, TEMP[0].

it is impossible to guess -- the change is merely replacing a bug with another.


For the record, the problem also happens without LLVM:

  DRAW_USE_LLVM=0 draw-instanced -auto



Anyway, AFAICT, all hardware out there that really supports INSTANCEID/VERTEXID 
also supports native integers, so this is a problem specific to the draw module.

But given that draw module can support anything, this is actually self 
inflicted! In short, INSTANCEID/VERTEXID without integers is an historic 
artifact, that should not exist going forward.

The right fix is merely making sure that PIPE_SHADER_CAP_INTEGERS is accurately 
advertised as 1 by the draw module (just like Stephane secretly did in 
45fc069600ddbfe07a0a0cd5280161a8c7c55dd0 :)

I'm working on a patch that does this, and tries to cleanup 
draw_get_shader_param() too.

Jose


- Original Message -
 FWIW, I think Draw needs to know if a driver does or does not support
 integers, so that it can return system values in the correct type
 (not
 sure if that includes gallivm too). The reason for that is that
 glsl_to_tgsi generates *different* shaders depending on the native
 integer cap. I think this is good; the drivers which don't have
 integer system values and integer instructions just get shaders
 prepared to be executed on floating-point units only.
 
 However the aforementioned modification of Draw would only be
 required
 if there were a driver using Draw for fallbacks, i.e. if a driver
 doesn't know in advance whether a shader will be executed in software
 or hardware (that's only svga, I guess?).
 
 The software drivers and the drivers using Draw on hardware without
 vertex shaders can always use Draw with full integer support (and
 glsl_to_tgsi should generate vertex shaders with integers*) and
 nothing would need to be changed. Such drivers should return
 draw_get_shader_param(..) in get_shader_param, so that the state
 tracker knows exactly what the Draw module expects.
 
 * I just realized there is a bug in glsl_to_tgsi which doesn't follow
 the integer shader cap correctly. I'll send patches.
 
 Marek
 
 On Tue, Jul 3, 2012 at 10:43 PM, Olivier Galibert
 galib...@pobox.com wrote:
  On Tue, Jul 03, 2012 at 12:39:47PM -0700, Jose Fonseca wrote:
  Note that all registers are stored as floats (for convenience, and
  because LLVM has no unions), so integers are bitcasted into floats
  while storing/loading.  And I'm not sure if your patch would break
  that.
 
  I did test the patch with a llvmpipe in a glsl 120/no native
  integer
  setup.  draw_instanced worked.  I didn't try a full piglit though.
 
 
  I still think that having draw/gallivm guessing whether native
  integer support is intended or not is bad. Either:
  1) TGSI is extended (e.g., more type annotations) so that
  native-integer support can inferred from it
  2) draw/gallivm need to now if the driver has native-integer or
  not
 
  I'm inclined towards 1), as TGSI should be self-documented. That
  is,
  it should not be necessary to know if the driver has or not native
  integer support to know whether system values should be assumed to
  be integers or floats...
 
  It could be argued that dtype being TGSI_TYPE_FLOAT is the
  documentation on what is expected.  But I'm quickly reaching the
  point
  where I don't really care, just tell me what you want.  As long as
  textureFetch stays the only issue between llvmpipe and 1.30 I'm ok.
 
  Of course doing textureFetch right is going to require an
  interesting
  overhaul of the texture allocations... need to finish fixing the
  gm45
  interpolation/clipping first.
 
  Best,
 
OG.
 
  ___
  mesa-dev mailing list
  mesa-dev@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/mesa-dev
 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-10 Thread Marek Olšák
On Tue, Jul 10, 2012 at 3:30 PM, Jose Fonseca jfons...@vmware.com wrote:
 Yep. The interfaces are busted.

 Without native integers we get

DCL SV[0], INSTANCEID
...
ARL ADDR[0].x, SV[0].

 and with integers we get

DCL SV[0], INSTANCEID
...
UARL ADDR[0].x, SV[0].

 Olivier's fix is incorrect. It works on the above cases by guessing the type, 
 but if we have:

DCL SV[0], INSTANCEID
...
MOV TEMP[0].x, SV[0].
ARL ADDR[0].x, TEMP[0].

 and

DCL SV[0], INSTANCEID
...
MOV TEMP[0].x, SV[0].
UARL ADDR[0].x, TEMP[0].

 it is impossible to guess -- the change is merely replacing a bug with 
 another.


 For the record, the problem also happens without LLVM:

   DRAW_USE_LLVM=0 draw-instanced -auto



 Anyway, AFAICT, all hardware out there that really supports 
 INSTANCEID/VERTEXID also supports native integers, so this is a problem 
 specific to the draw module.

 But given that draw module can support anything, this is actually self 
 inflicted! In short, INSTANCEID/VERTEXID without integers is an historic 
 artifact, that should not exist going forward.

 The right fix is merely making sure that PIPE_SHADER_CAP_INTEGERS is 
 accurately advertised as 1 by the draw module (just like Stephane secretly 
 did in 45fc069600ddbfe07a0a0cd5280161a8c7c55dd0 :)

I just wanted to tell you Stephane's change cannot work and it even
has no effect at the moment. The native integer support is global in
core Mesa. It's because integer uniforms are converted to floats based
on the global NativeInteger flag for all shader stages and that can't
be fixed easily, because uniforms can be shared between shaders.
Basically, all drivers must advertise integer support either for all
shader stages or none.

Given that, I only see two possible outcomes:

1) Disable INSTANCEID support in DX9-level drivers using Draw (that's
only i915g AFAIK) and only support INSTANCEID with integers.

2) Let drivers set the type of system values in Draw, so that Draw
doesn't have to guess what it should be.

I'm okay with either solution.

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


Re: [Mesa-dev] [PATCH 04/22] gallium: add util_format_stencil helper function

2012-07-10 Thread Marek Olšák
On Tue, Jul 10, 2012 at 8:29 AM, Jose Fonseca jfons...@vmware.com wrote:
 util_format_stencil seems a too generic. Some sort of qualifier would be 
 more future proof, e.g., util_format_stencil_only.

Alright, consider it done. (without re-sending the patches)

Marek


 - Original Message -
 used for stencil sampler views.
 ---
  src/gallium/auxiliary/util/u_format.h |   29
  +
  src/mesa/state_tracker/st_cb_drawpixels.c |   23
  ++-
  2 files changed, 31 insertions(+), 21 deletions(-)

 diff --git a/src/gallium/auxiliary/util/u_format.h
 b/src/gallium/auxiliary/util/u_format.h
 index e35e164..7995b57 100644
 --- a/src/gallium/auxiliary/util/u_format.h
 +++ b/src/gallium/auxiliary/util/u_format.h
 @@ -882,6 +882,35 @@ util_format_linear(enum pipe_format format)
  }

  /**
 + * Given a depth-stencil format, return the corresponding
 stencil-only format.
 + * For stencil-only formats, return the format unchanged.
 + */
 +static INLINE enum pipe_format
 +util_format_stencil(enum pipe_format format)
 +{
 +   switch (format) {
 +   /* mask out the depth component */
 +   case PIPE_FORMAT_Z24_UNORM_S8_UINT:
 +  return PIPE_FORMAT_X24S8_UINT;
 +   case PIPE_FORMAT_S8_UINT_Z24_UNORM:
 +  return PIPE_FORMAT_S8X24_UINT;
 +   case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 +  return PIPE_FORMAT_X32_S8X24_UINT;
 +
 +   /* stencil only formats */
 +   case PIPE_FORMAT_X24S8_UINT:
 +   case PIPE_FORMAT_S8X24_UINT:
 +   case PIPE_FORMAT_X32_S8X24_UINT:
 +   case PIPE_FORMAT_S8_UINT:
 +  return format;
 +
 +   default:
 +  assert(0);
 +  return PIPE_FORMAT_NONE;
 +   }
 +}
 +
 +/**
   * Return the number of components stored.
   * Formats with block size != 1x1 will always have 1 component (the
   block).
   */
 diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c
 b/src/mesa/state_tracker/st_cb_drawpixels.c
 index 2bcbada..727273b 100644
 --- a/src/mesa/state_tracker/st_cb_drawpixels.c
 +++ b/src/mesa/state_tracker/st_cb_drawpixels.c
 @@ -1165,27 +1165,8 @@ st_DrawPixels(struct gl_context *ctx, GLint x,
 GLint y,
   * The stencil is written using the shader stencil
   export
   * functionality. */
  if (write_stencil) {
 -   enum pipe_format stencil_format = PIPE_FORMAT_NONE;
 -
 -   switch (pt-format) {
 -   case PIPE_FORMAT_Z24_UNORM_S8_UINT:
 -   case PIPE_FORMAT_X24S8_UINT:
 -  stencil_format = PIPE_FORMAT_X24S8_UINT;
 -  break;
 -   case PIPE_FORMAT_S8_UINT_Z24_UNORM:
 -   case PIPE_FORMAT_S8X24_UINT:
 -  stencil_format = PIPE_FORMAT_S8X24_UINT;
 -  break;
 -   case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 -   case PIPE_FORMAT_X32_S8X24_UINT:
 -  stencil_format = PIPE_FORMAT_X32_S8X24_UINT;
 -  break;
 -   case PIPE_FORMAT_S8_UINT:
 -  stencil_format = PIPE_FORMAT_S8_UINT;
 -  break;
 -   default:
 -  assert(0);
 -   }
 +   enum pipe_format stencil_format =
 + util_format_stencil(pt-format);

 sv[1] =
 st_create_texture_sampler_view_format(st-pipe, pt,
   
 stencil_format);
 --
 1.7.9.5

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

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


[Mesa-dev] [PATCH 0/9] Automake continued (v2)

2012-07-10 Thread Jon TURNEY
Updated to address various comments:
[1/9] libOsmesa links with libaries in the builddir, not the srcdir
[2/9] libglsl use AM_V_GEN to silence generated code rules and add 
BUILT_SOURCES to CLEANFILES 
[4/9] Remove stray -static from flags for libmesa and libmesagallium
[6/9] Remove unndeded libglsl.a from GALLIUM_DRI_LIB_DEPS
[9/9] Fix comment to talk about the right library and try to make sense

If you should want to test this, these patches can be pulled from the
branch automake-continued-v2 at git://people.freedesktop.org/~jturney/mesa

Jon TURNEY (8):
  automake: convert libglsl
  Rename sparc/clip.S - sparc/sparc_clip.S
  automake: convert libmesa and libmesagallium
  Remove unused MESA_MODULES autoconf variable
  Link dri drivers with mesa or dricore libtool library
  Rename X86-64_API - X86_64_API
  automake: convert libglapi
  Don't explicitly link libOsmesa with libmesa's dependency libglsl

Laurent Carlier (1):
  automake: convert libOSmesa building

 configs/current.in  |3 +-
 configure.ac|   27 +++--
 src/egl/main/Makefile.am|2 +-
 src/gallium/targets/Makefile.dri|4 +-
 src/glsl/.gitignore |1 +
 src/glsl/Makefile   |  144 -
 src/glsl/Makefile.am|  112 +
 src/glsl/glcpp/.gitignore   |1 +
 src/glsl/glcpp/Makefile.am  |   33 +
 src/glsl/tests/Makefile.am  |4 +-
 src/glx/Makefile.am |2 +-
 src/mapi/glapi/.gitignore   |1 +
 src/mapi/glapi/Makefile |   77 
 src/mapi/glapi/Makefile.am  |   69 ++
 src/mapi/glapi/sources.mak  |2 +-
 src/mapi/glapi/tests/Makefile.am|2 +-
 src/mesa/Makefile.am|   45 ++-
 src/mesa/Makefile.old   |   57 +-
 src/mesa/SConscript |2 +-
 src/mesa/drivers/osmesa/.gitignore  |1 +
 src/mesa/drivers/osmesa/Makefile|   51 
 src/mesa/drivers/osmesa/Makefile.am |   49 
 src/mesa/drivers/x11/Makefile.am|4 +-
 src/mesa/main/tests/Makefile.am |2 +-
 src/mesa/sources.mak|2 +-
 src/mesa/sparc/clip.S   |  233 ---
 src/mesa/sparc/sparc_clip.S |  233 +++
 27 files changed, 572 insertions(+), 591 deletions(-)
 delete mode 100644 src/glsl/Makefile
 create mode 100644 src/glsl/Makefile.am
 create mode 100644 src/glsl/glcpp/Makefile.am
 delete mode 100644 src/mapi/glapi/Makefile
 create mode 100644 src/mapi/glapi/Makefile.am
 create mode 100644 src/mesa/drivers/osmesa/.gitignore
 delete mode 100644 src/mesa/drivers/osmesa/Makefile
 create mode 100644 src/mesa/drivers/osmesa/Makefile.am
 delete mode 100644 src/mesa/sparc/clip.S
 create mode 100644 src/mesa/sparc/sparc_clip.S

-- 
1.7.9

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


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

2012-07-10 Thread Jon TURNEY
From: Laurent Carlier lordhea...@gmail.com

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
v5: Libraries will be in the builddir, not the srcdir.

Reviewed-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 configure.ac|5 +++
 src/mesa/drivers/osmesa/.gitignore  |1 +
 src/mesa/drivers/osmesa/Makefile|   51 ---
 src/mesa/drivers/osmesa/Makefile.am |   50 ++
 4 files changed, 56 insertions(+), 51 deletions(-)
 create mode 100644 src/mesa/drivers/osmesa/.gitignore
 delete mode 100644 src/mesa/drivers/osmesa/Makefile
 create mode 100644 src/mesa/drivers/osmesa/Makefile.am

diff --git a/configure.ac b/configure.ac
index 46265a2..e5ac791 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1370,10 +1370,14 @@ if test x$enable_osmesa = xyes; then
 OSMESA_MESA_DEPS=
 OSMESA_PC_LIB_PRIV=-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS
 fi
+
+OSMESA_VERSION=`echo $VERSION | $SED 's/\./:/g'`
+
 AC_SUBST([OSMESA_LIB_DEPS])
 AC_SUBST([OSMESA_MESA_DEPS])
 AC_SUBST([OSMESA_PC_REQ])
 AC_SUBST([OSMESA_PC_LIB_PRIV])
+AC_SUBST([OSMESA_VERSION])
 
 dnl
 dnl gbm configuration
@@ -2188,6 +2192,7 @@ AC_CONFIG_FILES([configs/current
src/mesa/drivers/dri/r200/Makefile
src/mesa/drivers/dri/radeon/Makefile
src/mesa/drivers/dri/swrast/Makefile
+   src/mesa/drivers/osmesa/Makefile
src/mesa/drivers/x11/Makefile
src/mesa/gl.pc
src/mesa/osmesa.pc])
diff --git a/src/mesa/drivers/osmesa/.gitignore 
b/src/mesa/drivers/osmesa/.gitignore
new file mode 100644
index 000..5fc607b
--- /dev/null
+++ b/src/mesa/drivers/osmesa/.gitignore
@@ -0,0 +1 @@
+/Makefile
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
deleted file mode 100644
index 39ab09a..000
--- a/src/mesa/drivers/osmesa/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-# src/mesa/drivers/osmesa/Makefile for libOSMesa.so
-
-# Note that we may generate libOSMesa.so or libOSMesa16.so or libOSMesa32.so
-# with this Makefile
-
-
-TOP = ../../../..
-
-include $(TOP)/configs/current
-
-
-
-SOURCES = osmesa.c
-
-OBJECTS = $(SOURCES:.c=.o)
-
-INCLUDE_DIRS = \
-   -I$(TOP)/include \
-   -I$(TOP)/src/mapi \
-   -I$(TOP)/src/mesa \
-   -I$(TOP)/src/mesa/main
-
-CORE_MESA = \
-   $(TOP)/src/mesa/libmesa.a \
-   $(TOP)/src/mapi/glapi/libglapi.a \
-   $(TOP)/src/glsl/libglsl.a
-
-.c.o:
-   $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $ -o $@
-
-
-default: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
-
-
-# libOSMesa can be used in conjuction with libGL or with all other Mesa
-# sources. We can also build libOSMesa16/libOSMesa32 by setting
-# -DCHAN_BITS=16/32.
-$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
-   $(MKLIB) -o $(OSMESA_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
-   -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-   -install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \
-   -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
-   $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
-
-
-
-clean:
-   -rm -f *.o *~
-
-
-# XXX todo install rule?
diff --git a/src/mesa/drivers/osmesa/Makefile.am 
b/src/mesa/drivers/osmesa/Makefile.am
new file mode 100644
index 000..3cf3005
--- /dev/null
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -0,0 +1,50 @@
+
+
+# Copyright © 2012 Laurent Carlier lordhea...@gmail.com
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the Software),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+# Hack to make some of the non-automake variables work.
+TOP=$(top_builddir)
+
+AM_CFLAGS = \
+   -I$(top_srcdir)/include \
+   -I$(top_srcdir)/src/mapi \
+   -I$(top_srcdir)/src/mesa/ \
+   $(DEFINES) \
+   

[Mesa-dev] [PATCH 2/9] automake: convert libglsl

2012-07-10 Thread Jon TURNEY
v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to 
CLEANFILES

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 configure.ac|2 +
 src/glsl/.gitignore |1 +
 src/glsl/Makefile   |  144 ---
 src/glsl/Makefile.am|  112 +++
 src/glsl/glcpp/.gitignore   |1 +
 src/glsl/glcpp/Makefile.am  |   33 
 src/glsl/tests/Makefile.am  |2 +-
 src/mesa/drivers/osmesa/Makefile.am |2 +-
 8 files changed, 151 insertions(+), 146 deletions(-)
 delete mode 100644 src/glsl/Makefile
 create mode 100644 src/glsl/Makefile.am
 create mode 100644 src/glsl/glcpp/Makefile.am

diff --git a/configure.ac b/configure.ac
index e5ac791..93a8493 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2170,6 +2170,8 @@ AC_CONFIG_FILES([configs/current
src/egl/wayland/wayland-egl/Makefile
src/egl/wayland/wayland-egl/wayland-egl.pc
src/egl/wayland/wayland-drm/Makefile
+   src/glsl/Makefile
+   src/glsl/glcpp/Makefile
src/glsl/tests/Makefile
src/glx/Makefile
src/glx/tests/Makefile
diff --git a/src/glsl/.gitignore b/src/glsl/.gitignore
index d26839a..e3531cd 100644
--- a/src/glsl/.gitignore
+++ b/src/glsl/.gitignore
@@ -6,3 +6,4 @@ glsl_parser.output
 builtin_function.cpp
 builtin_compiler
 glsl_test
+/Makefile
diff --git a/src/glsl/Makefile b/src/glsl/Makefile
deleted file mode 100644
index 3cf9fc9..000
--- a/src/glsl/Makefile
+++ /dev/null
@@ -1,144 +0,0 @@
-
-#src/glsl/pp/Makefile
-
-TOP = ../..
-
-include $(TOP)/configs/current
-
-LIBNAME = glsl
-
-GLSL_SRCDIR=.
-include Makefile.sources
-
-GLCPP_SOURCES = \
-   $(LIBGLCPP_GENERATED_FILES) \
-   $(LIBGLCPP_FILES) \
-   ralloc.c \
-   glcpp/glcpp.c
-
-C_SOURCES = \
-   $(LIBGLCPP_GENERATED_FILES) \
-   $(LIBGLCPP_FILES) \
-   $(LIBGLSL_FILES)
-
-# common sources for builtin_compiler and libglsl
-CXX_SOURCES = \
-   $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
-   $(LIBGLSL_CXX_FILES)
-
-LIBS = \
-   $(TOP)/src/glsl/libglsl.a
-
-APPS = glsl_compiler glsl_test glcpp/glcpp
-
-GLSL2_C_SOURCES = \
-   ../mesa/program/hash_table.c \
-   ../mesa/program/symbol_table.c
-GLSL2_CXX_SOURCES = \
-   $(GLSL_COMPILER_CXX_FILES)
-
-GLSL2_OBJECTS = \
-   $(GLSL2_C_SOURCES:.c=.o) \
-   $(GLSL2_CXX_SOURCES:.cpp=.o)
-
-TEST_C_SOURCES = \
-   ../mesa/program/hash_table.c \
-   ../mesa/program/symbol_table.c
-
-TEST_CXX_SOURCES = \
-   standalone_scaffolding.cpp \
-   test.cpp \
-   test_optpass.cpp
-
-TEST_OBJECTS = \
-   $(TEST_C_SOURCES:.c=.o) \
-   $(TEST_CXX_SOURCES:.cpp=.o)
-
-### Basic defines ###
-
-DEFINES += \
-   $(LIBRARY_DEFINES) \
-   $(API_DEFINES)
-
-GLCPP_OBJECTS = \
-   $(GLCPP_SOURCES:.c=.o) \
-   ../mesa/program/hash_table.o
-
-OBJECTS = \
-   $(C_SOURCES:.c=.o) \
-   $(CXX_SOURCES:.cpp=.o)
-
-INCLUDES = \
-   -I. \
-   -I../mesa \
-   -I../mapi \
-   -I../../include \
-   $(LIBRARY_INCLUDES)
-
-ALL_SOURCES = \
-   $(C_SOURCES) \
-   $(CXX_SOURCES) \
-   $(GLSL2_CXX_SOURCES) \
-   $(GLSL2_C_SOURCES) \
-   $(TEST_CXX_SOURCES) \
-   $(TEST_C_SOURCES)
-
-# TARGETS #
-
-default: depend lib$(LIBNAME).a $(APPS)
-
-lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile 
$(TOP)/src/glsl/Makefile.template
-   $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o
-
-depend: $(ALL_SOURCES) Makefile
-   rm -f depend
-   touch depend
-   $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2 /dev/null
-
-# Remove .o and backup files
-clean:
-   rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(TEST_OBJECTS) $(OBJECTS) 
lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o 
builtin_stubs.o builtin_compiler
-   -rm -f $(APPS)
-
-# Dummy target
-install:
-   @echo -n 
-
-# RULES #
-
-glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
-   $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) $(LIBS) -o 
$@
-
-glsl_test: $(TEST_OBJECTS) libglsl.a
-   $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(TEST_OBJECTS) $(LIBS) -o 
$@
-
-glcpp: glcpp/glcpp
-glcpp/glcpp: $(GLCPP_OBJECTS)
-   $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@
-
-.cpp.o:
-   $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $ -o $@
-
-.c.o:
-   $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $ -o $@
-
-glsl_lexer.cpp: glsl_lexer.ll
-   $(FLEX) --nounistd -o$@  $
-
-glsl_parser.cpp: glsl_parser.yy
-   $(BISON) -v -o $@ -p _mesa_glsl_ --defines=glsl_parser.h $
-
-glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
-   $(FLEX) --nounistd -o$@  $
-
-glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
-   $(BISON) -v -o $@ --defines=glcpp/glcpp-parse.h $
-
-builtin_compiler: $(GLSL2_OBJECTS) 

[Mesa-dev] [PATCH 3/9] Rename sparc/clip.S - sparc/sparc_clip.S

2012-07-10 Thread Jon TURNEY
Automake can't handle having both clip.S and clip.c, even though they have 
different paths

src/mesa/Makefile.am: object `clip.lo' created by `$(SRCDIR)/sparc/clip.S' and 
`$(SRCDIR)/main/clip.c'

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 src/mesa/SConscript |2 +-
 src/mesa/sources.mak|2 +-
 src/mesa/sparc/clip.S   |  233 ---
 src/mesa/sparc/sparc_clip.S |  233 +++
 4 files changed, 235 insertions(+), 235 deletions(-)
 delete mode 100644 src/mesa/sparc/clip.S
 create mode 100644 src/mesa/sparc/sparc_clip.S

diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 819a0fd..906c579 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -430,7 +430,7 @@ if env['gcc'] and env['platform'] not in ('darwin', 
'windows'):
 elif env['machine'] == 'sparc':
 mesa_sources += [
 'sparc/sparc.c',
-'sparc/clip.S',
+'sparc/sparc_clip.S',
 'sparc/norm.S',
 'sparc/xform.S',
 ]
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 16b1c39..d22f059 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -307,7 +307,7 @@ X86_64_FILES =  \
$(SRCDIR)/x86-64/xform4.S
 
 SPARC_FILES =  \
-   $(SRCDIR)/sparc/clip.S  \
+   $(SRCDIR)/sparc/sparc_clip.S\
$(SRCDIR)/sparc/norm.S  \
$(SRCDIR)/sparc/xform.S
 
diff --git a/src/mesa/sparc/clip.S b/src/mesa/sparc/clip.S
deleted file mode 100644
index dc23917..000
--- a/src/mesa/sparc/clip.S
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Clip testing in SPARC assembly
- */
-
-#if __arch64__
-#define LDPTR  ldx
-#define V4F_DATA   0x00
-#define V4F_START  0x08
-#define V4F_COUNT  0x10
-#define V4F_STRIDE 0x14
-#define V4F_SIZE   0x18
-#define V4F_FLAGS  0x1c
-#else
-#define LDPTR  ld
-#define V4F_DATA   0x00
-#define V4F_START  0x04
-#define V4F_COUNT  0x08
-#define V4F_STRIDE 0x0c
-#define V4F_SIZE   0x10
-#define V4F_FLAGS  0x14
-#endif
-
-#define VEC_SIZE_1 1
-#define VEC_SIZE_2 3
-#define VEC_SIZE_3 7
-#define VEC_SIZE_4 15
-
-.register %g2, #scratch
-.register %g3, #scratch
-
-   .text
-   .align  64
-
-one_dot_zero:
-   .word   0x3f80  /* 1.0f */
-
-   /* This trick is shamelessly stolen from the x86
-* Mesa asm.  Very clever, and we can do it too
-* since we have the necessary add with carry
-* instructions on Sparc.
-*/
-clip_table:
-   .byte0,  1,  0,  2,  4,  5,  4,  6
-   .byte0,  1,  0,  2,  8,  9,  8, 10
-   .byte   32, 33, 32, 34, 36, 37, 36, 38
-   .byte   32, 33, 32, 34, 40, 41, 40, 42
-   .byte0,  1,  0,  2,  4,  5,  4,  6
-   .byte0,  1,  0,  2,  8,  9,  8, 10
-   .byte   16, 17, 16, 18, 20, 21, 20, 22
-   .byte   16, 17, 16, 18, 24, 25, 24, 26
-   .byte   63, 61, 63, 62, 55, 53, 55, 54
-   .byte   63, 61, 63, 62, 59, 57, 59, 58
-   .byte   47, 45, 47, 46, 39, 37, 39, 38
-   .byte   47, 45, 47, 46, 43, 41, 43, 42
-   .byte   63, 61, 63, 62, 55, 53, 55, 54
-   .byte   63, 61, 63, 62, 59, 57, 59, 58
-   .byte   31, 29, 31, 30, 23, 21, 23, 22
-   .byte   31, 29, 31, 30, 27, 25, 27, 26
-
-/* GLvector4f *clip_vec, GLvector4f *proj_vec, 
-   GLubyte clipMask[], GLubyte *orMask, GLubyte *andMask,
-   GLboolean viewport_z_enable */
-
-   .align  64
-__pc_tramp:
-   retl
-nop
-
-   .globl  _mesa_sparc_cliptest_points4
-_mesa_sparc_cliptest_points4:
-   save%sp, -64, %sp
-   call__pc_tramp
-sub%o7, (. - one_dot_zero - 4), %g1
-   ld  [%g1 + 0x0], %f4
-   add %g1, 0x4, %g1
-
-   ld  [%i0 + V4F_STRIDE], %l1
-   ld  [%i0 + V4F_COUNT], %l3
-   LDPTR   [%i0 + V4F_START], %i0
-   LDPTR   [%i1 + V4F_START], %i5
-   ldub[%i3], %g2
-   ldub[%i4], %g3
-   sll %g3, 8, %g3
-   or  %g2, %g3, %g2
-
-   ld  [%i1 + V4F_FLAGS], %g3
-   or  %g3, VEC_SIZE_4, %g3
-   st  %g3, [%i1 + V4F_FLAGS]
-   mov 3, %g3
-   st  %g3, [%i1 + V4F_SIZE]
-   st  %l3, [%i1 + V4F_COUNT]
-   clr %l2
-   clr %l0
-
-   /* l0:  i
-* l3:  count
-* l1:  stride
-* l2:  c
-* g2:  (tmpAndMask  8) | tmpOrMask
-* g1:  clip_table
-* i0:  from[stride][i]
-* i2:  clipMask
-* i5:  vProj[4][i]
-*/
-
-1: ld  [%i0 + 0x0c], %f3   ! LSU   Group
-   ld  [%i0 + 0x0c], %g5   ! LSU   Group
-   ld  [%i0 + 

[Mesa-dev] [PATCH 5/9] Remove unused MESA_MODULES autoconf variable

2012-07-10 Thread Jon TURNEY
---
 configs/current.in |1 -
 configure.ac   |3 ---
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/configs/current.in b/configs/current.in
index f4858bd..ca817c4 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -147,7 +147,6 @@ VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
 GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@
 
 # DRI dependencies
-MESA_MODULES = @MESA_MODULES@
 DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
 LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
 LIBDRM_LIB = @LIBDRM_LIBS@
diff --git a/configure.ac b/configure.ac
index 93a8493..ae28007 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1086,15 +1086,12 @@ AC_SUBST([GLAPI_LIB_DEPS])
 
 dnl Setup default DRI CFLAGS
 DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
-MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
 
 if test x$enable_dri = xyes  test x$driglx_direct = xyes ; then
 DRI_LIB_DEPS=-L\$(TOP)/\$(LIB_DIR) -ldricore$VERSION
-MESA_MODULES=\$(TOP)/\$(LIB_DIR)/libdricore$VERSION.so
 HAVE_DRICORE=yes
 fi
 AM_CONDITIONAL(HAVE_DRICORE, test x$HAVE_DRICORE = xyes)
-AC_SUBST([MESA_MODULES])
 
 AC_SUBST([HAVE_XF86VIDMODE])
 
-- 
1.7.9

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


[Mesa-dev] [PATCH 4/9] automake: convert libmesa and libmesagallium

2012-07-10 Thread Jon TURNEY
* configure substitutions are not allowed in _SOURCES variables in automake, 
so instead of
MESA_ASM_FILES, use some AM_CONDITIONALS to choose which architecture's asm 
sources are used
in libmesa_la_SOURCES. (Can't remove MESA_ASM_FILES autoconf variable as it's 
still used in
sources.mak)

* Update to link with the .la file in other Makefile.am files, and make a link 
to the
.a file for the convenience of other Makefiles which have not yet been 
converted to automake

v2: Remove stray -static from LDFLAGS

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 src/glsl/tests/Makefile.am  |2 +-
 src/mesa/Makefile.am|   45 +--
 src/mesa/Makefile.old   |   57 +--
 src/mesa/drivers/osmesa/Makefile.am |2 +-
 src/mesa/drivers/x11/Makefile.am|2 +-
 src/mesa/main/tests/Makefile.am |2 +-
 6 files changed, 46 insertions(+), 64 deletions(-)

diff --git a/src/glsl/tests/Makefile.am b/src/glsl/tests/Makefile.am
index 4829fb2..33e634d 100644
--- a/src/glsl/tests/Makefile.am
+++ b/src/glsl/tests/Makefile.am
@@ -28,7 +28,7 @@ uniform_initializer_test_SOURCES =\
 uniform_initializer_test_LDADD =   \
$(top_builddir)/src/gtest/libgtest.la   \
$(top_builddir)/src/glsl/libglsl.la \
-   $(top_builddir)/src/mesa/libmesa.a  \
+   $(top_builddir)/src/mesa/libmesa.la \
-lpthread
 
 ralloc_test_SOURCES = ralloc_test.cpp $(top_builddir)/src/glsl/ralloc.c
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index bada760..54ee253 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -93,14 +93,51 @@ program/lex.yy.c: program/program_lexer.l
mkdir -p program
$(LEX) --never-interactive --outfile=$@ $
 
-all-local:
-   $(MAKE) -f $(srcdir)/Makefile.old
+noinst_LTLIBRARIES = libmesa.la libmesagallium.la
+
+SRCDIR = $(top_srcdir)/src/mesa
+include sources.mak
+
+AM_CFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CFLAGS)
+AM_CXXFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) 
$(CXXFLAGS)
+
+# cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a 
configure substitution
+MESA_ASM_FILES_FOR_ARCH =
+
+if HAVE_X86_ASM
+MESA_ASM_FILES_FOR_ARCH += $(X86_FILES)
+endif
+if HAVE_X86_64_ASM
+MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
+endif
+if HAVE_SPARC_ASM
+MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES)
+endif
+
+libmesa_la_SOURCES = \
+   $(MESA_FILES) \
+   $(MESA_CXX_FILES) \
+$(MESA_ASM_FILES_FOR_ARCH)
+
+libmesa_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
+libmesa_la_LDFLAGS =
+
+libmesagallium_la_SOURCES = \
+   $(MESA_GALLIUM_FILES) \
+   $(MESA_GALLIUM_CXX_FILES) \
+$(MESA_ASM_FILES_FOR_ARCH)
+
+libmesagallium_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
+libmesagallium_la_LDFLAGS =
 
 install-exec-local:
$(MAKE) -f $(srcdir)/Makefile.old install
 
-clean-local:
-   $(MAKE) -f $(srcdir)/Makefile.old clean
+# Provide compatibility with scripts for the old Mesa build system for
+# a while by putting a link to the library in the current directory.
+all-local: libmesa.la libmesagallium.la
+   ln -f .libs/libmesa.a .
+   ln -f .libs/libmesagallium.a .
 
 pkgconfigdir = $(libdir)/pkgconfig
 
diff --git a/src/mesa/Makefile.old b/src/mesa/Makefile.old
index 4ea70d4..3266a5d 100644
--- a/src/mesa/Makefile.old
+++ b/src/mesa/Makefile.old
@@ -3,58 +3,10 @@
 TOP = ../..
 include $(TOP)/configs/current
 
-MESA_LIBS := libmesa.a libmesagallium.a
-DEPENDS := depend
-
 SRCDIR = .
 include sources.mak
 
-# define preprocessor flags
-MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES)
-
-# append include dirs
-MESA_CPPFLAGS += $(INCLUDE_DIRS)
-
-# tidy compiler flags
-CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
-CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS))
-
-# LLVM is needed for the state tracker
-MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS)
-MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS)
-
-%.o: %.c
-   $(CC) -c -o $@ $ $(MESA_CPPFLAGS) $(MESA_CFLAGS)
-
-%.o: %.cpp
-   $(CXX) -c -o $@ $ $(MESA_CPPFLAGS) $(MESA_CXXFLAGS)
-
-%.o: %.S
-   $(CC) -c -o $@ $ $(MESA_CPPFLAGS) $(MESA_CFLAGS)
-
-# Default: build dependencies, then asm_subdirs, GLSL built-in lib,
-# then convenience libs (.a) and finally the device drivers:
-default: $(DEPENDS) $(MESA_LIBS)
-
-##
-# Helper libraries used by many drivers:
-
-# Make archive of core mesa object files
-libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS)
-   @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS)
-
-# Make archive of subset of core mesa object files for gallium
-libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
-   @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
-
-##
-# Dependency generation
-
-depend: $(ALL_FILES) 

[Mesa-dev] [PATCH 6/9] Link dri drivers with mesa or dricore libtool library

2012-07-10 Thread Jon TURNEY
Now mesa/drivers/dri is converted to automake, we want to update DRI_LIB_DEPS
so that we link with the libmesa or libdricore libtool library, as appropriate.

However, this is complicated by the fact that gallium/targets is not (yet)
converted, so we can't share the DRI_LIB_DEPS autoconf variable with that 
anymore.

Add an additional autoconf variable GALLIUM_DRI_LIB_DEPS, whic is now used in
gallium/targets/Makefile.dri, to link with the libdircore or libmesa native 
library.

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 configs/current.in   |1 +
 configure.ac |   11 ---
 src/gallium/targets/Makefile.dri |4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/configs/current.in b/configs/current.in
index ca817c4..e0c0130 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -148,6 +148,7 @@ GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@
 
 # DRI dependencies
 DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
+GALLIUM_DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @GALLIUM_DRI_LIB_DEPS@
 LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
 LIBDRM_LIB = @LIBDRM_LIBS@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
diff --git a/configure.ac b/configure.ac
index ae28007..5724f8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1084,11 +1084,14 @@ GLAPI_LIB_DEPS=-lpthread $SELINUX_LIBS
 AC_SUBST([GLAPI_LIB_DEPS])
 
 
-dnl Setup default DRI CFLAGS
-DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
+dnl dri libraries are linking with mesa
+DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.la'
+GALLIUM_DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
 
+dnl ... or dricore?
 if test x$enable_dri = xyes  test x$driglx_direct = xyes ; then
-DRI_LIB_DEPS=-L\$(TOP)/\$(LIB_DIR) -ldricore$VERSION
+DRI_LIB_DEPS='$(TOP)/src/mesa/libdricore/libdricore$VERSION.la'
+GALLIUM_DRI_LIB_DEPS='$(TOP)/src/mesa/libdricore/libdricore$VERSION.a'
 HAVE_DRICORE=yes
 fi
 AM_CONDITIONAL(HAVE_DRICORE, test x$HAVE_DRICORE = xyes)
@@ -1266,10 +1269,12 @@ if test x$enable_dri = xyes; then
 
 # put all the necessary libs together
 DRI_LIB_DEPS=$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm 
-lpthread $DLOPEN_LIBS
+GALLIUM_DRI_LIB_DEPS=$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS 
$EXPAT_LIB -lm -lpthread $DLOPEN_LIBS
 fi
 AC_SUBST([DRI_DIRS])
 AC_SUBST([EXPAT_INCLUDES])
 AC_SUBST([DRI_LIB_DEPS])
+AC_SUBST([GALLIUM_DRI_LIB_DEPS])
 
 case $DRI_DIRS in
 *i915*|*i965*)
diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri
index 3abed82..5b6676d 100644
--- a/src/gallium/targets/Makefile.dri
+++ b/src/gallium/targets/Makefile.dri
@@ -73,8 +73,8 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) 
Makefile \
$(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
$(OBJECTS) $(PIPE_DRIVERS) \
 -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \
- $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
-   $(CXX) $(CFLAGS) -o $@.test 
$(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS) $(LDFLAGS);
+ $(GALLIUM_DRI_LIB_DEPS) $(DRIVER_EXTRAS)
+   $(CXX) $(CFLAGS) -o $@.test 
$(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(GALLIUM_DRI_LIB_DEPS) 
$(LDFLAGS);
@rm -f $@.test
mv -f $@.tmp $@
 
-- 
1.7.9

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


[Mesa-dev] [PATCH 7/9] Rename X86-64_API - X86_64_API

2012-07-10 Thread Jon TURNEY
automake doesn't allow hyphens in variable names

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 configure.ac   |2 +-
 src/mapi/glapi/sources.mak |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5724f8a..c579fd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,7 +509,7 @@ if test x$enable_asm = xyes; then
 x86_64)
 DEFINES=$DEFINES -DUSE_X86_64_ASM
 MESA_ASM_FILES='$(X86_64_FILES)'
-GLAPI_ASM_SOURCES='$(X86-64_API)'
+GLAPI_ASM_SOURCES='$(X86_64_API)'
 AC_MSG_RESULT([yes, x86_64])
 ;;
 sparc)
diff --git a/src/mapi/glapi/sources.mak b/src/mapi/glapi/sources.mak
index dfc6cc6..aa8a4d4 100644
--- a/src/mapi/glapi/sources.mak
+++ b/src/mapi/glapi/sources.mak
@@ -12,7 +12,7 @@ GLAPI_SOURCES = \
 X86_API =  \
glapi_x86.S
 
-X86-64_API =   \
+X86_64_API =   \
glapi_x86-64.S
 
 SPARC_API =\
-- 
1.7.9

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


[Mesa-dev] [PATCH 9/9] Don't explicitly link libOsmesa with libmesa's dependency libglsl

2012-07-10 Thread Jon TURNEY
The libmesa convenience library is linked with the libglsl convenience
library.  libOsmesa is linked with libmesa, and also directly with libglsl.
This gives rise to duplicate symbol errors.

We must either:
(i) Not link libmesa with libglsl, and link anything that uses libmesa with
libglsl as well, or
(ii) Link libmesa with libglsl, and not link anything that uses libmesa with
libglsl

I choose (ii) just because it's least change, but I'm not sure it's right.

Note that drivers/X11 makes libGL by linking with libmesa, but not libglsl,
so it's a bit unclear to me how this was working correctly before in both cases
(It might be some sort of accidental side-effect of what mklib's 
expand_archives()
function does that this ever worked before?)
---
 src/mesa/drivers/osmesa/Makefile.am |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/osmesa/Makefile.am 
b/src/mesa/drivers/osmesa/Makefile.am
index 9989c92..7c151bf 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -40,8 +40,7 @@ lib@OSMESA_LIB@_la_SOURCES = osmesa.c
 lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -shared
 lib@OSMESA_LIB@_la_LIBADD = \
$(top_builddir)/src/mesa/libmesa.la \
-   $(top_builddir)/src/mapi/glapi/libglapi.la \
-   $(top_builddir)/src/glsl/libglsl.la
+   $(top_builddir)/src/mapi/glapi/libglapi.la
 
 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the driver into /lib of the build tree.
-- 
1.7.9

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


[Mesa-dev] [PATCH 8/9] automake: convert libglapi

2012-07-10 Thread Jon TURNEY
* configure substitutions are not allowed in _SOURCES variables in automake,
so remove the AC_SUBST'ed GLAPI_ASM_SOURCES and instead use some AM_CONDITIONALS
to choose which asm sources are used

* Change GLAPI_LIB to point to the .la file in other Makefile.am files, and 
make a link
to the .a file for the convenience of other Makefiles which have not yet been 
converted
to automake

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 configs/current.in  |1 -
 configure.ac|6 +--
 src/egl/main/Makefile.am|2 +-
 src/glx/Makefile.am |2 +-
 src/mapi/glapi/.gitignore   |1 +
 src/mapi/glapi/Makefile |   77 ---
 src/mapi/glapi/Makefile.am  |   69 +++
 src/mapi/glapi/tests/Makefile.am|2 +-
 src/mesa/drivers/osmesa/Makefile.am |2 +-
 src/mesa/drivers/x11/Makefile.am|2 +-
 10 files changed, 76 insertions(+), 88 deletions(-)
 delete mode 100644 src/mapi/glapi/Makefile
 create mode 100644 src/mapi/glapi/Makefile.am

diff --git a/configs/current.in b/configs/current.in
index e0c0130..dc0dea8 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -47,7 +47,6 @@ DLOPEN_LIBS = @DLOPEN_LIBS@
 
 # Source selection
 MESA_ASM_FILES = @MESA_ASM_FILES@
-GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
 
 # Misc tools and flags
 MAKE = @MAKE@
diff --git a/configure.ac b/configure.ac
index c579fd3..7e55907 100644
--- a/configure.ac
+++ b/configure.ac
@@ -454,7 +454,6 @@ AC_ARG_ENABLE([asm],
 )
 asm_arch=
 MESA_ASM_FILES=
-GLAPI_ASM_SOURCES=
 AC_MSG_CHECKING([whether to enable assembly])
 test x$enable_asm = xno  AC_MSG_RESULT([no])
 # disable if cross compiling on x86/x86_64 since we must run gen_matypes
@@ -503,19 +502,16 @@ if test x$enable_asm = xyes; then
 x86)
 DEFINES=$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM 
-DUSE_SSE_ASM
 MESA_ASM_FILES='$(X86_FILES)'
-GLAPI_ASM_SOURCES='$(X86_API)'
 AC_MSG_RESULT([yes, x86])
 ;;
 x86_64)
 DEFINES=$DEFINES -DUSE_X86_64_ASM
 MESA_ASM_FILES='$(X86_64_FILES)'
-GLAPI_ASM_SOURCES='$(X86_64_API)'
 AC_MSG_RESULT([yes, x86_64])
 ;;
 sparc)
 DEFINES=$DEFINES -DUSE_SPARC_ASM
 MESA_ASM_FILES='$(SPARC_FILES)'
-GLAPI_ASM_SOURCES='$(SPARC_API)'
 AC_MSG_RESULT([yes, sparc])
 ;;
 *)
@@ -524,7 +520,6 @@ if test x$enable_asm = xyes; then
 esac
 fi
 AC_SUBST([MESA_ASM_FILES])
-AC_SUBST([GLAPI_ASM_SOURCES])
 
 dnl PIC code macro
 MESA_PIC_FLAGS
@@ -2177,6 +2172,7 @@ AC_CONFIG_FILES([configs/current
src/glsl/tests/Makefile
src/glx/Makefile
src/glx/tests/Makefile
+   src/mapi/glapi/Makefile
src/mapi/glapi/gen/Makefile
src/mapi/shared-glapi/Makefile
src/mapi/glapi/tests/Makefile
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index 9c3935b..ca5257a 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -19,7 +19,7 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-GLAPI_LIB = ../mapi/glapi/libglapi.a
+GLAPI_LIB = ../mapi/glapi/libglapi.la
 
 if HAVE_XF86VIDMODE
 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index 37a938d..6ca85cd 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -26,7 +26,7 @@ endif
 
 SUBDIRS=tests
 
-GLAPI_LIB = ../mapi/glapi/libglapi.a
+GLAPI_LIB = ../mapi/glapi/libglapi.la
 
 if HAVE_XF86VIDMODE
 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
diff --git a/src/mapi/glapi/.gitignore b/src/mapi/glapi/.gitignore
index ecae56a..25d3dfd 100644
--- a/src/mapi/glapi/.gitignore
+++ b/src/mapi/glapi/.gitignore
@@ -7,3 +7,4 @@ glapi_x86.S
 glapitable.h
 glapitemp.h
 glprocs.h
+\Makefile
diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile
deleted file mode 100644
index 211f384..000
--- a/src/mapi/glapi/Makefile
+++ /dev/null
@@ -1,77 +0,0 @@
-# src/mapi/glapi/Makefile
-
-TOP = ../../..
-include $(TOP)/configs/current
-
-TARGET = glapi
-
-MAPI = $(TOP)/src/mapi/mapi
-
-include sources.mak
-include $(MAPI)/sources.mak
-
-glapi_CPPFLAGS := \
-   -I$(TOP)/include \
-   -I$(TOP)/src/mapi \
-   -I$(TOP)/src/mesa
-
-ifeq ($(SHARED_GLAPI),1)
-glapi_CPPFLAGS += \
-   -DMAPI_MODE_BRIDGE \
-   -DMAPI_ABI_HEADER=\glapi/glapi_mapi_tmp.h\
-glapi_SOURCES := $(MAPI_BRIDGE_FILES)
-
-glapi_GLAPI_OBJECTS :=
-glapi_ASM_OBJECTS :=
-glapi_MAPI_OBJECTS := $(notdir $(MAPI_BRIDGE_FILES:.c=.o))
-else
-glapi_CPPFLAGS += -DMAPI_MODE_UTIL
-glapi_SOURCES := $(GLAPI_SOURCES) $(MAPI_UTIL_FILES)
-
-glapi_GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
-glapi_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
-glapi_MAPI_OBJECTS := $(notdir $(MAPI_UTIL_FILES:.c=.o))
-endif # SHARED_GLAPI
-
-glapi_OBJECTS := \
-   

Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options

2012-07-10 Thread Brad King
On 07/09/2012 04:57 PM, Brad King wrote:
 Running git bisect points to commit 2d4b77c7 (automake:
 Convert src/mesa/drivers/x11/Makefile, 2012-06-12).  The change
 made by the commit does not obviously drop use of GL_LIB.

Upon closer inspection it *does* obviously drop use of GL_LIB.
Now libGL is hard-coded in Makefile.am.  Naive replacement
like that below is not valid automake code AFAICT.  I'm not
familiar enough with automake to know how to make the library
name configurable.  Does anyone know?

Thanks,
-Brad


diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am
index cced238..af3fa8f 100644
--- a/src/mesa/drivers/x11/Makefile.am
+++ b/src/mesa/drivers/x11/Makefile.am
@@ -33,10 +33,10 @@ AM_CPPFLAGS = \
$(DEFINES)

 if HAVE_X11_DRIVER
-lib_LTLIBRARIES = libGL.la
+lib_LTLIBRARIES = lib$(GL_LIB).la
 endif

-libGL_la_SOURCES = \
+lib$(GL_LIB)_la_SOURCES = \
glxapi.h \
glxheader.h \
xfonts.h \
@@ -55,20 +55,20 @@ GL_MAJOR = 1
 GL_MINOR = 6
 GL_PATCH = 0

-libGL_la_LIBADD = \
+lib$(GL_LIB)_la_LIBADD = \
$(top_builddir)/src/mesa/libmesa.a \
$(top_builddir)/src/mapi/glapi/libglapi.a
-libGL_la_LDFLAGS = \
+lib$(GL_LIB)_la_LDFLAGS = \
-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \
$(GL_LIB_DEPS)

 if HAVE_SHARED_GLAPI
-libGL_la_LDFLAGS += -L$(top_builddir)/$(LIB_DIR) -l$(GLAPI_LIB)
+lib$(GL_LIB)_la_LDFLAGS += -L$(top_builddir)/$(LIB_DIR) -l$(GLAPI_LIB)
 endif

 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the driver into /lib of the build tree.
-all-local: libGL.la
+all-local: lib$(GL_LIB).la
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
-   ln -f .libs/libGL.so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) 
$(top_builddir)/$(LIB_DIR)/libGL.so.1
-   ln -sf libGL.so.1 $(top_builddir)/$(LIB_DIR)/libGL.so
+   ln -f .libs/lib$(GL_LIB).so.$(GL_MAJOR).$(GL_MINOR).$(GL_PATCH) 
$(top_builddir)/$(LIB_DIR)/lib$(GL_LIB).so.1
+   ln -sf lib$(GL_LIB).so.1 $(top_builddir)/$(LIB_DIR)/lib$(GL_LIB).so
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/10] ARB_transform_feedback3 ARB_transform_feedback_instanced

2012-07-10 Thread Marek Olšák
Hi,

I plan to push this series in two days if there's no other feedback.

Marek

On Thu, Jul 5, 2012 at 1:20 PM, Marek Olšák mar...@gmail.com wrote:
 Hi everyone,

 the title says it all. These are the remaining transform feedback extensions 
 from GL4. Nothing needs to be done for this in drivers, provided they fully 
 implement the internal interfaces.

 This doesn't add support for multiple vertex streams. It seems like 
 ARB_transform_feedback3 adds vertex streams, but it only adds the API. The 
 main part of the functionality is defined in ARB_gpu_shader5.

 There are new tests for this on the piglit mailing list.

 Please review.

 Marek Olšák (10):
   glapi: add ARB_transform_feedback3
   glapi: add ARB_transform_feedback_instanced
   glsl: implement ARB_transform_feedback3 in the linker
   mesa: implement glGet queries and error handling for 
 ARB_transform_feedback3
   mesa: implement indexed query functions from ARB_transform_feedback3
   mesa: implement display list support for indexed query functions
   mesa: implement display list support for new DrawTransformFeedback 
 functions
   mesa: implement new DrawTransformFeedback functions
   mesa: add ARB_transform_feedback_instanced extension enable flag
   st/mesa: expose new transform feedback extensions

  src/glsl/linker.cpp|  119 ++
  src/mapi/glapi/gen/gl_API.xml  |   50 -
  src/mesa/main/api_validate.c   |   26 +--
  src/mesa/main/api_validate.h   |4 +-
  src/mesa/main/context.c|1 +
  src/mesa/main/dd.h |8 ++
  src/mesa/main/dlist.c  |  125 
 +++-
  src/mesa/main/extensions.c |2 +
  src/mesa/main/get.c|9 +++
  src/mesa/main/mtypes.h |3 +
  src/mesa/main/queryobj.c   |   81 +
  src/mesa/main/transformfeedback.c  |   32 
  src/mesa/main/vtxfmt.c |5 ++
  src/mesa/state_tracker/st_extensions.c |6 ++
  src/mesa/vbo/vbo_exec_array.c  |   62 ++--
  src/mesa/vbo/vbo_save_api.c|   45 +++-
  16 files changed, 533 insertions(+), 45 deletions(-)

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


Re: [Mesa-dev] [PATCH 00/22] Gallium and R600 improvements

2012-07-10 Thread Jose Fonseca
- Original Message -
 Hi everyone,
 
 this series has two parts.
 
 Patches 1-12 are Mesa/Gallium improvements. Most importantly, this
 adds acceleration of stencil copying (including glBlitFramebuffer)
 using the shader stencil export functionality. I am afraid r600g and
 radeonsi are the only drivers which can make use of it at the
 moment. There is also acceleration for depth texture mipmap
 generation.

I've skimmed through these, and didn't notice anything wrong.

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


Re: [Mesa-dev] [PATCH 00/22] Gallium and R600 improvements

2012-07-10 Thread Alex Deucher
On Mon, Jul 9, 2012 at 3:15 PM, Marek Olšák mar...@gmail.com wrote:
 Hi everyone,

 this series has two parts.

 Patches 1-12 are Mesa/Gallium improvements. Most importantly, this adds 
 acceleration of stencil copying (including glBlitFramebuffer) using the 
 shader stencil export functionality. I am afraid r600g and radeonsi are the 
 only drivers which can make use of it at the moment. There is also 
 acceleration for depth texture mipmap generation.

 Patches 13-22 are R600 improvements. There is a new derived state for the CB 
 registers which kept cumulating in the draw_vbo function, and some 
 improvements for depth-stencil flushing and uploading. My changes to the 
 CB_TARGET_MASK emission in the compute code (patch #13) might need some 
 review from somebody working on compute.

 The R600 changes depend on the not-yet-committed patch r600g: improve 
 flushed depth texture handling v2 from Vadim Girlin.

 The series fixes 23 depth-stencil piglit tests on r600g.

For the series:

Reviewed-by: Alex Deucher alexander.deuc...@amd.com


 Marek Olšák (22):
   mesa: remove assertions that do not allow compressed 2D_ARRAY textures
   gallium/u_gen_mipmap: accelerate depth texture mipmap generation
   gallium/u_blitter: minify depth0 when initializing last_layer
   gallium: add util_format_stencil helper function
   gallium/u_blitter: accelerate depth-stencil copying using shader 
 stencil export
   gallium/u_blitter: accelerate stencil-only copying
   gallium/util: move pipe_tex_to_tgsi_tex helper function into u_inlines
   gallium/u_blit: don't do two copies for non-2D textures
   gallium/u_blit: drop not-very-useful wrapper around 
 util_blit_pixels_writemask
   gallium/u_blit: remove useless memset calls
   st/mesa: set colormask to zero when blitting depth
   st/mesa: implement accelerated stencil blitting using shader stencil 
 export
   r600g: move CB_TARGET_MASK setup into new cb_misc_state
   r600g: move MULTIWRITE setup into cb_misc_state for r6xx-r7xx
   r600g: move CB_SHADER_MASK setup into cb_misc_state
   r600g: set DISABLE in CB_COLOR_CONTROL if colormask is 0
   r600g: remove is_flush from DSA state
   r600g: do fine-grained depth texture flushing
   r600g: flush depth textures bound to vertex shaders
   r600g: don't set dirty_db_mask for a flushed depth texture
   r600g: don't flush depth textures set as colorbuffers
   r600g: fix uploading non-zero mipmap levels of depth textures

  src/gallium/auxiliary/postprocess/pp_mlaa.c|3 +-
  src/gallium/auxiliary/postprocess/pp_run.c |3 +-
  src/gallium/auxiliary/util/u_blit.c|  337 
 +---
  src/gallium/auxiliary/util/u_blit.h|   20 +-
  src/gallium/auxiliary/util/u_blitter.c |  153 ++---
  src/gallium/auxiliary/util/u_blitter.h |4 +-
  src/gallium/auxiliary/util/u_format.h  |   29 ++
  src/gallium/auxiliary/util/u_gen_mipmap.c  |   84 +++--
  src/gallium/auxiliary/util/u_inlines.h |   26 ++
  src/gallium/auxiliary/util/u_simple_shaders.c  |  100 ++
  src/gallium/auxiliary/util/u_simple_shaders.h  |   12 +
  src/gallium/drivers/r600/evergreen_compute.c   |3 +-
  .../drivers/r600/evergreen_compute_internal.c  |2 +-
  src/gallium/drivers/r600/evergreen_hw_context.c|4 -
  src/gallium/drivers/r600/evergreen_state.c |   36 ++-
  src/gallium/drivers/r600/evergreend.h  |2 +
  src/gallium/drivers/r600/r600_blit.c   |   99 +++---
  src/gallium/drivers/r600/r600_hw_context.c |4 +-
  src/gallium/drivers/r600/r600_pipe.h   |   27 +-
  src/gallium/drivers/r600/r600_resource.h   |6 +-
  src/gallium/drivers/r600/r600_state.c  |   42 ++-
  src/gallium/drivers/r600/r600_state_common.c   |   88 ++---
  src/gallium/drivers/r600/r600_texture.c|   23 +-
  src/gallium/drivers/r600/r600d.h   |2 +
  src/mesa/main/formats.c|6 +-
  src/mesa/state_tracker/st_cb_blit.c|   37 ++-
  src/mesa/state_tracker/st_cb_drawpixels.c  |   23 +-
  src/mesa/state_tracker/st_cb_texture.c |   32 +-
  src/mesa/state_tracker/st_context.c|2 +
  src/mesa/state_tracker/st_context.h|2 +-
  30 files changed, 838 insertions(+), 373 deletions(-)

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


Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-10 Thread Jose Fonseca


- Original Message -
 On Tue, Jul 10, 2012 at 3:30 PM, Jose Fonseca jfons...@vmware.com
 wrote:
  Yep. The interfaces are busted.
 
  Without native integers we get
 
 DCL SV[0], INSTANCEID
 ...
 ARL ADDR[0].x, SV[0].
 
  and with integers we get
 
 DCL SV[0], INSTANCEID
 ...
 UARL ADDR[0].x, SV[0].
 
  Olivier's fix is incorrect. It works on the above cases by guessing
  the type, but if we have:
 
 DCL SV[0], INSTANCEID
 ...
 MOV TEMP[0].x, SV[0].
 ARL ADDR[0].x, TEMP[0].
 
  and
 
 DCL SV[0], INSTANCEID
 ...
 MOV TEMP[0].x, SV[0].
 UARL ADDR[0].x, TEMP[0].
 
  it is impossible to guess -- the change is merely replacing a bug
  with another.
 
 
  For the record, the problem also happens without LLVM:
 
DRAW_USE_LLVM=0 draw-instanced -auto
 
 
 
  Anyway, AFAICT, all hardware out there that really supports
  INSTANCEID/VERTEXID also supports native integers, so this is a
  problem specific to the draw module.
 
  But given that draw module can support anything, this is actually
  self inflicted! In short, INSTANCEID/VERTEXID without integers is
  an historic artifact, that should not exist going forward.
 
  The right fix is merely making sure that PIPE_SHADER_CAP_INTEGERS
  is accurately advertised as 1 by the draw module (just like
  Stephane secretly did in 45fc069600ddbfe07a0a0cd5280161a8c7c55dd0
  :)
 
 I just wanted to tell you Stephane's change cannot work and it even
 has no effect at the moment. The native integer support is global in
 core Mesa. It's because integer uniforms are converted to floats
 based
 on the global NativeInteger flag for all shader stages and that can't
 be fixed easily, because uniforms can be shared between shaders.
 Basically, all drivers must advertise integer support either for all
 shader stages or none.

I see..
 
 Given that, I only see two possible outcomes:
 
 1) Disable INSTANCEID support in DX9-level drivers using Draw (that's
 only i915g AFAIK) and only support INSTANCEID with integers.

 2) Let drivers set the type of system values in Draw, so that Draw
 doesn't have to guess what it should be.

My issue with 2) with this is that TGSI semantics depend on an external state. 
I think this is ugly and confusing.

If Stephane's OK with 1), I'd prefer taking it.

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


[Mesa-dev] Mesa 8.0.4 release

2012-07-10 Thread Ian Romanick
Mesa 8.0.4 has been released.  Mesa 8.0.4 is a bug fix release which 
fixes bugs found since the 8.0.3 release.


The tag in the GIT repository for Mesa 8.0.4 is 'mesa-8.0.4'.

Mesa 8.0.4 is available for download at
ftp://freedesktop.org/pub/mesa/8.0.4/

I was originally planning for Mesa 8.0.4 to be released back on June 
15th and Mesa 8.0.5 to be released on July 20th.  Things happened (as 
they always do!), and 8.0.4 got delayed.  I don't see a lot of value in 
doing another release in 10 days.  Unless there are objections, I think 
we'll just skip the July release.  The next releases will be mid-August.


As far as I know, the plan is still to release Mesa 8.1 and Mesa 
8.0.next simultaneously on (or around) August 17th.


md5sums:

d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
02b96082d2f1ad72e7385f4022afafb9  MesaLib-8.0.4.tar.gz
1f0fdabe6e8019d4de6c16e20e74d163  MesaLib-8.0.4.zip

I have verified building from the .tar.bz2 file by doing:

tar -xjf MesaLib-8.0.4.tar.bz2
cd Mesa-8.0.4
./configure --enable-dri --with-dri-drivers=yes \
--enable-gles1 --enable-gles2 --enable-glx-tls \
--disable-glu --with-gallium-drivers \
--enable-gallium-llvm
make -j6

I have also verified that I pushed all the cherry picks and the tag.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-10 Thread Stéphane Marchesin
On Tue, Jul 10, 2012 at 9:04 AM, Jose Fonseca jfons...@vmware.com wrote:


 - Original Message -
 On Tue, Jul 10, 2012 at 3:30 PM, Jose Fonseca jfons...@vmware.com
 wrote:
  Yep. The interfaces are busted.
 
  Without native integers we get
 
 DCL SV[0], INSTANCEID
 ...
 ARL ADDR[0].x, SV[0].
 
  and with integers we get
 
 DCL SV[0], INSTANCEID
 ...
 UARL ADDR[0].x, SV[0].
 
  Olivier's fix is incorrect. It works on the above cases by guessing
  the type, but if we have:
 
 DCL SV[0], INSTANCEID
 ...
 MOV TEMP[0].x, SV[0].
 ARL ADDR[0].x, TEMP[0].
 
  and
 
 DCL SV[0], INSTANCEID
 ...
 MOV TEMP[0].x, SV[0].
 UARL ADDR[0].x, TEMP[0].
 
  it is impossible to guess -- the change is merely replacing a bug
  with another.
 
 
  For the record, the problem also happens without LLVM:
 
DRAW_USE_LLVM=0 draw-instanced -auto
 
 
 
  Anyway, AFAICT, all hardware out there that really supports
  INSTANCEID/VERTEXID also supports native integers, so this is a
  problem specific to the draw module.
 
  But given that draw module can support anything, this is actually
  self inflicted! In short, INSTANCEID/VERTEXID without integers is
  an historic artifact, that should not exist going forward.
 
  The right fix is merely making sure that PIPE_SHADER_CAP_INTEGERS
  is accurately advertised as 1 by the draw module (just like
  Stephane secretly did in 45fc069600ddbfe07a0a0cd5280161a8c7c55dd0
  :)

 I just wanted to tell you Stephane's change cannot work and it even
 has no effect at the moment. The native integer support is global in
 core Mesa. It's because integer uniforms are converted to floats
 based
 on the global NativeInteger flag for all shader stages and that can't
 be fixed easily, because uniforms can be shared between shaders.
 Basically, all drivers must advertise integer support either for all
 shader stages or none.

 I see..

 Given that, I only see two possible outcomes:

 1) Disable INSTANCEID support in DX9-level drivers using Draw (that's
 only i915g AFAIK) and only support INSTANCEID with integers.

 2) Let drivers set the type of system values in Draw, so that Draw
 doesn't have to guess what it should be.

 My issue with 2) with this is that TGSI semantics depend on an external 
 state. I think this is ugly and confusing.

 If Stephane's OK with 1), I'd prefer taking it.


There is also option 3): revert the two patches causing the regression.

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


[Mesa-dev] [PATCH] docs/relnotes-8.0.4: fix html markup

2012-07-10 Thread Andreas Boll
---
 docs/relnotes-8.0.4.html |   85 ++
 1 files changed, 41 insertions(+), 44 deletions(-)

diff --git a/docs/relnotes-8.0.4.html b/docs/relnotes-8.0.4.html
index dd89b95..529140a 100644
--- a/docs/relnotes-8.0.4.html
+++ b/docs/relnotes-8.0.4.html
@@ -1,16 +1,13 @@
-HTML
-
+!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
+html lang=en
 head
-TITLEMesa Release Notes/TITLE
-link rel=stylesheet type=text/css href=mesa.css
-meta http-equiv=content-type content=text/html; charset=utf-8 /
+  meta http-equiv=content-type content=text/html; charset=utf-8
+  titleMesa Release Notes/title
+  link rel=stylesheet type=text/css href=mesa.css
 /head
+body
 
-BODY
-
-body bgcolor=#ee
-
-H1Mesa 8.0.4 Release Notes / July 10, 2012/H1
+h1Mesa 8.0.4 Release Notes / July 10, 2012/h1
 
 p
 Mesa 8.0.4 is a bug fix release which fixes bugs found since the 8.0.2 release.
@@ -70,18 +67,18 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
   git log mesa-8.0.3..mesa-8.0.4
 /pre
 
-pAndreas Betz (1):
+pAndreas Betz (1):/p
 ul
   livega: fix 565 color unpacking bug/li
-/ul/p
+/ul
 
-pAntoine Labour (2):
+pAntoine Labour (2):/p
 ul
   limeta: Cleanup the resources we allocate./li
   limesa: Free uniforms correclty./li
-/ul/p
+/ul
 
-pBrian Paul (22):
+pBrian Paul (22):/p
 ul
   lidocs: add link to 8.0.3 release notes/li
   limesa: fix Z32_FLOAT -gt; uint conversion functions/li
@@ -105,39 +102,39 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
   list/mesa: fix mipmap image size computation w.r.t. texture arrays/li
   lidraw: fix missing immediates bug in polygon stipple code/li
   list/mesa: fix max_offset computation for base vertex/li
-/ul/p
+/ul
 
-pChristoph Bumiller (1):
+pChristoph Bumiller (1):/p
 ul
   linv50: handle NEG,ABS modifiers for short RCP encoding/li
-/ul/p
+/ul
 
-pDylan Noblesmith (1):
+pDylan Noblesmith (1):/p
 ul
   limesa: require GL_MAX_SAMPLES gt;= 4 for GL 3.0/li
-/ul/p
+/ul
 
-pEric Anholt (1):
+pEric Anholt (1):/p
 ul
   lii965/vs: Fix texelFetchOffset()/li
-/ul/p
+/ul
 
-pIan Romanick (5):
+pIan Romanick (5):/p
 ul
   lidocs: Add 8.0.3 release md5sums/li
   liglx/tests: Fix off-by-one error in allocating extension string 
buffer/li
   liglsl: Remove spurious printf messages/li
   liglsl: Fix pi/2 constant in acos built-in function/li
   limesa: Bump version number to 8.0.4/li
-/ul/p
+/ul
 
-pJosé Fonseca (2):
+pJosé Fonseca (2):/p
 ul
   limesa: Avoid void acinclude.m4 Android.common.mk Android.mk autogen.sh 
bin common.py configs configure.ac docs doxygen include Makefile scons 
SConstruct src tests arithmetic./li
   lidraw: Ensure that prepare is always run after LLVM garbagge 
collection./li
-/ul/p
+/ul
 
-pKenneth Graunke (15):
+pKenneth Graunke (15):/p
 ul
   limesa: Check for a negative size parameter in 
glCopyBufferSubData()./li
   lii965: Fix brw_swap_cmod() for LE/GE comparisons./li
@@ -154,51 +151,51 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
   lii965/fs: Fix user-defined FS outputs with less than four components./li
   liglsl: Hook up loop_variable_state destructor to plug a memory leak./li
   liglsl: Don't trust loop analysis in the presence of function calls./li
-/ul/p
+/ul
 
-pKurt Roeckx (1):
+pKurt Roeckx (1):/p
 ul
   lii830: Fix crash for GL_STENCIL_TEST in i830Enable()/li
-/ul/p
+/ul
 
-pLukas Rössler (1):
+pLukas Rössler (1):/p
 ul
   liglu: fix two Clang warnings/li
-/ul/p
+/ul
 
-pMarek Olšák (2):
+pMarek Olšák (2):/p
 ul
   limesa: allow exposing GL3 without EXT_texture_integer/li
   list/mesa: don't do srgb-gt;linear conversion in decompress_with_blit/li
-/ul/p
+/ul
 
-pPaul Seidler (1):
+pPaul Seidler (1):/p
 ul
   litests: include mesa headers/li
-/ul/p
+/ul
 
-pStéphane Marchesin (3):
+pStéphane Marchesin (3):/p
 ul
   liglx: Handle a null reply in QueryVersion./li
   lii915g: Don't invert signalled/unsignalled fences/li
   lii915g: Don't avoid flushing when we have a pending fence./li
-/ul/p
+/ul
 
-pThomas Gstädtner (1):
+pThomas Gstädtner (1):/p
 ul
   ligallium/targets: pass ldflags parameter to MKLIB/li
-/ul/p
+/ul
 
-pVadim Girlin (2):
+pVadim Girlin (2):/p
 ul
   list/mesa: set stObj-gt;lastLevel in guess_and_alloc_texture/li
   lir600g: check gpr count limit/li
-/ul/p
+/ul
 
-pVinson Lee (1):
+pVinson Lee (1):/p
 ul
   list/mesa: Fix uninitialized members in glsl_to_tgsi_visitor 
constructor./li
-/ul/p
+/ul
 
 /body
 /html
-- 
1.7.1

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


Re: [Mesa-dev] [PATCH] docs/relnotes-8.0.4: fix html markup

2012-07-10 Thread Ian Romanick
Right... I forgot that the HTML formatting got changed around.  I just 
copied the 8.0.3 release notes in the 8.0 branch as the starting point. 
 I think it should be fine apply this to master, and I can pick it over 
to 8.0 branch later... though I don't think it will matter there.  I'll 
just have to remember to not make the same mistake again. :)


Reviewed-by: Ian Romanick ian.d.roman...@intel.com

On 07/10/2012 10:09 AM, Andreas Boll wrote:

---
  docs/relnotes-8.0.4.html |   85 ++
  1 files changed, 41 insertions(+), 44 deletions(-)

diff --git a/docs/relnotes-8.0.4.html b/docs/relnotes-8.0.4.html
index dd89b95..529140a 100644
--- a/docs/relnotes-8.0.4.html
+++ b/docs/relnotes-8.0.4.html
@@ -1,16 +1,13 @@
-HTML
-
+!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
+html lang=en
  head
-TITLEMesa Release Notes/TITLE
-link rel=stylesheet type=text/css href=mesa.css
-meta http-equiv=content-type content=text/html; charset=utf-8 /
+  meta http-equiv=content-type content=text/html; charset=utf-8
+  titleMesa Release Notes/title
+  link rel=stylesheet type=text/css href=mesa.css
  /head
+body

-BODY
-
-body bgcolor=#ee
-
-H1Mesa 8.0.4 Release Notes / July 10, 2012/H1
+h1Mesa 8.0.4 Release Notes / July 10, 2012/h1

  p
  Mesa 8.0.4 is a bug fix release which fixes bugs found since the 8.0.2 
release.
@@ -70,18 +67,18 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
git log mesa-8.0.3..mesa-8.0.4
  /pre

-pAndreas Betz (1):
+pAndreas Betz (1):/p
  ul
livega: fix 565 color unpacking bug/li
-/ul/p
+/ul

-pAntoine Labour (2):
+pAntoine Labour (2):/p
  ul
limeta: Cleanup the resources we allocate./li
limesa: Free uniforms correclty./li
-/ul/p
+/ul

-pBrian Paul (22):
+pBrian Paul (22):/p
  ul
lidocs: add link to 8.0.3 release notes/li
limesa: fix Z32_FLOAT -gt; uint conversion functions/li
@@ -105,39 +102,39 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
list/mesa: fix mipmap image size computation w.r.t. texture arrays/li
lidraw: fix missing immediates bug in polygon stipple code/li
list/mesa: fix max_offset computation for base vertex/li
-/ul/p
+/ul

-pChristoph Bumiller (1):
+pChristoph Bumiller (1):/p
  ul
linv50: handle NEG,ABS modifiers for short RCP encoding/li
-/ul/p
+/ul

-pDylan Noblesmith (1):
+pDylan Noblesmith (1):/p
  ul
limesa: require GL_MAX_SAMPLES gt;= 4 for GL 3.0/li
-/ul/p
+/ul

-pEric Anholt (1):
+pEric Anholt (1):/p
  ul
lii965/vs: Fix texelFetchOffset()/li
-/ul/p
+/ul

-pIan Romanick (5):
+pIan Romanick (5):/p
  ul
lidocs: Add 8.0.3 release md5sums/li
liglx/tests: Fix off-by-one error in allocating extension string 
buffer/li
liglsl: Remove spurious printf messages/li
liglsl: Fix pi/2 constant in acos built-in function/li
limesa: Bump version number to 8.0.4/li
-/ul/p
+/ul

-pJosé Fonseca (2):
+pJosé Fonseca (2):/p
  ul
limesa: Avoid void acinclude.m4 Android.common.mk Android.mk autogen.sh bin 
common.py configs configure.ac docs doxygen include Makefile scons SConstruct src tests 
arithmetic./li
lidraw: Ensure that prepare is always run after LLVM garbagge 
collection./li
-/ul/p
+/ul

-pKenneth Graunke (15):
+pKenneth Graunke (15):/p
  ul
limesa: Check for a negative size parameter in 
glCopyBufferSubData()./li
lii965: Fix brw_swap_cmod() for LE/GE comparisons./li
@@ -154,51 +151,51 @@ d546f988adfdf986cff45b1efa2d8a46  MesaLib-8.0.4.tar.bz2
lii965/fs: Fix user-defined FS outputs with less than four 
components./li
liglsl: Hook up loop_variable_state destructor to plug a memory leak./li
liglsl: Don't trust loop analysis in the presence of function calls./li
-/ul/p
+/ul

-pKurt Roeckx (1):
+pKurt Roeckx (1):/p
  ul
lii830: Fix crash for GL_STENCIL_TEST in i830Enable()/li
-/ul/p
+/ul

-pLukas Rössler (1):
+pLukas Rössler (1):/p
  ul
liglu: fix two Clang warnings/li
-/ul/p
+/ul

-pMarek Olšák (2):
+pMarek Olšák (2):/p
  ul
limesa: allow exposing GL3 without EXT_texture_integer/li
list/mesa: don't do srgb-gt;linear conversion in 
decompress_with_blit/li
-/ul/p
+/ul

-pPaul Seidler (1):
+pPaul Seidler (1):/p
  ul
litests: include mesa headers/li
-/ul/p
+/ul

-pStéphane Marchesin (3):
+pStéphane Marchesin (3):/p
  ul
liglx: Handle a null reply in QueryVersion./li
lii915g: Don't invert signalled/unsignalled fences/li
lii915g: Don't avoid flushing when we have a pending fence./li
-/ul/p
+/ul

-pThomas Gstädtner (1):
+pThomas Gstädtner (1):/p
  ul
ligallium/targets: pass ldflags parameter to MKLIB/li
-/ul/p
+/ul

-pVadim Girlin (2):
+pVadim Girlin (2):/p
  ul
list/mesa: set stObj-gt;lastLevel in guess_and_alloc_texture/li
lir600g: check gpr count limit/li
-/ul/p
+/ul

-pVinson Lee (1):
+pVinson Lee (1):/p
  ul
list/mesa: Fix uninitialized members in glsl_to_tgsi_visitor 
constructor./li
-/ul/p
+/ul

  /body
  /html




Re: [Mesa-dev] [PATCH 22/22] r600g: fix uploading non-zero mipmap levels of depth textures

2012-07-10 Thread Marek Olšák
On Tue, Jul 10, 2012 at 11:44 AM, Michel Dänzer mic...@daenzer.net wrote:
 On Mon, 2012-07-09 at 21:15 +0200, Marek Olšák wrote:
 This fixes piglit/depth-level-clamp.
 ---
  src/gallium/drivers/r600/r600_texture.c |5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

 diff --git a/src/gallium/drivers/r600/r600_texture.c 
 b/src/gallium/drivers/r600/r600_texture.c
 index a6a83ca..d16c252 100644
 --- a/src/gallium/drivers/r600/r600_texture.c
 +++ b/src/gallium/drivers/r600/r600_texture.c
 @@ -926,8 +926,9 @@ void r600_texture_transfer_destroy(struct pipe_context 
 *ctx,

   u_box_origin_2d(texture-width0, texture-height0, 
 sbox);

 - ctx-resource_copy_region(ctx, texture, 0, 0, 0, 0,
 -   rtransfer-staging-b.b, 0,
 + ctx-resource_copy_region(ctx, texture, 
 transfer-level,
 +   0, 0, transfer-box.z,
 +   rtransfer-staging-b.b, 
 transfer-level,

 Does this really need to take into account transfer-box.z, but not .x
 and .y?

Yes, it could be optimized more. I'd rather leave the optimization to
some other patch. The read transfers always copy the whole layer too.

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


Re: [Mesa-dev] [PATCH] r600g: improve flushed depth texture handling v2

2012-07-10 Thread Marek Olšák
On Tue, Jul 10, 2012 at 6:40 AM, Vadim Girlin vadimgir...@gmail.com wrote:
 On Sat, 2012-07-07 at 01:48 +0200, Marek Olšák wrote:
 On Wed, Jun 27, 2012 at 1:34 AM, Vadim Girlin vadimgir...@gmail.com wrote:
  Use r600_resource_texture::flished_depth_texture for GPU access, and
  allocate it in the VRAM. For transfers we'll allocate untiled texture in 
  the
  GTT and store it in the r600_transfer::staging.
 
  Improves performance when flushed depth texture is frequently used by the
  GPU (about 30% for Lightsmark).
 
  Signed-off-by: Vadim Girlin vadimgir...@gmail.com
  ---
 
  Fixes fbo-clear-formats, fbo-generatemipmap-formats, no regressions on
  evergreen

 Hi,

 is there any reason this patch hasn't been committed yet?


 Hi,

 I have some doubts because it was benchmarked by phoronix and there were
 regressions, though I suspect that something is wrong with the results:

 http://www.phoronix.com/scan.php?page=articleitem=amd_r600g_texdepthnum=4

 I was going to look into it but had no time yet. I'd like to be sure
 that there are no regressions before committing.

Well, there's nothing wrong with your patch. I wouldn't trust
benchmarks run with the Unity desktop so much. I myself had to switch
from Unity 2D to Xfce just to get consistent results when testing
performance.

Now that your patch separates flushing for texturing and transfers, I
think we could make it a little bit faster by imlementing an in-place
flush for texturing (that is without having to allocate another
resource).

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


[Mesa-dev] [PATCH 1/5] glsl: Initialize coordinate to NULL in ir_texture constructor.

2012-07-10 Thread Kenneth Graunke
I ran into this while trying to create a TXS query, which doesn't have a
coordinate.  Since it didn't get initialized to NULL, a bunch of
visitors tried to access it and crashed.

Most of the time, this won't be a problem, but it's just a good idea.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/glsl/ir.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index b54e2f2..9bbf3b7 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1341,7 +1341,8 @@ enum ir_texture_opcode {
 class ir_texture : public ir_rvalue {
 public:
ir_texture(enum ir_texture_opcode op)
-  : op(op), projector(NULL), shadow_comparitor(NULL), offset(NULL)
+  : op(op), coordinate(NULL), projector(NULL), shadow_comparitor(NULL),
+offset(NULL)
{
   this-ir_type = ir_type_texture;
}
-- 
1.7.10.4

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


[Mesa-dev] Reworking textureGrad on shadow samplers

2012-07-10 Thread Kenneth Graunke
Intel hardware doesn't natively support textureGrad with shadow
comparisons.  This patch series implements a GLSL IR level lowering
pass to compute the LOD level that would be selected based on the
given gradient values, based on the equations on page 205 of the
OpenGL 3.0 specification.  It then simply uses textureLod().

The old method had many problems:
- The shadow comparison was done post-filtering.
- It required state-dependent recompiles whenever the comparison
  function changed.
- It didn't even work: many cases hit assertion failures.
- I never implemented it for the VS.

The new method is not perfect; it only passes 36/45 of oglconform's
shadow-grad tests.  That said, it seems to work a lot better than the
previous method, and the remaining cases are so obscure that I'd like
to just push it as is and fix up the remaining cases sometime in the
future (i.e. bug reports welcome).

One of the main advantages is that this reduces state-dependent
recompiles, and thus increases performance certain applications.
(Said applications aren't actually using TXD - we were just being
 overzealous in our program key handling.)

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


[Mesa-dev] [PATCH 2/5] glsl/ir_builder: Add a generic constructor for unary expressions.

2012-07-10 Thread Kenneth Graunke
I needed to compute logs and square roots in a patch I was working on,
and wanted to use the convenient interface.  We already have a similar
constructor for binops; adding one for unops seems reasonable.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/glsl/ir_builder.cpp |8 
 src/glsl/ir_builder.h   |1 +
 2 files changed, 9 insertions(+)

diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index 9a16c90..fc6ee96 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -143,6 +143,14 @@ swizzle_xyzw(operand a)
 }
 
 ir_expression *
+expr(ir_expression_operation op, operand a)
+{
+   void *mem_ctx = ralloc_parent(a.val);
+
+   return new(mem_ctx) ir_expression(op, a.val);
+}
+
+ir_expression *
 expr(ir_expression_operation op, operand a, operand b)
 {
void *mem_ctx = ralloc_parent(a.val);
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index 0ebcbab..410b08c 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -83,6 +83,7 @@ public:
 ir_assignment *assign(deref lhs, operand rhs);
 ir_assignment *assign(deref lhs, operand rhs, int writemask);
 
+ir_expression *expr(ir_expression_operation op, operand a);
 ir_expression *expr(ir_expression_operation op, operand a, operand b);
 ir_expression *add(operand a, operand b);
 ir_expression *sub(operand a, operand b);
-- 
1.7.10.4

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


[Mesa-dev] [PATCH 3/5] glsl/ir_builder: Add a new swizzle_for_size() function.

2012-07-10 Thread Kenneth Graunke
This swizzles away unwanted components, while preserving the order of
the ones that remain.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/glsl/ir_builder.cpp |   15 +++
 src/glsl/ir_builder.h   |5 +
 2 files changed, 20 insertions(+)

diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index fc6ee96..d96e25c 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -77,6 +77,21 @@ swizzle(operand a, int swizzle, int components)
 }
 
 ir_swizzle *
+swizzle_for_size(operand a, int components)
+{
+   void *mem_ctx = ralloc_parent(a.val);
+
+   if (a.val-type-vector_elements  components)
+  components = a.val-type-vector_elements;
+
+   unsigned s[4] = { 0, 1, 2, 3 };
+   for (int i = components; i  4; i++)
+  s[i] = components - 1;
+
+   return new(mem_ctx) ir_swizzle(a.val, s, components);
+}
+
+ir_swizzle *
 swizzle_(operand a)
 {
return swizzle(a, SWIZZLE_, 4);
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index 410b08c..7a0a196 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -91,6 +91,11 @@ ir_expression *mul(operand a, operand b);
 ir_expression *dot(operand a, operand b);
 ir_expression *saturate(operand a);
 
+/**
+ * Swizzle away later components, but preserve the ordering.
+ */
+ir_swizzle *swizzle_for_size(operand a, int components);
+
 ir_swizzle *swizzle_(operand a);
 ir_swizzle *swizzle_(operand a);
 ir_swizzle *swizzle_(operand a);
-- 
1.7.10.4

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


[Mesa-dev] [PATCH 4/5] i965: Add a lowering pass to convert TXD to TXL by computing the LOD.

2012-07-10 Thread Kenneth Graunke
Intel hardware doesn't natively support textureGrad with shadow
comparisons.  So we need to generate code to handle it somehow.

Based on the equations of page 205 of the OpenGL 3.0 specification,
it's possible to compute the LOD value that would be selected given the
gradient values.  Then, we can simply convert the TXD to a TXL.

Currently, this passes 38/46 of oglconform's shadow-grad subtests,
and selects the wrong level for the other 6 (but doesn't crash).

While we should investigate the remaining failures, this new method at
least works better than the old one.  Texturing with explicit gradients,
shadow sampling, and either projection or texel offsets is pretty
obscure anyway.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/mesa/drivers/dri/i965/Makefile.sources |1 +
 src/mesa/drivers/dri/i965/brw_context.h|1 +
 .../dri/i965/brw_lower_texture_gradients.cpp   |  153 
 src/mesa/drivers/dri/i965/brw_shader.cpp   |1 +
 4 files changed, 156 insertions(+)
 create mode 100644 src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp

diff --git a/src/mesa/drivers/dri/i965/Makefile.sources 
b/src/mesa/drivers/dri/i965/Makefile.sources
index 82143ac..334bfd9 100644
--- a/src/mesa/drivers/dri/i965/Makefile.sources
+++ b/src/mesa/drivers/dri/i965/Makefile.sources
@@ -125,6 +125,7 @@ i965_CXX_FILES = \
brw_fs_reg_allocate.cpp \
brw_fs_schedule_instructions.cpp \
brw_fs_vector_splitting.cpp \
+   brw_lower_texture_gradients.cpp \
brw_shader.cpp \
brw_vec4.cpp \
brw_vec4_emit.cpp \
diff --git a/src/mesa/drivers/dri/i965/brw_context.h 
b/src/mesa/drivers/dri/i965/brw_context.h
index c1f2314..b4868fe 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1276,6 +1276,7 @@ brw_program_reloc(struct brw_context *brw, uint32_t 
state_offset,
 }
 
 bool brw_do_cubemap_normalize(struct exec_list *instructions);
+bool brw_lower_texture_gradients(struct exec_list *instructions);
 
 #ifdef __cplusplus
 }
diff --git a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp 
b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
new file mode 100644
index 000..2d4f2ab
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
@@ -0,0 +1,153 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file brw_lower_texture_gradients.cpp
+ */
+
+#include glsl/ir.h
+#include glsl/ir_builder.h
+
+using namespace ir_builder;
+
+class lower_texture_grad_visitor : public ir_hierarchical_visitor {
+public:
+   lower_texture_grad_visitor()
+   {
+  progress = false;
+   }
+
+   ir_visitor_status visit_leave(ir_texture *ir);
+
+
+   bool progress;
+
+private:
+   void emit(ir_variable *, ir_rvalue *);
+};
+
+/**
+ * Emit a variable declaration and an assignment to initialize it.
+ */
+void
+lower_texture_grad_visitor::emit(ir_variable *var, ir_rvalue *value)
+{
+   base_ir-insert_before(var);
+   base_ir-insert_before(assign(var, value));
+}
+
+static const glsl_type *
+txs_type(const glsl_type *type)
+{
+   unsigned dims;
+   switch (type-sampler_dimensionality) {
+   case GLSL_SAMPLER_DIM_1D:
+  dims = 1;
+  break;
+   case GLSL_SAMPLER_DIM_2D:
+   case GLSL_SAMPLER_DIM_RECT:
+   case GLSL_SAMPLER_DIM_CUBE:
+  dims = 2;
+  break;
+   case GLSL_SAMPLER_DIM_3D:
+  dims = 3;
+  break;
+   default:
+  assert(!Should not get here: invalid sampler dimensionality);
+   }
+
+   if (type-sampler_array)
+  dims++;
+
+   return glsl_type::get_instance(GLSL_TYPE_INT, dims, 1);
+}
+
+ir_visitor_status
+lower_texture_grad_visitor::visit_leave(ir_texture *ir)
+{
+   /* Only lower textureGrad with shadow samplers */
+   if (ir-op != ir_txd || !ir-shadow_comparitor)
+  return visit_continue;
+
+   

[Mesa-dev] [PATCH 5/5] i965: Delete previous workaround for textureGrad with shadow samplers.

2012-07-10 Thread Kenneth Graunke
It had many problems:
- The shadow comparison was done post-filtering.
- It required state-dependent recompiles whenever the comparison
  function changed.
- It didn't even work: many cases hit assertion failures.
- I never implemented it for the VS.

The new lowering pass which converts textureGrad to textureLod by
computing the LOD value works much better, and eliminates the
state-dependent recompiles that were contributing to a performance
problem in a closed-source application we're investigating.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
---
 src/mesa/drivers/dri/i965/brw_fs.cpp |3 --
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |   62 +++---
 src/mesa/drivers/dri/i965/brw_program.h  |   12 -
 src/mesa/drivers/dri/i965/brw_wm.c   |3 --
 4 files changed, 5 insertions(+), 75 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 175e36e..b3b25cc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2163,9 +2163,6 @@ brw_fs_precompile(struct gl_context *ctx, struct 
gl_shader_program *prog)
key.clamp_fragment_color = true;
 
for (int i = 0; i  BRW_MAX_TEX_UNIT; i++) {
-  if (fp-Base.ShadowSamplers  (1  i))
-key.tex.compare_funcs[i] = GL_LESS;
-
   /* FINISHME: depth compares might use (0,0,0,W) for example */
   key.tex.swizzles[i] = SWIZZLE_XYZW;
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 28adf33..7224cbe 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -712,7 +712,7 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, 
fs_reg coordinate,
/* g0 header. */
mlen = 1;
 
-   if (ir-shadow_comparitor  ir-op != ir_txd) {
+   if (ir-shadow_comparitor) {
   for (int i = 0; i  ir-coordinate-type-vector_elements; i++) {
 emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), coordinate);
 coordinate.reg_offset++;
@@ -931,7 +931,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, 
fs_reg coordinate,
}
mlen += vector_elements * reg_width;
 
-   if (ir-shadow_comparitor  ir-op != ir_txd) {
+   if (ir-shadow_comparitor) {
   mlen = MAX2(mlen, header_present + 4 * reg_width);
 
   ir-shadow_comparitor-accept(this);
@@ -1038,7 +1038,7 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, 
fs_reg coordinate,
   base_mrf--;
}
 
-   if (ir-shadow_comparitor  ir-op != ir_txd) {
+   if (ir-shadow_comparitor) {
   ir-shadow_comparitor-accept(this);
   emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this-result);
   mlen += reg_width;
@@ -1163,19 +1163,6 @@ fs_visitor::visit(ir_texture *ir)
int sampler = _mesa_get_sampler_uniform_value(ir-sampler, prog, fp-Base);
sampler = fp-Base.SamplerUnits[sampler];
 
-   /* Our hardware doesn't have a sample_d_c message, so shadow compares
-* for textureGrad/TXD need to be emulated with instructions.
-*/
-   bool hw_compare_supported = ir-op != ir_txd;
-   if (ir-shadow_comparitor  !hw_compare_supported) {
-  assert(c-key.tex.compare_funcs[sampler] != GL_NONE);
-  /* No need to even sample for GL_ALWAYS or GL_NEVER...bail early */
-  if (c-key.tex.compare_funcs[sampler] == GL_ALWAYS)
-return swizzle_result(ir, fs_reg(1.0f), sampler);
-  else if (c-key.tex.compare_funcs[sampler] == GL_NEVER)
-return swizzle_result(ir, fs_reg(0.0f), sampler);
-   }
-
if (ir-coordinate)
   ir-coordinate-accept(this);
fs_reg coordinate = this-result;
@@ -1325,47 +1312,8 @@ fs_visitor::visit(ir_texture *ir)
 
inst-sampler = sampler;
 
-   if (ir-shadow_comparitor) {
-  if (hw_compare_supported) {
-inst-shadow_compare = true;
-  } else {
-ir-shadow_comparitor-accept(this);
-fs_reg ref = this-result;
-
-fs_reg value = dst;
-dst = fs_reg(this, glsl_type::vec4_type);
-
-/* FINISHME: This needs to be done pre-filtering. */
-
-uint32_t conditional = 0;
-switch (c-key.tex.compare_funcs[sampler]) {
-/* GL_ALWAYS and GL_NEVER were handled at the top of the function */
-case GL_LESS: conditional = BRW_CONDITIONAL_L;   break;
-case GL_GREATER:  conditional = BRW_CONDITIONAL_G;   break;
-case GL_LEQUAL:   conditional = BRW_CONDITIONAL_LE;  break;
-case GL_GEQUAL:   conditional = BRW_CONDITIONAL_GE;  break;
-case GL_EQUAL:conditional = BRW_CONDITIONAL_EQ;  break;
-case GL_NOTEQUAL: conditional = BRW_CONDITIONAL_NEQ; break;
-default: assert(!Should not get here: bad shadow compare function);
-}
-
-/* Use conditional moves to load 0 or 1 as the result */
-this-current_annotation = manual shadow comparison;
-for (int i = 0; i  4; i++) {
-   inst = 

[Mesa-dev] [Bug 51956] New: EnumStrings.LookUpByNumber regression

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

 Bug #: 51956
   Summary: EnumStrings.LookUpByNumber regression
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: v...@freedesktop.org
CC: mar...@gmail.com


mesa: 67a8ee891b2e119d826d8f830c1cbbe64ecb4f82 (master)

$ make check
[...]
[==] Running 4 tests from 1 test case.
[--] Global test environment set-up.
[--] 4 tests from EnumStrings
[ RUN  ] EnumStrings.LookUpByNumber
enum_strings.cpp:54: Failure
Value of: _mesa_lookup_enum_by_nr(everything[i].value)
  Actual: GL_TIME_ELAPSED
Expected: everything[i].name
Which is: GL_TIME_ELAPSED_EXT
[  FAILED  ] EnumStrings.LookUpByNumber (1 ms)



4952caad2dbf8668d86c3043b5761c61382bbb4c is the first bad commit
commit 4952caad2dbf8668d86c3043b5761c61382bbb4c
Author: Marek Olšák mar...@gmail.com
Date:   Tue Jun 26 01:36:44 2012 +0200

glapi: add ARB_timer_query

Reviewed-by: Brian Paul bri...@vmware.com

:04 04 7e6016519ee95a7681a00bb7df928403f54bdbd2
e260426c8823c355cc6ca16eb789bed0beeeddaf M  src
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


Re: [Mesa-dev] [PATCH 4/5] mesa: Add function for decoding ETC1 textures

2012-07-10 Thread Kenneth Graunke
On 07/09/2012 10:46 AM, Chad Versace wrote:
 Add function _mesa_etc1_image_decode_to_abgr(). It is intended to be
 used by glCompressedTexSubImage2D to translate ETC1 textures into ABGR.
 
 Signed-off-by: Chad Versace chad.vers...@linux.intel.com
 ---
  src/mesa/main/texcompress_etc.c | 82 
 +
  src/mesa/main/texcompress_etc.h |  6 +++
  2 files changed, 88 insertions(+)
 
 diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
 index e3b2e83..d84ee0e 100644
 --- a/src/mesa/main/texcompress_etc.c
 +++ b/src/mesa/main/texcompress_etc.c
 @@ -178,3 +178,85 @@ _mesa_fetch_texel_2d_f_etc1_rgb8(const struct 
 swrast_texture_image *texImage,
 texel[BCOMP] = UBYTE_TO_FLOAT(bgr888[2]);
 texel[ACOMP] = 1.0f;
  }
 +
 +static int
 +align(int x, int m)
 +{
 +   return (m * x + m - 1) / m;
 +}

Perhaps we should just move the ALIGN and ROUND_DOWN_TO macros from
intel_context.h into macros.h?

For reference, ALIGN() is:
#define ALIGN(value, alignment)  (((value) + alignment - 1) 
~(alignment - 1))

Either way, this patch looks right to me.
Reviewed-by: Kenneth Graunke kenn...@whitecape.org

 +
 +/**
 + * Decode texture data in format `MESA_FORMAT_ETC1_RGB8` to
 + * `MESA_FORMAT_ABGR`.
 + *
 + * The size of the source data must be a multiple of the ETC1 block size,
 + * which is 8, even if the texture image's dimensions are not aligned to 4.
 + * From the GL_OES_compressed_ETC1_RGB8_texture spec:
 + *   The texture is described as a number of 4x4 pixel blocks. If the
 + *   texture (or a particular mip-level) is smaller than 4 pixels in
 + *   any dimension (such as a 2x2 or a 8x1 texture), the texture is
 + *   found in the upper left part of the block(s), and the rest of the
 + *   pixels are not used. For instance, a texture of size 4x2 will be
 + *   placed in the upper half of a 4x4 block, and the lower half of the
 + *   pixels in the block will not be accessed.
 + *
 + * \param src_width in pixels
 + * \param src_height in pixels
 + * \param dst_rowstride in bytes
 + */
 +void
 +_mesa_etc1_image_decode_to_abgr(const uint8_t *src,
 +int src_width,
 +int src_height,
 +uint8_t *dst,
 +int dst_rowstride)
 +{
 +   /* An XRGB pixel is 4 bytes. */
 +   const int pixel_bytes = 4;
 +
 +   /* A block contains 4x4 pixels. */
 +   const int block_width = 4;
 +   const int block_height = 4;
 +
 +   /* A block contains 8 bytes. */
 +   const int block_bytes = 8;
 +
 +   /* The stride in units of blocks. */
 +   const int block_stride = align(src_width, block_width) / block_width;
 +
 +   /* The block being decoded. */
 +   int block_x;
 +   int block_y;
 +
 +   /* Iterate over each block. */
 +   for (block_y = 0; block_y * block_height  src_height; ++block_y) {
 +  for (block_x = 0; block_x * block_width  src_width; ++block_x) {
 + struct etc1_block block;
 +
 + /* The pixel's position relative to the block's base. */
 + int pixel_x;
 + int pixel_y;
 +
 + const uint8_t *src_block_base =
 +   src + block_bytes * (block_y * block_stride + block_x);
 +
 + uint8_t *dst_block_base = dst
 + + block_y * block_height * dst_rowstride
 + + block_x * block_width * pixel_bytes;
 +
 + etc1_parse_block(block, src_block_base);
 +
 + /* Iterate over each pixel in block. */
 + for (pixel_y = 0; pixel_y  block_height; ++pixel_y) {
 +for (pixel_x = 0; pixel_x  block_width; ++pixel_x) {
 +   uint8_t *dst_texel = dst_block_base
 +  + pixel_y * dst_rowstride
 +  + pixel_x * pixel_bytes;
 +
 +   etc1_fetch_texel(block, pixel_x, pixel_y, dst_texel);
 +   dst_texel[3] = 0xff;
 +}
 + }
 +  }
 +   }
 +}
 diff --git a/src/mesa/main/texcompress_etc.h b/src/mesa/main/texcompress_etc.h
 index 8e8427f..552a7bd 100644
 --- a/src/mesa/main/texcompress_etc.h
 +++ b/src/mesa/main/texcompress_etc.h
 @@ -36,5 +36,11 @@ _mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS);
  void
  _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
   GLint i, GLint j, GLint k, GLfloat *texel);
 +void
 +_mesa_etc1_image_decode_to_abgr(const uint8_t *src,
 +int src_width,
 +int src_height,
 +uint8_t *dst,
 +int dst_rowstride);
  
  #endif
 


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


Re: [Mesa-dev] [PATCH 1/5] mesa: Fold texcompress_etc1_tmp.h into texcompress_etc.c

2012-07-10 Thread Kenneth Graunke
On 07/09/2012 10:46 AM, Chad Versace wrote:
 The header defined the functions in with C-style macro templates. Since
 there was only one user of the header, the templates were unnecessary.
 This patch redefines the functions as vanilla, non-templated functions.
 
 This patch also removes the header and folds its contents into
 texcompress_etc.c.  The header defined many inline helper functions for
 texcompress_etc.c, but, since no other file included it, it never made
 sense to keep the header separate from the .c file.
 
 Signed-off-by: Chad Versace chad.vers...@linux.intel.com
 ---
  src/mesa/main/texcompress_etc.c | 119 +--
  src/mesa/main/texcompress_etc_tmp.h | 136 
 
  2 files changed, 112 insertions(+), 143 deletions(-)
  delete mode 100644 src/mesa/main/texcompress_etc_tmp.h

This is also used by src/gallium/auxiliary/util/u_format_etc.c.

Otherwise, this series looks good to me!
Reviewed-by: Kenneth Graunke kenn...@whitecape.org
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/5] build: fix location of generated files in src/mesa

2012-07-10 Thread Matt Turner
On Sun, Jul 8, 2012 at 10:44 PM, Christopher James Halse Rogers
christopher.halse.rog...@canonical.com wrote:
 On Sun, 2012-07-08 at 19:39 -0700, Kenneth Graunke wrote:
 On 07/08/2012 04:14 PM, Christopher James Halse Rogers wrote:
  Signed-off-by: Christopher James Halse Rogers 
  christopher.halse.rog...@canonical.com
  ---
   src/mesa/sources.mak |9 +
   1 file changed, 5 insertions(+), 4 deletions(-)
 
  diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
  index 16b1c39..87191fd 100644
  --- a/src/mesa/sources.mak
  +++ b/src/mesa/sources.mak
  @@ -4,8 +4,8 @@ SRCDIR ?= .
 
   # this is part of MAIN_FILES
   MAIN_ES_FILES = \
  -   $(SRCDIR)/main/api_exec_es1.c \
  -   $(SRCDIR)/main/api_exec_es2.c
  +   $(TOP)/src/mesa/main/api_exec_es1.c \
  +   $(TOP)/src/mesa/main/api_exec_es2.c

 Could we use $(top_builddir) instead of $(TOP)?  As your first patch
 demonstrates, there are really two top-level directories, so $(TOP) is
 ambiguous/confusing.  I'd rather see us stop using it, for clarity.

 It's included in a number of non-automake Makefiles, where IIUC
 $(top_builddir) is not normally defined.

 On the other hand, making these Makefiles define $(top_builddir) instead
 of $(TOP) would be easy, and probably makes sense given the transition
 to autotools. I'll do that.

Ultimately, I think we should kill off $(TOP). It seems to often be
the source of top_srcdir/top_builddir confusion.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51960] New: [bisected] Mesa master fails to build

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

 Bug #: 51960
   Summary: [bisected] Mesa master fails to build
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: pavel.ondra...@email.cz
CC: bri...@vmware.com


Created attachment 64082
  -- https://bugs.freedesktop.org/attachment.cgi?id=64082
build log

CXXLD  libdricore8.1.0.la
.libs/execmem.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
gmake[4]: *** [libdricore8.1.0.la] Error 1

Full build log attached.

I'm building with ./autogen.sh --enable-debug
--with-gallium-drivers=swrast,r300 --with-dri-drivers= --disable-egl
--enable-texture-float --disable-glu. 

51b0a0b33ca16599a5972c3e77607284a1b7fb9b is the first bad commit
commit 51b0a0b33ca16599a5972c3e77607284a1b7fb9b
Author: Brian Paul bri...@vmware.com
Date:   Tue Jun 26 14:47:19 2012 -0600

mesa: update glext.h to version 81

I double checked the bisect, and also reverting this commit from master fixes
it.
This is up to date Fedora 17, gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5),

-- 
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] docs/relnotes-8.0.4: fix html markup

2012-07-10 Thread Andreas Boll
2012/7/10 Ian Romanick i...@freedesktop.org:
 Right... I forgot that the HTML formatting got changed around.  I just
 copied the 8.0.3 release notes in the 8.0 branch as the starting point.  I
 think it should be fine apply this to master, and I can pick it over to 8.0
 branch later... though I don't think it will matter there.  I'll just have
 to remember to not make the same mistake again. :)

 Reviewed-by: Ian Romanick ian.d.roman...@intel.com



No problem.
Please push this patch, I don't have commit access.

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


Re: [Mesa-dev] [PATCH 1/5] mesa: Fold texcompress_etc1_tmp.h into texcompress_etc.c

2012-07-10 Thread Chad Versace
On 07/10/2012 11:42 AM, Kenneth Graunke wrote:
 On 07/09/2012 10:46 AM, Chad Versace wrote:
 The header defined the functions in with C-style macro templates. Since
 there was only one user of the header, the templates were unnecessary.
 This patch redefines the functions as vanilla, non-templated functions.

 This patch also removes the header and folds its contents into
 texcompress_etc.c.  The header defined many inline helper functions for
 texcompress_etc.c, but, since no other file included it, it never made
 sense to keep the header separate from the .c file.

 Signed-off-by: Chad Versace chad.vers...@linux.intel.com
 ---
  src/mesa/main/texcompress_etc.c | 119 +--
  src/mesa/main/texcompress_etc_tmp.h | 136 
 
  2 files changed, 112 insertions(+), 143 deletions(-)
  delete mode 100644 src/mesa/main/texcompress_etc_tmp.h
 
 This is also used by src/gallium/auxiliary/util/u_format_etc.c.

Argh, I fail at grep. I'll de-templatize the header but not delete it.

 Otherwise, this series looks good to me!
 Reviewed-by: Kenneth Graunke kenn...@whitecape.org

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


[Mesa-dev] Mesa master branch: forced update

2012-07-10 Thread Tom Stellard

I just fetched from the master branch of the fdo mesa repo and was
greeted with a forced update message, and the gitweb interface shows
several days of history are missing from the master branch.

olv appears to be the last user to modify the master branch:

tstellar@annarchy:~$ ls -l /git/mesa/mesa.git/refs/heads/master
-rw-rw-r-- 1 olv mesa 41 Jul 10 11:41 /git/mesa/mesa.git/refs/heads/master

Anyone know what happened?

-Tom

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


Re: [Mesa-dev] [PATCH] r600g: improve flushed depth texture handling v2

2012-07-10 Thread Jerome Glisse
On Tue, Jul 10, 2012 at 2:10 PM, Marek Olšák mar...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 6:40 AM, Vadim Girlin vadimgir...@gmail.com wrote:
 On Sat, 2012-07-07 at 01:48 +0200, Marek Olšák wrote:
 On Wed, Jun 27, 2012 at 1:34 AM, Vadim Girlin vadimgir...@gmail.com wrote:
  Use r600_resource_texture::flished_depth_texture for GPU access, and
  allocate it in the VRAM. For transfers we'll allocate untiled texture in 
  the
  GTT and store it in the r600_transfer::staging.
 
  Improves performance when flushed depth texture is frequently used by the
  GPU (about 30% for Lightsmark).
 
  Signed-off-by: Vadim Girlin vadimgir...@gmail.com
  ---
 
  Fixes fbo-clear-formats, fbo-generatemipmap-formats, no regressions on
  evergreen

 Hi,

 is there any reason this patch hasn't been committed yet?


 Hi,

 I have some doubts because it was benchmarked by phoronix and there were
 regressions, though I suspect that something is wrong with the results:

 http://www.phoronix.com/scan.php?page=articleitem=amd_r600g_texdepthnum=4

 I was going to look into it but had no time yet. I'd like to be sure
 that there are no regressions before committing.

 Well, there's nothing wrong with your patch. I wouldn't trust
 benchmarks run with the Unity desktop so much. I myself had to switch
 from Unity 2D to Xfce just to get consistent results when testing
 performance.

 Now that your patch separates flushing for texturing and transfers, I
 think we could make it a little bit faster by imlementing an in-place
 flush for texturing (that is without having to allocate another
 resource).

 Marek

In place flush are useful for the case where you know you wont reuse
the depth buffer as a depth buffer, or if you know next operation will
be a gClear on the depth buffer. What i am worried about is that
recompression might not work in place, for it to work you need to have
db decompressed into db tiling format and not cb tiling format.

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


Re: [Mesa-dev] Mesa master branch: forced update

2012-07-10 Thread Kenneth Graunke
On 07/10/2012 12:50 PM, Tom Stellard wrote:
 
 I just fetched from the master branch of the fdo mesa repo and was
 greeted with a forced update message, and the gitweb interface shows
 several days of history are missing from the master branch.
 
 olv appears to be the last user to modify the master branch:
 
 tstellar@annarchy:~$ ls -l /git/mesa/mesa.git/refs/heads/master
 -rw-rw-r-- 1 olv mesa 41 Jul 10 11:41 /git/mesa/mesa.git/refs/heads/master
 
 Anyone know what happened?
 
 -Tom

I'm not sure what happened, but I just (non-force) pushed my copy of
master to restore the lost history.  Ian, Chad, Matt, Jordan, Anuj,
Paul, and I looked at our copies and it appeared that I had the most
recent history (I'd pulled literally a few hours ago).

The new head is:

commit 67a8ee891b2e119d826d8f830c1cbbe64ecb4f82
Author: Marek Olšák mar...@gmail.com
Date:   Tue Jul 10 18:55:46 2012 +0200

gallium/docs: document interface changes for timestamp query

Hopefully this doesn't make things worse...
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 51956] EnumStrings.LookUpByNumber regression

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

--- Comment #1 from Ian Romanick i...@freedesktop.org 2012-07-10 20:18:07 PDT 
---
Changing the name is fine.  The test just needs to have the new name replace
the old name too.

-- 
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 branch: forced update

2012-07-10 Thread Ferry Huberts


On 10-07-12 22:13, Kenneth Graunke wrote:

On 07/10/2012 12:50 PM, Tom Stellard wrote:


I just fetched from the master branch of the fdo mesa repo and was
greeted with a forced update message, and the gitweb interface shows
several days of history are missing from the master branch.

olv appears to be the last user to modify the master branch:

tstellar@annarchy:~$ ls -l /git/mesa/mesa.git/refs/heads/master
-rw-rw-r-- 1 olv mesa 41 Jul 10 11:41 /git/mesa/mesa.git/refs/heads/master

Anyone know what happened?


Login on the server, and look at the git logs.
The commits are not lost, just not visible.

logs are in:
repodir/logs

or do:
cd repodir
git reflog




-Tom


I'm not sure what happened, but I just (non-force) pushed my copy of
master to restore the lost history.  Ian, Chad, Matt, Jordan, Anuj,
Paul, and I looked at our copies and it appeared that I had the most
recent history (I'd pulled literally a few hours ago).

The new head is:

commit 67a8ee891b2e119d826d8f830c1cbbe64ecb4f82
Author: Marek Olšák mar...@gmail.com
Date:   Tue Jul 10 18:55:46 2012 +0200

 gallium/docs: document interface changes for timestamp query

Hopefully this doesn't make things worse...
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev



--
Ferry Huberts


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


Re: [Mesa-dev] Mesa master branch: forced update

2012-07-10 Thread Kristian Høgsberg
On Tue, Jul 10, 2012 at 4:24 PM, Ferry Huberts maili...@hupie.com wrote:

 On 10-07-12 22:13, Kenneth Graunke wrote:

 On 07/10/2012 12:50 PM, Tom Stellard wrote:


 I just fetched from the master branch of the fdo mesa repo and was
 greeted with a forced update message, and the gitweb interface shows
 several days of history are missing from the master branch.

 olv appears to be the last user to modify the master branch:

 tstellar@annarchy:~$ ls -l /git/mesa/mesa.git/refs/heads/master
 -rw-rw-r-- 1 olv mesa 41 Jul 10 11:41
 /git/mesa/mesa.git/refs/heads/master

 Anyone know what happened?


 Login on the server, and look at the git logs.
 The commits are not lost, just not visible.

 logs are in:
 repodir/logs

 or do:
 cd repodir
 git reflog

I already did that, there are no reflogs in the mesa git repo.  The
repo is older than the reflog feature.  The best we can do is to look
at the master ref.

It's possible that this was an attack to alter history (sneak in a
backdoor, for example, the dri drivers run as root in aiglx in most
distros).  However, the commit that was pushed matches the older
commit (which is why Kenneth was able to pull and fast-forward) and
git fsck verifies that the history hasn't been tampered with.  That
is, it is possible to hand edit a commit object to include changes
that wasn't originally there and then just force the SHA1 to match
what is was before.  git fsck will catch that, but only in a new
clone, since when you pull from an existing repo, git won't fetch old
objects.  More unlikely, history was altered in a way such that code
was inserted but the sha1 was preserved (ie sha1 was compromised).
I'm on a bad connection right now, but I'll do a fresh clone of the
mesa repo and do a git fsck there as well as comparing the contents of
a recent commit with what I have locally to see if the contents has
been changed while preserving the sha1 validity.

Of course, if you were looking to compromise the repo, you wouldn't
push back history and attract attention like this, but better safe
than sorry.

Kristian

 -Tom


 I'm not sure what happened, but I just (non-force) pushed my copy of
 master to restore the lost history.  Ian, Chad, Matt, Jordan, Anuj,
 Paul, and I looked at our copies and it appeared that I had the most
 recent history (I'd pulled literally a few hours ago).

 The new head is:

 commit 67a8ee891b2e119d826d8f830c1cbbe64ecb4f82
 Author: Marek Olšák mar...@gmail.com
 Date:   Tue Jul 10 18:55:46 2012 +0200

  gallium/docs: document interface changes for timestamp query

 Hopefully this doesn't make things worse...
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev


 --
 Ferry Huberts



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


Re: [Mesa-dev] [PATCH] r600g: improve flushed depth texture handling v2

2012-07-10 Thread Marek Olšák
On Tue, Jul 10, 2012 at 10:00 PM, Jerome Glisse j.gli...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 2:10 PM, Marek Olšák mar...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 6:40 AM, Vadim Girlin vadimgir...@gmail.com wrote:
 On Sat, 2012-07-07 at 01:48 +0200, Marek Olšák wrote:
 On Wed, Jun 27, 2012 at 1:34 AM, Vadim Girlin vadimgir...@gmail.com 
 wrote:
  Use r600_resource_texture::flished_depth_texture for GPU access, and
  allocate it in the VRAM. For transfers we'll allocate untiled texture in 
  the
  GTT and store it in the r600_transfer::staging.
 
  Improves performance when flushed depth texture is frequently used by the
  GPU (about 30% for Lightsmark).
 
  Signed-off-by: Vadim Girlin vadimgir...@gmail.com
  ---
 
  Fixes fbo-clear-formats, fbo-generatemipmap-formats, no regressions on
  evergreen

 Hi,

 is there any reason this patch hasn't been committed yet?


 Hi,

 I have some doubts because it was benchmarked by phoronix and there were
 regressions, though I suspect that something is wrong with the results:

 http://www.phoronix.com/scan.php?page=articleitem=amd_r600g_texdepthnum=4

 I was going to look into it but had no time yet. I'd like to be sure
 that there are no regressions before committing.

 Well, there's nothing wrong with your patch. I wouldn't trust
 benchmarks run with the Unity desktop so much. I myself had to switch
 from Unity 2D to Xfce just to get consistent results when testing
 performance.

 Now that your patch separates flushing for texturing and transfers, I
 think we could make it a little bit faster by imlementing an in-place
 flush for texturing (that is without having to allocate another
 resource).

 Marek

 In place flush are useful for the case where you know you wont reuse
 the depth buffer as a depth buffer, or if you know next operation will
 be a gClear on the depth buffer. What i am worried about is that
 recompression might not work in place, for it to work you need to have
 db decompressed into db tiling format and not cb tiling format.

The case where the depth is not reused is the most common one. It
might even be the only one in practice. Depth textures are most
commonly used for shadow mapping, which is the not-reusing case. They
can also be used to implement deferred rendering (though that's not
very common), which means the same as shadow mapping for us. Actually,
no graphics algorithm comes to mind that would do write-texture-write
with the same depth buffer.

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


[Mesa-dev] [Bug 51956] EnumStrings.LookUpByNumber regression

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

Ian Romanick i...@freedesktop.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Ian Romanick i...@freedesktop.org 2012-07-10 21:48:11 PDT 
---
commit 4fae5e32d5272986e9e64303eadc974d57e7b3ed
Author: Ian Romanick ian.d.roman...@intel.com
Date:   Tue Jul 10 13:37:06 2012 -0700

mesa/test: Update name of GL_TIME_ELAPSED

4952caa caused the _EXT to fall off the name of this enum.  This is
fine.  Update the unit test to expect the new value.

Signed-off-by: Ian Romanick ian.d.roman...@intel.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51956

-- 
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/9] automake: convert libglsl

2012-07-10 Thread Matt Turner
On Tue, Jul 10, 2012 at 10:08 AM, Jon TURNEY
jon.tur...@dronecode.org.uk wrote:
 v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to 
 CLEANFILES

 Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
 ---
  configure.ac|2 +
  src/glsl/.gitignore |1 +
  src/glsl/Makefile   |  144 
 ---
  src/glsl/Makefile.am|  112 +++
  src/glsl/glcpp/.gitignore   |1 +
  src/glsl/glcpp/Makefile.am  |   33 
  src/glsl/tests/Makefile.am  |2 +-
  src/mesa/drivers/osmesa/Makefile.am |2 +-
  8 files changed, 151 insertions(+), 146 deletions(-)
  delete mode 100644 src/glsl/Makefile
  create mode 100644 src/glsl/Makefile.am
  create mode 100644 src/glsl/glcpp/Makefile.am

 diff --git a/configure.ac b/configure.ac
 index e5ac791..93a8493 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -2170,6 +2170,8 @@ AC_CONFIG_FILES([configs/current
 src/egl/wayland/wayland-egl/Makefile
 src/egl/wayland/wayland-egl/wayland-egl.pc
 src/egl/wayland/wayland-drm/Makefile
 +   src/glsl/Makefile
 +   src/glsl/glcpp/Makefile
 src/glsl/tests/Makefile
 src/glx/Makefile
 src/glx/tests/Makefile
 diff --git a/src/glsl/.gitignore b/src/glsl/.gitignore
 index d26839a..e3531cd 100644
 --- a/src/glsl/.gitignore
 +++ b/src/glsl/.gitignore
 @@ -6,3 +6,4 @@ glsl_parser.output
  builtin_function.cpp
  builtin_compiler
  glsl_test
 +/Makefile
 diff --git a/src/glsl/Makefile b/src/glsl/Makefile
 deleted file mode 100644
 index 3cf9fc9..000
 --- a/src/glsl/Makefile
 +++ /dev/null
 @@ -1,144 +0,0 @@
 -
 -#src/glsl/pp/Makefile
 -
 -TOP = ../..
 -
 -include $(TOP)/configs/current
 -
 -LIBNAME = glsl
 -
 -GLSL_SRCDIR=.
 -include Makefile.sources
 -
 -GLCPP_SOURCES = \
 -   $(LIBGLCPP_GENERATED_FILES) \
 -   $(LIBGLCPP_FILES) \
 -   ralloc.c \
 -   glcpp/glcpp.c
 -
 -C_SOURCES = \
 -   $(LIBGLCPP_GENERATED_FILES) \
 -   $(LIBGLCPP_FILES) \
 -   $(LIBGLSL_FILES)
 -
 -# common sources for builtin_compiler and libglsl
 -CXX_SOURCES = \
 -   $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
 -   $(LIBGLSL_CXX_FILES)
 -
 -LIBS = \
 -   $(TOP)/src/glsl/libglsl.a
 -
 -APPS = glsl_compiler glsl_test glcpp/glcpp
 -
 -GLSL2_C_SOURCES = \
 -   ../mesa/program/hash_table.c \
 -   ../mesa/program/symbol_table.c
 -GLSL2_CXX_SOURCES = \
 -   $(GLSL_COMPILER_CXX_FILES)
 -
 -GLSL2_OBJECTS = \
 -   $(GLSL2_C_SOURCES:.c=.o) \
 -   $(GLSL2_CXX_SOURCES:.cpp=.o)
 -
 -TEST_C_SOURCES = \
 -   ../mesa/program/hash_table.c \
 -   ../mesa/program/symbol_table.c
 -
 -TEST_CXX_SOURCES = \
 -   standalone_scaffolding.cpp \
 -   test.cpp \
 -   test_optpass.cpp
 -
 -TEST_OBJECTS = \
 -   $(TEST_C_SOURCES:.c=.o) \
 -   $(TEST_CXX_SOURCES:.cpp=.o)
 -
 -### Basic defines ###
 -
 -DEFINES += \
 -   $(LIBRARY_DEFINES) \
 -   $(API_DEFINES)
 -
 -GLCPP_OBJECTS = \
 -   $(GLCPP_SOURCES:.c=.o) \
 -   ../mesa/program/hash_table.o
 -
 -OBJECTS = \
 -   $(C_SOURCES:.c=.o) \
 -   $(CXX_SOURCES:.cpp=.o)
 -
 -INCLUDES = \
 -   -I. \
 -   -I../mesa \
 -   -I../mapi \
 -   -I../../include \
 -   $(LIBRARY_INCLUDES)
 -
 -ALL_SOURCES = \
 -   $(C_SOURCES) \
 -   $(CXX_SOURCES) \
 -   $(GLSL2_CXX_SOURCES) \
 -   $(GLSL2_C_SOURCES) \
 -   $(TEST_CXX_SOURCES) \
 -   $(TEST_C_SOURCES)
 -
 -# TARGETS #
 -
 -default: depend lib$(LIBNAME).a $(APPS)
 -
 -lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile 
 $(TOP)/src/glsl/Makefile.template
 -   $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) 
 builtin_function.o
 -
 -depend: $(ALL_SOURCES) Makefile
 -   rm -f depend
 -   touch depend
 -   $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2 /dev/null
 -
 -# Remove .o and backup files
 -clean:
 -   rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(TEST_OBJECTS) $(OBJECTS) 
 lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o 
 builtin_stubs.o builtin_compiler
 -   -rm -f $(APPS)
 -
 -# Dummy target
 -install:
 -   @echo -n 
 -
 -# RULES #
 -
 -glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
 -   $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) $(LIBS) 
 -o $@
 -
 -glsl_test: $(TEST_OBJECTS) libglsl.a
 -   $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(TEST_OBJECTS) $(LIBS) 
 -o $@
 -
 -glcpp: glcpp/glcpp
 -glcpp/glcpp: $(GLCPP_OBJECTS)
 -   $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@
 -
 -.cpp.o:
 -   $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $ -o $@
 -
 -.c.o:
 -   $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $ -o $@
 -
 -glsl_lexer.cpp: glsl_lexer.ll
 -   $(FLEX) --nounistd -o$@  $
 -
 -glsl_parser.cpp: glsl_parser.yy
 -   $(BISON) -v -o 

Re: [Mesa-dev] [PATCH 3/9] Rename sparc/clip.S - sparc/sparc_clip.S

2012-07-10 Thread Matt Turner
On Tue, Jul 10, 2012 at 10:08 AM, Jon TURNEY
jon.tur...@dronecode.org.uk wrote:
 Automake can't handle having both clip.S and clip.c, even though they have 
 different paths

 src/mesa/Makefile.am: object `clip.lo' created by `$(SRCDIR)/sparc/clip.S' 
 and `$(SRCDIR)/main/clip.c'

 Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
 ---

Yeah, ran into this too at some point.

Reviewed-by: Matt Turner matts...@gmail.com
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Recent master build failure (upgrade gl2ext.h / glDrawBuffersNV fallout)

2012-07-10 Thread Jeremy Huddleston Sequoia
Mesa master stopped building successfully on my tinderbox on 7/6.  The relevant 
changes from the previous successful build were 95ce454..c445b0f, and I 
bisected it to the upgrade of gl2ext.h to version 18099 (see below).

../../../src/mapi/glapi/glapitemp.h:4635:1: error: no previous prototype for 
'glDrawBuffersNV' [-Werror=missing-prototypes]

The commit mentions that this new failure is expected, so it would be nice if 
the fix for the original issue could now be included as well.

--Jeremy

3ed8d4285360047d78cfd3218ac4f8f325ae5d6e is the first bad commit
commit 3ed8d4285360047d78cfd3218ac4f8f325ae5d6e
Author: Kristian Høgsberg k...@bitplanet.net
Date:   Tue Jul 3 20:47:04 2012 -0400

GLES2: upgrade gl2ext.h to version 18099

Redo this commit, and remove the inclusion of gl2ext.h
from src/mapi/glapi/glapi_priv.h.  The include was added in
8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype for
glDrawBuffersNV and others, but it's not possible to include both
glext.h and gl2ext.h from the same file.

I don't see the missing prototype here (with or without shared glapi)
so I'm just removing the offending #include.

Also, since we're redoing this, update to the most recent gl2ext.2.

Signed-off-by: Kristian Høgsberg k...@bitplanet.net

:04 04 3076bd4623a3727eb3690e39801c459ea2c08706 
7754f21c4cee87eb86ccb5ac8b9cbf810d0835ff M  include
:04 04 0e602fff716a390251eacb932e7f406eb399e2e0 
ed4ecdd9127f4541ed0f148f3b97e6eefb6572df M  src

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


Re: [Mesa-dev] [PATCH] r600g: improve flushed depth texture handling v2

2012-07-10 Thread Vadim Girlin
On Tue, 2012-07-10 at 20:10 +0200, Marek Olšák wrote:
 On Tue, Jul 10, 2012 at 6:40 AM, Vadim Girlin vadimgir...@gmail.com wrote:
  On Sat, 2012-07-07 at 01:48 +0200, Marek Olšák wrote:
  On Wed, Jun 27, 2012 at 1:34 AM, Vadim Girlin vadimgir...@gmail.com 
  wrote:
   Use r600_resource_texture::flished_depth_texture for GPU access, and
   allocate it in the VRAM. For transfers we'll allocate untiled texture in 
   the
   GTT and store it in the r600_transfer::staging.
  
   Improves performance when flushed depth texture is frequently used by the
   GPU (about 30% for Lightsmark).
  
   Signed-off-by: Vadim Girlin vadimgir...@gmail.com
   ---
  
   Fixes fbo-clear-formats, fbo-generatemipmap-formats, no regressions on
   evergreen
 
  Hi,
 
  is there any reason this patch hasn't been committed yet?
 
 
  Hi,
 
  I have some doubts because it was benchmarked by phoronix and there were
  regressions, though I suspect that something is wrong with the results:
 
  http://www.phoronix.com/scan.php?page=articleitem=amd_r600g_texdepthnum=4
 
  I was going to look into it but had no time yet. I'd like to be sure
  that there are no regressions before committing.
 
 Well, there's nothing wrong with your patch. I wouldn't trust
 benchmarks run with the Unity desktop so much. I myself had to switch
 from Unity 2D to Xfce just to get consistent results when testing
 performance.
 

OK, I've pushed it. Thanks for reviewing.

Vadim

 Now that your patch separates flushing for texturing and transfers, I
 think we could make it a little bit faster by imlementing an in-place
 flush for texturing (that is without having to allocate another
 resource).
 
 Marek



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


[Mesa-dev] [PATCH 0/3 v2] intel: Enable GL_OES_compressed_ETC1_RGB8_texture

2012-07-10 Thread Chad Versace
This series lives on my etc1-v9 branch.

This series enables GL_OES_compressed_ETC1_RGB8_texture for all Intel hardware
by simply decoding the ETC1 data into RGBX data at time of glTexImage. No
current Intel hardware supports ETC1.

v2: Don't break gallium.

Chad Versace (3):
  gallium/util, mesa: Refactor etc1 unpack function
  mesa: Add function for decoding ETC1 textures
  intel: Enable GL_OES_compressed_ETC1_RGB8_texture

 src/gallium/auxiliary/util/u_format_etc.c| 25 +
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |  5 ++
 src/mesa/drivers/dri/intel/intel_extensions.c|  1 +
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c   | 70 +++-
 src/mesa/drivers/dri/intel/intel_mipmap_tree.h   | 15 +
 src/mesa/main/texcompress_etc.c  | 32 +++
 src/mesa/main/texcompress_etc.h  |  8 +++
 src/mesa/main/texcompress_etc_tmp.h  | 34 
 8 files changed, 165 insertions(+), 25 deletions(-)

-- 
1.7.11.1

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


[Mesa-dev] [PATCH 1/3] gallium/util, mesa: Refactor etc1 unpack function

2012-07-10 Thread Chad Versace
Move the body of util_etc1_rgb8_unpack_rgba_unorm8 into a new function
that can be shared between gallium and dri drivers,
texcompress_etc_tmp.h:etc1_unpack_rgba.

CC: Chia-I o...@lunarg.com
CC: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Chad Versace chad.vers...@linux.intel.com
---
 src/gallium/auxiliary/util/u_format_etc.c | 25 +--
 src/mesa/main/texcompress_etc_tmp.h   | 34 +++
 2 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format_etc.c 
b/src/gallium/auxiliary/util/u_format_etc.c
index 7500e1e..f909b16 100644
--- a/src/gallium/auxiliary/util/u_format_etc.c
+++ b/src/gallium/auxiliary/util/u_format_etc.c
@@ -13,30 +13,7 @@
 void
 util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned 
dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, 
unsigned height)
 {
-   const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
-   struct etc1_block block;
-   unsigned x, y, i, j;
-
-   for (y = 0; y  height; y += bh) {
-  const uint8_t *src = src_row;
-
-  for (x = 0; x  width; x+= bw) {
- etc1_parse_block(block, src);
-
- for (j = 0; j  bh; j++) {
-uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
-for (i = 0; i  bw; i++) {
-   etc1_fetch_texel(block, i, j, dst);
-   dst[3] = 255;
-   dst += comps;
-}
- }
-
- src += bs;
-  }
-
-  src_row += src_stride;
-   }
+   etc1_unpack_rgba(dst_row, dst_stride, src_row, src_stride, width, 
height);
 }
 
 void
diff --git a/src/mesa/main/texcompress_etc_tmp.h 
b/src/mesa/main/texcompress_etc_tmp.h
index 5c8c6de..8bbb2cd 100644
--- a/src/mesa/main/texcompress_etc_tmp.h
+++ b/src/mesa/main/texcompress_etc_tmp.h
@@ -134,3 +134,37 @@ TAG(etc1_fetch_texel)(const struct TAG(etc1_block) *block,
dst[1] = TAG(etc1_clamp)(base_color[1], modifier);
dst[2] = TAG(etc1_clamp)(base_color[2], modifier);
 }
+
+static void
+etc1_unpack_rgba(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned width,
+ unsigned height)
+{
+   const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
+   struct etc1_block block;
+   unsigned x, y, i, j;
+
+   for (y = 0; y  height; y += bh) {
+  const uint8_t *src = src_row;
+
+  for (x = 0; x  width; x+= bw) {
+ etc1_parse_block(block, src);
+
+ for (j = 0; j  bh; j++) {
+uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
+for (i = 0; i  bw; i++) {
+   etc1_fetch_texel(block, i, j, dst);
+   dst[3] = 255;
+   dst += comps;
+}
+ }
+
+ src += bs;
+  }
+
+  src_row += src_stride;
+   }
+}
-- 
1.7.11.1

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


[Mesa-dev] [PATCH 2/3] mesa: Add function for decoding ETC1 textures

2012-07-10 Thread Chad Versace
Add function _mesa_etc1_unpack_rgba. It is intended to be used by
glCompressedTexSubImage2D to decode ETC1 textures into RGBA.

CC: Chia-I o...@lunarg.com
CC: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Chad Versace chad.vers...@linux.intel.com
---
 src/mesa/main/texcompress_etc.c | 32 
 src/mesa/main/texcompress_etc.h |  8 
 2 files changed, 40 insertions(+)

diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index 5b331a9..c645f52 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -69,3 +69,35 @@ _mesa_fetch_texel_2d_f_etc1_rgb8(const struct 
swrast_texture_image *texImage,
texel[BCOMP] = UBYTE_TO_FLOAT(dst[2]);
texel[ACOMP] = 1.0f;
 }
+
+/**
+ * Decode texture data in format `MESA_FORMAT_ETC1_RGB8` to
+ * `MESA_FORMAT_ABGR`.
+ *
+ * The size of the source data must be a multiple of the ETC1 block size,
+ * which is 8, even if the texture image's dimensions are not aligned to 4.
+ * From the GL_OES_compressed_ETC1_RGB8_texture spec:
+ *   The texture is described as a number of 4x4 pixel blocks. If the
+ *   texture (or a particular mip-level) is smaller than 4 pixels in
+ *   any dimension (such as a 2x2 or a 8x1 texture), the texture is
+ *   found in the upper left part of the block(s), and the rest of the
+ *   pixels are not used. For instance, a texture of size 4x2 will be
+ *   placed in the upper half of a 4x4 block, and the lower half of the
+ *   pixels in the block will not be accessed.
+ *
+ * \param src_width in pixels
+ * \param src_height in pixels
+ * \param dst_stride in bytes
+ */
+void
+_mesa_etc1_unpack_rgba(uint8_t *dst_row,
+   unsigned dst_stride,
+   const uint8_t *src_row,
+   unsigned src_stride,
+   unsigned src_width,
+   unsigned src_height)
+{
+   etc1_unpack_rgba(dst_row, dst_stride,
+src_row, src_stride,
+src_width, src_height);
+}
diff --git a/src/mesa/main/texcompress_etc.h b/src/mesa/main/texcompress_etc.h
index 8e8427f..bfba4ff 100644
--- a/src/mesa/main/texcompress_etc.h
+++ b/src/mesa/main/texcompress_etc.h
@@ -37,4 +37,12 @@ void
 _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
  GLint i, GLint j, GLint k, GLfloat *texel);
 
+void
+_mesa_etc1_unpack_rgba(uint8_t *dst_row,
+   unsigned dst_stride,
+   const uint8_t *src_row,
+   unsigned src_stride,
+   unsigned src_width,
+   unsigned src_height);
+
 #endif
-- 
1.7.11.1

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


[Mesa-dev] [PATCH 3/3] intel: Enable GL_OES_compressed_ETC1_RGB8_texture

2012-07-10 Thread Chad Versace
Enable it for all hardware.

No current hardware supports ETC1, so this patch implements it by
translating the ETC1 data to RGBX data during the call to
glCompressedTexImage2D(). For details, see the doxygen for
intel_mipmap_tree::wraps_etc1.

Passes the Piglit test spec/OES_compressed_ETC1_RGB8_texture/miptree (test
is pending review) and the ETC1 test in the GLES2 conformance suite.

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Chad Versace chad.vers...@linux.intel.com
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |  5 ++
 src/mesa/drivers/dri/intel/intel_extensions.c|  1 +
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c   | 70 +++-
 src/mesa/drivers/dri/intel/intel_mipmap_tree.h   | 15 +
 4 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 
b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 26e65af..794aadb 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -551,6 +551,11 @@ brw_init_surface_formats(struct brw_context *brw)
ctx-TextureFormatSupported[MESA_FORMAT_Z32_FLOAT] = true;
ctx-TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
ctx-TextureFormatSupported[MESA_FORMAT_Z16] = true;
+
+   /* On hardware that lacks support for ETC1, we map ETC1 to RGBX
+* during glCompressedTexImage2D(). See intel_mipmap_tree::wraps_etc1.
+*/
+   ctx-TextureFormatSupported[MESA_FORMAT_ETC1_RGB8] = true;
 }
 
 bool
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c 
b/src/mesa/drivers/dri/intel/intel_extensions.c
index 953b983..844125d 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -91,6 +91,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx-Extensions.OES_EGL_image = true;
 #endif
ctx-Extensions.OES_draw_texture = true;
+   ctx-Extensions.OES_compressed_ETC1_RGB8_texture = true;
 
if (intel-gen = 6)
   ctx-Const.GLSLVersion = 130;
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c 
b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 7018c37..74c9924 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -38,6 +38,7 @@
 #include main/enums.h
 #include main/formats.h
 #include main/image.h
+#include main/texcompress_etc.h
 #include main/teximage.h
 
 #define FILE_DEBUG_FLAG DEBUG_MIPTREE
@@ -180,7 +181,15 @@ intel_miptree_create(struct intel_context *intel,
 {
struct intel_mipmap_tree *mt;
uint32_t tiling = I915_TILING_NONE;
-   GLenum base_format = _mesa_get_format_base_format(format);
+   GLenum base_format;
+   bool wraps_etc1 = false;
+
+   if (format == MESA_FORMAT_ETC1_RGB8) {
+  format = MESA_FORMAT_RGBX_REV;
+  wraps_etc1 = true;
+   }
+
+   base_format = _mesa_get_format_base_format(format);
 
if (intel-use_texture_tiling  !_mesa_is_format_compressed(format)) {
   if (intel-gen = 4 
@@ -227,6 +236,7 @@ intel_miptree_create(struct intel_context *intel,
   return NULL;
}
 
+   mt-wraps_etc1 = wraps_etc1;
mt-region = intel_region_alloc(intel-intelScreen,
   tiling,
   mt-cpp,
@@ -978,6 +988,60 @@ intel_miptree_unmap_s8(struct intel_context *intel,
free(map-buffer);
 }
 
+static void
+intel_miptree_map_etc1(struct intel_context *intel,
+   struct intel_mipmap_tree *mt,
+   struct intel_miptree_map *map,
+   unsigned int level,
+   unsigned int slice)
+{
+   /* For justification of these invariants,
+* see intel_mipmap_tree:wraps_etc1.
+*/
+   assert(mt-wraps_etc1);
+   assert(mt-format == MESA_FORMAT_RGBX_REV);
+
+   /* From the GL_OES_compressed_ETC1_RGB8_texture spec:
+*   INVALID_OPERATION is generated by CompressedTexSubImage2D,
+*   TexSubImage2D, or CopyTexSubImage2D if the texture image level
+*   bound to target has internal format ETC1_RGB8_OES.
+*
+* This implies that intel_miptree_map_etc1() can only be called from
+* glCompressedTexImage2D, and hence the assertions below hold.
+*/
+   assert(map-mode  GL_MAP_WRITE_BIT);
+   assert(map-mode  GL_MAP_INVALIDATE_RANGE_BIT);
+   assert(map-x == 0);
+   assert(map-y == 0);
+
+   /* Each ETC1 block contains 4x4 pixels in 8 bytes. */
+   map-stride = 2 * map-w;
+   map-buffer = map-ptr = malloc(map-stride * map-h);
+}
+
+static void
+intel_miptree_unmap_etc1(struct intel_context *intel,
+ struct intel_mipmap_tree *mt,
+ struct intel_miptree_map *map,
+ unsigned int level,
+ unsigned int slice)
+{
+   uint32_t image_x;
+   uint32_t image_y;
+   intel_miptree_get_image_offset(mt, level, 0, slice, image_x, image_y);
+
+   uint8_t *xbgr = intel_region_map(intel, 

Re: [Mesa-dev] [PATCH 4/5] i965/fs.h: Refactor tests for instructions modifying a register.

2012-07-10 Thread Kenneth Graunke
On 07/09/2012 03:40 PM, Eric Anholt wrote:
 ---
  src/mesa/drivers/dri/i965/brw_fs.cpp   |   25 
 ++--
  src/mesa/drivers/dri/i965/brw_fs.h |1 +
  .../drivers/dri/i965/brw_fs_copy_propagation.cpp   |   16 ++---
  src/mesa/drivers/dri/i965/brw_fs_cse.cpp   |8 +--
  4 files changed, 16 insertions(+), 34 deletions(-)
 
 diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
 b/src/mesa/drivers/dri/i965/brw_fs.cpp
 index 374a059..354134c 100644
 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
 +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
 @@ -168,6 +168,15 @@ fs_inst::regs_written()
  }
  
  bool
 +fs_inst::overwrites_reg(const fs_reg reg)
 +{
 +   return (reg.file == dst.file 
 +   reg.reg == dst.reg 
 +   reg.reg_offset = dst.reg_offset  
 +   reg.reg_offset  dst.reg_offset + regs_written());
 +}
 +
 +bool
  fs_inst::is_tex()
  {
 return (opcode == SHADER_OPCODE_TEX ||
 @@ -1400,9 +1409,7 @@ fs_visitor::propagate_constants()
}
  
if (scan_inst-dst.file == GRF 
 -  scan_inst-dst.reg == inst-dst.reg 
 -  (scan_inst-dst.reg_offset == inst-dst.reg_offset ||
 -   scan_inst-regs_written()  1)) {
 + scan_inst-overwrites_reg(inst-dst)) {

Technically this is a change in behavior: instead of breaking whenever
regs_written()  1, we actually check if it's in the range.

That's a good change to make, but it might be nice to note it in the
commit message.

Reviewed-by: Kenneth Graunke kenn...@whitecape.org

   break;
}
}
 @@ -1602,16 +1609,8 @@ fs_visitor::register_coalesce()
  !scan_inst-is_tail_sentinel();
  scan_inst = (fs_inst *)scan_inst-next) {
if (scan_inst-dst.file == GRF) {
 - if (scan_inst-dst.reg == inst-dst.reg 
 - (scan_inst-dst.reg_offset == inst-dst.reg_offset ||
 -  scan_inst-regs_written()  1)) {
 -interfered = true;
 -break;
 - }
 - if (inst-src[0].file == GRF 
 - scan_inst-dst.reg == inst-src[0].reg 
 - (scan_inst-dst.reg_offset == inst-src[0].reg_offset ||
 -  scan_inst-regs_written()  1)) {
 + if (scan_inst-overwrites_reg(inst-dst) ||
 +scan_inst-overwrites_reg(inst-src[0])) {
  interfered = true;
  break;
   }
 diff --git a/src/mesa/drivers/dri/i965/brw_fs.h 
 b/src/mesa/drivers/dri/i965/brw_fs.h
 index deb58d8..6e3c46a 100644
 --- a/src/mesa/drivers/dri/i965/brw_fs.h
 +++ b/src/mesa/drivers/dri/i965/brw_fs.h
 @@ -150,6 +150,7 @@ public:
  
 bool equals(fs_inst *inst);
 int regs_written();
 +   bool overwrites_reg(const fs_reg reg);
 bool is_tex();
 bool is_math();
  
 diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp 
 b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
 index 106964d..1870f43 100644
 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
 +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
 @@ -98,23 +98,11 @@ fs_visitor::opt_copy_propagate_local(void *mem_ctx,
  
/* kill the destination from the ACP */
if (inst-dst.file == GRF) {
 -  int start_offset = inst-dst.reg_offset;
 -  int end_offset = start_offset + inst-regs_written();
 -
foreach_list_safe(entry_node, acp) {
   acp_entry *entry = (acp_entry *)entry_node;
  
 - if (entry-dst.file == GRF 
 - entry-dst.reg == inst-dst.reg 
 - entry-dst.reg_offset = start_offset 
 - entry-dst.reg_offset  end_offset) {
 -entry-remove();
 -continue;
 - }
 - if (entry-src.file == GRF 
 - entry-src.reg == inst-dst.reg 
 - entry-src.reg_offset = start_offset 
 - entry-src.reg_offset  end_offset) {
 + if (inst-overwrites_reg(entry-dst) ||
 +inst-overwrites_reg(entry-src)) {
  entry-remove();
   }
}
 diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp 
 b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
 index fd28e14..7bf6698 100644
 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
 +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
 @@ -150,17 +150,11 @@ fs_visitor::opt_cse_local(fs_bblock *block, exec_list 
 *aeb)
}
  
/* Kill all AEB entries that use the destination. */
 -  int start_offset = inst-dst.reg_offset;
 -  int end_offset = start_offset + inst-regs_written();
 -
foreach_list_safe(entry_node, aeb) {
aeb_entry *entry = (aeb_entry *)entry_node;
  
for (int i = 0; i  3; i++) {
 - if (entry-generator-src[i].file == inst-dst.file 
 - entry-generator-src[i].reg == inst-dst.reg 
 - entry-generator-src[i].reg_offset = start_offset 
 - entry-generator-src[i].reg_offset  end_offset) {
 +if (inst-overwrites_reg(entry-generator-src[i])) {
  

Re: [Mesa-dev] [PATCH] r600g: improve flushed depth texture handling v2

2012-07-10 Thread Jerome Glisse
On Tue, Jul 10, 2012 at 5:16 PM, Marek Olšák mar...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 10:00 PM, Jerome Glisse j.gli...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 2:10 PM, Marek Olšák mar...@gmail.com wrote:
 On Tue, Jul 10, 2012 at 6:40 AM, Vadim Girlin vadimgir...@gmail.com wrote:
 On Sat, 2012-07-07 at 01:48 +0200, Marek Olšák wrote:
 On Wed, Jun 27, 2012 at 1:34 AM, Vadim Girlin vadimgir...@gmail.com 
 wrote:
  Use r600_resource_texture::flished_depth_texture for GPU access, and
  allocate it in the VRAM. For transfers we'll allocate untiled texture 
  in the
  GTT and store it in the r600_transfer::staging.
 
  Improves performance when flushed depth texture is frequently used by 
  the
  GPU (about 30% for Lightsmark).
 
  Signed-off-by: Vadim Girlin vadimgir...@gmail.com
  ---
 
  Fixes fbo-clear-formats, fbo-generatemipmap-formats, no regressions on
  evergreen

 Hi,

 is there any reason this patch hasn't been committed yet?


 Hi,

 I have some doubts because it was benchmarked by phoronix and there were
 regressions, though I suspect that something is wrong with the results:

 http://www.phoronix.com/scan.php?page=articleitem=amd_r600g_texdepthnum=4

 I was going to look into it but had no time yet. I'd like to be sure
 that there are no regressions before committing.

 Well, there's nothing wrong with your patch. I wouldn't trust
 benchmarks run with the Unity desktop so much. I myself had to switch
 from Unity 2D to Xfce just to get consistent results when testing
 performance.

 Now that your patch separates flushing for texturing and transfers, I
 think we could make it a little bit faster by imlementing an in-place
 flush for texturing (that is without having to allocate another
 resource).

 Marek

 In place flush are useful for the case where you know you wont reuse
 the depth buffer as a depth buffer, or if you know next operation will
 be a gClear on the depth buffer. What i am worried about is that
 recompression might not work in place, for it to work you need to have
 db decompressed into db tiling format and not cb tiling format.

 The case where the depth is not reused is the most common one. It
 might even be the only one in practice. Depth textures are most
 commonly used for shadow mapping, which is the not-reusing case. They
 can also be used to implement deferred rendering (though that's not
 very common), which means the same as shadow mapping for us. Actually,
 no graphics algorithm comes to mind that would do write-texture-write
 with the same depth buffer.

 Marek

I am not saying it's not the most common one, i am saying that
recompressing might be more complex (recompress to different buffer
then copy back to original buffer, or copy buffer and uncompress from
copy).

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


Re: [Mesa-dev] Recent master build failure (upgrade gl2ext.h / glDrawBuffersNV fallout)

2012-07-10 Thread Ian Romanick

On 07/10/2012 02:39 PM, Jeremy Huddleston Sequoia wrote:

Mesa master stopped building successfully on my tinderbox on 7/6.  The relevant 
changes from the previous successful build were 95ce454..c445b0f, and I 
bisected it to the upgrade of gl2ext.h to version 18099 (see below).

../../../src/mapi/glapi/glapitemp.h:4635:1: error: no previous prototype for 
'glDrawBuffersNV' [-Werror=missing-prototypes]

The commit mentions that this new failure is expected, so it would be nice if 
the fix for the original issue could now be included as well.


This commit fixed another, even more catastrophic, problem.  The fix is 
to get a new gl2ext.h, when it's available, that fixes the original 
problem.  In the mean time, I think tinderbox will remain broken. :(


See http://lists.freedesktop.org/archives/mesa-dev/2012-July/023670.html


--Jeremy

3ed8d4285360047d78cfd3218ac4f8f325ae5d6e is the first bad commit
commit 3ed8d4285360047d78cfd3218ac4f8f325ae5d6e
Author: Kristian Høgsberg k...@bitplanet.net
Date:   Tue Jul 3 20:47:04 2012 -0400

 GLES2: upgrade gl2ext.h to version 18099

 Redo this commit, and remove the inclusion of gl2ext.h
 from src/mapi/glapi/glapi_priv.h.  The include was added in
 8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype for
 glDrawBuffersNV and others, but it's not possible to include both
 glext.h and gl2ext.h from the same file.

 I don't see the missing prototype here (with or without shared glapi)
 so I'm just removing the offending #include.

 Also, since we're redoing this, update to the most recent gl2ext.2.

 Signed-off-by: Kristian Høgsberg k...@bitplanet.net

:04 04 3076bd4623a3727eb3690e39801c459ea2c08706 
7754f21c4cee87eb86ccb5ac8b9cbf810d0835ff M  include
:04 04 0e602fff716a390251eacb932e7f406eb399e2e0 
ed4ecdd9127f4541ed0f148f3b97e6eefb6572df M  src

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




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


[Mesa-dev] [Bug 51972] New: Compilation error on x86-64 with --enable-32-bit option

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

 Bug #: 51972
   Summary: Compilation error on x86-64 with --enable-32-bit
option
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: virgile.bes...@free.fr


I'm on Debian Sid and I can't manage to compile mesa with the --enable-32-bit
option whereas it works without this option.

I typed this command in my shell :

./autogen.sh --with-gallium-drivers=r600 --with-dri-drivers= --enable-32-bit  

and the output was :

[...]
checking expat.h usability... no
checking expat.h presence... yes
configure: WARNING: expat.h: present but cannot be compiled
configure: WARNING: expat.h: check for missing prerequisite headers?
configure: WARNING: expat.h: see the Autoconf documentation
configure: WARNING: expat.h: section Present But Cannot Be Compiled
configure: WARNING: expat.h: proceeding with the compiler's result
configure: WARNING: ##
-- ##
configure: WARNING: ## Report this to
https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ##
configure: WARNING: ##
-- ##
checking for expat.h... no
configure: error: Expat required for DRI.

I don't know if it's a mesa bug or an Autoconf bug...

Thanks

V.B.

-- 
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] [PATCH] egl_dri2: NULL check for EGLNativeWindowType

2012-07-10 Thread Elvis Lee
Some application calls eglCreateWindowSurface with
EGLNativeWindowType parameter having zero value. It causes SEGV
and disturbs error handling like EGL_NO_SURFACE.

Signed-off-by: Elvis Lee kwangwoong@lge.com
---
 src/egl/drivers/dri2/platform_drm.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_drm.c 
b/src/egl/drivers/dri2/platform_drm.c
index 54067ff..9aafb52 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -108,6 +108,8 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, 
EGLint type,
 
switch (type) {
case EGL_WINDOW_BIT:
+  if (!window)
+ return NULL;
   surf = gbm_dri_surface((struct gbm_surface *) window);
   dri2_surf-gbm_surf = surf;
   dri2_surf-base.Width =  surf-base.width;
-- 
1.7.9.5

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


Re: [Mesa-dev] Recent master build failure (upgrade gl2ext.h / glDrawBuffersNV fallout)

2012-07-10 Thread Kristian Høgsberg
Hi Jeremy,

I wasn't able to reproduce this problem when I committed the patch to
update gl2ext.h, but I now figured out what triggers it.  It only
happens when the asm stubs are disabled (either pass --disable-asm to
configure or buid on an arch where we fallback to c stubs) and when
shared glapi is disabled.

Anyway, having reproduced it, I see that it's just glDrawBuffersNV
that's the problem.  I assumed that this was just the first missing
prototype and you didn't list the rest.  Digging further, it turns out
that we don't generate entry points for GLES extension functions in
general, which is why only glDrawBuffersNV is a problem.  The
GL_NV_draw_buffers extension defines the entry point is in
ARB_draw_buffers.xml which holds GL extensions too.  All other GLES
extensions are listed in es_EXT.xml, which isn't used to generate the
public entry points.

So it looks like the real fix is the attached patch - move the
GL_NV_draw_buffer definition to es_EXT.xml.  It does fix the error
here and doesn't affect the other configuration combinations.

Kristian

On Tue, Jul 10, 2012 at 9:00 PM, Ian Romanick i...@freedesktop.org wrote:
 On 07/10/2012 02:39 PM, Jeremy Huddleston Sequoia wrote:

 Mesa master stopped building successfully on my tinderbox on 7/6.  The
 relevant changes from the previous successful build were 95ce454..c445b0f,
 and I bisected it to the upgrade of gl2ext.h to version 18099 (see below).

 ../../../src/mapi/glapi/glapitemp.h:4635:1: error: no previous prototype
 for 'glDrawBuffersNV' [-Werror=missing-prototypes]

 The commit mentions that this new failure is expected, so it would be nice
 if the fix for the original issue could now be included as well.


 This commit fixed another, even more catastrophic, problem.  The fix is to
 get a new gl2ext.h, when it's available, that fixes the original problem.
 In the mean time, I think tinderbox will remain broken. :(

 See http://lists.freedesktop.org/archives/mesa-dev/2012-July/023670.html

 --Jeremy

 3ed8d4285360047d78cfd3218ac4f8f325ae5d6e is the first bad commit
 commit 3ed8d4285360047d78cfd3218ac4f8f325ae5d6e
 Author: Kristian Høgsberg k...@bitplanet.net
 Date:   Tue Jul 3 20:47:04 2012 -0400

  GLES2: upgrade gl2ext.h to version 18099

  Redo this commit, and remove the inclusion of gl2ext.h
  from src/mapi/glapi/glapi_priv.h.  The include was added in
  8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype
 for
  glDrawBuffersNV and others, but it's not possible to include both
  glext.h and gl2ext.h from the same file.

  I don't see the missing prototype here (with or without shared glapi)
  so I'm just removing the offending #include.

  Also, since we're redoing this, update to the most recent gl2ext.2.

  Signed-off-by: Kristian Høgsberg k...@bitplanet.net

 :04 04 3076bd4623a3727eb3690e39801c459ea2c08706
 7754f21c4cee87eb86ccb5ac8b9cbf810d0835ff M  include
 :04 04 0e602fff716a390251eacb932e7f406eb399e2e0
 ed4ecdd9127f4541ed0f148f3b97e6eefb6572df M  src

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





0001-mapi-Move-GL_NV_draw_buffers-extension-to-es_EXT.xml.patch
Description: Binary data
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Mesa (master): docs: Update GL3.txt.

2012-07-10 Thread Eric Anholt
Kenneth Graunke k...@kemper.freedesktop.org writes:
 inverse() has been done for a while.

Does the inverse() builtin constant expression handling work for
you?  It doesn't here.

 None of us know what highp change means;

GLSL 1.40 spec: Make the default precision qualification for fragment
shader be high. -- it was also on our task list.



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