Re: [Mesa-dev] [PATCH] mesa: distinct gl_client_array arrays are gone

2011-11-29 Thread Jose Fonseca
It looks like there is a regression, 
https://bugs.freedesktop.org/show_bug.cgi?id=43353 . Can you investigate this?

Jose

- Original Message -
> 
> Hi,
> 
> Apologies for braking this!
> Thanks, looks great.
> 
> Mathias
> 
> On Tuesday, November 29, 2011 08:22:58 Chia-I Wu wrote:
> > From: Chia-I Wu 
> > 
> > Fix build errors since 762c9766c93697af8d7fbaa729aed118789dbe8e.
> > ---
> >  src/mesa/main/ffvertex_prog.c |2 +-
> >  src/mesa/main/get.c   |6 +++---
> >  src/mesa/main/varray.c|2 --
> >  3 files changed, 4 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/mesa/main/ffvertex_prog.c
> > b/src/mesa/main/ffvertex_prog.c
> > index f88110f..19d319a 100644
> > --- a/src/mesa/main/ffvertex_prog.c
> > +++ b/src/mesa/main/ffvertex_prog.c
> > @@ -230,7 +230,7 @@ static void make_state_key( struct gl_context
> > *ctx,
> > struct state_key *key ) key->point_attenuated = 1;
> > 
> >  #if FEATURE_point_size_array
> > -   if (ctx->Array.ArrayObj->PointSize.Enabled)
> > +   if
> > (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled)
> >key->point_array = 1;
> >  #endif
> > 
> > diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> > index a97ba3a..4df6afe 100644
> > --- a/src/mesa/main/get.c
> > +++ b/src/mesa/main/get.c
> > @@ -676,9 +676,9 @@ static const struct value_desc values[] = {
> > { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES },
> > 
> > /* OES_point_size_array */
> > -   { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(PointSize.Enabled,
> > TYPE_BOOLEAN)
> > }, -   { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(PointSize.Type,
> > TYPE_ENUM) }, -   { GL_POINT_SIZE_ARRAY_STRIDE_OES,
> > ARRAY_FIELD(PointSize.Stride, TYPE_INT) }, +   {
> > GL_POINT_SIZE_ARRAY_OES,
> > ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled,
> > TYPE_BOOLEAN) },
> > +   { GL_POINT_SIZE_ARRAY_TYPE_OES,
> > ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM)
> > }, +   {
> > GL_POINT_SIZE_ARRAY_STRIDE_OES,
> > ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT)
> > }, {
> > GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 },
> > #endif
> > /* FEATURE_ES1 */
> > 
> > diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> > index fdcd877..cfb0aa2 100644
> > --- a/src/mesa/main/varray.c
> > +++ b/src/mesa/main/varray.c
> > @@ -341,8 +341,6 @@ _mesa_TexCoordPointer(GLint size, GLenum type,
> > GLsizei
> > stride, if (ctx->API == API_OPENGLES)
> >legalTypes |= BYTE_BIT;
> > 
> > -   ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord));
> > -
> > update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX(unit),
> >  legalTypes, 1, 4,
> >  size, type, stride, GL_FALSE, GL_FALSE,
> ___
> 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] mesa: distinct gl_client_array arrays are gone

2011-11-29 Thread Mathias Fröhlich

Hi,

Apologies for braking this!
Thanks, looks great.

Mathias

On Tuesday, November 29, 2011 08:22:58 Chia-I Wu wrote:
> From: Chia-I Wu 
> 
> Fix build errors since 762c9766c93697af8d7fbaa729aed118789dbe8e.
> ---
>  src/mesa/main/ffvertex_prog.c |2 +-
>  src/mesa/main/get.c   |6 +++---
>  src/mesa/main/varray.c|2 --
>  3 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
> index f88110f..19d319a 100644
> --- a/src/mesa/main/ffvertex_prog.c
> +++ b/src/mesa/main/ffvertex_prog.c
> @@ -230,7 +230,7 @@ static void make_state_key( struct gl_context *ctx,
> struct state_key *key ) key->point_attenuated = 1;
> 
>  #if FEATURE_point_size_array
> -   if (ctx->Array.ArrayObj->PointSize.Enabled)
> +   if (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled)
>key->point_array = 1;
>  #endif
> 
> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> index a97ba3a..4df6afe 100644
> --- a/src/mesa/main/get.c
> +++ b/src/mesa/main/get.c
> @@ -676,9 +676,9 @@ static const struct value_desc values[] = {
> { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES },
> 
> /* OES_point_size_array */
> -   { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(PointSize.Enabled, TYPE_BOOLEAN)
> }, -   { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(PointSize.Type,
> TYPE_ENUM) }, -   { GL_POINT_SIZE_ARRAY_STRIDE_OES,
> ARRAY_FIELD(PointSize.Stride, TYPE_INT) }, +   { GL_POINT_SIZE_ARRAY_OES,
> ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN) },
> +   { GL_POINT_SIZE_ARRAY_TYPE_OES,
> ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM) }, +   {
> GL_POINT_SIZE_ARRAY_STRIDE_OES,
> ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT) }, {
> GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 }, #endif
> /* FEATURE_ES1 */
> 
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index fdcd877..cfb0aa2 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -341,8 +341,6 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei
> stride, if (ctx->API == API_OPENGLES)
>legalTypes |= BYTE_BIT;
> 
> -   ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord));
> -
> update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX(unit),
>  legalTypes, 1, 4,
>  size, type, stride, GL_FALSE, GL_FALSE,
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 41999] eglGetProcAddress("glMapBufferOES") doesn't work if the app links against both -lGL and -lGLESv2

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41999

--- Comment #3 from Chia-I Wu  2011-11-29 22:32:44 PST ---
Does it help to configure mesa with --enable-shared-glapi and rebuild?  The
option is mandatory for GL and GLES interoperation.

-- 
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/4] i965: increase the brw eu instruction store size dynamically

2011-11-29 Thread Yuanhan Liu
On Tue, Nov 29, 2011 at 10:40:46AM -0800, Eric Anholt wrote:
> On Tue, 29 Nov 2011 16:08:39 +0800, Yuanhan Liu  
> wrote:
> > Increase the brw eu instruction store size dynamically instead of just
> > allocating it statically with a constant limit. This would fix something
> > that 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would
> > limit it to 1'.
> 
> I was going to caution against the other assumptions on insn pointers
> staying valid in pre-gen6 code in case someone reduced the initial store
> size at some point, and you'd already reduced the initial store size :)
> 
> So, in brw_clip_emit.c

I presume you were talking about brw_vec4_emit.cpp

> and brw_sf_emit.c there are a few cases
> (particularly loops) where the brw_instruction * is taken from one
> instruction emit and used later.  I'd be comfortable with this patch if
> those were converted to using an instruction index as well.

Right, I missed those. Will fix it.

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


[Mesa-dev] [PATCH 7/7] docs: list GL_OES_compressed_ETC1_RGB8_texture in 7.12 release notes

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

---
 docs/relnotes-7.12.html |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/docs/relnotes-7.12.html b/docs/relnotes-7.12.html
index 393b112..378df96 100644
--- a/docs/relnotes-7.12.html
+++ b/docs/relnotes-7.12.html
@@ -46,6 +46,7 @@ tbd
 GL_NV_fog_distance (all gallium drivers, nouveau classic)
 GL_NV_primitive_restart (r600g)
 GL_OES_EGL_image_external (gallium drivers)
+GL_OES_compressed_ETC1_RGB8_texture (softpipe, llvmpipe)
 ARB_texture_rgb10_a2ui (softpipe, r600g)
 Many updates to the VMware svga Gallium driver
 
-- 
1.7.7.1

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


[Mesa-dev] [PATCH 6/7] st/mesa: add support for GL_OES_compressed_ETC1_RGB8_texture

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

Have st/mesa recognize MESA_FORMAT_ETC1_RGB8 then we are good to advertise the
extension.
---
 src/mesa/state_tracker/st_extensions.c |8 
 src/mesa/state_tracker/st_format.c |   12 
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index c741d13..29fe54a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -475,6 +475,14 @@ void st_init_extensions(struct st_context *st)
   ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
}
 
+   if (ctx->API != API_OPENGL) {
+  if (screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8,
+  PIPE_TEXTURE_2D, 0,
+  PIPE_BIND_SAMPLER_VIEW)) {
+ ctx->Extensions.OES_compressed_ETC1_RGB8_texture = GL_TRUE;
+  }
+   }
+
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW)) {
diff --git a/src/mesa/state_tracker/st_format.c 
b/src/mesa/state_tracker/st_format.c
index bc414f4..4b34acf 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -420,6 +420,9 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_SIGNED_LA_LATC2:
   return PIPE_FORMAT_LATC2_SNORM;
 
+   case MESA_FORMAT_ETC1_RGB8:
+  return PIPE_FORMAT_ETC1_RGB8;
+
/* signed normalized formats */
case MESA_FORMAT_SIGNED_R8:
   return PIPE_FORMAT_R8_SNORM;
@@ -745,6 +748,9 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_LATC2_SNORM:
   return MESA_FORMAT_SIGNED_LA_LATC2;
 
+   case PIPE_FORMAT_ETC1_RGB8:
+  return MESA_FORMAT_ETC1_RGB8;
+
/* signed normalized formats */
case PIPE_FORMAT_R8_SNORM:
   return MESA_FORMAT_SIGNED_R8;
@@ -1189,6 +1195,12 @@ static const struct format_mapping format_map[] = {
   { PIPE_FORMAT_LATC2_SNORM, 0 }
},
 
+   /* ETC1 */
+   {
+  { GL_ETC1_RGB8_OES, 0 },
+  { PIPE_FORMAT_ETC1_RGB8, 0 }
+   },
+
/* signed/unsigned integer formats.
 */
{
-- 
1.7.7.1

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


[Mesa-dev] [PATCH 5/7] gallium: add PIPE_FORMAT_ETC1_RGB8

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

The format is defined by GL_OES_compressed_ETC1_RGB8_texture.
---
 src/gallium/auxiliary/Makefile.sources   |1 +
 src/gallium/auxiliary/util/u_format.csv  |3 +
 src/gallium/auxiliary/util/u_format.h|7 ++-
 src/gallium/auxiliary/util/u_format_etc1.c   |  104 ++
 src/gallium/auxiliary/util/u_format_etc1.h   |   46 +++
 src/gallium/auxiliary/util/u_format_pack.py  |2 +-
 src/gallium/auxiliary/util/u_format_table.py |1 +
 src/gallium/include/pipe/p_format.h  |3 +
 8 files changed, 165 insertions(+), 2 deletions(-)
 create mode 100644 src/gallium/auxiliary/util/u_format_etc1.c
 create mode 100644 src/gallium/auxiliary/util/u_format_etc1.h

diff --git a/src/gallium/auxiliary/Makefile.sources 
b/src/gallium/auxiliary/Makefile.sources
index 5c65533..80fd3c6 100644
--- a/src/gallium/auxiliary/Makefile.sources
+++ b/src/gallium/auxiliary/Makefile.sources
@@ -103,6 +103,7 @@ C_SOURCES := \
util/u_format_latc.c \
util/u_format_s3tc.c \
util/u_format_rgtc.c \
+   util/u_format_etc1.c \
util/u_format_tests.c \
util/u_format_yuv.c \
util/u_format_zs.c \
diff --git a/src/gallium/auxiliary/util/u_format.csv 
b/src/gallium/auxiliary/util/u_format.csv
index 4b6fc75..14528cb 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -158,6 +158,7 @@ PIPE_FORMAT_R8G8Bx_SNORM  , other,  1,  1, sn8 
, sn8 , , , x
 # - http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt
 # - http://www.opengl.org/registry/specs/ARB/texture_compression_rgtc.txt
 # - http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt
+# - 
http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
 # - http://msdn.microsoft.com/en-us/library/bb694531.aspx
 PIPE_FORMAT_DXT1_RGB  , s3tc, 4, 4, x64 , , , , xyz1, 
rgb
 PIPE_FORMAT_DXT1_RGBA , s3tc, 4, 4, x64 , , , , xyzw, 
rgb
@@ -178,6 +179,8 @@ PIPE_FORMAT_LATC1_SNORM   , rgtc, 4, 4, x64,  , 
, , xxx1, rg
 PIPE_FORMAT_LATC2_UNORM   , rgtc, 4, 4, x128, , , , xxxy, 
rgb
 PIPE_FORMAT_LATC2_SNORM   , rgtc, 4, 4, x128, , , , xxxy, 
rgb
 
+PIPE_FORMAT_ETC1_RGB8 , etc1, 4, 4, x64,  , , , xyz1, 
rgb
+
 # Straightforward D3D10-like formats (also used for 
 # vertex buffer element description)
 # 
diff --git a/src/gallium/auxiliary/util/u_format.h 
b/src/gallium/auxiliary/util/u_format.h
index 99ee676..f133a45 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -70,9 +70,14 @@ enum util_format_layout {
UTIL_FORMAT_LAYOUT_RGTC = 5,
 
/**
+* Ericsson Texture Compression
+*/
+   UTIL_FORMAT_LAYOUT_ETC1 = 6,
+
+   /**
 * Everything else that doesn't fit in any of the above layouts.
 */
-   UTIL_FORMAT_LAYOUT_OTHER = 6
+   UTIL_FORMAT_LAYOUT_OTHER = 7
 };
 
 
diff --git a/src/gallium/auxiliary/util/u_format_etc1.c 
b/src/gallium/auxiliary/util/u_format_etc1.c
new file mode 100644
index 000..044ba12
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_etc1.c
@@ -0,0 +1,104 @@
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+#include "util/u_math.h"
+#include "u_format_etc1.h"
+
+/* define etc1_parse_block and etc. */
+#define UINT8_TYPE uint8_t
+#define TAG(x) x
+#include "../../../mesa/main/texcompress_etc1_tmp.h"
+#undef TAG
+#undef UINT8_TYPE
+
+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;
+   }
+}
+
+void
+util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, 
const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+   assert(0);
+}
+
+void
+util_format_etc1_rgb8_unpack_rgba_float(float *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

[Mesa-dev] [PATCH 4/7] mesa: add support for GL_OES_compressed_ETC1_RGB8_texture

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa.  There is no
driver support yet.

Unlike desktop GL compressed texture formats, GLES compressed texture formats
usually can only be used with glCompressedTexImage2D.  All other gl*Tex*Image*
functions are updated to check for that.
---
 src/mesa/main/APIspec.xml |2 +
 src/mesa/main/extensions.c|1 +
 src/mesa/main/format_unpack.c |8 ++
 src/mesa/main/formats.c   |   16 +
 src/mesa/main/formats.h   |2 +
 src/mesa/main/glheader.h  |4 +++
 src/mesa/main/image.c |3 ++
 src/mesa/main/mtypes.h|1 +
 src/mesa/main/texcompress.c   |   22 +
 src/mesa/main/texformat.c |   10 
 src/mesa/main/teximage.c  |   51 +
 src/mesa/main/texstore.c  |2 +
 src/mesa/swrast/s_texfetch.c  |8 ++
 13 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 99c726c..eeae599 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -3806,6 +3806,7 @@



+   



@@ -4105,6 +4106,7 @@

 

+   



diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 8ebc051..b02a49d 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -219,6 +219,7 @@ static const struct extension extension_table[] = {
{ "GL_OES_blend_func_separate", o(EXT_blend_func_separate), 
 ES1,   2009 },
{ "GL_OES_blend_subtract",  o(dummy_true),  
 ES1,   2009 },
{ "GL_OES_byte_coordinates",o(dummy_true),  
 ES1,   2002 },
+   { "GL_OES_compressed_ETC1_RGB8_texture",
o(OES_compressed_ETC1_RGB8_texture), ES1 | ES2, 2005 },
{ "GL_OES_compressed_paletted_texture", o(dummy_true),  
 ES1,   2003 },
{ "GL_OES_depth24", o(EXT_framebuffer_object),  
 ES1 | ES2, 2005 },
{ "GL_OES_depth32", o(dummy_false), 
DISABLE,2005 },
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 0ab6940..4a538d7 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -1289,6 +1289,12 @@ unpack_SIGNED_LA_LATC2(const void *src, GLfloat 
dst[][4], GLuint n)
 }
 
 static void
+unpack_ETC1_RGB8(const void *src, GLfloat dst[][4], GLuint n)
+{
+   /* XXX to do */
+}
+
+static void
 unpack_SIGNED_A8(const void *src, GLfloat dst[][4], GLuint n)
 {
const GLbyte *s = ((const GLbyte *) src);
@@ -1535,6 +1541,8 @@ get_unpack_rgba_function(gl_format format)
   table[MESA_FORMAT_LA_LATC2] = unpack_LA_LATC2;
   table[MESA_FORMAT_SIGNED_LA_LATC2] = unpack_SIGNED_LA_LATC2;
 
+  table[MESA_FORMAT_ETC1_RGB8] = unpack_ETC1_RGB8;
+
   table[MESA_FORMAT_SIGNED_A8] = unpack_SIGNED_A8;
   table[MESA_FORMAT_SIGNED_L8] = unpack_SIGNED_L8;
   table[MESA_FORMAT_SIGNED_AL88] = unpack_SIGNED_AL88;
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 6709ef5..fe1f06e 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1386,6 +1386,16 @@ static struct gl_format_info 
format_info[MESA_FORMAT_COUNT] =
  4, 4, 16 /* 16 bytes per 4x4 block */
},
 
+   {
+  MESA_FORMAT_ETC1_RGB8,
+  "MESA_FORMAT_ETC1_RGB8",
+  GL_RGB,
+  GL_UNSIGNED_NORMALIZED,
+  8, 8, 8, 0,
+  0, 0, 0, 0, 0,
+  4, 4, 8 /* 8 bytes per 4x4 block */
+   },
+
/* Signed formats from EXT_texture_snorm that are not in GL3.1 */
{
   MESA_FORMAT_SIGNED_A8,
@@ -1790,6 +1800,8 @@ _mesa_get_uncompressed_format(gl_format format)
   return MESA_FORMAT_AL88;
case MESA_FORMAT_SIGNED_LA_LATC2:
   return MESA_FORMAT_SIGNED_AL88;
+   case MESA_FORMAT_ETC1_RGB8:
+  return MESA_FORMAT_RGB888;
default:
 #ifdef DEBUG
   assert(!_mesa_is_format_compressed(format));
@@ -2240,6 +2252,7 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_SIGNED_L_LATC1:
case MESA_FORMAT_LA_LATC2:
case MESA_FORMAT_SIGNED_LA_LATC2:
+   case MESA_FORMAT_ETC1_RGB8:
   /* XXX generate error instead? */
   *datatype = GL_UNSIGNED_BYTE;
   *comps = 0;
@@ -2777,6 +2790,9 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_SIGNED_LA_LATC2:
   return GL_FALSE;
 
+   case MESA_FORMAT_ETC1_RGB8:
+  return GL_FALSE;
+
case MESA_FORMAT_SIGNED_A8:
case MESA_FORMAT_SIGNED_L8:
case MESA_FORMAT_SIGNED_AL88:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index b22b073..fc2bb9a 100644
--- a/src/mesa/main

[Mesa-dev] [PATCH 3/7] mesa: add ETC1 decoding routines

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

The format is defined by GL_OES_compressed_ETC1_RGB8_texture.  These routines
will be used in the following commit.
---
 src/mesa/main/texcompress_etc1.c |   71 ++
 src/mesa/main/texcompress_etc1.h |   40 ++
 src/mesa/main/texcompress_etc1_tmp.h |  136 ++
 src/mesa/sources.mak |1 +
 4 files changed, 248 insertions(+), 0 deletions(-)
 create mode 100644 src/mesa/main/texcompress_etc1.c
 create mode 100644 src/mesa/main/texcompress_etc1.h
 create mode 100644 src/mesa/main/texcompress_etc1_tmp.h

diff --git a/src/mesa/main/texcompress_etc1.c b/src/mesa/main/texcompress_etc1.c
new file mode 100644
index 000..a745ea2
--- /dev/null
+++ b/src/mesa/main/texcompress_etc1.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 LunarG, Inc.
+ *
+ * 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 texcompress_etc1.c
+ * GL_OES_compressed_ETC1_RGB8_texture support.
+ */
+
+
+#include "mfeatures.h"
+#include "texcompress.h"
+#include "texcompress_etc1.h"
+#include "texstore.h"
+#include "macros.h"
+#include "swrast/s_context.h"
+
+GLboolean
+_mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS)
+{
+   /* GL_ETC1_RGB8_OES is only valid in glCompressedTexImage2D */
+   ASSERT(0);
+
+   return GL_FALSE;
+}
+
+/* define etc1_parse_block and etc. */
+#define UINT8_TYPE GLubyte
+#define TAG(x) x
+#include "texcompress_etc1_tmp.h"
+#undef TAG
+#undef UINT8_TYPE
+
+void
+_mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+   struct etc1_block block;
+   GLubyte dst[3];
+   const GLubyte *src;
+
+   src = (const GLubyte *) texImage->Data +
+  (((texImage->RowStride + 3) / 4) * (j / 4) + (i / 4)) * 8;
+
+   etc1_parse_block(&block, src);
+   etc1_fetch_texel(&block, i % 4, j % 4, dst);
+
+   texel[RCOMP] = UBYTE_TO_FLOAT(dst[0]);
+   texel[GCOMP] = UBYTE_TO_FLOAT(dst[1]);
+   texel[BCOMP] = UBYTE_TO_FLOAT(dst[2]);
+   texel[ACOMP] = 1.0f;
+}
diff --git a/src/mesa/main/texcompress_etc1.h b/src/mesa/main/texcompress_etc1.h
new file mode 100644
index 000..4e166b2
--- /dev/null
+++ b/src/mesa/main/texcompress_etc1.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 LunarG, Inc.
+ *
+ * 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.
+ */
+
+#ifndef TEXCOMPRESS_ETC1_H
+#define TEXCOMPRESS_ETC1_H
+
+#include "glheader.h"
+#include "mfeatures.h"
+#include "texstore.h"
+
+struct swrast_texture_image;
+
+extern GLboolean
+_mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+#endif
diff --git a/src/mesa/main/texcompress_etc1_tmp.h 
b/src/mesa/main/texcompress_etc1

[Mesa-dev] [PATCH 1/7] glapi: add GL_OES_compressed_ETC1_RGB8_texture for GLES

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

---
 src/mapi/glapi/gen/es_EXT.xml |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index bc98aee..c7e7d07 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -48,6 +48,10 @@
 
 
 
+
+
+
+
 
 
 
-- 
1.7.7.1

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


[Mesa-dev] [PATCH 0/7] add support for GL_OES_compressed_ETC1_RGB8_texture

2011-11-29 Thread Chia-I Wu
From: Chia-I Wu 

Hi,

This series add GL_OES_compressed_ETC1_RGB8_texture support for softpipe and
llvmpipe.  GL_OES_compressed_ETC1_RGB8_texture is a GLES-specific extension.
It defines a new compressed texture format, GL_ETC1_RGB8_OES.  This format is
probably the only commonly used format on GLES that is supported by multiple
vendors.

Other than not prefixed by GL_COMPRESSED_, the other difference from other
compressed formats is that the format is only valid for
glCompressedTexImage2D:  No update (gl*TexSubImage2D) nor compression
(gl[Copy]TexImage) is allowed.  This difference can actually be seen with most
GLES compressed formats.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] i965: let if_stack just store the instruction index

