[Mesa-dev] [Bug 80848] [dri3] Building mesa fails with dri3 enabled
https://bugs.freedesktop.org/show_bug.cgi?id=80848 --- Comment #28 from Juha-Pekka Heikkilä juhapekka.heikk...@gmail.com --- Created attachment 110039 -- https://bugs.freedesktop.org/attachment.cgi?id=110039action=edit log of failed dri3 build with Emil's patch included Here is the log with Emil's patch included. Log contain everything make install produced. My mesa head was at 60f011af1a370004333cbc3fee7fec137ebd9d6a -- 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 77449] Tracker bug for all bugs related to Steam titles
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Felix Schwarz felix.schw...@oss.schwarz.eu changed: What|Removed |Added Depends on||86720 -- 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/7] util: Move u_atomic.h to src/util and modify API
On 26/11/14 01:01, Matt Turner wrote: On Mon, Nov 24, 2014 at 4:39 PM, Matt Turner matts...@gmail.com wrote: I've got some thread-safety fixes queued up after this and thought I'd be a good Mesa citizen and pull some code into src/util. I did some clean ups like replacing INLINE (MSVC knows about inline these days, right?) and used stdbool.h instead of the boolean type. I also removed the inline assembly implementations because they were either dead code, or only allowed *ancient* gcc to build Mesa and because I didn't want to update them for the next patch, which makes the API consist of some macros that internally do the right operation based on the type. The last patch looks funky, but I think it's actually a reasonable solution. I don't have MSVC or Sun Studio, so please give this a test. With José's fixes merged in, I've pushed a branch to git://people.freedesktop.org/~mattst88/mesa thread-safe Feel free to ignore the patches on top of this series. Looks great. Reviewed-by: Jose Fonseca jfons...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] Add support for following Texture Float extensions.
This patch is based on initial work done by Kevin Rogovin here: http://lists.freedesktop.org/archives/mesa-dev/2014-May/059012.html Piglit tests can be found here: http://lists.freedesktop.org/archives/piglit/2014-July/011964.html The main changes in this patch are: 1)Add boolean flags to toggle On/Off different float extensions. 2)Add support to check filter and texture completeness. Kalyan Kondapally (1): Add support for following Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear. src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] Add support for following Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear.
Support for these extensions need to be explicitly enabled per driver and this patch enables support for i965 drivers. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com Signed-off-by: Kalyan Kondapally kalyan.kondapa...@intel.com --- src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 76f..e95eaef 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -245,6 +245,12 @@ intelInitExtensions(struct gl_context *ctx) ctx-Extensions.OES_standard_derivatives = true; ctx-Extensions.OES_EGL_image_external = true; + bool enable_opengles2_extensions = ctx-API == API_OPENGLES2; + ctx-Extensions.OES_texture_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_float_linear = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float_linear = enable_opengles2_extensions; + if (brw-gen = 6) ctx-Const.GLSLVersion = 330; else diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 0df04c2..6833fcf 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -314,6 +314,10 @@ static const struct extension extension_table[] = { { GL_OES_texture_3D, o(EXT_texture3D), ES2, 2005 }, { GL_OES_texture_cube_map,o(ARB_texture_cube_map), ES1, 2007 }, { GL_OES_texture_env_crossbar, o(ARB_texture_env_crossbar), ES1, 2005 }, + { GL_OES_texture_float, o(OES_texture_float), ES2, 2005 }, + { GL_OES_texture_float_linear, o(OES_texture_float_linear), ES2, 2005 }, + { GL_OES_texture_half_float, o(OES_texture_half_float), ES2, 2005 }, + { GL_OES_texture_half_float_linear, o(OES_texture_half_float_linear), ES2, 2005 }, { GL_OES_texture_mirrored_repeat, o(dummy_true), ES1, 2005 }, { GL_OES_texture_npot, o(ARB_texture_non_power_of_two), ES1 | ES2, 2005 }, { GL_OES_vertex_array_object, o(dummy_true), ES1 | ES2, 2010 }, diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 00478f9..efb1e2e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -93,6 +93,7 @@ _mesa_sizeof_type(GLenum type) case GL_DOUBLE: return sizeof(GLdouble); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FIXED: return sizeof(GLfixed); @@ -125,6 +126,7 @@ _mesa_sizeof_packed_type(GLenum type) case GL_INT: return sizeof(GLint); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FLOAT: return sizeof(GLfloat); @@ -241,6 +243,7 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type) case GL_FLOAT: return comps * sizeof(GLfloat); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: @@ -1448,6 +1451,19 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, } return GL_NO_ERROR; + case GL_HALF_FLOAT_OES: + switch (format) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE: + case GL_ALPHA: + return GL_NO_ERROR; + default: + return GL_INVALID_OPERATION; + } + + default: ; /* fall-through */ } @@ -1775,14 +1791,14 @@ _mesa_es_error_check_format_and_type(GLenum format, GLenum type, return type_valid ? GL_NO_ERROR : GL_INVALID_OPERATION; } - /** * Do error checking of format/type combinations for OpenGL ES 3 * glTex[Sub]Image. * \return error code, or GL_NO_ERROR. */ GLenum -_mesa_es3_error_check_format_and_type(GLenum format, GLenum type, +_mesa_es3_error_check_format_and_type(const struct gl_context *ctx, + GLenum format, GLenum type,
Re: [Mesa-dev] [PATCH] Add support for following Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear.
Hi, Please ignore this patch. Will re-send with the commit message fixed. Thanks, Kalyan On Wed, Nov 26, 2014 at 5:31 AM, Kalyan Kondapally kondapallykalyancontrib...@gmail.com wrote: Support for these extensions need to be explicitly enabled per driver and this patch enables support for i965 drivers. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com Signed-off-by: Kalyan Kondapally kalyan.kondapa...@intel.com --- src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 76f..e95eaef 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -245,6 +245,12 @@ intelInitExtensions(struct gl_context *ctx) ctx-Extensions.OES_standard_derivatives = true; ctx-Extensions.OES_EGL_image_external = true; + bool enable_opengles2_extensions = ctx-API == API_OPENGLES2; + ctx-Extensions.OES_texture_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_float_linear = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float_linear = enable_opengles2_extensions; + if (brw-gen = 6) ctx-Const.GLSLVersion = 330; else diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 0df04c2..6833fcf 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -314,6 +314,10 @@ static const struct extension extension_table[] = { { GL_OES_texture_3D, o(EXT_texture3D), ES2, 2005 }, { GL_OES_texture_cube_map,o(ARB_texture_cube_map), ES1, 2007 }, { GL_OES_texture_env_crossbar, o(ARB_texture_env_crossbar), ES1, 2005 }, + { GL_OES_texture_float, o(OES_texture_float), ES2, 2005 }, + { GL_OES_texture_float_linear, o(OES_texture_float_linear), ES2, 2005 }, + { GL_OES_texture_half_float, o(OES_texture_half_float), ES2, 2005 }, + { GL_OES_texture_half_float_linear, o(OES_texture_half_float_linear), ES2, 2005 }, { GL_OES_texture_mirrored_repeat, o(dummy_true), ES1, 2005 }, { GL_OES_texture_npot, o(ARB_texture_non_power_of_two), ES1 | ES2, 2005 }, { GL_OES_vertex_array_object, o(dummy_true), ES1 | ES2, 2010 }, diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 00478f9..efb1e2e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -93,6 +93,7 @@ _mesa_sizeof_type(GLenum type) case GL_DOUBLE: return sizeof(GLdouble); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FIXED: return sizeof(GLfixed); @@ -125,6 +126,7 @@ _mesa_sizeof_packed_type(GLenum type) case GL_INT: return sizeof(GLint); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FLOAT: return sizeof(GLfloat); @@ -241,6 +243,7 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type) case GL_FLOAT: return comps * sizeof(GLfloat); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: @@ -1448,6 +1451,19 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, } return GL_NO_ERROR; + case GL_HALF_FLOAT_OES: + switch (format) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE: + case GL_ALPHA: + return GL_NO_ERROR; + default: + return GL_INVALID_OPERATION; + } + + default: ; /* fall-through */ } @@ -1775,14 +1791,14 @@ _mesa_es_error_check_format_and_type(GLenum format, GLenum type, return type_valid ? GL_NO_ERROR : GL_INVALID_OPERATION; } - /** * Do error checking of format/type combinations for OpenGL ES 3 *
[Mesa-dev] [PATCH] Add support for GLES2 Texture Float extensions.
This patch is based on initial work done by Kevin Rogovin here: http://lists.freedesktop.org/archives/mesa-dev/2014-May/059012.html Piglit tests can be found here: http://lists.freedesktop.org/archives/piglit/2014-July/011964.html The main changes in this patch are: 1)Add boolean flags to toggle On/Off different float extensions. 2)Add support to check filter and texture completeness. Kalyan Kondapally (1): Add support for Texture Float extensions. src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] Add support for Texture Float extensions.
This patch adds support for following GLES2 Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear. Support for these extensions need to be explicitly enabled per driver and this patch enables support for i965 drivers. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com Signed-off-by: Kalyan Kondapally kalyan.kondapa...@intel.com --- src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 76f..e95eaef 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -245,6 +245,12 @@ intelInitExtensions(struct gl_context *ctx) ctx-Extensions.OES_standard_derivatives = true; ctx-Extensions.OES_EGL_image_external = true; + bool enable_opengles2_extensions = ctx-API == API_OPENGLES2; + ctx-Extensions.OES_texture_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_float_linear = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float_linear = enable_opengles2_extensions; + if (brw-gen = 6) ctx-Const.GLSLVersion = 330; else diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 0df04c2..6833fcf 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -314,6 +314,10 @@ static const struct extension extension_table[] = { { GL_OES_texture_3D, o(EXT_texture3D), ES2, 2005 }, { GL_OES_texture_cube_map,o(ARB_texture_cube_map), ES1, 2007 }, { GL_OES_texture_env_crossbar, o(ARB_texture_env_crossbar), ES1, 2005 }, + { GL_OES_texture_float, o(OES_texture_float), ES2, 2005 }, + { GL_OES_texture_float_linear, o(OES_texture_float_linear), ES2, 2005 }, + { GL_OES_texture_half_float, o(OES_texture_half_float), ES2, 2005 }, + { GL_OES_texture_half_float_linear, o(OES_texture_half_float_linear), ES2, 2005 }, { GL_OES_texture_mirrored_repeat, o(dummy_true), ES1, 2005 }, { GL_OES_texture_npot, o(ARB_texture_non_power_of_two), ES1 | ES2, 2005 }, { GL_OES_vertex_array_object, o(dummy_true), ES1 | ES2, 2010 }, diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 00478f9..efb1e2e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -93,6 +93,7 @@ _mesa_sizeof_type(GLenum type) case GL_DOUBLE: return sizeof(GLdouble); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FIXED: return sizeof(GLfixed); @@ -125,6 +126,7 @@ _mesa_sizeof_packed_type(GLenum type) case GL_INT: return sizeof(GLint); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FLOAT: return sizeof(GLfloat); @@ -241,6 +243,7 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type) case GL_FLOAT: return comps * sizeof(GLfloat); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: @@ -1448,6 +1451,19 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, } return GL_NO_ERROR; + case GL_HALF_FLOAT_OES: + switch (format) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE: + case GL_ALPHA: + return GL_NO_ERROR; + default: + return GL_INVALID_OPERATION; + } + + default: ; /* fall-through */ } @@ -1775,14 +1791,14 @@ _mesa_es_error_check_format_and_type(GLenum format, GLenum type, return type_valid ? GL_NO_ERROR : GL_INVALID_OPERATION; } - /** * Do error checking of format/type combinations for OpenGL ES 3 * glTex[Sub]Image. * \return error code, or GL_NO_ERROR. */ GLenum
Re: [Mesa-dev] [PATCH] Add support for Texture Float extensions.
The subject line of the patch should be something like mesa: add support for GL_OES_texture_*float* extensions A bunch of other nitpicks below... On 11/26/2014 06:55 AM, Kalyan Kondapally wrote: This patch adds support for following GLES2 Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear. Support for these extensions need to be explicitly enabled per driver and this patch enables support for i965 drivers. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com Signed-off-by: Kalyan Kondapally kalyan.kondapa...@intel.com --- src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++ src/mesa/main/extensions.c | 4 ++ src/mesa/main/glformats.c| 48 +++--- src/mesa/main/glformats.h| 3 +- src/mesa/main/mtypes.h | 6 +++ src/mesa/main/pack.c | 16 src/mesa/main/teximage.c | 60 +++- src/mesa/main/texobj.c | 39 ++ 8 files changed, 175 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 76f..e95eaef 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -245,6 +245,12 @@ intelInitExtensions(struct gl_context *ctx) ctx-Extensions.OES_standard_derivatives = true; ctx-Extensions.OES_EGL_image_external = true; + bool enable_opengles2_extensions = ctx-API == API_OPENGLES2; + ctx-Extensions.OES_texture_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float = enable_opengles2_extensions; + ctx-Extensions.OES_texture_float_linear = enable_opengles2_extensions; + ctx-Extensions.OES_texture_half_float_linear = enable_opengles2_extensions; + if (brw-gen = 6) ctx-Const.GLSLVersion = 330; else diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 0df04c2..6833fcf 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -314,6 +314,10 @@ static const struct extension extension_table[] = { { GL_OES_texture_3D, o(EXT_texture3D), ES2, 2005 }, { GL_OES_texture_cube_map,o(ARB_texture_cube_map), ES1, 2007 }, { GL_OES_texture_env_crossbar, o(ARB_texture_env_crossbar), ES1, 2005 }, + { GL_OES_texture_float, o(OES_texture_float), ES2, 2005 }, + { GL_OES_texture_float_linear, o(OES_texture_float_linear), ES2, 2005 }, + { GL_OES_texture_half_float, o(OES_texture_half_float), ES2, 2005 }, + { GL_OES_texture_half_float_linear, o(OES_texture_half_float_linear), ES2, 2005 }, { GL_OES_texture_mirrored_repeat, o(dummy_true), ES1, 2005 }, { GL_OES_texture_npot, o(ARB_texture_non_power_of_two), ES1 | ES2, 2005 }, { GL_OES_vertex_array_object, o(dummy_true), ES1 | ES2, 2010 }, diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 00478f9..efb1e2e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -93,6 +93,7 @@ _mesa_sizeof_type(GLenum type) case GL_DOUBLE: return sizeof(GLdouble); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FIXED: return sizeof(GLfixed); @@ -125,6 +126,7 @@ _mesa_sizeof_packed_type(GLenum type) case GL_INT: return sizeof(GLint); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return sizeof(GLhalfARB); case GL_FLOAT: return sizeof(GLfloat); @@ -241,6 +243,7 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type) case GL_FLOAT: return comps * sizeof(GLfloat); case GL_HALF_FLOAT_ARB: + case GL_HALF_FLOAT_OES: return comps * sizeof(GLhalfARB); case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: @@ -1448,6 +1451,19 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, } return GL_NO_ERROR; + case GL_HALF_FLOAT_OES: + switch (format) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE: + case GL_ALPHA: + return GL_NO_ERROR; + default: + return GL_INVALID_OPERATION; Incorrect indentation on the two 'return' lines. + } + + default: ; /* fall-through */ } @@ -1775,14 +1791,14 @@
[Mesa-dev] [Bug 80848] [dri3] Building mesa fails with dri3 enabled
https://bugs.freedesktop.org/show_bug.cgi?id=80848 --- Comment #29 from Emil Velikov emil.l.veli...@gmail.com --- OK so it seems that, on relink, libtool prepends an extra -L or two prior to -L/opt/lib thus gcc/ld might end up finding the system library thus never bothers searching in /opt/lib. The extra -L can be seen when one invokes $ make V=1 .. It smells like a bug in libtool, despite the response I got on IRC (va at #autotools) that libtool is correct here. Cannot find any hints, neither did he/she mention anything to support that statement :'( The search continues... Guys can you attach the glx hunk of $ make V=1 make V=1 install, with the patch in comment 27. Additionally can you add the last ~15 lines of libtool --help Thanks Emil -- 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 2/5] i965: Initialize compaction tables once per process.
--- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 7117890..8e33bcb 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -75,6 +75,7 @@ #include brw_context.h #include brw_eu.h #include intel_asm_annotation.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ static const uint32_t g45_control_index_table[32] = { 0b0, @@ -1247,6 +1248,10 @@ update_gen4_jump_count(struct brw_context *brw, brw_inst *insn, void brw_init_compaction_tables(struct brw_context *brw) { + static bool initialized; + if (initialized || p_atomic_cmpxchg(initialized, false, true) != false) + return; + assert(g45_control_index_table[ARRAY_SIZE(g45_control_index_table) - 1] != 0); assert(g45_datatype_table[ARRAY_SIZE(g45_datatype_table) - 1] != 0); assert(g45_subreg_table[ARRAY_SIZE(g45_subreg_table) - 1] != 0); -- 2.0.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.
The i965 backends pass something out of 'screen', which is allocated per-process, making using this as a ralloc context not thread-safe. All callers ra_alloc_interference_graph() already ralloc_free() its return value. --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 6cf7ce7..1cfd66f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -374,7 +374,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count) struct ra_graph *g; unsigned int i; - g = rzalloc(regs, struct ra_graph); + g = rzalloc(NULL, struct ra_graph); g-regs = regs; g-nodes = rzalloc_array(g, struct ra_node, count); g-count = count; -- 2.0.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/5] glsl: Initialize static temporaries_allocate_names once per process.
--- src/glsl/glsl_parser_extras.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 27e3301..5772d13 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -29,6 +29,7 @@ extern C { #include main/core.h /* for struct gl_context */ #include main/context.h #include main/shaderobj.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ } #include util/ralloc.h @@ -1447,7 +1448,8 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader, const char *source = shader-Source; if (ctx-Const.GenerateTemporaryNames) - ir_variable::temporaries_allocate_names = true; + (void) p_atomic_cmpxchg(ir_variable::temporaries_allocate_names, + false, true); state-error = glcpp_preprocess(state, source, state-info_log, ctx-Extensions, ctx); -- 2.0.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/5] i965: Initialize INTEL_DEBUG once per process.
--- src/mesa/drivers/dri/i965/intel_debug.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c index a283357..6391cf7 100644 --- a/src/mesa/drivers/dri/i965/intel_debug.c +++ b/src/mesa/drivers/dri/i965/intel_debug.c @@ -32,6 +32,7 @@ #include brw_context.h #include intel_debug.h #include utils.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ uint64_t INTEL_DEBUG = 0; @@ -73,7 +74,9 @@ static const struct dri_debug_control debug_control[] = { void brw_process_intel_debug_variable(struct brw_context *brw) { - INTEL_DEBUG = driParseDebugString(getenv(INTEL_DEBUG), debug_control); + uint64_t intel_debug = driParseDebugString(getenv(INTEL_DEBUG), debug_control); + (void) p_atomic_cmpxchg(INTEL_DEBUG, 0, intel_debug); + if (INTEL_DEBUG DEBUG_BUFMGR) dri_bufmgr_set_debug(brw-bufmgr, true); -- 2.0.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/5] i965/fs: Clean up some whitespace in reg_allocate.
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 44c74a3..0813f64 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -544,8 +544,8 @@ fs_visitor::assign_regs(bool allow_spilling) int first_mrf_hack_node = node_count; if (brw-gen = 7) node_count += BRW_MAX_GRF - GEN7_MRF_HACK_START; - struct ra_graph *g = ra_alloc_interference_graph(screen-wm_reg_sets[rsi].regs, -node_count); + struct ra_graph *g = + ra_alloc_interference_graph(screen-wm_reg_sets[rsi].regs, node_count); for (int i = 0; i this-virtual_grf_count; i++) { unsigned size = this-virtual_grf_sizes[i]; -- 2.0.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/9] scons: Remove dead code/comments.
From: José Fonseca jfons...@vmware.com - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. --- scons/gallium.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scons/gallium.py b/scons/gallium.py index 4df6e1a..fe800fa 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -378,21 +378,18 @@ def generate(env): #'-march=pentium4', ] if distutils.version.LooseVersion(ccversion) = distutils.version.LooseVersion('4.2') \ - and (platform != 'windows' or env['build'] == 'debug' or True) \ and platform != 'haiku': # NOTE: We need to ensure stack is realigned given that we # produce shared objects, and have no control over the stack # alignment policy of the application. Therefore we need # -mstackrealign ore -mincoming-stack-boundary=2. # -# XXX: -O and -mstackrealign causes stack corruption on MinGW -# # XXX: We could have SSE without -mstackrealign if we always used # __attribute__((force_align_arg_pointer)), but that's not # always the case. ccflags += [ '-mstackrealign', # ensure stack is aligned -'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics +'-msse', '-msse2', # enable SIMD intrinsics #'-mfpmath=sse', ] if platform in ['windows', 'darwin']: -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/9] draw, gallivm, llvmpipe: Avoid implicit casts of 32-bit shifts to 64-bits.
From: José Fonseca jfons...@vmware.com Addresses MSVC warnings result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?), which can often be symptom of bugs, but in these cases were all benign. --- src/gallium/auxiliary/draw/draw_llvm.c| 4 ++-- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 +- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 4 ++-- src/gallium/drivers/llvmpipe/lp_state_fs.c| 8 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index a2e6112..dbaece3 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -1269,7 +1269,7 @@ generate_clipmask(struct draw_llvm *llvm, test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, clipdist); is_nan_or_inf = lp_build_is_inf_or_nan(gallivm, vs_type, clipdist); test = LLVMBuildOr(builder, test, is_nan_or_inf, ); -temp = lp_build_const_int_vec(gallivm, i32_type, 1 plane_idx); +temp = lp_build_const_int_vec(gallivm, i32_type, 1LL plane_idx); test = LLVMBuildAnd(builder, test, temp, ); mask = LLVMBuildOr(builder, mask, test, ); } else { @@ -1305,7 +1305,7 @@ generate_clipmask(struct draw_llvm *llvm, sum = LLVMBuildFAdd(builder, sum, test, ); test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, sum); -temp = lp_build_const_int_vec(gallivm, i32_type, 1 plane_idx); +temp = lp_build_const_int_vec(gallivm, i32_type, 1LL plane_idx); test = LLVMBuildAnd(builder, test, temp, ); mask = LLVMBuildOr(builder, mask, test, ); } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 87da355..cd05f11 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -932,7 +932,7 @@ lp_build_mul_norm(struct gallivm_state *gallivm, * half = sgn(ab) * 0.5 * (2 ** n) = sgn(ab) * (1 (n - 1)) */ - half = lp_build_const_int_vec(gallivm, wide_type, 1 (n - 1)); + half = lp_build_const_int_vec(gallivm, wide_type, 1LL (n - 1)); if (wide_type.sign) { LLVMValueRef minus_half = LLVMBuildNeg(builder, half, ); LLVMValueRef sign = lp_build_shr_imm(bld, ab, wide_type.width - 1); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index 85c0d4e..8cee994 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -1641,7 +1641,7 @@ lp_build_cube_lookup(struct lp_build_sample_context *bld, LLVMValueRef ma, mai, signma, signmabit, imahalfpos; LLVMValueRef posHalf = lp_build_const_vec(gallivm, coord_bld-type, 0.5); LLVMValueRef signmask = lp_build_const_int_vec(gallivm, intctype, - 1 (intctype.width - 1)); + 1LL (intctype.width - 1)); LLVMValueRef signshift = lp_build_const_int_vec(gallivm, intctype, intctype.width -1); LLVMValueRef facex = lp_build_const_int_vec(gallivm, intctype, PIPE_TEX_FACE_POS_X); diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 900df71..a2f55ed 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -760,8 +760,8 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, for (i = 0; i nr_planes; i++) { int64_t planeout = cx[i] + eo[i]; int64_t planepartial = cx[i] + ei[i] - 1; - out |= (planeout 63); - partial |= (planepartial 63) (1i); + out |= (int) (planeout 63); + partial |= ((int) (planepartial 63)) (1i); } if (out) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 0fc3686..a68b274 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -174,10 +174,10 @@ generate_quad_mask(struct gallivm_state *gallivm, for (i = 0; i fs_type.length / 4; i++) { unsigned j = 2 * (i % 2) + (i / 2) * 8; - bits[4*i + 0] = LLVMConstInt(i32t, 1 (j + 0), 0); - bits[4*i + 1] = LLVMConstInt(i32t, 1 (j + 1), 0); - bits[4*i + 2] = LLVMConstInt(i32t, 1 (j + 4), 0); - bits[4*i + 3] = LLVMConstInt(i32t, 1 (j + 5), 0); + bits[4*i + 0] = LLVMConstInt(i32t, 1ULL (j + 0), 0); + bits[4*i + 1] = LLVMConstInt(i32t, 1ULL (j + 1), 0); + bits[4*i + 2] = LLVMConstInt(i32t, 1ULL (j + 4), 0); + bits[4*i + 3] =
[Mesa-dev] [PATCH 7/9] mapi/glapi: Fix dll linkage of GLES1 symbols.
From: José Fonseca jfons...@vmware.com This fixes several MSVC warnings like: warning C4273: 'glClearColorx' : inconsistent dll linkage In fact, we should avoid using `declspec(dllexport)` altogether, and use exclusively the .DEF instead, which gives more precise control of which symbols must be exported, but all the public GL/GLES headers practically force us to pick between `declspec(dllexport)` or `ideclspec(dllimport)`. --- src/mapi/glapi/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index bc1c43a..97ebfe6 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -16,6 +16,7 @@ if env['platform'] == 'windows': env.Append(CPPDEFINES = [ '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers +'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers ]) if env['gles']: env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS']) -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.
From: José Fonseca jfons...@vmware.com Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. This change disables them. --- scons/gallium.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scons/gallium.py b/scons/gallium.py index 8e2090b..d9bf760 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -462,6 +462,7 @@ def generate(env): ] ccflags += [ '/W3', # warning level +'/wd4018', # signed/unsigned mismatch '/wd4244', # conversion from 'type1' to 'type2', possible loss of data '/wd4305', # truncation from 'type1' to 'type2' '/wd4800', # forcing value to bool 'true' or 'false' (performance warning) -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/9] scons: Generate SSE2 floating-point arithmetic.
From: José Fonseca jfons...@vmware.com - SSE2 is available on all x86 processors we care about. - It's recommended by Intel: https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints - And has been the default since MSVC 2012: http://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.110).aspx --- scons/gallium.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scons/gallium.py b/scons/gallium.py index fe800fa..8e2090b 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -390,7 +390,7 @@ def generate(env): ccflags += [ '-mstackrealign', # ensure stack is aligned '-msse', '-msse2', # enable SIMD intrinsics -#'-mfpmath=sse', +'-mfpmath=sse', # generate SSE floating-point arithmetic ] if platform in ['windows', 'darwin']: # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216 @@ -469,7 +469,7 @@ def generate(env): ] if env['machine'] == 'x86': ccflags += [ -#'/arch:SSE2', # use the SSE2 instructions +'/arch:SSE2', # use the SSE2 instructions (default since MSVC 2012) ] if platform == 'windows': ccflags += [ -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 8/9] st/wgl: Don't export wglGetExtensionsStringARB.
From: José Fonseca jfons...@vmware.com It's not exported by the official opengl32.dll neither. Applications are supposed to get it via wglGetProcAddress(), not GetProcAddress(). --- src/gallium/state_trackers/wgl/opengl32.def | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/wgl/opengl32.def b/src/gallium/state_trackers/wgl/opengl32.def index 01a29d0..c35c23b 100644 --- a/src/gallium/state_trackers/wgl/opengl32.def +++ b/src/gallium/state_trackers/wgl/opengl32.def @@ -367,7 +367,6 @@ EXPORTS wglUseFontBitmapsW wglUseFontOutlinesA wglUseFontOutlinesW - wglGetExtensionsStringARB DrvCopyContext DrvCreateContext DrvCreateLayerContext -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 6/9] util/u_snprintf: Don't redefine HAVE_STDINT_H as 0.
From: José Fonseca jfons...@vmware.com We now always guarantee availability of stdint.h on MSVC -- if MSVC doesn't supply one we use our own. --- src/gallium/auxiliary/util/u_snprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c index 7a2bf2a..39e9b70 100644 --- a/src/gallium/auxiliary/util/u_snprintf.c +++ b/src/gallium/auxiliary/util/u_snprintf.c @@ -176,7 +176,7 @@ #define HAVE_ASPRINTF 1 /* not needed */ #define HAVE_STDARG_H 1 #define HAVE_STDDEF_H 1 -#define HAVE_STDINT_H 0 +#define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_INTTYPES_H 0 #define HAVE_LOCALE_H 0 -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/9] gallivm: Removed unused variable.
From: José Fonseca jfons...@vmware.com --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index 2ef5db1..738d5e9 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c @@ -492,7 +492,7 @@ lp_emit_instruction_aos( int *pc) { LLVMValueRef src0, src1, src2; - LLVMValueRef tmp0, tmp1; + LLVMValueRef tmp0; LLVMValueRef dst0 = NULL; /* -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.
From: José Fonseca jfons...@vmware.com Just use the same entrypoints we use for st/wgl's opengl32.dll. --- src/mesa/drivers/windows/gdi/mesa.def | 839 -- 1 file changed, 192 insertions(+), 647 deletions(-) diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def index 92736b3..a52207b 100644 --- a/src/mesa/drivers/windows/gdi/mesa.def +++ b/src/mesa/drivers/windows/gdi/mesa.def @@ -1,6 +1,3 @@ -; DO NOT EDIT - This file generated automatically by mesadef.py script -;DESCRIPTION 'Mesa (OpenGL work-alike) for Win32' -VERSION 6.5 ; ; Module definition file for Mesa (OPENGL32.DLL) ; @@ -27,15 +24,23 @@ VERSION 6.5 ; points are compiled with dllexport declspec. ; EXPORTS - glNewList - glEndList - glCallList - glCallLists - glDeleteLists - glGenLists - glListBase + glAccum + glAlphaFunc + glAreTexturesResident + glArrayElement glBegin + glBindTexture glBitmap + glBlendFunc + glCallList + glCallLists + glClear + glClearAccum + glClearColor + glClearDepth + glClearIndex + glClearStencil + glClipPlane glColor3b glColor3bv glColor3d @@ -68,9 +73,88 @@ EXPORTS glColor4uiv glColor4us glColor4usv + glColorMask + glColorMaterial + glColorPointer + glCopyPixels + glCopyTexImage1D + glCopyTexImage2D + glCopyTexSubImage1D + glCopyTexSubImage2D + glCullFace + glDeleteLists + glDeleteTextures + glDepthFunc + glDepthMask + glDepthRange + glDisable + glDisableClientState + glDrawArrays + glDrawBuffer + glDrawElements + glDrawPixels glEdgeFlag + glEdgeFlagPointer glEdgeFlagv + glEnable + glEnableClientState glEnd + glEndList + glEvalCoord1d + glEvalCoord1dv + glEvalCoord1f + glEvalCoord1fv + glEvalCoord2d + glEvalCoord2dv + glEvalCoord2f + glEvalCoord2fv + glEvalMesh1 + glEvalMesh2 + glEvalPoint1 + glEvalPoint2 + glFeedbackBuffer + glFinish + glFlush + glFogf + glFogfv + glFogi + glFogiv + glFrontFace + glFrustum + glGenLists + glGenTextures + glGetBooleanv + glGetClipPlane + glGetDoublev + glGetError + glGetFloatv + glGetIntegerv + glGetLightfv + glGetLightiv + glGetMapdv + glGetMapfv + glGetMapiv + glGetMaterialfv + glGetMaterialiv + glGetPixelMapfv + glGetPixelMapuiv + glGetPixelMapusv + glGetPointerv + glGetPolygonStipple + glGetString + glGetTexEnvfv + glGetTexEnviv + glGetTexGendv + glGetTexGenfv + glGetTexGeniv + glGetTexImage + glGetTexLevelParameterfv + glGetTexLevelParameteriv + glGetTexParameterfv + glGetTexParameteriv + glHint + glIndexMask + glIndexPointer glIndexd glIndexdv glIndexf @@ -79,6 +163,45 @@ EXPORTS glIndexiv glIndexs glIndexsv + glIndexub + glIndexubv + glInitNames + glInterleavedArrays + glIsEnabled + glIsList + glIsTexture + glLightModelf + glLightModelfv + glLightModeli + glLightModeliv + glLightf + glLightfv + glLighti + glLightiv + glLineStipple + glLineWidth + glListBase + glLoadIdentity + glLoadMatrixd + glLoadMatrixf + glLoadName + glLogicOp + glMap1d + glMap1f + glMap2d + glMap2f + glMapGrid1d + glMapGrid1f + glMapGrid2d + glMapGrid2f + glMaterialf + glMaterialfv + glMateriali + glMaterialiv + glMatrixMode + glMultMatrixd + glMultMatrixf + glNewList glNormal3b glNormal3bv glNormal3d @@ -89,6 +212,30 @@ EXPORTS glNormal3iv glNormal3s glNormal3sv + glNormalPointer + glOrtho + glPassThrough + glPixelMapfv + glPixelMapuiv + glPixelMapusv + glPixelStoref + glPixelStorei + glPixelTransferf + glPixelTransferi + glPixelZoom + glPointSize + glPolygonMode + glPolygonOffset + glPolygonStipple + glPopAttrib + glPopClientAttrib + glPopMatrix + glPopName + glPrioritizeTextures + glPushAttrib + glPushClientAttrib + glPushMatrix + glPushName glRasterPos2d glRasterPos2dv glRasterPos2f @@ -113,6 +260,8 @@ EXPORTS glRasterPos4iv glRasterPos4s glRasterPos4sv + glReadBuffer + glReadPixels glRectd glRectdv
Re: [Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.
On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: The i965 backends pass something out of 'screen', which is allocated per-process, making using this as a ralloc context not thread-safe. All callers ra_alloc_interference_graph() already ralloc_free() its return value. --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 6cf7ce7..1cfd66f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -374,7 +374,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count) struct ra_graph *g; unsigned int i; - g = rzalloc(regs, struct ra_graph); + g = rzalloc(NULL, struct ra_graph); Why not make ra_alloc_interference_graph take a ralloc context? g-regs = regs; g-nodes = rzalloc_array(g, struct ra_node, count); g-count = count; -- 2.0.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
Re: [Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.
On Wed, Nov 26, 2014 at 10:56 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: The i965 backends pass something out of 'screen', which is allocated per-process, making using this as a ralloc context not thread-safe. All callers ra_alloc_interference_graph() already ralloc_free() its return value. --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 6cf7ce7..1cfd66f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -374,7 +374,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count) struct ra_graph *g; unsigned int i; - g = rzalloc(regs, struct ra_graph); + g = rzalloc(NULL, struct ra_graph); Why not make ra_alloc_interference_graph take a ralloc context? I mean, I could, but why? All callers of ra_alloc_interference_graph() ralloc_free its result themselves. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] i965: Initialize compaction tables once per process.
On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 7117890..8e33bcb 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -75,6 +75,7 @@ #include brw_context.h #include brw_eu.h #include intel_asm_annotation.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ static const uint32_t g45_control_index_table[32] = { 0b0, @@ -1247,6 +1248,10 @@ update_gen4_jump_count(struct brw_context *brw, brw_inst *insn, void brw_init_compaction_tables(struct brw_context *brw) { + static bool initialized; + if (initialized || p_atomic_cmpxchg(initialized, false, true) != false) + return; + Sure, this protects the initialized flag, but what happens if a thread tries to use compaction after someone else starts initializing but before they've finished? Same comment for the other two patches that do more-or-less the same thing. --Jason assert(g45_control_index_table[ARRAY_SIZE(g45_control_index_table) - 1] != 0); assert(g45_datatype_table[ARRAY_SIZE(g45_datatype_table) - 1] != 0); assert(g45_subreg_table[ARRAY_SIZE(g45_subreg_table) - 1] != 0); -- 2.0.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
Re: [Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.
On Wed, Nov 26, 2014 at 10:47 AM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Just use the same entrypoints we use for st/wgl's opengl32.dll. --- Subject: s/mesadef.py/mesa.def/ If mesadef.py is indeed dead after this, maybe you'd like to grab the patch that deletes it from one of my previous series. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.
On Wed, Nov 26, 2014 at 10:59 AM, Matt Turner matts...@gmail.com wrote: On Wed, Nov 26, 2014 at 10:56 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: The i965 backends pass something out of 'screen', which is allocated per-process, making using this as a ralloc context not thread-safe. All callers ra_alloc_interference_graph() already ralloc_free() its return value. --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 6cf7ce7..1cfd66f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -374,7 +374,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count) struct ra_graph *g; unsigned int i; - g = rzalloc(regs, struct ra_graph); + g = rzalloc(NULL, struct ra_graph); Why not make ra_alloc_interference_graph take a ralloc context? I mean, I could, but why? All callers of ra_alloc_interference_graph() ralloc_free its result themselves. Sure. It doesn't much matter. It just gives us the option. I don't care much either way. This one is Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/9] scons: Remove dead code/comments.
The series LGTM. Reviewed-by: Brian Paul bri...@vmware.com On 11/26/2014 11:47 AM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. --- scons/gallium.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scons/gallium.py b/scons/gallium.py index 4df6e1a..fe800fa 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -378,21 +378,18 @@ def generate(env): #'-march=pentium4', ] if distutils.version.LooseVersion(ccversion) = distutils.version.LooseVersion('4.2') \ - and (platform != 'windows' or env['build'] == 'debug' or True) \ and platform != 'haiku': # NOTE: We need to ensure stack is realigned given that we # produce shared objects, and have no control over the stack # alignment policy of the application. Therefore we need # -mstackrealign ore -mincoming-stack-boundary=2. # -# XXX: -O and -mstackrealign causes stack corruption on MinGW -# # XXX: We could have SSE without -mstackrealign if we always used # __attribute__((force_align_arg_pointer)), but that's not # always the case. ccflags += [ '-mstackrealign', # ensure stack is aligned -'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics +'-msse', '-msse2', # enable SIMD intrinsics #'-mfpmath=sse', ] if platform in ['windows', 'darwin']: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] i965: Initialize compaction tables once per process.
On Wed, Nov 26, 2014 at 10:59 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 7117890..8e33bcb 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -75,6 +75,7 @@ #include brw_context.h #include brw_eu.h #include intel_asm_annotation.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ static const uint32_t g45_control_index_table[32] = { 0b0, @@ -1247,6 +1248,10 @@ update_gen4_jump_count(struct brw_context *brw, brw_inst *insn, void brw_init_compaction_tables(struct brw_context *brw) { + static bool initialized; + if (initialized || p_atomic_cmpxchg(initialized, false, true) != false) + return; + Sure, this protects the initialized flag, but what happens if a thread tries to use compaction after someone else starts initializing but before they've finished? Same comment for the other two patches that do more-or-less the same thing. Yes, that is theoretically possible. But for it to happen two threads would have to arrive at brw_init_compaction_tables() at the same time, one would get through the initialized lock and the other wouldn't. The one that didn't would then have to compile an entire shader with everything that entails, run the generator, and then get to compacting the instructions before the initializing thread executed the 27 instructions in this function. Since the initializations in the other two patches are just single variables (i.e., not a variable protecting a whole initialization function) I don't think they even have the same theoretical problem. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.
On Wed, 2014-11-26 at 18:47 +, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. gcc does not ignore the issue. there is -Wsign-compare. it's part of -Wextra (and thus disabled by default). I build mesa with -Wextra (and -Wno-unused-paramter) and my setup adds these warnings: 154 -Wmissing-field-initializers 1 -Wold-style-declaration 614 -Wsign-compare 8 -Wtype-limits I think it might be worth fixing these and and adding -Wextra to gcc build flags. jan This change disables them. --- scons/gallium.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scons/gallium.py b/scons/gallium.py index 8e2090b..d9bf760 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -462,6 +462,7 @@ def generate(env): ] ccflags += [ '/W3', # warning level +'/wd4018', # signed/unsigned mismatch '/wd4244', # conversion from 'type1' to 'type2', possible loss of data '/wd4305', # truncation from 'type1' to 'type2' '/wd4800', # forcing value to bool 'true' or 'false' (performance warning) -- Jan Vesely jan.ves...@rutgers.edu signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/5] i965: Initialize compaction tables once per process.
On Wed, Nov 26, 2014 at 11:10 AM, Matt Turner matts...@gmail.com wrote: On Wed, Nov 26, 2014 at 10:59 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 7117890..8e33bcb 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -75,6 +75,7 @@ #include brw_context.h #include brw_eu.h #include intel_asm_annotation.h +#include util/u_atomic.h /* for p_atomic_cmpxchg */ static const uint32_t g45_control_index_table[32] = { 0b0, @@ -1247,6 +1248,10 @@ update_gen4_jump_count(struct brw_context *brw, brw_inst *insn, void brw_init_compaction_tables(struct brw_context *brw) { + static bool initialized; + if (initialized || p_atomic_cmpxchg(initialized, false, true) != false) + return; + Sure, this protects the initialized flag, but what happens if a thread tries to use compaction after someone else starts initializing but before they've finished? Same comment for the other two patches that do more-or-less the same thing. Yes, that is theoretically possible. But for it to happen two threads would have to arrive at brw_init_compaction_tables() at the same time, one would get through the initialized lock and the other wouldn't. The one that didn't would then have to compile an entire shader with everything that entails, run the generator, and then get to compacting the instructions before the initializing thread executed the 27 instructions in this function. Sure, not likely. I'd still throw in a comment to future readers as to why its 99.9% safe. Since the initializations in the other two patches are just single variables (i.e., not a variable protecting a whole initialization function) I don't think they even have the same theoretical problem. Right. Wasn't reading close enough. With the comment above, you can have my R-B on the rest of them. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.
Am 26.11.2014 um 19:47 schrieb jfons...@vmware.com: From: José Fonseca jfons...@vmware.com Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. This change disables them. --- scons/gallium.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scons/gallium.py b/scons/gallium.py index 8e2090b..d9bf760 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -462,6 +462,7 @@ def generate(env): ] ccflags += [ '/W3', # warning level +'/wd4018', # signed/unsigned mismatch '/wd4244', # conversion from 'type1' to 'type2', possible loss of data '/wd4305', # truncation from 'type1' to 'type2' '/wd4800', # forcing value to bool 'true' or 'false' (performance warning) I'm pretty sure I've seen gcc warnings about unsigned/signed mismatches too, there's some options for that. I don't know though if they apply to exactly the same situations. Either way if they are annoying disabling them is fine by me, they _usually_ don't tend to be harmful bugs... Roland ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/9] draw, gallivm, llvmpipe: Avoid implicit casts of 32-bit shifts to 64-bits.
I guess we could do explicit cast after the shift but we probably don't care enough about the slight performance hit on 32bit platforms (though actually some compilers might be smart enough to figure out a 32bit shift is really all that's needed). In any case, for the series: Reviewed-by: Roland Scheidegger srol...@vmware.com Am 26.11.2014 um 19:47 schrieb jfons...@vmware.com: From: José Fonseca jfons...@vmware.com Addresses MSVC warnings result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?), which can often be symptom of bugs, but in these cases were all benign. --- src/gallium/auxiliary/draw/draw_llvm.c| 4 ++-- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 +- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 4 ++-- src/gallium/drivers/llvmpipe/lp_state_fs.c| 8 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index a2e6112..dbaece3 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -1269,7 +1269,7 @@ generate_clipmask(struct draw_llvm *llvm, test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, clipdist); is_nan_or_inf = lp_build_is_inf_or_nan(gallivm, vs_type, clipdist); test = LLVMBuildOr(builder, test, is_nan_or_inf, ); -temp = lp_build_const_int_vec(gallivm, i32_type, 1 plane_idx); +temp = lp_build_const_int_vec(gallivm, i32_type, 1LL plane_idx); test = LLVMBuildAnd(builder, test, temp, ); mask = LLVMBuildOr(builder, mask, test, ); } else { @@ -1305,7 +1305,7 @@ generate_clipmask(struct draw_llvm *llvm, sum = LLVMBuildFAdd(builder, sum, test, ); test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, sum); -temp = lp_build_const_int_vec(gallivm, i32_type, 1 plane_idx); +temp = lp_build_const_int_vec(gallivm, i32_type, 1LL plane_idx); test = LLVMBuildAnd(builder, test, temp, ); mask = LLVMBuildOr(builder, mask, test, ); } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 87da355..cd05f11 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -932,7 +932,7 @@ lp_build_mul_norm(struct gallivm_state *gallivm, * half = sgn(ab) * 0.5 * (2 ** n) = sgn(ab) * (1 (n - 1)) */ - half = lp_build_const_int_vec(gallivm, wide_type, 1 (n - 1)); + half = lp_build_const_int_vec(gallivm, wide_type, 1LL (n - 1)); if (wide_type.sign) { LLVMValueRef minus_half = LLVMBuildNeg(builder, half, ); LLVMValueRef sign = lp_build_shr_imm(bld, ab, wide_type.width - 1); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index 85c0d4e..8cee994 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -1641,7 +1641,7 @@ lp_build_cube_lookup(struct lp_build_sample_context *bld, LLVMValueRef ma, mai, signma, signmabit, imahalfpos; LLVMValueRef posHalf = lp_build_const_vec(gallivm, coord_bld-type, 0.5); LLVMValueRef signmask = lp_build_const_int_vec(gallivm, intctype, - 1 (intctype.width - 1)); + 1LL (intctype.width - 1)); LLVMValueRef signshift = lp_build_const_int_vec(gallivm, intctype, intctype.width -1); LLVMValueRef facex = lp_build_const_int_vec(gallivm, intctype, PIPE_TEX_FACE_POS_X); diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 900df71..a2f55ed 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -760,8 +760,8 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, for (i = 0; i nr_planes; i++) { int64_t planeout = cx[i] + eo[i]; int64_t planepartial = cx[i] + ei[i] - 1; - out |= (planeout 63); - partial |= (planepartial 63) (1i); + out |= (int) (planeout 63); + partial |= ((int) (planepartial 63)) (1i); } if (out) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 0fc3686..a68b274 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -174,10 +174,10 @@ generate_quad_mask(struct gallivm_state *gallivm, for (i = 0; i fs_type.length / 4; i++) {
Re: [Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.
On 26/11/14 19:16, Jan Vesely wrote: On Wed, 2014-11-26 at 18:47 +, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. gcc does not ignore the issue. there is -Wsign-compare. it's part of -Wextra (and thus disabled by default). I build mesa with -Wextra (and -Wno-unused-paramter) and my setup adds these warnings: 154 -Wmissing-field-initializers 1 -Wold-style-declaration 614 -Wsign-compare 8 -Wtype-limits I think it might be worth fixing these and and adding -Wextra to gcc build flags. I had the same noble idea, but the numbers are enough to push most/all people away. Until we resolve them, it might be worth keeping the annoyance factor low. Please send in patches I'm sure Jose won't object. I might even join the fun :) Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.
On 26/11/14 19:16, Jan Vesely wrote: On Wed, 2014-11-26 at 18:47 +, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. gcc does not ignore the issue. there is -Wsign-compare. it's part of -Wextra (and thus disabled by default). I build mesa with -Wextra (and -Wno-unused-paramter) and my setup adds these warnings: 154 -Wmissing-field-initializers 1 -Wold-style-declaration 614 -Wsign-compare 8 -Wtype-limits Thanks for this info. I think it might be worth fixing these and and adding -Wextra to gcc build flags. Yeah, these signed/unsigned compare warnings have some utility. Particularly to ensure the code is robust to invalid or very large parameters, ie. the sort of thing that could lead to security bugs. On the other hand, 614 is a large number of places to fix.. Fixing them is not something I feel entitled to impose upon others. But if people are game, I'm game too. I'll withhold this patch for now, to let people think about this, and investigate a bit further myself how much overlap is there between MSVC and GCC warnings for this. Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] glsl: Use | action in the lexer source to avoid duplicating the float action
Flex and lex have a special action ‘|’ which means to use the same action as the next rule. We can use this to reduce a bit of code duplication in the rules for the various float literal formats. --- src/glsl/glsl_lexer.ll | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 419a07b..57c46be 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -450,18 +450,9 @@ layout { return LITERAL_INTEGER(8); } -[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? { - yylval-real = _mesa_strtof(yytext, NULL); - return FLOATCONSTANT; - } -\.[0-9]+([eE][+-]?[0-9]+)?[fF]?{ - yylval-real = _mesa_strtof(yytext, NULL); - return FLOATCONSTANT; - } -[0-9]+\.([eE][+-]?[0-9]+)?[fF]?{ - yylval-real = _mesa_strtof(yytext, NULL); - return FLOATCONSTANT; - } +[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? | +\.[0-9]+([eE][+-]?[0-9]+)?[fF]?| +[0-9]+\.([eE][+-]?[0-9]+)?[fF]?| [0-9]+[eE][+-]?[0-9]+[fF]? { yylval-real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; -- 1.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] glsl: Disallow float literals with the 'f' suffix but no point or exponent
According to the GLSL spec float literals like ‘1f’ shouldn't be allowed without adding a decimal point or an exponent. Apparently the AMD driver also disallows this so it seems unlikely that anything would be relying on it. --- This was discussed here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071039.html I've run this through Piglit and it doesn't cause any regressions except for glsl-floating-constant-120.shader_test but I think that test is bogus. I've posted a patch to change it here: http://lists.freedesktop.org/archives/piglit/2014-November/013488.html src/glsl/glsl_lexer.ll | 4 1 file changed, 4 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index ad6d32f..419a07b 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -466,10 +466,6 @@ layout { yylval-real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } -[0-9]+[fF] { - yylval-real = _mesa_strtof(yytext, NULL); - return FLOATCONSTANT; - } true { yylval-n = 1; -- 1.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] glapi: Remove dead mesadef.py.
Reviewed-by: Jose Fonseca jfons...@vmware.com On 21/11/14 18:35, Matt Turner wrote: Dead since commit 4e120c97, in which apiparser (which mesadef.py imports) was removed. --- src/mapi/glapi/gen/Makefile.am | 1 - src/mapi/glapi/gen/mesadef.py | 215 - 2 files changed, 216 deletions(-) delete mode 100644 src/mapi/glapi/gen/mesadef.py diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index 9c70b26..7f76f19 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -74,7 +74,6 @@ EXTRA_DIST= \ glX_proto_send.py \ glX_proto_size.py \ glX_server_table.py \ - mesadef.py \ remap_helper.py \ gl_API.dtd diff --git a/src/mapi/glapi/gen/mesadef.py b/src/mapi/glapi/gen/mesadef.py deleted file mode 100644 index 77cc4a3..000 --- a/src/mapi/glapi/gen/mesadef.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python - - -# Mesa 3-D graphics library -# -# Copyright (C) 1999-2001 Brian Paul 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, 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 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. - - -# Generate the mesa.def file for Windows. -# -# Usage: -#mesadef.py mesa.def -#Then copy to src/mesa/drivers/windows/gdi -# -# Dependencies: -#The apispec file must be in the current directory. - - - -import apiparser -import string - - -def PrintHead(): -print '; DO NOT EDIT - This file generated automatically by mesadef.py script' -print 'DESCRIPTION \'Mesa (OpenGL work-alike) for Win32\'' -print 'VERSION 6.0' -print ';' -print '; Module definition file for Mesa (OPENGL32.DLL)' -print ';' -print '; Note: The OpenGL functions use the STDCALL' -print '; function calling convention. Microsoft\'s' -print '; OPENGL32 uses this convention and so must the' -print '; Mesa OPENGL32 so that the Mesa DLL can be used' -print '; as a drop-in replacement.' -print ';' -print '; The linker exports STDCALL entry points with' -print '; \'decorated\' names; e.g., _glBegin@0, where the' -print '; trailing number is the number of bytes of ' -print '; parameter data pushed onto the stack. The' -print '; callee is responsible for popping this data' -print '; off the stack, usually via a RETF n instruction.' -print ';' -print '; However, the Microsoft OPENGL32.DLL does not export' -print '; the decorated names, even though the calling convention' -print '; is STDCALL. So, this module definition file is' -print '; needed to force the Mesa OPENGL32.DLL to export the' -print '; symbols in the same manner as the Microsoft DLL.' -print '; Were it not for this problem, this file would not' -print '; be needed (for the gl* functions) since the entry' -print '; points are compiled with dllexport declspec.' -print ';' -print '; However, this file is still needed to export internal' -print '; Mesa symbols for the benefit of the OSMESA32.DLL.' -print ';' -print 'EXPORTS' -return -#enddef - - -def PrintTail(): -print ';' -print '; WGL API' -print '\twglChoosePixelFormat' -print '\twglCopyContext' -print '\twglCreateContext' -print '\twglCreateLayerContext' -print '\twglDeleteContext' -print '\twglDescribeLayerPlane' -print '\twglDescribePixelFormat' -print '\twglGetCurrentContext' -print '\twglGetCurrentDC' -print '\twglGetExtensionsStringARB' -print '\twglGetLayerPaletteEntries' -print '\twglGetPixelFormat' -print '\twglGetProcAddress' -print '\twglMakeCurrent' -print '\twglRealizeLayerPalette' -print '\twglSetLayerPaletteEntries' -print '\twglSetPixelFormat' -print '\twglShareLists' -print '\twglSwapBuffers' -print '\twglSwapLayerBuffers' -print '\twglUseFontBitmapsA' -print '\twglUseFontBitmapsW' -print '\twglUseFontOutlinesA' -print '\twglUseFontOutlinesW' -print ';' -print ';
Re: [Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.
On 26/11/14 19:01, Matt Turner wrote: On Wed, Nov 26, 2014 at 10:47 AM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Just use the same entrypoints we use for st/wgl's opengl32.dll. --- Subject: s/mesadef.py/mesa.def/ Ah, yes. If mesadef.py is indeed dead after this, maybe you'd like to grab the patch that deletes it from one of my previous series. Sure, I'll add my Reviewed-by and push it with this then, unless you beat me to it. Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.
On Wed, Nov 26, 2014 at 12:14 PM, Jose Fonseca jfons...@vmware.com wrote: On 26/11/14 19:01, Matt Turner wrote: On Wed, Nov 26, 2014 at 10:47 AM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com Just use the same entrypoints we use for st/wgl's opengl32.dll. --- Subject: s/mesadef.py/mesa.def/ Ah, yes. If mesadef.py is indeed dead after this, maybe you'd like to grab the patch that deletes it from one of my previous series. Sure, I'll add my Reviewed-by and push it with this then, unless you beat me to it. Thanks. Yeah, feel free to push it with the rest of your series. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH v3 01/19] st/nine: clean device9ex.
Hi guys, I've picked up patches 1-10 13 for master. Afaict there is still a comment on two on the topic of queries, so I'll leave these out for now. Patches 12 does not seem to be mesa-stable material based on the commit message, yet they seem to be a requirement for #3. Can you add a couple of words to make this clearer in future patches ? Thanks Emil On 24/11/14 23:38, David Heidelberg wrote: From: Axel Davy axel.d...@ens.fr Pass ex specific parameters as arguments to device9 ctor instead of passing them by filling the structure. Cc: 10.4 mesa-sta...@lists.freedesktop.org Reviewed-by: David Heidelberg da...@ixit.cz Signed-off-by: Axel Davy axel.d...@ens.fr --- src/gallium/state_trackers/nine/adapter9.c | 2 +- src/gallium/state_trackers/nine/device9.c | 19 +++ src/gallium/state_trackers/nine/device9.h | 7 +-- src/gallium/state_trackers/nine/device9ex.c | 6 ++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c index 8d574de..e409d5f 100644 --- a/src/gallium/state_trackers/nine/adapter9.c +++ b/src/gallium/state_trackers/nine/adapter9.c @@ -990,7 +990,7 @@ NineAdapter9_CreateDevice( struct NineAdapter9 *This, params.BehaviorFlags = BehaviorFlags; hr = NineDevice9_new(screen, params, caps, pPresentationParameters, - pD3D9, pPresentationGroup, This-ctx, + pD3D9, pPresentationGroup, This-ctx, FALSE, NULL, (struct NineDevice9 **)ppReturnedDeviceInterface); if (FAILED(hr)) { DBG(Failed to create device.\n); diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 7d2142d..5f95b42 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -139,7 +139,9 @@ NineDevice9_ctor( struct NineDevice9 *This, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, - struct d3dadapter9_context *pCTX ) + struct d3dadapter9_context *pCTX, + boolean ex, + D3DDISPLAYMODEEX *pFullscreenDisplayMode ) { unsigned i; HRESULT hr = NineUnknown_ctor(This-base, pParams); @@ -151,6 +153,7 @@ NineDevice9_ctor( struct NineDevice9 *This, This-caps = *pCaps; This-d3d9 = pD3D9; This-params = *pCreationParameters; +This-ex = ex; This-present = pPresentationGroup; IDirect3D9_AddRef(This-d3d9); ID3DPresentGroup_AddRef(This-present); @@ -177,12 +180,12 @@ NineDevice9_ctor( struct NineDevice9 *This, if (FAILED(hr)) return hr; -if (This-ex) { +if (ex) { D3DDISPLAYMODEEX *mode = NULL; struct NineSwapChain9Ex **ret = (struct NineSwapChain9Ex **)This-swapchains[i]; -if (This-pFullscreenDisplayMode) mode = (This-pFullscreenDisplayMode[i]); +if (pFullscreenDisplayMode) mode = (pFullscreenDisplayMode[i]); /* when this is a Device9Ex, it should create SwapChain9Exs */ hr = NineSwapChain9Ex_new(This, TRUE, present, pPresentationParameters[i], pCTX, @@ -310,9 +313,6 @@ NineDevice9_ctor( struct NineDevice9 *This, This-update = This-state; nine_update_state(This, ~0); -/* Is just used to pass the parameter from NineDevice9Ex_ctor */ -This-pFullscreenDisplayMode = NULL; - ID3DPresentGroup_Release(This-present); return D3D_OK; @@ -974,7 +974,7 @@ create_zs_or_rt_surface(struct NineDevice9 *This, } else { resource = NULL; } -hr = NineSurface9_new(This, NULL, resource, 0, 0, 0, desc, surface); +hr = NineSurface9_new(This, NULL, resource, NULL, 0, 0, 0, desc, surface); pipe_resource_reference(resource, NULL); if (SUCCEEDED(hr)) @@ -3447,6 +3447,8 @@ NineDevice9_new( struct pipe_screen *pScreen, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, struct d3dadapter9_context *pCTX, + boolean ex, + D3DDISPLAYMODEEX *pFullscreenDisplayMode, struct NineDevice9 **ppOut ) { BOOL lock; @@ -3454,5 +3456,6 @@ NineDevice9_new( struct pipe_screen *pScreen, NINE_NEW(Device9, ppOut, lock, /* args */ pScreen, pCreationParameters, pCaps, - pPresentationParameters, pD3D9, pPresentationGroup, pCTX); + pPresentationParameters, pD3D9, pPresentationGroup, pCTX, + ex, pFullscreenDisplayMode); } diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h index 9dc248e..3649e1b
Re: [Mesa-dev] [PATCH 1/2] glsl: Disallow float literals with the 'f' suffix but no point or exponent
On Wed, Nov 26, 2014 at 12:02 PM, Neil Roberts n...@linux.intel.com wrote: According to the GLSL spec float literals like ‘1f’ shouldn't be allowed without adding a decimal point or an exponent. Apparently the AMD driver also disallows this so it seems unlikely that anything would be relying on it. --- Thanks Neil. Both are Reviewed-by: Matt Turner matts...@gmail.com And for added confirmation, float x = 1f doesn't compile in C either. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] r600: fix texture gradients instruction emission (v2)
Hello Dave, Cherry picking this commit for the 10.3 branch resulted in a number of non-trivial conflicts. Can you or anyone else familiar with the code backport this for 10.3 ? Thanks Emil On 18/11/14 22:53, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com The piglit tests were failing, and it appeared to be SB optimising out things, but Glenn pointed out the gradients are meant to be clause local, so we should emit the texture instructions in the same clause. This moves things around to always copy to a temp and then emit the texture clauses for H/V. v2: Glenn pointed out we could get another ALU fetch in the wrong place, so load the src gpr earlier as well. Fixes at least: ./bin/tex-miplevel-selection textureGrad 2D Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/r600_shader.c | 59 ++ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 76daf2c..41caac3 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -5110,11 +5110,37 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) } if (inst-Instruction.Opcode == TGSI_OPCODE_TXD) { + int temp_h, temp_v; /* TGSI moves the sampler to src reg 3 for TXD */ sampler_src_reg = 3; sampler_index_mode = inst-Src[sampler_src_reg].Indirect.Index == 2 ? 2 : 0; // CF_INDEX_1 : CF_INDEX_NONE + src_loaded = TRUE; + for (i = 0; i 3; i++) { + int treg = r600_get_temp(ctx); + + if (i == 0) + src_gpr = treg; + else if (i == 1) + temp_h = treg; + else + temp_v = treg; + + for (j = 0; j 4; j++) { + memset(alu, 0, sizeof(struct r600_bytecode_alu)); + alu.op = ALU_OP1_MOV; +r600_bytecode_src(alu.src[0], ctx-src[i], j); +alu.dst.sel = treg; +alu.dst.chan = j; +if (j == 3) + alu.last = 1; +alu.dst.write = 1; +r = r600_bytecode_add_alu(ctx-bc, alu); +if (r) +return r; + } + } for (i = 1; i 3; i++) { /* set gradients h/v */ memset(tex, 0, sizeof(struct r600_bytecode_tex)); @@ -5125,35 +5151,12 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS; tex.resource_index_mode = sampler_index_mode; - if (tgsi_tex_src_requires_loading(ctx, i)) { - tex.src_gpr = r600_get_temp(ctx); - tex.src_sel_x = 0; - tex.src_sel_y = 1; - tex.src_sel_z = 2; - tex.src_sel_w = 3; + tex.src_gpr = (i == 1) ? temp_h : temp_v; + tex.src_sel_x = 0; + tex.src_sel_y = 1; + tex.src_sel_z = 2; + tex.src_sel_w = 3; - for (j = 0; j 4; j++) { - memset(alu, 0, sizeof(struct r600_bytecode_alu)); - alu.op = ALU_OP1_MOV; -r600_bytecode_src(alu.src[0], ctx-src[i], j); -alu.dst.sel = tex.src_gpr; -alu.dst.chan = j; -if (j == 3) -alu.last = 1; -alu.dst.write = 1; -r = r600_bytecode_add_alu(ctx-bc, alu); -if (r) -return r; - } - - } else { - tex.src_gpr = tgsi_tex_get_src_gpr(ctx, i); - tex.src_sel_x = ctx-src[i].swizzle[0]; - tex.src_sel_y = ctx-src[i].swizzle[1]; - tex.src_sel_z = ctx-src[i].swizzle[2]; - tex.src_sel_w = ctx-src[i].swizzle[3]; - tex.src_rel = ctx-src[i].rel; - } tex.dst_gpr = ctx-temp_reg; /*
Re: [Mesa-dev] [PATCH] r600g: do all CUBE ALU operations before gradient texture operations (v2)
Hello Dave, Cherry picking this commit for the 10.3 branch resulted in a number of non-trivial conflicts. Can you or anyone else familiar with the code backport this for 10.3 ? Thanks Emil On 24/11/14 00:32, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com This moves all the CUBE section above the gradients section, it also fixes a bug with gradient handling in the bytecode handling where the gradient dst register should be ignored but isn't causing the subsequent sample_g to fail into a second tex clause. v2: avoid changes to bytecode by using spare temps Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/r600_shader.c | 136 + 1 file changed, 72 insertions(+), 64 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 41caac3..e7b39be 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -5095,6 +5095,14 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) inst-Instruction.Opcode == TGSI_OPCODE_TG4) sampler_src_reg = 2; + /* TGSI moves the sampler to src reg 3 for TXD */ + if (inst-Instruction.Opcode == TGSI_OPCODE_TXD) + sampler_src_reg = 3; + + sampler_index_mode = inst-Src[sampler_src_reg].Indirect.Index == 2 ? 2 : 0; // CF_INDEX_1 : CF_INDEX_NONE + if (sampler_index_mode) + ctx-shader-uses_index_registers = true; + src_gpr = tgsi_tex_get_src_gpr(ctx, 0); if (inst-Texture.Texture == TGSI_TEXTURE_BUFFER) { @@ -5109,67 +5117,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) } } - if (inst-Instruction.Opcode == TGSI_OPCODE_TXD) { - int temp_h, temp_v; - /* TGSI moves the sampler to src reg 3 for TXD */ - sampler_src_reg = 3; - - sampler_index_mode = inst-Src[sampler_src_reg].Indirect.Index == 2 ? 2 : 0; // CF_INDEX_1 : CF_INDEX_NONE - - src_loaded = TRUE; - for (i = 0; i 3; i++) { - int treg = r600_get_temp(ctx); - - if (i == 0) - src_gpr = treg; - else if (i == 1) - temp_h = treg; - else - temp_v = treg; - - for (j = 0; j 4; j++) { - memset(alu, 0, sizeof(struct r600_bytecode_alu)); - alu.op = ALU_OP1_MOV; -r600_bytecode_src(alu.src[0], ctx-src[i], j); -alu.dst.sel = treg; -alu.dst.chan = j; -if (j == 3) - alu.last = 1; -alu.dst.write = 1; -r = r600_bytecode_add_alu(ctx-bc, alu); -if (r) -return r; - } - } - for (i = 1; i 3; i++) { - /* set gradients h/v */ - memset(tex, 0, sizeof(struct r600_bytecode_tex)); - tex.op = (i == 1) ? FETCH_OP_SET_GRADIENTS_H : - FETCH_OP_SET_GRADIENTS_V; - tex.sampler_id = tgsi_tex_get_src_gpr(ctx, sampler_src_reg); - tex.sampler_index_mode = sampler_index_mode; - tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS; - tex.resource_index_mode = sampler_index_mode; - - tex.src_gpr = (i == 1) ? temp_h : temp_v; - tex.src_sel_x = 0; - tex.src_sel_y = 1; - tex.src_sel_z = 2; - tex.src_sel_w = 3; - - tex.dst_gpr = ctx-temp_reg; /* just to avoid confusing the asm scheduler */ - tex.dst_sel_x = tex.dst_sel_y = tex.dst_sel_z = tex.dst_sel_w = 7; - if (inst-Texture.Texture != TGSI_TEXTURE_RECT) { - tex.coord_type_x = 1; - tex.coord_type_y = 1; - tex.coord_type_z = 1; - tex.coord_type_w = 1; - } - r = r600_bytecode_add_tex(ctx-bc, tex); - if (r) - return r; - } - } else if (inst-Instruction.Opcode == TGSI_OPCODE_TXP) { + if (inst-Instruction.Opcode == TGSI_OPCODE_TXP) { int out_chan; /* Add perspective divide */ if (ctx-bc-chip_class == CAYMAN) { @@ -5233,9 +5181,6 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) src_gpr = ctx-temp_reg; }
Re: [Mesa-dev] [Mesa-stable] [PATCH v3 01/19] st/nine: clean device9ex.
Thanks, patch 1 is not needed for patch 2 and 3. As for patch 2, I'm 99% sure it's not needed for patch 3. Axel On 26/11/2014 21:14, Emil Velikov wrote : Hi guys, I've picked up patches 1-10 13 for master. Afaict there is still a comment on two on the topic of queries, so I'll leave these out for now. Patches 12 does not seem to be mesa-stable material based on the commit message, yet they seem to be a requirement for #3. Can you add a couple of words to make this clearer in future patches ? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH V2] mesa: Permanently enable features supported by target CPU at compile time.
On 21/11/14 09:02, Siavash Eliasi wrote: On 11/10/2014 04:28 AM, Emil Velikov wrote: I'm not sure did you just said that you've checked it, or that's what it ought to do ? There is a reason why I'm so picky - this bizarre (as one might call it) setup is just the tip of the iceberg when it comes to people building mesa themselves. Would be nice to get your patch in as long as it does not break stuff :) -Emil Hello Emil, David Heidelberg kindly tested the patch on his machines and it was okay. Please consider pushing the patch upstream if it looks good to you guys too. Considering Ian's supporting comment and confirming that it does not break the unique builds I've added David's r-b and pushed this to master. Thanks -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] util/hash_table: Rework the API to know about hashing
Timothy Arceri t_arc...@yahoo.com.au writes: On the subject of the hash table performance I spent way to much time looking into this recently. In the end it was taking up to much time benchmarking and profiling for what it was worth (at least in my test cases) so I've moved on for now. However for those interested here is what I found. Unsurprisingly most time is spent doing the hash and resolving collisions. For increased hash speed I implemented the _mm_crc32_u8() intrinsic which seemed to give a nice bump in performance and with no noticeable change in collisions over the FNV-1a hash. For better collision resolution I was looking at robin hood hashing which looks like a nice fit for the current table [1] but moved on before trying it out. Neat. I bet you could get measurable improvements on i965's CPU overhead, which spends quite a bit of time hashing. signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] r600g: merge the TXQ and BUFFER constant buffers
On Mon, 24 Nov 2014 04:36:06 +0100, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com We are using 1 more buffer than we have, although in the future the driver should just end up using one buffer in total probably, this is a good first step, it merges the txq cube array and buffer info constants on r600 and evergreen. this also most likely breaks llvm backend, I've changed it, but it definitely needs fixes for this. this fixes a bunch of geom shader textureSize tests on rv635 from gpu reset to pass. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/r600_llvm.c | 3 +- src/gallium/drivers/r600/r600_pipe.h | 8 +-- src/gallium/drivers/r600/r600_shader.c | 18 -- src/gallium/drivers/r600/r600_state_common.c | 92 +++- 4 files changed, 54 insertions(+), 67 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index c19693a..470c65f 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gallium/drivers/r600/r600_llvm.c @@ -23,7 +23,6 @@ #define CONSTANT_BUFFER_0_ADDR_SPACE 8 #define CONSTANT_BUFFER_1_ADDR_SPACE (CONSTANT_BUFFER_0_ADDR_SPACE + R600_UCP_CONST_BUFFER) -#define CONSTANT_TXQ_BUFFER (CONSTANT_BUFFER_0_ADDR_SPACE + R600_TXQ_CONST_BUFFER) #define LLVM_R600_BUFFER_INFO_CONST_BUFFER \ (CONSTANT_BUFFER_0_ADDR_SPACE + R600_BUFFER_INFO_CONST_BUFFER) @@ -690,7 +689,7 @@ static void llvm_emit_tex( if (emit_data-inst-Dst[0].Register.WriteMask 4) { LLVMValueRef offset = lp_build_const_int32(bld_base-base.gallivm, 0); LLVMValueRef ZLayer = LLVMBuildExtractElement(gallivm-builder, - llvm_load_const_buffer(bld_base, offset, CONSTANT_TXQ_BUFFER), +llvm_load_const_buffer(bld_base, offset, LLVM_R600_BUFFER_INFO_CONST_BUFFER, lp_build_const_int32(gallivm, 0), ); I don't see how llvm_emit_tex can possibly work in its current condition. This patch breaks it a little more... emit_data-output[0] = LLVMBuildInsertElement(gallivm-builder, emit_data-output[0], ZLayer, lp_build_const_int32(gallivm, 2), ); diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 40b0328..e27e877 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -44,14 +44,13 @@ #define R600_TRACE_CS_DWORDS 7 #define R600_MAX_USER_CONST_BUFFERS 13 -#define R600_MAX_DRIVER_CONST_BUFFERS 4 +#define R600_MAX_DRIVER_CONST_BUFFERS 3 #define R600_MAX_CONST_BUFFERS (R600_MAX_USER_CONST_BUFFERS + R600_MAX_DRIVER_CONST_BUFFERS) /* start driver buffers after user buffers */ #define R600_UCP_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS) -#define R600_TXQ_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 1) -#define R600_BUFFER_INFO_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 2) -#define R600_GS_RING_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 3) +#define R600_BUFFER_INFO_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 1) +#define R600_GS_RING_CONST_BUFFER (R600_MAX_USER_CONST_BUFFERS + 2) /* Currently R600_MAX_CONST_BUFFERS is too large, the hardware only has 16 buffers, but the driver is * trying to use 17. Avoid accidentally aliasing with user UBOs for The comment here needs updating, its should be down to 16 buffers total now ie within hardware limits. D3D 11 does require 15 to be available for application use though so eventually all the driver buffers ought to be merged, but outside of scope of this patch. SAMPLE_POSITIONS by using an id16. * UCP/SAMPLE_POSITIONS are never accessed by same shader stage so they can use the same id. @@ -316,7 +315,6 @@ struct r600_samplerview_state { uint32_tdirty_mask; uint32_tcompressed_depthtex_mask; /* which textures are depth */ uint32_tcompressed_colortex_mask; - boolean dirty_txq_constants; boolean dirty_buffer_constants; }; diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index a772dee..61ff162 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -5035,8 +5035,9 @@ static int r600_do_buffer_txq(struct r600_shader_ctx *ctx) alu.op = ALU_OP1_MOV; if (ctx-bc-chip_class = EVERGREEN) { - alu.src[0].sel = 512 + (id / 4); - alu.src[0].chan = id % 4; + /* channel 0 or 2 of each word */ + alu.src[0].sel = 512 + (id / 2); + alu.src[0].chan = (id % 2) * 2; } else { /* r600 we have them at channel 2 of the second dword */ alu.src[0].sel = 512 + (id * 2) + 1; @@ -5697,9 +5698,16 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
Re: [Mesa-dev] [PATCH] Set llvmpipe and softpipe note only for MSAA.
Hi! I'm not familiar with the patch and merge process, I just wonder if it is normal that my patch isn't merged yet (it's been more than 20 days). I can wait, but I just want to be sure I'm not waiting for nothing :D Thanks! 2014-11-03 6:02 GMT-05:00 Roland Scheidegger srol...@vmware.com: Am 02.11.2014 um 18:35 schrieb Romain Failliot: Hi! Sorry if I'm doing this wrong, first time here. I've tried git send-mail, but I don't have an SMTP server so it wasn't working. Here is the simple commit (and the patch attached): Set llvmpipe and softpipe note only for MSAA. Right now, in mesamatrix.net https://urldefense.proofpoint.com/v2/url?u=http-3A__mesamatrix.netd=AAMFaQc=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEsr=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_Im=kzXQqa7IRw5KjPPr67fHHaH3RMVOcsUcvSFCWxNS8Vks=-N1IRI3obYJVa_Y2haMbftx-cr4yrp4pPyxX6LfcyqUe=, the footnote is set so that it seems to be for all the features, while actually it seems to be only for the MSAA. I'm ok with that change. Well in the txt file it seemed to make sense to add that as a footnote for GL 3.0 (because without it you're not truly GL 3.0 compliant) but I see this causes problems with parsing. Roland ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] [RFC] MESA_shading_language_130: is this it?
Glamor is 4x faster on my ILK using glsl 130 at core text using x11perf -ftext. Ian started writing a spec for this extension a while back, which seems like most of the work, this patch seems to do enough, to advertise GLSL 1.30. TODO: fix extension numbering get piglit to execute tests on this Just-hacked-up-by: Dave Airlie airl...@redhat.com --- src/mapi/glapi/gen/MESA_shading_language_130.xml | 255 +++ src/mapi/glapi/gen/gl_API.xml| 2 + src/mesa/drivers/dri/i965/intel_extensions.c | 5 + src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 5 files changed, 264 insertions(+) create mode 100644 src/mapi/glapi/gen/MESA_shading_language_130.xml diff --git a/src/mapi/glapi/gen/MESA_shading_language_130.xml b/src/mapi/glapi/gen/MESA_shading_language_130.xml new file mode 100644 index 000..9aa553d --- /dev/null +++ b/src/mapi/glapi/gen/MESA_shading_language_130.xml @@ -0,0 +1,255 @@ +?xml version=1.0? +!DOCTYPE OpenGLAPI SYSTEM gl_API.dtd + +OpenGLAPI + +category name=GL_MESA_shading_language_130 number=999 + +enum name=VERTEX_ATTRIB_ARRAY_INTEGERvalue=0x88FD/ +enum name=SAMPLER_1D_ARRAY value=0x8DC0/ +enum name=SAMPLER_2D_ARRAY value=0x8DC1/ +enum name=SAMPLER_1D_ARRAY_SHADOWvalue=0x8DC3/ +enum name=SAMPLER_2D_ARRAY_SHADOWvalue=0x8DC4/ +enum name=SAMPLER_CUBE_SHADOWvalue=0x8DC5/ +enum name=UNSIGNED_INT_VEC2 value=0x8DC6/ +enum name=UNSIGNED_INT_VEC3 value=0x8DC7/ +enum name=UNSIGNED_INT_VEC4 value=0x8DC8/ +enum name=INT_SAMPLER_1D value=0x8DC9/ +enum name=INT_SAMPLER_2D value=0x8DCA/ +enum name=INT_SAMPLER_3D value=0x8DCB/ +enum name=INT_SAMPLER_CUBE value=0x8DCC/ +enum name=INT_SAMPLER_1D_ARRAY value=0x8DCE/ +enum name=INT_SAMPLER_2D_ARRAY value=0x8DCF/ +enum name=UNSIGNED_INT_SAMPLER_1Dvalue=0x8DD1/ +enum name=UNSIGNED_INT_SAMPLER_2Dvalue=0x8DD2/ +enum name=UNSIGNED_INT_SAMPLER_3Dvalue=0x8DD3/ +enum name=UNSIGNED_INT_SAMPLER_CUBE value=0x8DD4/ +enum name=UNSIGNED_INT_SAMPLER_1D_ARRAY value=0x8DD6/ +enum name=UNSIGNED_INT_SAMPLER_2D_ARRAY value=0x8DD7/ + +!-- There is no MIN_PROGRAM_TEXEL_OFFSET in glext.h. There is + MIN_PROGRAM_TEXEL_OFFSET_NV and MIN_PROGRAM_TEXEL_OFFSET (OpenGL + 3.0). Same goes for MAX_PROGRAM_TEXEL_OFFSET. +-- +enum name=MIN_PROGRAM_TEXEL_OFFSET value=0x8904 +size name=Get mode=get/ +/enum +enum name=MAX_PROGRAM_TEXEL_OFFSET value=0x8905 +size name=Get mode=get/ +/enum + +enum name=CLIP_DISTANCE0 value=0x3000/ +enum name=CLIP_DISTANCE1 value=0x3001/ +enum name=CLIP_DISTANCE2 value=0x3002/ +enum name=CLIP_DISTANCE3 value=0x3003/ +enum name=CLIP_DISTANCE4 value=0x3004/ +enum name=CLIP_DISTANCE5 value=0x3005/ +enum name=CLIP_DISTANCE6 value=0x3006/ +enum name=CLIP_DISTANCE7 value=0x3007/ + +enum name=MAX_CLIP_DISTANCES value=0x0D32/ + +!-- +function name=VertexAttribI1i offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLint/ +/function + +function name=VertexAttribI2i offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLint/ +param name=y type=GLint/ +/function + +function name=VertexAttribI3i offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLint/ +param name=y type=GLint/ +param name=z type=GLint/ +/function + +function name=VertexAttribI4i offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLint/ +param name=y type=GLint/ +param name=z type=GLint/ +param name=w type=GLint/ +/function + +function name=VertexAttribI1ui offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLuint/ +/function + +function name=VertexAttribI2ui offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLuint/ +param name=y type=GLuint/ +/function + +function name=VertexAttribI3ui offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x type=GLuint/ +param name=y type=GLuint/ +param name=z type=GLuint/ +/function + +function name=VertexAttribI4ui offset=assign exec=dynamic +param name=index type=GLuint/ +param name=x
Re: [Mesa-dev] [PATCH 1/2] glsl: Disallow float literals with the 'f' suffix but no point or exponent
Thanks Neil! I was planning to fix this once I was done with the format conversion stuff, so you saved me some work :) I tested the patch and it fixes the following dEQP tests: dEQP-GLES3.functional.shaders.constants.float_int_f_suffix_0_vertex dEQP-GLES3.functional.shaders.constants.float_int_f_suffix_0_fragment dEQP-GLES3.functional.shaders.constants.float_int_f_suffix_1_vertex dEQP-GLES3.functional.shaders.constants.float_int_f_suffix_1_fragment Iago On Wed, 2014-11-26 at 20:02 +, Neil Roberts wrote: According to the GLSL spec float literals like ‘1f’ shouldn't be allowed without adding a decimal point or an exponent. Apparently the AMD driver also disallows this so it seems unlikely that anything would be relying on it. --- This was discussed here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071039.html I've run this through Piglit and it doesn't cause any regressions except for glsl-floating-constant-120.shader_test but I think that test is bogus. I've posted a patch to change it here: http://lists.freedesktop.org/archives/piglit/2014-November/013488.html src/glsl/glsl_lexer.ll | 4 1 file changed, 4 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index ad6d32f..419a07b 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -466,10 +466,6 @@ layout { yylval-real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; } -[0-9]+[fF] { - yylval-real = _mesa_strtof(yytext, NULL); - return FLOATCONSTANT; - } true { yylval-n = 1; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev