mesa.git
12 years agomesa: fix html in shortlog_mesa.sh script
Andreas Boll [Thu, 14 Jun 2012 14:25:42 +0000 (08:25 -0600)]
mesa: fix html in shortlog_mesa.sh script

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: added Ian's shortlog_mesa.sh script in bin/
Brian Paul [Thu, 14 Jun 2012 14:22:54 +0000 (08:22 -0600)]
mesa: added Ian's shortlog_mesa.sh script in bin/

12 years agosvga: make svga_surface_needs_propagation() surface const
Brian Paul [Wed, 13 Jun 2012 17:41:32 +0000 (11:41 -0600)]
svga: make svga_surface_needs_propagation() surface const

12 years agosvga: add svga_surface_const() cast wrapper
Brian Paul [Wed, 13 Jun 2012 17:41:03 +0000 (11:41 -0600)]
svga: add svga_surface_const() cast wrapper

12 years agosvga: fix comment typo
Brian Paul [Wed, 13 Jun 2012 17:40:34 +0000 (11:40 -0600)]
svga: fix comment typo

12 years agorbug: fix make process on Linux Mint 13 x64.
Aaron Watry [Wed, 13 Jun 2012 01:16:37 +0000 (20:16 -0500)]
rbug: fix make process on Linux Mint 13 x64.

Previously, rbug_*.c would fail to compile with incomplete prototype
errors when make was run from the command line on my machine. My IDE
always built fine, and still does after this patch (Netbeans 7.1.2).