2011-11-29 Thread Yuanhan Liu
On Tue, Nov 29, 2011 at 10:35:42AM -0800, Eric Anholt wrote:
> On Tue, 29 Nov 2011 16:08:38 +0800, Yuanhan Liu  
> wrote:
> > Let if_stack just store the instruction pointer(an index). This is
> > somehow more flexible than store the instruction memory address.
> 
> I'd be more specific: This lets us realloc the instruction store.
> 
> > diff --git a/src/mesa/drivers/dri/i965/brw_eu.c 
> > b/src/mesa/drivers/dri/i965/brw_eu.c
> > index b5a858b..d6e5c09 100644
> > --- a/src/mesa/drivers/dri/i965/brw_eu.c
> > +++ b/src/mesa/drivers/dri/i965/brw_eu.c
> > @@ -191,8 +191,7 @@ brw_init_compile(struct brw_context *brw, struct 
> > brw_compile *p, void *mem_ctx)
> > /* Set up control flow stack */
> > p->if_stack_depth = 0;
> > p->if_stack_array_size = 16;
> > -   p->if_stack =
> > -  rzalloc_array(mem_ctx, struct brw_instruction *, 
> > p->if_stack_array_size);
> > +   p->if_stack = rzalloc_array(mem_ctx, GLuint, p->if_stack_array_size);
> >  }
> 
> Please use plain types instead of the awful GL-decorated types, unless
> it's something directly exposed in the GL API.

Agreed. But I somehow followed the type usage of 'GLuint nr_insn'
defined in brw_compile. Since the if_stack is used to store instruction
index, and the index is defined in a GLuint type. That's why I
origianlly used GLuint.

So, I should also change the type of nr_insn to something like int, too?
(BTW, I guess int would be enough, but for good semantics, a positive
index, should I use uint32_t?)

Thanks,
Yuanhan Liu

> 
> (if you want sized types, the standard ones in inttypes.h are good)


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


[Mesa-dev] [Bug 43138] [glsl] fail to get the active attribute with function glGetProgramiv

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43138

sunyi  changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

--- Comment #8 from sunyi  2011-11-29 19:00:28 PST ---
The commit is on the master. Verified it.

-- 
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] i965: Make gen6_resolve_implied_move a no-op for MRF sources.

2011-11-29 Thread Eric Anholt
On Mon, 28 Nov 2011 20:21:45 -0800, Kenneth Graunke  
wrote:
> Attempting to move an MRF to a MRF is not only pointless, it will fail
> because MRFs are read-only, resulting in garbage in your register.
> 
> If we already set up a MRF source, there's nothing to resolve anyway.
> 
> Signed-off-by: Kenneth Graunke 

Looks like an obviously good idea to me.

Reviewed-by: Eric Anholt 


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


[Mesa-dev] [Bug 43355] New: state_tracker/st_mesa_to_tgsi.c:296:translate_texture_target: Assertion `0' failed.

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43355

 Bug #: 43355
   Summary: state_tracker/st_mesa_to_tgsi.c:296:translate_texture_
target: Assertion `0' failed.
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
  Severity: critical
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: v...@vmware.com


mesa: ccd4d4367f2b4e5aebfc59b832599812a4a1c7d8 (master)

Run piglit test draw-pixel-with-texture on softpipe, llvmpipe, r300g, or r600g.
The test triggers an assert.

$ ./bin/draw-pixel-with-texture -auto
state_tracker/st_mesa_to_tgsi.c:296:translate_texture_target: Assertion `0'
failed.
Trace/breakpoint trap (core dumped)

(gdb) bt
#0  0x00421769 in _debug_assert_fail (expr=0x586db3 "0", file=0x586d04
"state_tracker/st_mesa_to_tgsi.c", line=296, function=0x5873ae
"translate_texture_target") at util/u_debug.c:278
#1  0x003c2768 in translate_texture_target (textarget=0, shadow=0 '\000') at
state_tracker/st_mesa_to_tgsi.c:296
#2  0x002ca552 in compile_tgsi_instruction (t=0x9ab0a38, inst=0x9a60198) at
state_tracker/st_glsl_to_tgsi.cpp:4256
#3  0x002cbf08 in st_translate_program (ctx=0x9977bc8, procType=0,
ureg=0x9aac668, program=0x9a5fce8, proginfo=0x9a9c300, numInputs=1,
inputMapping=0xbfa33e34, 
inputSemanticName=0xbfa33f7c "\005\036;", inputSemanticIndex=0xbfa33f5c "",
interpMode=0xbfa33db4, numOutputs=1, outputMapping=0xbfa33eb4,
outputSemanticName=0xbfa33f3c "\001\327:", 
outputSemanticIndex=0xbfa33f1c "", passthrough_edgeflags=0 '\000') at
state_tracker/st_glsl_to_tgsi.cpp:4748
#4  0x00286c54 in st_translate_fragment_program (st=0x99d1ff8, stfp=0x9a9c300,
key=0xbfa34000) at state_tracker/st_program.c:653
#5  0x00286e53 in st_get_fp_variant (st=0x99d1ff8, stfp=0x9a6b770,
key=0xbfa34000) at state_tracker/st_program.c:728
#6  0x003bb9dd in get_color_fp_variant (st=0x99d1ff8) at
state_tracker/st_cb_drawpixels.c:1008
#7  0x003bbc10 in st_DrawPixels (ctx=0x9977bc8, x=0, y=0, width=100,
height=100, format=6408, type=5126, unpack=0x99866b4, pixels=0xae19f008) at
state_tracker/st_cb_drawpixels.c:1089
#8  0x00350d21 in _mesa_DrawPixels (width=100, height=100, format=6408,
type=5126, pixels=0xae19f008) at main/drawpix.c:113
#9  0x0806bcb4 in piglit_display () at
piglit/tests/general/draw-pixel-with-texture.c:62
#10 0x0806bd3f in display () at piglit/tests/util/piglit-framework.c:56
#11 0x00b09820 in fghRedrawWindow (window=0x9880838, enumerator=0xbfa34298) at
freeglut_main.c:210
#12 fghcbDisplayWindow (window=0x9880838, enumerator=0xbfa34298) at
freeglut_main.c:227
#13 0x00b0d660 in fgEnumWindows (enumCallback=0xb09790 ,
enumerator=0xbfa34298) at freeglut_structure.c:394
#14 0x00b09cdb in fghDisplayAll () at freeglut_main.c:249
#15 glutMainLoopEvent () at freeglut_main.c:1450
#16 0x00b0a605 in glutMainLoop () at freeglut_main.c:1498
#17 0x0806c441 in main (argc=1, argv=0xbfa34524) at
piglit/tests/util/piglit-framework.c:294


src/mesa/state_tracker/st_mesa_to_tgsi.c
   271  unsigned
   272  translate_texture_target( GLuint textarget,
   273GLboolean shadow )
   274  {
   275 if (shadow) {
   276switch( textarget ) {
   277case TEXTURE_1D_INDEX:   return TGSI_TEXTURE_SHADOW1D;
   278case TEXTURE_2D_INDEX:   return TGSI_TEXTURE_SHADOW2D;
   279case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_SHADOWRECT;
   280case TEXTURE_1D_ARRAY_INDEX: return TGSI_TEXTURE_SHADOW1D_ARRAY;
   281case TEXTURE_2D_ARRAY_INDEX: return TGSI_TEXTURE_SHADOW2D_ARRAY;
   282default: break;
   283}
   284 }
   285  
   286 switch( textarget ) {
   287 case TEXTURE_1D_INDEX:   return TGSI_TEXTURE_1D;
   288 case TEXTURE_2D_INDEX:   return TGSI_TEXTURE_2D;
   289 case TEXTURE_3D_INDEX:   return TGSI_TEXTURE_3D;
   290 case TEXTURE_CUBE_INDEX: return TGSI_TEXTURE_CUBE;
   291 case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_RECT;
   292 case TEXTURE_1D_ARRAY_INDEX:   return TGSI_TEXTURE_1D_ARRAY;
   293 case TEXTURE_2D_ARRAY_INDEX:   return TGSI_TEXTURE_2D_ARRAY;
   294 case TEXTURE_EXTERNAL_INDEX:   return TGSI_TEXTURE_2D;
   295 default:
   296debug_assert( 0 );
   297return TGSI_TEXTURE_1D;
   298 }
   299  }

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


[Mesa-dev] [Bug 43353] [swrast] piglit bgra-vert-attrib-pointer regression

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43353

--- Comment #3 from Vinson Lee  2011-11-29 15:50:16 PST ---
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
762c9766c93697af8d7fbaa729aed118789dbe8e
76ba431b97087e2d5ca0351e0d613f0812fd1425
We cannot bisect more!
bisect run cannot continue any more



commit 762c9766c93697af8d7fbaa729aed118789dbe8e
Author: Mathias Fröhlich 
Date:   Mon Oct 31 22:23:51 2011 +0100

mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.

Replace the distinct struct gl_client_array members in gl_array_object by
an array of gl_client_arrays indexed by VERT_ATTRIB_*.
Renumber the vertex attributes slightly to keep the old semantics of the
distinct array members. Make use of the upper 32 bits in VERT_BIT_*.
Update all occurances of the distinct struct members with the array
equivalents.

Signed-off-by: Mathias Froehlich 
Reviewed-by: Eric Anholt 


commit 76ba431b97087e2d5ca0351e0d613f0812fd1425
Author: Chia-I Wu 
Date:   Tue Nov 29 15:19:28 2011 +0800

mesa: distinct gl_client_array arrays are gone

Fix build errors since 762c9766c93697af8d7fbaa729aed118789dbe8e.

Acked-by: Jose Fonseca 

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


[Mesa-dev] [Bug 43353] [swrast] piglit bgra-vert-attrib-pointer regression

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43353

Vinson Lee  changed:

   What|Removed |Added

   Platform|Other   |x86 (IA32)
 OS/Version|All |Linux (All)
Summary|[swrast] piglit |[swrast] piglit
   |bgra-vert-attrib-pointer|bgra-vert-attrib-pointer
   ||regression

--- Comment #2 from Vinson Lee  2011-11-29 15:31:51 PST ---
mesa: ccd4d4367f2b4e5aebfc59b832599812a4a1c7d8 (master)

Run piglit bgra-vert-attrib-pointer on swrast.

$ ./bin/bgra-vert-attrib-pointer -auto
Probe at (200,200)
  Expected: 1.00 0.00 0.00
  Observed: 0.00 0.00 0.00
PIGLIT: {'result': 'fail' }

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


[Mesa-dev] [Bug 43353] [swrast] piglit bgra-vert-attrib-pointer

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43353

--- Comment #1 from Vinson Lee  2011-11-29 15:29:35 PST ---
Created attachment 53962
  --> https://bugs.freedesktop.org/attachment.cgi?id=53962
bgra-vert-attrib-pointer.png

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


[Mesa-dev] [Bug 43353] New: [swrast] piglit bgra-vert-attrib-pointer

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43353

 Bug #: 43353
   Summary: [swrast] piglit bgra-vert-attrib-pointer
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Other
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: v...@vmware.com


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


[Mesa-dev] [Bug 43317] swrast: glean basic sanity fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43317

--- Comment #2 from Nicholas Miell  2011-11-29 14:03:53 PST 
---
Created attachment 53961
  --> https://bugs.freedesktop.org/attachment.cgi?id=53961
glxinfo with Mesa ccd4d4367f2b4e5aebfc59b832599812a4a1c7d8

-- 
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 0/1] gallium/failover: deprecated, dead and now gone(?)

2011-11-29 Thread Kai Wasserbäch
Dear mesa-dev list,
[0] mentioned a third module/driver for deletion. The following patch will
do exactly that: remove all traces of the failover driver.
As before I tried to hit everything but would really appreiciate if somebody
with more in-depth knowledge of Mesa's codebase to look over the patch.

Should you accept the patch, please commit it for me, I don't have commit
access for Mesa's Git repository.

Kind regards,
Kai Wasserbäch


[0] 


Kai Wasserbäch (1):
  gallium/failover: Remove the deprecated module.

 configs/darwin   |2 +-
 configs/default  |4 +-
 configure.ac |2 +-
 docs/relnotes-7.12.html  |7 +-
 doxygen/gallium.doc  |   11 -
 src/gallium/SConscript   |   11 +-
 src/gallium/docs/source/distro.rst   |   11 -
 src/gallium/drivers/failover/Makefile|   11 -
 src/gallium/drivers/failover/SConscript  |   15 -
 src/gallium/drivers/failover/fo_context.c|  146 --
 src/gallium/drivers/failover/fo_context.h|  144 --
 src/gallium/drivers/failover/fo_state.c  |  661 --
 src/gallium/drivers/failover/fo_state_emit.c |  144 --
 src/gallium/drivers/failover/fo_winsys.h |   48 --
 src/mesa/state_tracker/st_draw_feedback.c|1 -
 15 files changed, 12 insertions(+), 1206 deletions(-)
 delete mode 100644 src/gallium/drivers/failover/Makefile
 delete mode 100644 src/gallium/drivers/failover/SConscript
 delete mode 100644 src/gallium/drivers/failover/fo_context.c
 delete mode 100644 src/gallium/drivers/failover/fo_context.h
 delete mode 100644 src/gallium/drivers/failover/fo_state.c
 delete mode 100644 src/gallium/drivers/failover/fo_state_emit.c
 delete mode 100644 src/gallium/drivers/failover/fo_winsys.h

-- 
1.7.7.3

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


Re: [Mesa-dev] [PATCH] mesa: Reject glDrawPixels(integer format) on GL 3.0 or greater.

2011-11-29 Thread Ian Romanick

On 11/27/2011 06:08 PM, Eric Anholt wrote:

When folding GL_EXT_texture_integer into the core, a new (and very
sensible) restriction was added.
---
  src/mesa/main/drawpix.c |   13 +
  1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 412cc15..5d1bd5a 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -30,6 +30,7 @@
  #include "enums.h"
  #include "feedback.h"
  #include "framebuffer.h"
+#include "image.h"
  #include "mfeatures.h"
  #include "pbo.h"
  #include "readpix.h"
@@ -76,6 +77,18 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
goto end;  /* the error code was recorded */
 }

+   /* GL 3.0 introduced a new restriction on glDrawPixels() over what was in
+* GL_EXT_texture_integer.  From section 3.7.4 ("Rasterization of Pixel
+* Rectangles) on page 151 of the GL 3.0 specification:
+*
+* "If format contains integer components, as shown in table 3.6, an
+*  INVALID OPERATION error is generated."
+*/
+   if (ctx->VersionMajor>= 3&&  _mesa_is_integer_format(format)) {


I'd be in favor of making this check not depend on the GL version.  The 
EXT spec says DrawPixels only works with a shader.  The only way to get 
integer data from a shader is with EXT_gpu_shader4 or GLSL 1.30.  So... 
yeah.



+  _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)");
+  goto end;
+   }
+
 if (_mesa_error_check_format_type(ctx, format, type, GL_TRUE)) {
goto end;  /* the error code was recorded */
 }

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


Re: [Mesa-dev] GL 3.0 glDrawPixels(integer format)

2011-11-29 Thread Ian Romanick

On 11/27/2011 06:08 PM, Eric Anholt wrote:

While looking into MapRenderbuffer for glDrawPixels, I ended up
looking at integer again.  It looks like GL 3.0 has added sanity to
drawpixels for integer, which is to say that they've disallowed it.

I don't think there was any way to usefully use drawpixels of integer.
Assuming you want to output to an integer FBO, you have to have a
fragment shader bound.  You would also need to have the input to that
fragment shader be integer, or you're going to lose your precision.
But how does the glDrawPixels() input data get bound to some
user-defined shader input?

The fbo-integer-precision-drawpixels testcase currently binds a shader
that does gl_FragColor = gl_Color.  But if the output to an integer
FBO is written through a floating-point shader output, the result is
undefined (from GL_EXT_texture_integer):

"The color components used for per-fragment operations and written into a
 color buffer are undefined:

   * for fragment shaders that write floating-point color components to an
 integer color buffer, or..."

What should we do with that testcase?  If pre-3.0
GL_EXT_texture_integer allows drawpixels for integer, what behavior
would we actually want for making use of the user's shader?  (I'm
assuming that testcase passed for whatever code it was supposed to
test because that code just no-opped the shader.  Imagine the shader
doing some actual math on the color instead.).  I'm inclined to adopt
3.0 behavior generally, and assume that the 3.0 wording was a
correction after someone noticed that making drawpixels for integer
actually work was hopeless.


If other drivers report EXT_texture_integer with OpenGL 3.0 and generate 
the DrawPixels errors (per the 3.0 spec), then, in a practical sense, 
it's impossible for any application to use the DrawPixels functionality 
in EXT_texture_integer.


If there are no applications and there never will be any applications 
that use this quirk of the EXT, then I would opt for the 3.0 behavior.


I suspect that there may be apps that look for the EXT in the absence of 
3.0 to use integer textures.  We should continue to report the EXT.


I think this is a case where the EXT spec should have been updated to 
match 3.0 when 3.0 was released.  Alas.

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


[Mesa-dev] [Bug 43138] [glsl] fail to get the active attribute with function glGetProgramiv

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43138

Ian Romanick  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Ian Romanick  2011-11-29 11:15:53 PST 
---
Fixed on master by the following commit.  The rationale for not backporting
this to 7.11 explained in comment #3 still applies.

commit e6c314f7d2ed99714376fec6b7509a55535fa3ff
Author: Ian Romanick 
Date:   Mon Nov 21 20:47:57 2011 -0800

mesa: Allow generic attributes for glGetActiveAttrib and
GL_ACTIVE_ATTRIBUTE

Page 77 (page 91 of the PDF) says about glGetActiveAttrib:

"The returned attribute name can be the name of a generic
attribute or a conventional attribute (which begin with the prefix
"gl_", see the OpenGL Shading Language specification for a
complete list)."

Page 261 (page 275 of the PDF) says about glGetProgramiv:

"If pname is ACTIVE_ATTRIBUTES, the number of active attributes in
program is returned."

It doesn't say anything about built-in vs. user-defined attributes.
From the language around glGetActiveAttrib and the lack of an
exclusion of built-in attributes, which exists other places (e.g.,
around glBindAttribLocation), we can infer that GL_ACTIVE_ATTRIBUTES
should include the active attribute count.  It should also be included
in the values returned by glGetActiveAttrib.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43138
Signed-off-by: Ian Romanick 
Reviewed-by: Eric Anholt 
Tested-by: Yi Sun 

-- 
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] mesa: fix MESA_FORMAT_RG88 format match test

2011-11-29 Thread Eric Anholt
On Tue, 29 Nov 2011 07:26:52 -0700, Brian Paul  wrote:
> ---
>  src/mesa/main/formats.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
> index d3b12d0..9374f00 100644
> --- a/src/mesa/main/formats.c
> +++ b/src/mesa/main/formats.c
> @@ -2596,7 +2596,7 @@ _mesa_format_matches_format_and_type(gl_format 
> gl_format,
> case MESA_FORMAT_R8:
>return format == GL_RED && type == GL_UNSIGNED_BYTE;
> case MESA_FORMAT_RG88:
> -  return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && 
> littleEndian;
> +  return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
> case MESA_FORMAT_RG88_REV:
>return GL_FALSE;

Reviewed-by: Eric Anholt 


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


Re: [Mesa-dev] [PATCH 0/1] Delete the cell driver

2011-11-29 Thread Kai Wasserbäch
Dear Jose,
Jose Fonseca schrieb am 29.11.2011 18:55:
> Thanks. This one was was almost perfect -- it was just missing to remove
> src/gallium/auxiliary/rtasm/rtasm_ppc_spe.[ch] which was only used by cell.

I've updated the patch at [0] to include the above two files (and also remove it
from the Makefile.sources).

Kind regards,
Kai Wasserbäch


[0]




-- 

Kai Wasserbäch (Kai Wasserbaech)

E-Mail: k...@dev.carbon-project.org



signature.asc
Description: OpenPGP digital signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] i965: increase the brw eu instruction store size dynamically

2011-11-29 Thread Eric Anholt
On Tue, 29 Nov 2011 16:08:39 +0800, Yuanhan Liu  
wrote:
> Increase the brw eu instruction store size dynamically instead of just
> allocating it statically with a constant limit. This would fix something
> that 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would
> limit it to 1'.

I was going to caution against the other assumptions on insn pointers
staying valid in pre-gen6 code in case someone reduced the initial store
size at some point, and you'd already reduced the initial store size :)

So, in brw_clip_emit.c and brw_sf_emit.c there are a few cases
(particularly loops) where the brw_instruction * is taken from one
instruction emit and used later.  I'd be comfortable with this patch if
those were converted to using an instruction index as well.


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


Re: [Mesa-dev] [PATCH 3/4] i965: let if_stack just store the instruction index

2011-11-29 Thread Eric Anholt
On Tue, 29 Nov 2011 16:08:38 +0800, Yuanhan Liu  
wrote:
> Let if_stack just store the instruction pointer(an index). This is
> somehow more flexible than store the instruction memory address.

I'd be more specific: This lets us realloc the instruction store.

> diff --git a/src/mesa/drivers/dri/i965/brw_eu.c 
> b/src/mesa/drivers/dri/i965/brw_eu.c
> index b5a858b..d6e5c09 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu.c
> @@ -191,8 +191,7 @@ brw_init_compile(struct brw_context *brw, struct 
> brw_compile *p, void *mem_ctx)
> /* Set up control flow stack */
> p->if_stack_depth = 0;
> p->if_stack_array_size = 16;
> -   p->if_stack =
> -  rzalloc_array(mem_ctx, struct brw_instruction *, 
> p->if_stack_array_size);
> +   p->if_stack = rzalloc_array(mem_ctx, GLuint, p->if_stack_array_size);
>  }

Please use plain types instead of the awful GL-decorated types, unless
it's something directly exposed in the GL API.

(if you want sized types, the standard ones in inttypes.h are good)


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


[Mesa-dev] [Bug 43317] swrast: glean basic sanity fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43317

--- Comment #1 from Brian Paul  2011-11-29 10:29:57 PST ---
Works for me.  Can you attach the output of glxinfo?

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


[Mesa-dev] [Bug 43348] New: [r600g] piglit: spec/ARB_seamless_cube_map/arb_seamless_cube_map fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43348

 Bug #: 43348
   Summary: [r600g] piglit:
spec/ARB_seamless_cube_map/arb_seamless_cube_map fails
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the spec/ARB_seamless_cube_map/arb_seamless_cube_map
test fails with Git/c8db5a3d, which is a regression over Git/8d15268a. This is
with the r600g driver on a R700 class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

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


[Mesa-dev] [Bug 43347] New: [r600g] piglit: glx-make-glxdrawable-current fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43347

 Bug #: 43347
   Summary: [r600g] piglit: glx-make-glxdrawable-current fails
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the glx-make-glxdrawable-current test fails with
Git/c8db5a3d, which is a regression over Git/8d15268a. This is with the r600g
driver on a R700 class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

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


[Mesa-dev] [Bug 43346] New: [r600g] piglit: varray-disabled

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43346

 Bug #: 43346
   Summary: [r600g] piglit: varray-disabled
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the varray-disabled test fails with Git/c8db5a3d,
which is a regression over Git/8d15268a. This is with the r600g driver on a
R700 class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

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


[Mesa-dev] [Bug 43345] New: [r600g] piglit: quad-invariance fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43345

 Bug #: 43345
   Summary: [r600g] piglit: quad-invariance fails
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the quad-invariance test fails with Git/c8db5a3d,
which is a regression over Git/8d15268a. This is with the r600g driver on a
R700 class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

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


[Mesa-dev] [Bug 43344] [r600g] piglit: fbo-sys-blit fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43344

--- Comment #1 from Kai  2011-11-29 10:20:50 PST 
---
I was just about to file an extra bug for the fby-sys-sub-blit regression, but
it sounds, judging from the name, like it might be related to this bug.

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


[Mesa-dev] [Bug 43344] New: [r600g] piglit: fbo-sys-blit fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43344

 Bug #: 43344
   Summary: [r600g] piglit: fbo-sys-blit fails
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the fbo-sys-blit test fails with Git/c8db5a3d, which
is a regression over Git/8d15268a. This is with the r600g driver on a R700
class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

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


[Mesa-dev] [Bug 43343] New: [r600g] piglit: fbo-mipmap-copypix fails

2011-11-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43343

 Bug #: 43343
   Summary: [r600g] piglit: fbo-mipmap-copypix fails
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Keywords: regression
  Severity: normal
  Priority: medium
 Component: Mesa core
AssignedTo: mesa-dev@lists.freedesktop.org
ReportedBy: k...@dev.carbon-project.org


As can be seen from [0], the fbo-mipmap-copypix test fails with Git/c8db5a3d,
which is a regression over Git/8d15268a. This is with the r600g driver on a
R700 class chip.

Stack:
Kernel: 3.1.3
libdrm: 2.4.27-1
Mesa: Git/c8db5a3d
X.org: 1.11.1.902 (1.11.2 RC 2)


[0] 

-- 
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 0/1] Delete the cell driver

2011-11-29 Thread Jose Fonseca
Thanks. This one was was almost perfect -- it was just missing to remove 
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.[ch] which was only used by cell.

I'll push later if there are no objections.

Jose

- Original Message -
> Dear mesa-dev list,
> the recent discussion about enabling GLSL unconditionally ([0]) lead
> to the
> assessment, that certain Gallium3D drivers lacked developers (and
> users) but
> complicated the development of the actively maintained Gallium3D
> drivers.
> 
> The cell driver was named as one such driver. The following patch
> should remove
> all traces of it from the source tree, but as I'm not /that/ familiar
> with
> Mesa's code base, I might have missed something or been a little
> overeager.
> Therefore I'd appreciate if somebody with more knowledge in the field
> could
> check the patch.
> 
> Please note, that I don't have commit access for Mesa's Git
> repository, in case
> this patch should get accepted, someone would have to commit the
> patch for me.
> 
> As this patch is also quite large, I probably hit the list's size
> limit again.
> Therefore I've uploaded the patch to [1].
> 
> Kind regards,
> Kai Wasserbäch
> 
> 
> [0]
> 
> [1]
> 
> 
> 
> Kai Wasserbäch (1):
>   gallium/cell: Remove the driver.
> 
>  Makefile   |2 -
>  common.py  |2 +-
>  configs/linux-cell |   71 -
>  configs/linux-cell-debug   |   10 -
>  docs/cell.html |  138 --
>  docs/contents.html |3 +-
>  docs/news.html |2 +-
>  docs/relnotes-7.12.html|2 +
>  docs/relnotes-7.5.html |2 +-
>  docs/sourcetree.html   |1 -
>  doxygen/gallium.doc|1 -
>  .../auxiliary/target-helpers/inline_sw_helper.h|   15 +-
>  src/gallium/drivers/cell/Makefile  |   12 -
>  src/gallium/drivers/cell/common.h  |  377 
>  src/gallium/drivers/cell/ppu/Makefile  |   86 -
>  src/gallium/drivers/cell/ppu/cell_batch.c  |  260 ---
>  src/gallium/drivers/cell/ppu/cell_batch.h  |   54 -
>  src/gallium/drivers/cell/ppu/cell_clear.c  |   93 -
>  src/gallium/drivers/cell/ppu/cell_clear.h  |   42 -
>  src/gallium/drivers/cell/ppu/cell_context.c|  190 --
>  src/gallium/drivers/cell/ppu/cell_context.h|  210 --
>  src/gallium/drivers/cell/ppu/cell_draw_arrays.c|  113 -
>  src/gallium/drivers/cell/ppu/cell_draw_arrays.h|   36 -
>  src/gallium/drivers/cell/ppu/cell_fence.c  |  172 --
>  src/gallium/drivers/cell/ppu/cell_fence.h  |   60 -
>  src/gallium/drivers/cell/ppu/cell_flush.c  |  109 -
>  src/gallium/drivers/cell/ppu/cell_flush.h  |   45 -
>  src/gallium/drivers/cell/ppu/cell_gen_fp.c | 2036
>  --
>  src/gallium/drivers/cell/ppu/cell_gen_fp.h |   42 -
>  src/gallium/drivers/cell/ppu/cell_gen_fragment.c   | 2189
>  
>  src/gallium/drivers/cell/ppu/cell_gen_fragment.h   |   38 -
>  src/gallium/drivers/cell/ppu/cell_pipe_state.c |  473 -
>  src/gallium/drivers/cell/ppu/cell_pipe_state.h |   39 -
>  src/gallium/drivers/cell/ppu/cell_public.h |   10 -
>  src/gallium/drivers/cell/ppu/cell_render.c |  211 --
>  src/gallium/drivers/cell/ppu/cell_render.h |   39 -
>  src/gallium/drivers/cell/ppu/cell_screen.c |  221 --
>  src/gallium/drivers/cell/ppu/cell_screen.h |   55 -
>  src/gallium/drivers/cell/ppu/cell_spu.c|  219 --
>  src/gallium/drivers/cell/ppu/cell_spu.h|   79 -
>  src/gallium/drivers/cell/ppu/cell_state.h  |   65 -
>  src/gallium/drivers/cell/ppu/cell_state_derived.c  |  170 --
>  src/gallium/drivers/cell/ppu/cell_state_emit.c |  343 ---
>  src/gallium/drivers/cell/ppu/cell_state_emit.h |   36 -
>  .../drivers/cell/ppu/cell_state_per_fragment.c | 1432
>  -
>  .../drivers/cell/ppu/cell_state_per_fragment.h |   39 -
>  src/gallium/drivers/cell/ppu/cell_state_shader.c   |  229 --
>  src/gallium/drivers/cell/ppu/cell_state_vertex.c   |  120 --
>  src/gallium/drivers/cell/ppu/cell_surface.c|   37 -
>  src/gallium/drivers/cell/ppu/cell_surface.h|   42 -
>  src/gallium/drivers/cell/ppu/cell_texture.c|  644 --
>  src/gallium/drivers/cell/ppu/cell_texture.h|  102 -
>  src/gallium/drivers/cell/ppu/cell_vbuf.c   |  332 ---
>  src/gallium/drivers/cell/ppu/cell_vbuf.h   |   38 -
>  src/gallium/drivers/cell/ppu/cell_vertex_fetch.c   |  346 ---
>  src/gallium/dr

[Mesa-dev] [PATCH 0/1] Delete the cell driver

2011-11-29 Thread Kai Wasserbäch
Dear mesa-dev list,
the recent discussion about enabling GLSL unconditionally ([0]) lead to the
assessment, that certain Gallium3D drivers lacked developers (and users) but
complicated the development of the actively maintained Gallium3D drivers.

The cell driver was named as one such driver. The following patch should remove
all traces of it from the source tree, but as I'm not /that/ familiar with
Mesa's code base, I might have missed something or been a little overeager.
Therefore I'd appreciate if somebody with more knowledge in the field could
check the patch.

Please note, that I don't have commit access for Mesa's Git repository, in case
this patch should get accepted, someone would have to commit the patch for me.

As this patch is also quite large, I probably hit the list's size limit again.
Therefore I've uploaded the patch to [1].

Kind regards,
Kai Wasserbäch


[0] 
[1] 



Kai Wasserbäch (1):
  gallium/cell: Remove the driver.

 Makefile   |2 -
 common.py  |2 +-
 configs/linux-cell |   71 -
 configs/linux-cell-debug   |   10 -
 docs/cell.html |  138 --
 docs/contents.html |3 +-
 docs/news.html |2 +-
 docs/relnotes-7.12.html|2 +
 docs/relnotes-7.5.html |2 +-
 docs/sourcetree.html   |1 -
 doxygen/gallium.doc|1 -
 .../auxiliary/target-helpers/inline_sw_helper.h|   15 +-
 src/gallium/drivers/cell/Makefile  |   12 -
 src/gallium/drivers/cell/common.h  |  377 
 src/gallium/drivers/cell/ppu/Makefile  |   86 -
 src/gallium/drivers/cell/ppu/cell_batch.c  |  260 ---
 src/gallium/drivers/cell/ppu/cell_batch.h  |   54 -
 src/gallium/drivers/cell/ppu/cell_clear.c  |   93 -
 src/gallium/drivers/cell/ppu/cell_clear.h  |   42 -
 src/gallium/drivers/cell/ppu/cell_context.c|  190 --
 src/gallium/drivers/cell/ppu/cell_context.h|  210 --
 src/gallium/drivers/cell/ppu/cell_draw_arrays.c|  113 -
 src/gallium/drivers/cell/ppu/cell_draw_arrays.h|   36 -
 src/gallium/drivers/cell/ppu/cell_fence.c  |  172 --
 src/gallium/drivers/cell/ppu/cell_fence.h  |   60 -
 src/gallium/drivers/cell/ppu/cell_flush.c  |  109 -
 src/gallium/drivers/cell/ppu/cell_flush.h  |   45 -
 src/gallium/drivers/cell/ppu/cell_gen_fp.c | 2036 --
 src/gallium/drivers/cell/ppu/cell_gen_fp.h |   42 -
 src/gallium/drivers/cell/ppu/cell_gen_fragment.c   | 2189 
 src/gallium/drivers/cell/ppu/cell_gen_fragment.h   |   38 -
 src/gallium/drivers/cell/ppu/cell_pipe_state.c |  473 -
 src/gallium/drivers/cell/ppu/cell_pipe_state.h |   39 -
 src/gallium/drivers/cell/ppu/cell_public.h |   10 -
 src/gallium/drivers/cell/ppu/cell_render.c |  211 --
 src/gallium/drivers/cell/ppu/cell_render.h |   39 -
 src/gallium/drivers/cell/ppu/cell_screen.c |  221 --
 src/gallium/drivers/cell/ppu/cell_screen.h |   55 -
 src/gallium/drivers/cell/ppu/cell_spu.c|  219 --
 src/gallium/drivers/cell/ppu/cell_spu.h|   79 -
 src/gallium/drivers/cell/ppu/cell_state.h  |   65 -
 src/gallium/drivers/cell/ppu/cell_state_derived.c  |  170 --
 src/gallium/drivers/cell/ppu/cell_state_emit.c |  343 ---
 src/gallium/drivers/cell/ppu/cell_state_emit.h |   36 -
 .../drivers/cell/ppu/cell_state_per_fragment.c | 1432 -
 .../drivers/cell/ppu/cell_state_per_fragment.h |   39 -
 src/gallium/drivers/cell/ppu/cell_state_shader.c   |  229 --
 src/gallium/drivers/cell/ppu/cell_state_vertex.c   |  120 --
 src/gallium/drivers/cell/ppu/cell_surface.c|   37 -
 src/gallium/drivers/cell/ppu/cell_surface.h|   42 -
 src/gallium/drivers/cell/ppu/cell_texture.c|  644 --
 src/gallium/drivers/cell/ppu/cell_texture.h|  102 -
 src/gallium/drivers/cell/ppu/cell_vbuf.c   |  332 ---
 src/gallium/drivers/cell/ppu/cell_vbuf.h   |   38 -
 src/gallium/drivers/cell/ppu/cell_vertex_fetch.c   |  346 ---
 src/gallium/drivers/cell/ppu/cell_vertex_shader.c  |  145 --
 src/gallium/drivers/cell/spu/.gitignore|1 -
 src/gallium/drivers/cell/spu/Makefile  |   83 -
 src/gallium/drivers/cell/spu/spu_colorpack.h   |  145 --
 src/gallium/drivers/cell/spu/spu_command.c |  810 
 src/gallium/drivers/cell/spu/spu_command.h |   35 -
 src/gallium/drivers/cell/spu/spu_dcache.c  |  145 --
 src/gall

Re: [Mesa-dev] [PATCH 1/2] gallium/auxiliary: Remove os_stream.

2011-11-29 Thread Brian Paul

On 11/29/2011 09:04 AM, jfons...@vmware.com wrote:

From: José Fonseca

XP kernel mode was the only subsystem lacking stdio FILES.
---
  src/gallium/auxiliary/Makefile.sources  |5 -
  src/gallium/auxiliary/os/os_stream.c|   58 -
  src/gallium/auxiliary/os/os_stream.h|  145 ---
  src/gallium/auxiliary/os/os_stream_log.c|   82 -
  src/gallium/auxiliary/os/os_stream_null.c   |   78 -
  src/gallium/auxiliary/os/os_stream_stdc.c   |  122 ---
  src/gallium/auxiliary/os/os_stream_str.c|  167 ---
  src/gallium/auxiliary/util/u_debug.c|   14 +-
  src/gallium/auxiliary/util/u_debug_refcnt.c |   22 ++--
  src/gallium/auxiliary/util/u_dump.h |   48 -
  src/gallium/auxiliary/util/u_dump_state.c   |  103 
  src/gallium/drivers/trace/tr_dump.c |   17 ++--
  12 files changed, 99 insertions(+), 762 deletions(-)
  delete mode 100644 src/gallium/auxiliary/os/os_stream.c
  delete mode 100644 src/gallium/auxiliary/os/os_stream.h
  delete mode 100644 src/gallium/auxiliary/os/os_stream_log.c
  delete mode 100644 src/gallium/auxiliary/os/os_stream_null.c
  delete mode 100644 src/gallium/auxiliary/os/os_stream_stdc.c
  delete mode 100644 src/gallium/auxiliary/os/os_stream_str.c


Looks OK to me.

For the series: Reviewed-by: Brian Paul 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/1] Delete i965g

2011-11-29 Thread Jose Fonseca
- Original Message -
> On Tue, Nov 29, 2011 at 10:12 AM, Jose Fonseca 
> wrote:
> > The bulk is there but there are a few places missing.
> >
> > I'll update those, do some sanity checks and commit.
> >
> > Jose
> 
> Is there a good reason to delete i965g ? 

Hi Jerome,

Yes. Please read he "Re: [Mesa-dev] [PATCH 4/6] gallium: remove PIPE_CAP_GLSL 
and enable GLSL unconditionally" thread and other emails about it today.

The short story is: no one seemed to care about it, it adds unnecessary 
overhead to others when doing interface changes, and it apparently confuses 
users too.

> Maybe some people are interested in it.

Maybe. But interest is not quite enough.  If people willing to develop it ever 
materialize then they can bring the driver to life, by get it working again in 
a branch, and merge back to master, as any other driver.  After all, the driver 
was only deleted from the tip of the master branch. It's not that it was 
deleted from all history...

Master should have stable and/or maintained code.  Everything else should live 
in branches.

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


Re: [Mesa-dev] [PATCH 0/1] Delete i965g

2011-11-29 Thread Jerome Glisse
On Tue, Nov 29, 2011 at 10:12 AM, Jose Fonseca  wrote:
> The bulk is there but there are a few places missing.
>
> I'll update those, do some sanity checks and commit.
>
> Jose

Is there a good reason to delete i965g ? Maybe some people are interested in it.

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


[Mesa-dev] [PATCH 2/2] docs: Removed i965 entry in the source tree listing.

2011-11-29 Thread Kai Wasserbäch
Signed-off-by: Kai Wasserbäch 
---
 docs/sourcetree.html |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/docs/sourcetree.html b/docs/sourcetree.html
index 713e25b..3f100df 100644
--- a/docs/sourcetree.html
+++ b/docs/sourcetree.html
@@ -88,7 +88,6 @@ each directory.
   
   cell - Driver for Cell processor.
   i915 - Driver for Intel i915/i945.
-  i965 - Driver for Intel i965.
   llvmpipe - Software driver using LLVM for runtime code 
generation.
   nv* - Drivers for NVIDIA GPUs.
   r300 - Driver for ATI/AMD R300.
-- 
1.7.7.3

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


[Mesa-dev] [PATCH 0/2] i965g removal: docs update

2011-11-29 Thread Kai Wasserbäch
Dear Jose,
I just noticed, that I forgot to commit/send the following two updates to the
docs together with the removal patch.

Kind regards,
Kai Wasserbäch


Kai Wasserbäch (2):
  docs: Added item to release notes for 7.12.
  docs: Removed i965 entry in the source tree listing.

 docs/relnotes-7.12.html |6 --
 docs/sourcetree.html|1 -
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
1.7.7.3

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


[Mesa-dev] [PATCH 1/2] docs: Added item to release notes for 7.12.

2011-11-29 Thread Kai Wasserbäch
Signed-off-by: Kai Wasserbäch 
---
 docs/relnotes-7.12.html |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/relnotes-7.12.html b/docs/relnotes-7.12.html
index 74279a0..0d22113 100644
--- a/docs/relnotes-7.12.html
+++ b/docs/relnotes-7.12.html
@@ -69,9 +69,11 @@ tbd
   desktop OpenGL, GL_COLOR_INDEX data can still be uploaded
   to a color (e.g., RGBA) texture.  However, the data cannot be stored
   internally as color-index.
-Removed support for GL_APPLE_client_storage extension.
+Removed support for GL_APPLE_client_storage extension.
 Removed the classic Mesa r300 and r600 drivers, which are superseded
-  by the gallium drivers for this hardware.
+  by the gallium drivers for this hardware.
+Removed the i965g driver, which was broken and with nobody in sight to fix
+  the situation
 
 
 
-- 
1.7.7.3

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


[Mesa-dev] [PATCH 2/2] Remove windows kernel support code.

2011-11-29 Thread jfonseca
From: José Fonseca 

Not actively used.
---
 common.py   |2 +-
 scons/gallium.py|  128 +
 src/gallium/auxiliary/os/os_memory.h|4 -
 src/gallium/auxiliary/os/os_memory_win32k.h |  123 ---
 src/gallium/auxiliary/os/os_misc.c  |  120 +--
 src/gallium/auxiliary/os/os_misc.h  |2 +-
 src/gallium/auxiliary/os/os_time.c  |   50 +-
 src/gallium/auxiliary/util/u_atomic.h   |5 +-
 src/gallium/auxiliary/util/u_debug.c|   47 -
 src/gallium/auxiliary/util/u_debug_refcnt.c |2 +-
 src/gallium/auxiliary/util/u_math.h |   68 +-
 src/gallium/auxiliary/util/u_snprintf.c |8 --
 src/gallium/include/pipe/p_config.h |   14 +---
 src/mapi/glapi/SConscript   |  142 +--
 src/mapi/shared-glapi/SConscript|  101 ++--
 src/mapi/vgapi/SConscript   |  110 ++---
 16 files changed, 187 insertions(+), 739 deletions(-)
 delete mode 100644 src/gallium/auxiliary/os/os_memory_win32k.h

diff --git a/common.py b/common.py
index cfee1b5..5e2967f 100644
--- a/common.py
+++ b/common.py
@@ -83,7 +83,7 @@ def AddOptions(opts):
opts.Add(EnumOption('machine', 'use machine-specific assembly code', 
default_machine,

 allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', host_platform,
-   
 allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 
'darwin', 'cygwin', 'sunos', 'freebsd8')))
+   
 allowed_values=('linux', 'cell', 'windows', 'darwin', 'cygwin', 
'sunos', 'freebsd8')))
opts.Add(BoolOption('embedded', 'embedded build', 'no'))
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 
'no'))
diff --git a/scons/gallium.py b/scons/gallium.py
index 9651925..3cebaf5 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -113,11 +113,6 @@ def generate(env):
 
 # Toolchain
 platform = env['platform']
-if env['toolchain'] == 'default':
-if platform == 'winddk':
-env['toolchain'] = 'winddk'
-elif platform == 'wince':
-env['toolchain'] = 'wcesdk'
 env.Tool(env['toolchain'])
 
 # Allow override compiler and specify additional flags from environment
@@ -281,7 +276,7 @@ def generate(env):
 ]
 if gcc:
 cppdefines += [('__MSVCRT_VERSION__', '0x0700')]
-if msvc and env['toolchain'] != 'winddk':
+if msvc:
 cppdefines += [
 'VC_EXTRALEAN',
 '_USE_MATH_DEFINES',
@@ -292,57 +287,8 @@ def generate(env):
 ]
 if env['build'] in ('debug', 'checked'):
 cppdefines += ['_DEBUG']
-if env['toolchain'] == 'winddk':
-# Mimic WINDDK's builtin flags. See also:
-# - WINDDK's bin/makefile.new i386mk.inc for more info.
-# - buildchk_wxp_x86.log files, generated by the WINDDK's build
-# - http://alter.org.ua/docs/nt_kernel/vc8_proj/
-if machine == 'x86':
-cppdefines += ['_X86_', 'i386']
-if machine == 'x86_64':
-cppdefines += ['_AMD64_', 'AMD64']
-if platform == 'winddk':
-cppdefines += [
-'STD_CALL',
-('CONDITION_HANDLING', '1'),
-('NT_INST', '0'),
-('WIN32', '100'),
-('_NT1X_', '100'),
-('WINNT', '1'),
-('_WIN32_WINNT', '0x0501'), # minimum required OS version
-('WINVER', '0x0501'),
-('_WIN32_IE', '0x0603'),
-('WIN32_LEAN_AND_MEAN', '1'),
-('DEVL', '1'),
-('__BUILDMACHINE__', 'WinDDK'),
-('FPO', '0'),
-]
-if env['build'] in ('debug', 'checked'):
-cppdefines += [('DBG', 1)]
-if platform == 'wince':
-cppdefines += [
-'_CRT_SECURE_NO_DEPRECATE',
-'_USE_32BIT_TIME_T',
-'UNICODE',
-'_UNICODE',
-('UNDER_CE', '600'),
-('_WIN32_WCE', '0x600'),
-'WINCEOEM',
-'WINCEINTERNAL',
-'WIN32',
-'STRICT',
-'x86',
-'_X86_',
-'INTERNATIONAL',
-('INTLMSG_CODEPAGE', '1252'),
-]
 if platform == 'windows':
 cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
-if platform == 'winddk':
-cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_DISPLAY']
-if platform == 'wince':
-cppdefines += ['PIPE_SUBSYSTEM_WIN

[Mesa-dev] [PATCH 1/2] gallium/auxiliary: Remove os_stream.

2011-11-29 Thread jfonseca
From: José Fonseca 

XP kernel mode was the only subsystem lacking stdio FILES.
---
 src/gallium/auxiliary/Makefile.sources  |5 -
 src/gallium/auxiliary/os/os_stream.c|   58 -
 src/gallium/auxiliary/os/os_stream.h|  145 ---
 src/gallium/auxiliary/os/os_stream_log.c|   82 -
 src/gallium/auxiliary/os/os_stream_null.c   |   78 -
 src/gallium/auxiliary/os/os_stream_stdc.c   |  122 ---
 src/gallium/auxiliary/os/os_stream_str.c|  167 ---
 src/gallium/auxiliary/util/u_debug.c|   14 +-
 src/gallium/auxiliary/util/u_debug_refcnt.c |   22 ++--
 src/gallium/auxiliary/util/u_dump.h |   48 -
 src/gallium/auxiliary/util/u_dump_state.c   |  103 
 src/gallium/drivers/trace/tr_dump.c |   17 ++--
 12 files changed, 99 insertions(+), 762 deletions(-)
 delete mode 100644 src/gallium/auxiliary/os/os_stream.c
 delete mode 100644 src/gallium/auxiliary/os/os_stream.h
 delete mode 100644 src/gallium/auxiliary/os/os_stream_log.c
 delete mode 100644 src/gallium/auxiliary/os/os_stream_null.c
 delete mode 100644 src/gallium/auxiliary/os/os_stream_stdc.c
 delete mode 100644 src/gallium/auxiliary/os/os_stream_str.c

diff --git a/src/gallium/auxiliary/Makefile.sources 
b/src/gallium/auxiliary/Makefile.sources
index f1f3696..15de20c 100644
--- a/src/gallium/auxiliary/Makefile.sources
+++ b/src/gallium/auxiliary/Makefile.sources
@@ -37,11 +37,6 @@ C_SOURCES := \
draw/draw_vs_ppc.c \
draw/draw_vs_variant.c \
os/os_misc.c \
-   os/os_stream.c \
-   os/os_stream_log.c \
-   os/os_stream_null.c \
-   os/os_stream_stdc.c \
-   os/os_stream_str.c \
os/os_time.c \
pipebuffer/pb_buffer_fenced.c \
pipebuffer/pb_buffer_malloc.c \
diff --git a/src/gallium/auxiliary/os/os_stream.c 
b/src/gallium/auxiliary/os/os_stream.c
deleted file mode 100644
index 3c55fc0..000
--- a/src/gallium/auxiliary/os/os_stream.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * Copyright 2010 Luca Barbieri
- *
- * 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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS 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.
- *
- **/
-
-#include "pipe/p_config.h"
-
-#include "os_stream.h"
-#include "util/u_memory.h"
-#include "util/u_string.h"
-
-int
-os_default_stream_vprintf (struct os_stream* stream, const char *format, 
va_list ap)
-{
-   char buf[1024];
-   int retval;
-   va_list ap2;
-   va_copy(ap2, ap);
-   retval = util_vsnprintf(buf, sizeof(buf), format, ap2);
-   va_end(ap2);
-   if(retval <= 0)
-   {}
-   else if(retval < sizeof(buf))
-  stream->write(stream, buf, retval);
-   else
-   {
-  char* str = MALLOC(retval + 1);
-  if(!str)
- return -1;
-  retval = util_vsnprintf(str, retval + 1, format, ap);
-  if(retval > 0)
- stream->write(stream, str, retval);
-  FREE(str);
-   }
-
-   return retval;
-}
diff --git a/src/gallium/auxiliary/os/os_stream.h 
b/src/gallium/auxiliary/os/os_stream.h
deleted file mode 100644
index 6c6050b..000
--- a/src/gallium/auxiliary/os/os_stream.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- *
- * Copyright 2008-2010 VMware, Inc.
- * All Rights Reserved.
- *
- * 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, sub license, 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 

Re: [Mesa-dev] [PATCH 0/1] Delete i965g

2011-11-29 Thread Jose Fonseca
The bulk is there but there are a few places missing.

I'll update those, do some sanity checks and commit.

Jose

- Original Message -
> Dear mesa-dev list,
> Kai Wasserbäch schrieb am 29.11.2011 15:17:
> > Kai Wasserbäch (1):
> >   i965g: Delete this driver, it is broken.
> 
> the patch itself is held in moderation because it exceeds 128 KB,
> didn't know
> there was a limit. I've uploaded the mbox file to [0] for immediate
> review and
> hope somebody will release the e-mail from the moderation queue.
> 
> Kind regards,
> Kai Wasserbäch
> 
> 
> [0]
> 
> 
> 
> 
> --
> 
> Kai Wasserbäch (Kai Wasserbaech)
> 
> E-Mail: k...@dev.carbon-project.org
> 
> 
> ___
> 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] mesa: add STATIC_ASSERT() macro for compile-time assertions

2011-11-29 Thread Jose Fonseca
Brian,

The whole series looks a nice cleanup to me.

I haven't tried to compile this on MSVC, but it looks ordinary C, so it should 
be alright.

Jose

- Original Message -
> This can be used to check that tables have the right number of
> entries,
> etc. at compile-time.  This will hopefully catch things that are
> missed
> if particular drivers aren't tested, for example.
> 
> v2: Simplify the macro to omit the extra line number info (the
> compiler
> already indicates the line number).  And wrap the macro for
> readability.
> ---
>  src/mesa/main/compiler.h |   12 
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
> index 921e302..25d9810 100644
> --- a/src/mesa/main/compiler.h
> +++ b/src/mesa/main/compiler.h
> @@ -310,6 +310,18 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
>  #endif
>  #endif
>  
> +
> +/**
> + * Static (compile-time) assertion.
> + * Basically, use COND to dimension an array.  If COND is false/zero
> the
> + * array size will be -1 and we'll get a compilation error.
> + */
> +#define STATIC_ASSERT(COND) \
> +   do { \
> +  typedef int static_assertion_failed[(!!(COND))*2-1]; \
> +   } while (0)
> +
> +
>  #if (__GNUC__ >= 3)
>  #define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
>  #else
> --
> 1.7.3.4
> 
> ___
> 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] mesa: fix MESA_FORMAT_RG88 format match test

2011-11-29 Thread Brian Paul
---
 src/mesa/main/formats.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index d3b12d0..9374f00 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -2596,7 +2596,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_R8:
   return format == GL_RED && type == GL_UNSIGNED_BYTE;
case MESA_FORMAT_RG88:
-  return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && 
littleEndian;
+  return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
case MESA_FORMAT_RG88_REV:
   return GL_FALSE;
 
-- 
1.7.3.4

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


Re: [Mesa-dev] [PATCH 0/1] Delete i965g

2011-11-29 Thread Kai Wasserbäch
Dear mesa-dev list,
Kai Wasserbäch schrieb am 29.11.2011 15:17:
> Kai Wasserbäch (1):
>   i965g: Delete this driver, it is broken.

the patch itself is held in moderation because it exceeds 128 KB, didn't know
there was a limit. I've uploaded the mbox file to [0] for immediate review and
hope somebody will release the e-mail from the moderation queue.

Kind regards,
Kai Wasserbäch


[0]




-- 

Kai Wasserbäch (Kai Wasserbaech)

E-Mail: k...@dev.carbon-project.org



signature.asc
Description: OpenPGP digital signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/1] Delete i965g

2011-11-29 Thread Kai Wasserbäch

Dear mesa-dev list,
I prepared a patch, that should delete the i965g driver. I hope I didn't miss
something. It would be _very_ good if someone with more Mesa/Gallium3D
experience could have a look at this.

Please note, that I don't have commit access to Mesa's Git repository. In case
you accept this patch, someone with access would have to commit it in my stead.

Kind regards,
Kai Wasserbäch


Kai Wasserbäch (1):
  i965g: Delete this driver, it is broken.

 configure.ac   |   14 -
 src/gallium/drivers/i965/Makefile  |   74 -
 src/gallium/drivers/i965/SConscript|   79 -
 src/gallium/drivers/i965/brw_batchbuffer.c |  200 --
 src/gallium/drivers/i965/brw_batchbuffer.h |  147 --
 src/gallium/drivers/i965/brw_cc.c  |  129 --
 src/gallium/drivers/i965/brw_clip.c|  221 ---
 src/gallium/drivers/i965/brw_clip.h|  197 --
 src/gallium/drivers/i965/brw_clip_line.c   |  272 ---
 src/gallium/drivers/i965/brw_clip_point.c  |   47 -
 src/gallium/drivers/i965/brw_clip_state.c  |  209 --
 src/gallium/drivers/i965/brw_clip_tri.c|  596 --
 src/gallium/drivers/i965/brw_clip_unfilled.c   |  497 -
 src/gallium/drivers/i965/brw_clip_util.c   |  391 
 src/gallium/drivers/i965/brw_context.c |  162 --
 src/gallium/drivers/i965/brw_context.h |  865 
 src/gallium/drivers/i965/brw_curbe.c   |  382 
 src/gallium/drivers/i965/brw_debug.h   |   43 -
 src/gallium/drivers/i965/brw_defines.h | 1166 ---
 src/gallium/drivers/i965/brw_disasm.c  | 1023 --
 src/gallium/drivers/i965/brw_disasm.h  |   36 -
 src/gallium/drivers/i965/brw_draw.c|  254 ---
 src/gallium/drivers/i965/brw_draw.h|   39 -
 src/gallium/drivers/i965/brw_draw_upload.c |  359 
 src/gallium/drivers/i965/brw_eu.c  |  262 ---
 src/gallium/drivers/i965/brw_eu.h  |  992 --
 src/gallium/drivers/i965/brw_eu_debug.c|   94 -
 src/gallium/drivers/i965/brw_eu_emit.c | 1433 --
 src/gallium/drivers/i965/brw_eu_util.c |  126 --
 src/gallium/drivers/i965/brw_gs.c  |  215 --
 src/gallium/drivers/i965/brw_gs.h  |   76 -
 src/gallium/drivers/i965/brw_gs_emit.c |  180 --
 src/gallium/drivers/i965/brw_gs_state.c|  169 --
 src/gallium/drivers/i965/brw_misc_state.c  |  514 -
 src/gallium/drivers/i965/brw_pipe_blend.c  |  208 --
 src/gallium/drivers/i965/brw_pipe_clear.c  |  270 ---
 src/gallium/drivers/i965/brw_pipe_depth.c  |  187 --
 src/gallium/drivers/i965/brw_pipe_fb.c |   84 -
 src/gallium/drivers/i965/brw_pipe_flush.c  |   56 -
 src/gallium/drivers/i965/brw_pipe_misc.c   |   54 -
 src/gallium/drivers/i965/brw_pipe_query.c  |  264 ---
 src/gallium/drivers/i965/brw_pipe_rast.c   |  188 --
 src/gallium/drivers/i965/brw_pipe_rast.h   |   16 -
 src/gallium/drivers/i965/brw_pipe_sampler.c|  259 ---
 src/gallium/drivers/i965/brw_pipe_shader.c |  303 ---
 src/gallium/drivers/i965/brw_pipe_surface.c|  258 ---
 src/gallium/drivers/i965/brw_pipe_vertex.c |  329 
 src/gallium/drivers/i965/brw_public.h  |   13 -
 src/gallium/drivers/i965/brw_reg.h |  151 --
 src/gallium/drivers/i965/brw_resource.c|   52 -
 src/gallium/drivers/i965/brw_resource.h|  152 --
 src/gallium/drivers/i965/brw_resource_buffer.c |  182 --
 src/gallium/drivers/i965/brw_resource_texture.c|  555 --
 .../drivers/i965/brw_resource_texture_layout.c |  414 
 src/gallium/drivers/i965/brw_screen.c  |  460 -
 src/gallium/drivers/i965/brw_screen.h  |  104 -
 src/gallium/drivers/i965/brw_sf.c  |  216 --
 src/gallium/drivers/i965/brw_sf.h  |  122 --
 src/gallium/drivers/i965/brw_sf_emit.c |  764 ---
 src/gallium/drivers/i965/brw_sf_state.c|  331 
 src/gallium/drivers/i965/brw_state.h   |  174 --
 src/gallium/drivers/i965/brw_state_batch.c |   98 -
 src/gallium/drivers/i965/brw_state_cache.c |  617 --
 src/gallium/drivers/i965/brw_state_debug.c |  153 --
 src/gallium/drivers/i965/brw_state_upload.c|  270 ---
 src/gallium/drivers/i965/brw_structs.h | 1776 -
 src/gallium/drivers/i965/brw_structs_dump.c| 1247 
 src/gallium/drivers/i965/brw_structs_dump.h|  276 ---
 src/gallium/drivers/i965/brw_structs_dump.py   |  291 ---
 src/gallium/drivers/i965/brw_swtnl.c   |   95 -
 src/gallium/drivers/i965/brw_types.h   |   21 -
 src/gallium/drivers/i965/brw_urb.

Re: [Mesa-dev] Latest Git broken? error: 'struct gl_array_object' has no member named 'PointSize'

2011-11-29 Thread Theiss, Ingo
 
Am Dienstag, 29. November 2011 10:27 CET, Chia-I Wu  
schrieb: 
 
> On Tue, Nov 29, 2011 at 5:14 PM, Theiss, Ingo  
> wrote:
> > Dear devs,
> >
> > is it possible that the current git is broken? After my daily git pull I am 
> > no longer able to build mesa.
> > Here is the error which breaks my build:
> It should be fixed now.

Thanks. It´s working.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Latest Git broken? error: 'struct gl_array_object' has no member named 'PointSize'

2011-11-29 Thread Chia-I Wu
On Tue, Nov 29, 2011 at 5:14 PM, Theiss, Ingo  wrote:
> Dear devs,
>
> is it possible that the current git is broken? After my daily git pull I am 
> no longer able to build mesa.
> Here is the error which breaks my build:
It should be fixed now.
> ---
> gcc -c -o main/ffvertex_prog.o main/ffvertex_prog.c -DFEATURE_GL=1 
> -DFEATURE_ES1=1 -DFEATURE_ES2=1 -D_GNU_SOURCE -DPTHREADS 
> -DTEXTURE_FLOAT_ENABLED -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING 
> -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 
> -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2 
> -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -D__STDC_CONSTANT_MACROS 
> -DHAVE_LLVM=0x0208 -I../../include -I../../src/glsl -I../../src/mesa 
> -I../../src/mapi -I../../src/gallium/include -I../../src/gallium/auxiliary 
> -I/opt/llvm/include   -D_GNU_SOURCE -D__STDC_LIMIT_MACROS 
> -D__STDC_CONSTANT_MACROS -I/opt/llvm/include -O3 -Wall -m32 -march=native 
> -mtune=native -Wall -Wmissing-prototypes -std=c99 -ffast-math 
> -fno-strict-aliasing -fno-builtin-memcmp -m32 -O3 -Wall -m32 -march=native 
> -mtune=native -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM 
> -DUSE_SSE_ASM -fvisibility=hidden
> main/ffvertex_prog.c: In function 'make_state_key'
> main/ffvertex_prog.c:233:27: error: 'struct gl_array_object' has no member 
> named 'PointSize'
> make[2]: *** [main/ffvertex_prog.o] Error 1
> ---
>
> Regards,
>
> Ingo
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



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


[Mesa-dev] Latest Git broken? error: 'struct gl_array_object' has no member named 'PointSize'

2011-11-29 Thread Theiss, Ingo
Dear devs,

is it possible that the current git is broken? After my daily git pull I am no 
longer able to build mesa.
Here is the error which breaks my build:

---
gcc -c -o main/ffvertex_prog.o main/ffvertex_prog.c -DFEATURE_GL=1 
-DFEATURE_ES1=1 -DFEATURE_ES2=1 -D_GNU_SOURCE -DPTHREADS 
-DTEXTURE_FLOAT_ENABLED -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING 
-DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 
-DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2 
-DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -D__STDC_CONSTANT_MACROS 
-DHAVE_LLVM=0x0208 -I../../include -I../../src/glsl -I../../src/mesa 
-I../../src/mapi -I../../src/gallium/include -I../../src/gallium/auxiliary 
-I/opt/llvm/include   -D_GNU_SOURCE -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS -I/opt/llvm/include -O3 -Wall -m32 -march=native 
-mtune=native -Wall -Wmissing-prototypes -std=c99 -ffast-math 
-fno-strict-aliasing -fno-builtin-memcmp -m32 -O3 -Wall -m32 -march=native 
-mtune=native -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM 
-DUSE_SSE_ASM -fvisibility=hidden
main/ffvertex_prog.c: In function 'make_state_key'
main/ffvertex_prog.c:233:27: error: 'struct gl_array_object' has no member 
named 'PointSize'
make[2]: *** [main/ffvertex_prog.o] Error 1
---

Regards,

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


[Mesa-dev] [PATCH 4/4] i965: increase the brw eu instruction store size dynamically

2011-11-29 Thread Yuanhan Liu
Increase the brw eu instruction store size dynamically instead of just
allocating it statically with a constant limit. This would fix something
that 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would
limit it to 1'.

Signed-off-by: Yuanhan Liu 
---
 src/mesa/drivers/dri/i965/brw_eu.c  |7 +++
 src/mesa/drivers/dri/i965/brw_eu.h  |7 ---
 src/mesa/drivers/dri/i965/brw_eu_emit.c |   12 +++-
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.c 
b/src/mesa/drivers/dri/i965/brw_eu.c
index d6e5c09..3de2a1e 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -174,6 +174,13 @@ void
 brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx)
 {
p->brw = brw;
+   /*
+* Set the initial instruction store array size to 1024, if found that
+* isn't enough, then it will double the store size at brw_next_insn()
+* until it meet the BRW_EU_MAX_INSN
+*/
+   p->store_size = 1024;
+   p->store = rzalloc_array(mem_ctx, struct brw_instruction, p->store_size);
p->nr_insn = 0;
p->current = p->stack;
p->compressed = false;
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h 
b/src/mesa/drivers/dri/i965/brw_eu.h
index 9bc8a76..cb5bf2a 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -100,11 +100,12 @@ struct brw_glsl_call;
 
 
 
-#define BRW_EU_MAX_INSN_STACK 5
-#define BRW_EU_MAX_INSN 1
+#define BRW_EU_MAX_INSN_STACK   5
+#define BRW_EU_MAX_INSN (1024 * 1024)
 
 struct brw_compile {
-   struct brw_instruction store[BRW_EU_MAX_INSN];
+   struct brw_instruction *store;
+   GLuint store_size;
GLuint nr_insn;
 
void *mem_ctx;
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c 
b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index b9feb7d..782261f 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -688,7 +688,17 @@ brw_next_insn(struct brw_compile *p, GLuint opcode)
 {
struct brw_instruction *insn;
 
-   assert(p->nr_insn + 1 < BRW_EU_MAX_INSN);
+   if (p->nr_insn + 1 > p->store_size) {
+  if (p->nr_insn + 1 > BRW_EU_MAX_INSN) {
+ assert(!"exceed max brw allowed eu instructions");
+  } else {
+ if (0)
+printf("incresing the store size to %d\n", p->store_size << 1);
+ p->store_size <<= 1;
+ p->store = reralloc(p->mem_ctx, p->store,
+ struct brw_instruction, p->store_size);
+  }
+   }
 
insn = &p->store[p->nr_insn++];
memcpy(insn, p->current, sizeof(*insn));
-- 
1.7.4.4

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


[Mesa-dev] [PATCH 3/4] i965: let if_stack just store the instruction index

2011-11-29 Thread Yuanhan Liu
Let if_stack just store the instruction pointer(an index). This is
somehow more flexible than store the instruction memory address.

This patch is mainly for the next patch.

Signed-off-by: Yuanhan Liu 
---
 src/mesa/drivers/dri/i965/brw_eu.c  |3 +--
 src/mesa/drivers/dri/i965/brw_eu.h  |4 +++-
 src/mesa/drivers/dri/i965/brw_eu_emit.c |   16 
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.c 
b/src/mesa/drivers/dri/i965/brw_eu.c
index b5a858b..d6e5c09 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -191,8 +191,7 @@ brw_init_compile(struct brw_context *brw, struct 
brw_compile *p, void *mem_ctx)
/* Set up control flow stack */
p->if_stack_depth = 0;
p->if_stack_array_size = 16;
-   p->if_stack =
-  rzalloc_array(mem_ctx, struct brw_instruction *, p->if_stack_array_size);
+   p->if_stack = rzalloc_array(mem_ctx, GLuint, p->if_stack_array_size);
 }
 
 
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h 
b/src/mesa/drivers/dri/i965/brw_eu.h
index 8a446eb..9bc8a76 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -123,8 +123,10 @@ struct brw_compile {
/* Control flow stacks:
 * - if_stack contains IF and ELSE instructions which must be patched
 *   (and popped) once the matching ENDIF instruction is encountered.
+*
+*   Just store the instruction pointer(an index).
 */
-   struct brw_instruction **if_stack;
+   GLuint *if_stack;
int if_stack_depth;
int if_stack_array_size;
 
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c 
b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 60350ca..b9feb7d 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -896,14 +896,14 @@ struct brw_instruction *brw_JMPI(struct brw_compile *p,
 }
 
 static void
-push_if_stack(struct brw_compile *p, struct brw_instruction *inst)
+push_if_stack(struct brw_compile *p, GLuint inst)
 {
p->if_stack[p->if_stack_depth] = inst;
 
p->if_stack_depth++;
if (p->if_stack_array_size <= p->if_stack_depth) {
   p->if_stack_array_size *= 2;
-  p->if_stack = reralloc(p->mem_ctx, p->if_stack, struct brw_instruction *,
+  p->if_stack = reralloc(p->mem_ctx, p->if_stack, GLuint,
 p->if_stack_array_size);
}
 }
@@ -957,7 +957,7 @@ brw_IF(struct brw_compile *p, GLuint execute_size)
 
p->current->header.predicate_control = BRW_PREDICATE_NONE;
 
-   push_if_stack(p, insn);
+   push_if_stack(p, p->nr_insn - 1);
return insn;
 }
 
@@ -989,7 +989,7 @@ gen6_IF(struct brw_compile *p, uint32_t conditional,
if (!p->single_program_flow)
   insn->header.thread_control = BRW_THREAD_SWITCH;
 
-   push_if_stack(p, insn);
+   push_if_stack(p, p->nr_insn - 1);
return insn;
 }
 
@@ -1139,7 +1139,7 @@ brw_ELSE(struct brw_compile *p)
if (!p->single_program_flow)
   insn->header.thread_control = BRW_THREAD_SWITCH;
 
-   push_if_stack(p, insn);
+   push_if_stack(p, p->nr_insn - 1);
 }
 
 void
@@ -1152,11 +1152,11 @@ brw_ENDIF(struct brw_compile *p)
 
/* Pop the IF and (optional) ELSE instructions from the stack */
p->if_stack_depth--;
-   if (p->if_stack[p->if_stack_depth]->header.opcode == BRW_OPCODE_ELSE) {
-  else_inst = p->if_stack[p->if_stack_depth];
+   if (p->store[p->if_stack[p->if_stack_depth]].header.opcode == 
BRW_OPCODE_ELSE) {
+  else_inst = &p->store[p->if_stack[p->if_stack_depth]];
   p->if_stack_depth--;
}
-   if_inst = p->if_stack[p->if_stack_depth];
+   if_inst = &p->store[p->if_stack[p->if_stack_depth]];
 
if (p->single_program_flow) {
   /* ENDIF is useless; don't bother emitting it. */
-- 
1.7.4.4

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


[Mesa-dev] [PATCH 2/4] i965: remove the unused function current_insn()

2011-11-29 Thread Yuanhan Liu
I didn't find anywhere use it anymore, remove it.

Signed-off-by: Yuanhan Liu 
---
 src/mesa/drivers/dri/i965/brw_eu.h |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.h 
b/src/mesa/drivers/dri/i965/brw_eu.h
index dcb1fc9..8a446eb 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -781,11 +781,6 @@ brw_same_reg(struct brw_reg r1, struct brw_reg r2)
return r1.file == r2.file && r1.nr == r2.nr;
 }
 
-static INLINE struct brw_instruction *current_insn( struct brw_compile *p)
-{
-   return &p->store[p->nr_insn];
-}
-
 void brw_pop_insn_state( struct brw_compile *p );
 void brw_push_insn_state( struct brw_compile *p );
 void brw_set_mask_control( struct brw_compile *p, GLuint value );
-- 
1.7.4.4

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


[Mesa-dev] [PATCH 1/4] glx: remove the unused var

2011-11-29 Thread Yuanhan Liu
Silence the compile warning

Signed-off-by: Yuanhan Liu 
---
 src/glx/drisw_glx.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index a150c61..7ba491b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -304,7 +304,6 @@ drisw_bind_tex_image(Display * dpy,
struct glx_context *gc = __glXGetCurrentContext();
struct drisw_context *pcp = (struct drisw_context *) gc;
__GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
-   struct glx_display *dpyPriv = __glXInitialize(dpy);
struct drisw_drawable *pdraw = (struct drisw_drawable *) base;
struct drisw_screen *psc;
 
-- 
1.7.4.4

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