Most of the includes from files in gallium/auxiliary/rbug/* were
assuming an rbug/ subdirectory, while the headers are actually in the
same directory as the .c files.

The build error was also previously a problem for me on Ubuntu 11.10
and Mint 12.

Fixes build for the following configuration: ./autogen.sh
--enable-debug --enable-texture-float --with-gallium-drivers=r600
--with-dri-drivers=radeon --enable-r600-llvm-compiler

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agowindows/gdi: Remove GL_NV_register_combiners and GL_NV_vertex_array_range exports
José Fonseca [Thu, 14 Jun 2012 11:02:03 +0000 (12:02 +0100)]
windows/gdi: Remove GL_NV_register_combiners and GL_NV_vertex_array_range exports

12 years agoglsl: Fix pi/2 constant in acos built-in function
Ian Romanick [Mon, 4 Jun 2012 17:20:36 +0000 (10:20 -0700)]
glsl: Fix pi/2 constant in acos built-in function

In single precision, 1.5707963 becomes 1.5707962513 which is too
small.  However, 1.5707964 becomes 1.5707963705 which is just right.
The value 1.5707964 is already used in asin.ir.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
12 years agoglapi: Remove GL_NV_vertex_array_range from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:50:54 +0000 (12:50 -0700)]
glapi: Remove GL_NV_vertex_array_range from the dispatch table

There is no GLX protocol for these functions.  Open-source Linux
driver have not supported this extension for many years, and it seems
unlikely at this point that this support will return.  There's no
reason to have slots for these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove GL_NV_fence from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:46:54 +0000 (12:46 -0700)]
glapi: Remove GL_NV_fence from the dispatch table

There is no GLX protocol for these functions.  No open-source Linux
driver has ever supported this extension, and it seems unlikely at
this point that one ever will.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove GL_NV_register_combiners from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:41:08 +0000 (12:41 -0700)]
glapi: Remove GL_NV_register_combiners from the dispatch table

There is no GLX protocol for these functions.  No open-source Linux
driver has ever supported this extension, and it seems unlikely at
this point that one ever will.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove GL_APPLE_texture_range from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:32:27 +0000 (12:32 -0700)]
glapi: Remove GL_APPLE_texture_range from the dispatch table

There is no GLX protocol for these functions, and no Linux driver has
ever supported this extension.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove GL_SGIX_pixel_texture from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:23:36 +0000 (12:23 -0700)]
glapi: Remove GL_SGIX_pixel_texture from the dispatch table

There is no GLX protocol for this function.  Open-source Linux driver
have not supported this extension for many years, and it seems
unlikely at this point that this support will return.  There's no
reason to have slots for this function in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove GL_SGIS_pixel_texture from the dispatch table
Ian Romanick [Tue, 29 May 2012 19:15:11 +0000 (12:15 -0700)]
glapi: Remove GL_SGIS_pixel_texture from the dispatch table

There is no GLX protocol for these functions, and no Linux driver has
ever supported this extension.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa/tests: Add tests for the generated dispatch table
Ian Romanick [Tue, 29 May 2012 18:28:11 +0000 (11:28 -0700)]
mesa/tests: Add tests for the generated dispatch table

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions
Ian Romanick [Fri, 25 May 2012 15:26:33 +0000 (08:26 -0700)]
mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing GL_EXT_texture_sRGB_decode enums
Ian Romanick [Fri, 25 May 2012 19:35:21 +0000 (12:35 -0700)]
glapi: Add missing GL_EXT_texture_sRGB_decode enums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing GL_EXT_framebuffer_sRGB enums
Ian Romanick [Fri, 25 May 2012 19:35:04 +0000 (12:35 -0700)]
glapi: Add missing GL_EXT_framebuffer_sRGB enums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing GL_EXT_packed_float enums
Ian Romanick [Fri, 25 May 2012 19:34:51 +0000 (12:34 -0700)]
glapi: Add missing GL_EXT_packed_float enums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing framebuffer sRGB enum
Ian Romanick [Fri, 25 May 2012 19:33:57 +0000 (12:33 -0700)]
glapi: Add missing framebuffer sRGB enum

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add uniform buffer object enums
Ian Romanick [Fri, 25 May 2012 19:13:23 +0000 (12:13 -0700)]
glapi: Add uniform buffer object enums

These are from OpenGL 3.1 and ARB_uniform_buffer_object.  I only added
them to 3.1 because that required the least work.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing enums for GL_NV_fragment_program
Ian Romanick [Fri, 25 May 2012 19:12:58 +0000 (12:12 -0700)]
glapi: Add missing enums for GL_NV_fragment_program

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing enums for GL_ARB_occlusion_query2
Ian Romanick [Fri, 25 May 2012 19:12:33 +0000 (12:12 -0700)]
glapi: Add missing enums for GL_ARB_occlusion_query2

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove extraneous GL_ from TEXTURE_IMMUTABLE_FORMAT
Ian Romanick [Fri, 25 May 2012 19:07:40 +0000 (12:07 -0700)]
glapi: Remove extraneous GL_ from TEXTURE_IMMUTABLE_FORMAT

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing enums for GL_ATI_fragment_shader
Ian Romanick [Fri, 25 May 2012 18:39:59 +0000 (11:39 -0700)]
glapi: Add missing enums for GL_ATI_fragment_shader

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add texture swizzle enums
Ian Romanick [Fri, 25 May 2012 18:34:42 +0000 (11:34 -0700)]
glapi: Add texture swizzle enums

These are from OpenGL 3.3, ARB_texture_swizzle, and
EXT_texture_swizzle (with different names).  I only added them to 3.3
because that required the least work.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add a couple missing 3.0 enums
Ian Romanick [Fri, 25 May 2012 18:34:16 +0000 (11:34 -0700)]
glapi: Add a couple missing 3.0 enums

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing _NV extension on COMBINE4
Ian Romanick [Fri, 25 May 2012 18:33:39 +0000 (11:33 -0700)]
glapi: Add missing _NV extension on COMBINE4

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing enums for GL_EXT_vertex_array
Ian Romanick [Fri, 25 May 2012 18:18:21 +0000 (11:18 -0700)]
glapi: Add missing enums for GL_EXT_vertex_array

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Add missing enums for GL_EXT_compiled_vertex_array
Ian Romanick [Fri, 25 May 2012 18:13:42 +0000 (11:13 -0700)]
glapi: Add missing enums for GL_EXT_compiled_vertex_array

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglx/tests: Add unit tests for generated code in indirect_init.c
Ian Romanick [Thu, 24 May 2012 17:21:03 +0000 (10:21 -0700)]
glx/tests: Add unit tests for generated code in indirect_init.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglx/tests: Add unit tests for generated code in indirect_size.c
Ian Romanick [Thu, 24 May 2012 16:08:56 +0000 (09:08 -0700)]
glx/tests: Add unit tests for generated code in indirect_size.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglx/tests: Rename test as glx-test
Ian Romanick [Tue, 29 May 2012 22:20:21 +0000 (15:20 -0700)]
glx/tests: Rename test as glx-test

This matches the existing test in src/glsl/tests.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglx: Move tests from tests/glx to src/glx/tests
Ian Romanick [Wed, 23 May 2012 22:23:22 +0000 (15:23 -0700)]
glx: Move tests from tests/glx to src/glx/tests

This matches the organization of other unit tests in Mesa.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoutil: add some comments, fix indentation
Brian Paul [Tue, 12 Jun 2012 23:27:56 +0000 (17:27 -0600)]
util: add some comments, fix indentation

12 years agoglsl: Transform dot product by a basis vector into a swizzle
Matt Turner [Tue, 5 Jun 2012 01:59:34 +0000 (21:59 -0400)]
glsl: Transform dot product by a basis vector into a swizzle

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add is_basis function
Matt Turner [Mon, 4 Jun 2012 20:26:32 +0000 (16:26 -0400)]
glsl: Add is_basis function

Determines whether it's a basis vector, i.e., a vector with one element
equal to 1 and all other elements equal to 0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Check for zero vectors in ir_binop_dot
Matt Turner [Mon, 4 Jun 2012 20:17:12 +0000 (16:17 -0400)]
glsl: Check for zero vectors in ir_binop_dot

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: move variable declaration out of loop to fix MSVC build
Brian Paul [Tue, 12 Jun 2012 22:31:33 +0000 (16:31 -0600)]
mesa: move variable declaration out of loop to fix MSVC build

12 years agomesa: Fix bool-int mismatch
Stéphane Marchesin [Tue, 12 Jun 2012 22:11:21 +0000 (15:11 -0700)]
mesa: Fix bool-int mismatch

Also include stdbool for windows.

12 years agomesa: Fix hash table leak
Antoine Labour [Fri, 25 May 2012 01:17:50 +0000 (18:17 -0700)]
mesa: Fix hash table leak

When a value was replaced, the new key was strdup'd and leaked.
To fix this, we modify the hash table implementation to return
whether the value was replaced and free() the (now useless)
duplicate string.

12 years agomesa: Free uniforms correclty.
Antoine Labour [Fri, 25 May 2012 01:15:44 +0000 (18:15 -0700)]
mesa: Free uniforms correclty.

This is an array of uniforms, not a single one.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 8.0 branch.

12 years agometa: Cleanup the resources we allocate.
Antoine Labour [Fri, 25 May 2012 01:08:27 +0000 (18:08 -0700)]
meta: Cleanup the resources we allocate.

When we have multiple shared contexts, and one of them is
long-running, this will lead to never freeing those resources
since they are shared. Instead, free them right away on context
destruction since we know the other context isn't using them.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 8.0 branch.

12 years agoglx: Handle a null reply in QueryVersion.
Stéphane Marchesin [Fri, 25 May 2012 00:58:53 +0000 (17:58 -0700)]
glx: Handle a null reply in QueryVersion.

Works around crashes when X connections break.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 8.0 branch.

12 years agoradeonsi: Don't always re-compile shaders after they're bound.
Michel Dänzer [Tue, 12 Jun 2012 18:18:24 +0000 (20:18 +0200)]
radeonsi: Don't always re-compile shaders after they're bound.

12 years agost/xorg: Fix crash on startup.
Dave Airlie [Fri, 8 Jun 2012 16:10:18 +0000 (18:10 +0200)]
st/xorg: Fix crash on startup.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeonsi: Use linear instead of constant interpolation for now.
Michel Dänzer [Fri, 8 Jun 2012 15:15:21 +0000 (17:15 +0200)]
radeonsi: Use linear instead of constant interpolation for now.

Constant interpolation still hangs the GPU for some reason.

12 years agoradeonsi: Handle SUB_f32.
Thomas Stellard [Thu, 7 Jun 2012 17:33:24 +0000 (19:33 +0200)]
radeonsi: Handle SUB_f32.

Signed-off-by: Thomas Stellard <tom.stellard@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeonsi: Only dump shaders with environment variable RADEON_DUMP_SHADERS=1.
Michel Dänzer [Thu, 7 Jun 2012 17:30:47 +0000 (19:30 +0200)]
radeonsi: Only dump shaders with environment variable RADEON_DUMP_SHADERS=1.

12 years agomesa: Build git_sha1.h before computing dependencies.
Eric Anholt [Tue, 12 Jun 2012 01:46:51 +0000 (18:46 -0700)]
mesa: Build git_sha1.h before computing dependencies.

Otherwise, version.c doesn't get a dependency on it in a clean build,
and then it doesn't necessarily get generated before version.c is
compiled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50976
Reviewed-by: Jakob Bornecrantz jakob@vmware.com
12 years agodocs: whitespaces cleanup
Andreas Boll [Tue, 12 Jun 2012 07:05:49 +0000 (09:05 +0200)]
docs: whitespaces cleanup

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: remove some superfluous <p> tags
Andreas Boll [Tue, 12 Jun 2012 07:05:46 +0000 (09:05 +0200)]
docs: remove some superfluous <p> tags

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: remove unused table styles
Andreas Boll [Tue, 12 Jun 2012 07:05:42 +0000 (09:05 +0200)]
docs: remove unused table styles

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: remove unused anchor links
Andreas Boll [Tue, 12 Jun 2012 07:05:39 +0000 (09:05 +0200)]
docs: remove unused anchor links

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: prefer lowercase html tags
Andreas Boll [Tue, 12 Jun 2012 07:05:36 +0000 (09:05 +0200)]
docs: prefer lowercase html tags

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: use id instead of <a name>
Andreas Boll [Tue, 12 Jun 2012 07:05:33 +0000 (09:05 +0200)]
docs: use id instead of <a name>

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/subset-A.html: fix markup
Andreas Boll [Tue, 12 Jun 2012 07:05:30 +0000 (09:05 +0200)]
docs/subset-A.html: fix markup

fixes tidy warnings:

line 11 column 1 - Warning: <center> isn't allowed in <h1> elements
line 10 column 1 - Info: <h1> previously mentioned
line 11 column 34 - Warning: discarding unexpected </center>
line 14 column 1 - Warning: <center> isn't allowed in <h2> elements
line 13 column 1 - Info: <h2> previously mentioned
line 13 column 1 - Warning: missing </h2> before <h3>
line 18 column 1 - Warning: discarding unexpected </center>
line 19 column 1 - Warning: discarding unexpected </h2>

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/news.html: use proper markup
Andreas Boll [Tue, 12 Jun 2012 07:05:26 +0000 (09:05 +0200)]
docs/news.html: use proper markup

fixes tidy warnings:

line 1227 column 9 - Warning: missing <li>
line 1228 column 17 - Warning: missing <li>
line 1235 column 25 - Warning: missing <li>
line 1259 column 17 - Warning: missing <li>
line 1267 column 9 - Warning: missing <li>
line 1359 column 9 - Warning: missing <li>
line 1361 column 55 - Warning: discarding unexpected </i>
line 1354 column 1 - Warning: trimming empty <p>

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: fix html end/start tags
Andreas Boll [Tue, 12 Jun 2012 07:05:22 +0000 (09:05 +0200)]
docs: fix html end/start tags

for more well-formed html

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: escape special html chars
Andreas Boll [Tue, 12 Jun 2012 07:05:15 +0000 (09:05 +0200)]
docs: escape special html chars

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: consolidate html header and footer
Andreas Boll [Tue, 12 Jun 2012 07:05:03 +0000 (09:05 +0200)]
docs: consolidate html header and footer

add doctype
add character encoding
add missing <head> tag
unify html header and footer

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.
Kenneth Graunke [Sun, 10 Jun 2012 04:44:58 +0000 (21:44 -0700)]
mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.

Fixes oglconform's tbo/basic.buffer.delete test.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: Make glPrimitiveRestartIndex execute immediately in display lists.
Kenneth Graunke [Sun, 10 Jun 2012 01:06:17 +0000 (18:06 -0700)]
mesa: Make glPrimitiveRestartIndex execute immediately in display lists.

From the GL_NV_primitive_restart spec:
"PrimitiveRestartIndexNV is not compiled into display lists, but is
 executed immediately."

Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop
dispatch stub.

+2 oglconforms.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: Check for a negative "size" parameter in glCopyBufferSubData().
Kenneth Graunke [Sat, 9 Jun 2012 05:12:23 +0000 (22:12 -0700)]
mesa: Check for a negative "size" parameter in glCopyBufferSubData().

From the GL_ARB_copy_buffer spec:
"An INVALID_VALUE error is generated if any of readoffset, writeoffset,
 or size are negative [...]"

Fixes oglconform's copybuffer/negative.CNNegativeValues test.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoautomake: Add AM_PROG_AR before LT_INIT to silence a lot of warnings.
Kenneth Graunke [Thu, 31 May 2012 04:54:21 +0000 (21:54 -0700)]
automake: Add AM_PROG_AR before LT_INIT to silence a lot of warnings.

The warnings appear to occur with newer automake (probably 1.12).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoscons: Fix scons build.
José Fonseca [Mon, 11 Jun 2012 18:38:07 +0000 (19:38 +0100)]
scons: Fix scons build.

12 years agoconfigure.ac: Add --with-(gl|glu|osmesa)-lib-name options
Brad King [Tue, 5 Jun 2012 17:59:58 +0000 (13:59 -0400)]
configure.ac: Add --with-(gl|glu|osmesa)-lib-name options

These allow one to mangle the library names, without also mangling the
symbol names, to make them distinct from other GL libraries on the
system.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Put a bunch of optimization visitors under anonymous namespaces.
Eric Anholt [Tue, 29 May 2012 23:18:37 +0000 (16:18 -0700)]
glsl: Put a bunch of optimization visitors under anonymous namespaces.

Because these classes are used entirely from their own source files
and not from separate DSOs, the linker gets to produce massively less
code.  This cuts about 13k of text in the libdricore case.  In the
non-libdricore case, the additional linkage information allows the
compiler to inline some code, so libglsl.a size actually increases by
about 300 bytes.

For a dricore build, improves shader_runner runtime on
glsl-fs-copy-propagation-texcoords-1 by 0.21% +/- 0.03% (n=353574,
outliers removed).  No statistically significant difference with n=322
on glslparsertest on a yofrankie shader intended to test compiler
performance.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautomake: Merge the dricore libglsl build into libdricore.
Eric Anholt [Tue, 29 May 2012 21:55:40 +0000 (14:55 -0700)]
automake: Merge the dricore libglsl build into libdricore.

Now we have just one library of "all of Mesa core" instead of both
libdricore and libglsl that drivers link against.

I did this change in a sort of nonrecursive make fashion: the
generated files are still produced in the non-automake build, like the
rest of dricore, but the GLSL files are stuffed into libdricore
without building a convenience library in src/glsl (even though we
could now).  This would make a bit more sense if glsl was just another
dir under src/mesa, because right now I had to contort the prefix
variable name to look another ../ level up.

12 years agoautomake: Add a prefix variable for libglsl sources.
Eric Anholt [Tue, 29 May 2012 21:45:10 +0000 (14:45 -0700)]
automake: Add a prefix variable for libglsl sources.

See e86c40a84d241b954594f5ae7df9b9c3fc797a4e for reasoning.  In the
process I did s/:=/=/ to shut up automake about nonportable make syntax.

12 years agoautomake: Convert src/Makefile to automake.
Eric Anholt [Tue, 15 May 2012 17:21:31 +0000 (10:21 -0700)]
automake: Convert src/Makefile to automake.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautomake: Move top-level makefile to automake.
Eric Anholt [Tue, 15 May 2012 01:38:54 +0000 (18:38 -0700)]
automake: Move top-level makefile to automake.

This is part of a series to fix our build issues in the automake case
by hooking up the automatic Makefile regeneration support.  The
extract_git_sha1 is moved into src/mesa/Makefile so that we get
correct dependency generation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautomake: Globally add stub automake targets to the old Makefiles.
Eric Anholt [Tue, 15 May 2012 17:32:43 +0000 (10:32 -0700)]
automake: Globally add stub automake targets to the old Makefiles.

I tried to update all the old Makefiles that included the default
config to be sure they had a default target if they didn't previously
have one, since this new all target will always point at it.  Almost
everything had one.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Move the version information right into configure.ac.
Eric Anholt [Tue, 15 May 2012 01:43:15 +0000 (18:43 -0700)]
mesa: Move the version information right into configure.ac.

Nothing else called version.mk.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautomake: Remove the old static configs system.
Eric Anholt [Tue, 15 May 2012 01:26:30 +0000 (18:26 -0700)]
automake: Remove the old static configs system.

With the incremental automake conversion, we'd broken those that
included glx or egl.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoandroid: fix the build
Tapani Pälli [Thu, 7 Jun 2012 11:11:31 +0000 (14:11 +0300)]
android: fix the build

Some more of the files are now autogenerated, this caused build breakage,
patch adds generation of these missing files. Patch also changes existing
make so that the files are created to be part of the local source
(not intermediate directory, this causes several problems).

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
12 years agoi915g: Fix depth/stencil glClear
Michael Karcher [Sat, 9 Jun 2012 23:49:30 +0000 (01:49 +0200)]
i915g: Fix depth/stencil glClear

This patch fixes a copy/paste error and masking of depth/stencil (stencil
is in the top 8 bits), and makes glean/readPixSanity happy.

Both the stencil and the depth buffer piglit test also pass if
glClear(DEPTH | STENCIL) is executed instead of
glClear(DEPTH)/glClear(STENCIL).

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Christopher Egert <cme3000@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agomesa: Fix "glCopyBuffserSubData" typos in error messages and comments.
Kenneth Graunke [Sat, 9 Jun 2012 05:03:50 +0000 (22:03 -0700)]
mesa: Fix "glCopyBuffserSubData" typos in error messages and comments.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Clean up warnings about deleting classes without virtual destructors.
Eric Anholt [Mon, 14 May 2012 23:48:47 +0000 (16:48 -0700)]
glsl: Clean up warnings about deleting classes without virtual destructors.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: fix deref_hash memory leak in constant_expression_value
Marcin Slusarz [Tue, 5 Jun 2012 19:10:33 +0000 (21:10 +0200)]
glsl: fix deref_hash memory leak in constant_expression_value

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp: .gitignore cleanup
Andreas Boll [Fri, 8 Jun 2012 17:55:51 +0000 (19:55 +0200)]
glcpp: .gitignore cleanup

*.o, *.lo and *~ are already in toplevel .gitignore

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglapi: .gitignore cleanup
Andreas Boll [Fri, 8 Jun 2012 17:55:50 +0000 (19:55 +0200)]
glapi: .gitignore cleanup

remove archaic .cvsignore
*.pyo is already in toplevel .gitignore
*.pyc is already in toplevel .gitignore

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agogallivm: Fix calculating rho for 3d textures for the single-quad case
Roland Scheidegger [Thu, 24 May 2012 19:05:13 +0000 (21:05 +0200)]
gallivm: Fix calculating rho for 3d textures for the single-quad case

Discovered by accident, this looks like a very old typo bug.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agoi965: Add forgotten bitcast operations in brw_fs_channel_expressions.
Kenneth Graunke [Thu, 7 Jun 2012 18:20:18 +0000 (11:20 -0700)]
i965: Add forgotten bitcast operations in brw_fs_channel_expressions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/blorp: allow all buffer formats provided src and dst match.
Paul Berry [Wed, 6 Jun 2012 18:17:32 +0000 (11:17 -0700)]
i965/blorp: allow all buffer formats provided src and dst match.

Previously, blits using the "blorp" mechanism only worked for 8-bit
RGBA color buffers, 24-bit depth buffers, and 8 bit stencil buffers.
This was not enough, because the blorp mechanism must be used for
blitting whenever MSAA is in use.  This patch allows all formats to be
used, provided the source and destination formats match.

So far I have confirmed that the following formats work properly with
MSAA:
- GL_RGB
- GL_RGBA
- GL_ALPHA
- GL_ALPHA4
- GL_ALPHA8
- GL_R3_G3_B2
- GL_RGB4
- GL_RGB5
- GL_RGB8
- GL_RGB10
- GL_RGB12
- GL_RGB16
- GL_RGBA2
- GL_RGBA4
- GL_RGB5_A1
- GL_RGBA8
- GL_RGB10_A2
- GL_RGBA12
- GL_RGBA16

Fixes piglit tests "EXT_framebuffer_multisample/formats {2,4}" on
Sandy Bridge and Ivy Bridge.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/blorp: Implement logic for additional buffer formats.
Paul Berry [Wed, 6 Jun 2012 18:05:02 +0000 (11:05 -0700)]
i965/blorp: Implement logic for additional buffer formats.

Previously the blorp engine only supported RGBA8 color buffers and
24-bit depth buffers.  This patch adds support for any color buffer
format that is supported as a render target, and for 16-bit and 32-bit
depth buffers.

This required threading the brw_context struct through into
brw_blorp_surface_info::set() so that it can consult the
brw->render_target_format array.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/blorp: De-virtualize brw_blorp_{mip,surface}_info::set() function.
Paul Berry [Wed, 6 Jun 2012 17:59:56 +0000 (10:59 -0700)]
i965/blorp: De-virtualize brw_blorp_{mip,surface}_info::set() function.

Even though brw_blorp_surface_info is derived from brw_blorp_mip_info,
this function doesn't need to be virtual, because it is never accessed
through a base class pointer.  Making the function non-virtual will
allow it to take additional parameters in the brw_blorp_surface_info
case.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/blorp: Refactor surface format determination.
Paul Berry [Wed, 6 Jun 2012 17:34:12 +0000 (10:34 -0700)]
i965/blorp: Refactor surface format determination.

This patch moves the responsibility for deciding on the format of the
source and destination surfaces from the
gen{6,7}_blorp_emit_surface_state() functions to
brw_blorp_surface_info::set(), which is shared between Gen6 and Gen7.
This will make it possible to add support for more surface formats
without code duplication.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Enable the GL_ARB_shader_bit_encode extension.
Kenneth Graunke [Thu, 7 Jun 2012 07:11:28 +0000 (00:11 -0700)]
i965: Enable the GL_ARB_shader_bit_encode extension.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agost/mesa: Finally activate the ARB_shader_bit_encoding extension.
Olivier Galibert [Tue, 8 May 2012 18:40:37 +0000 (20:40 +0200)]
st/mesa: Finally activate the ARB_shader_bit_encoding extension.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Bitwise conversion operator support in the software renderers.
Olivier Galibert [Tue, 8 May 2012 18:40:36 +0000 (20:40 +0200)]
glsl: Bitwise conversion operator support in the software renderers.

TGSI doesn't need an opcode, since registers are untyped (but beware
once doubles come into the scene).  Mesa IR doesn't handle native
integers, so trying to handle them there is worthless, the case
entries are only added for warning reasons.

It was only tested with softpipe, since llvmpipe doesn't support glsl
1.3 yet.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Bitwise conversion operator support in ir_constant_expression.
Olivier Galibert [Tue, 8 May 2012 18:40:35 +0000 (20:40 +0200)]
glsl: Bitwise conversion operator support in ir_constant_expression.

A "test_out = floatBitsToUint(-1.0);" fired through the GLSL compiler
gives a correct "(assign (x) (var_ref test_out)
(constant uint (3212836864)))"

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Bitwise conversion operator support in ir_validate.
Olivier Galibert [Tue, 8 May 2012 18:40:34 +0000 (20:40 +0200)]
glsl: Bitwise conversion operator support in ir_validate.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Bitwise conversion operator support in ir_expression.
Olivier Galibert [Tue, 8 May 2012 18:40:33 +0000 (20:40 +0200)]
glsl: Bitwise conversion operator support in ir_expression.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: New unary opcodes for ARB_shader_bit_encoding support.
Olivier Galibert [Tue, 8 May 2012 18:40:32 +0000 (20:40 +0200)]
glsl: New unary opcodes for ARB_shader_bit_encoding support.

The opcodes are bitcast_f2u, bitcast_f2i, bitcast_i2f and bitcast_u2f.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Scaffolding for ARB_shader_bit_encoding.
Olivier Galibert [Mon, 30 Apr 2012 11:19:01 +0000 (13:19 +0200)]
glsl: Scaffolding for ARB_shader_bit_encoding.

That adds support for activating the extension.  It doesn't actually
*do* anything yet, of course.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Return 8 bits for GL_TEXTURE_RED_SIZE on RGTC formats.
Kenneth Graunke [Wed, 6 Jun 2012 06:51:04 +0000 (23:51 -0700)]
mesa: Return 8 bits for GL_TEXTURE_RED_SIZE on RGTC formats.

From the issues section of the GL_ARB_texture_compression_rgtc extension:

15) What should glGetTexLevelParameter return for
    GL_TEXTURE_GREEN_SIZE and GL_TEXTURE_BLUE_SIZE for the RGTC1
    formats?  What should glGetTexLevelParameter return for
    GL_TEXTURE_BLUE_SIZE for the RGTC2 formats?

    RESOLVED:  Zero bits.

    These formats always return 0.0 for these respective components
    and have no bits devoted to these components.

    Returning 8 bits for red size of RGTC1 and the red and green
    sizes of RGTC2 makes sense because that's the maximum potential
    precision for the uncompressed texels.

Thus, we need to return 8 bits for GL_TEXTURE_RED_SIZE on all RGTC formats
and 8 bits for GL_TEXTURE_GREEN_SIZE on RGTC2 formats.  BLUE should be 0.

Fixes oglconform/rgtc/advanced.texture_fetch.tex_param.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglsl: Hook up loop_variable_state destructor to plug a memory leak.
Kenneth Graunke [Tue, 5 Jun 2012 22:58:41 +0000 (15:58 -0700)]
glsl: Hook up loop_variable_state destructor to plug a memory leak.

While ~loop_state() is already freeing the loop_variable_state objects
via ralloc_free(this->mem_ctx), the ~loop_variable_state() destructor
was never getting called, so the hash table inside loop_variable_state
was never getting destroyed.

Fixes a memory leak in any shader with loops.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoradeon/llvm: Emulate RECIP_UINT instruction on Cayman
Tom Stellard [Wed, 6 Jun 2012 17:24:48 +0000 (13:24 -0400)]
radeon/llvm: Emulate RECIP_UINT instruction on Cayman

12 years agoradeon/llvm: Remove some duplicate code in the R600 CodeEmitter
Tom Stellard [Wed, 6 Jun 2012 15:40:34 +0000 (11:40 -0400)]
radeon/llvm: Remove some duplicate code in the R600 CodeEmitter