profile/ivi/mesa.git
13 years agomesa: remove support for GL_APPLE_client_storage extension
Brian Paul [Thu, 22 Sep 2011 00:54:53 +0000 (18:54 -0600)]
mesa: remove support for GL_APPLE_client_storage extension

AFAIK, there are few users of this extension and I can see a couple
reasons why this is probably broken in Mesa anyway.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agomesa: move gl_texture_image::Width/Height/DepthScale fields to swrast
Brian Paul [Thu, 22 Sep 2011 00:54:53 +0000 (18:54 -0600)]
mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast

These fields were only used for swrast so move them into
swrast_texture_image.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agomesa: move gl_texture_image::_IsPowerOfTwo into swrast
Brian Paul [Thu, 22 Sep 2011 00:54:53 +0000 (18:54 -0600)]
mesa: move gl_texture_image::_IsPowerOfTwo into swrast

It's only used by swrast.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agost/mesa: Finalize texture on render-to-texture.
Michel Dänzer [Thu, 22 Sep 2011 15:01:18 +0000 (17:01 +0200)]
st/mesa: Finalize texture on render-to-texture.

This makes sure that stObj->pt exists and is up to date.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 and piglit
fbo-incomplete-texture-03.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 7.11 branch.

13 years agost/mesa: Convert size assertions to conditionals in st_texture_image_copy.
Brian Paul [Thu, 22 Sep 2011 15:01:18 +0000 (17:01 +0200)]
st/mesa: Convert size assertions to conditionals in st_texture_image_copy.

Prevents potential assertion failures in piglit fbo-incomplete-texture-03 test.

NOTE: This is a candidate for the 7.11 branch.

13 years agod3d1x: setup draw info primitive restart parameters
Christoph Bumiller [Thu, 22 Sep 2011 14:43:19 +0000 (16:43 +0200)]
d3d1x: setup draw info primitive restart parameters

13 years agodraw: add support for guard-band clipping
Brian Paul [Wed, 21 Sep 2011 18:06:17 +0000 (12:06 -0600)]
draw: add support for guard-band clipping

13 years agodraw: Reduce the number of vertex shader variants per context to 128.
José Fonseca [Wed, 14 Jul 2010 14:12:33 +0000 (15:12 +0100)]
draw: Reduce the number of vertex shader variants per context to 128.

13 years agodraw: Respect max_indices from the renderer.
Kurt Daverman [Mon, 7 Mar 2011 13:11:03 +0000 (13:11 +0000)]
draw: Respect max_indices from the renderer.

13 years agotranslate: check for PIPE_SUBSYSTEM_EMBEDDED
Brian Paul [Wed, 21 Sep 2011 17:37:49 +0000 (11:37 -0600)]
translate: check for PIPE_SUBSYSTEM_EMBEDDED

13 years agotgsi: Check in scan for fs position and depth reads
Jakob Bornecrantz [Thu, 7 Apr 2011 12:20:33 +0000 (13:20 +0100)]
tgsi: Check in scan for fs position and depth reads

13 years agosvga: skip assertion when index_bias < 0
Brian Paul [Mon, 20 Jun 2011 16:45:17 +0000 (10:45 -0600)]
svga: skip assertion when index_bias < 0

See bug 688383

13 years agosvga: fix the test for sRGB texture formats
Brian Paul [Wed, 27 Jul 2011 22:08:58 +0000 (16:08 -0600)]
svga: fix the test for sRGB texture formats

The pipe_sampler_view::format field should be prefered over the resource/
texture format.  The former is used to override the texture format for
sRGB decode enable/disable, etc.

Also, use new util_format_is_srgb() helper to catch all sRGB formats.

This fixes the piglit tex-srgb test for GL_EXT_texture_sRGB_decode.

13 years agogallium/util: add util_format_is_srgb() helper
Brian Paul [Wed, 27 Jul 2011 22:08:13 +0000 (16:08 -0600)]
gallium/util: add util_format_is_srgb() helper

13 years agoutil: add u_bit_scan helper
Keith Whitwell [Wed, 21 Sep 2011 17:22:43 +0000 (11:22 -0600)]
util: add u_bit_scan helper

13 years agoutil: Allow to make the depth/stencil format queries without repeatedly looking up...
José Fonseca [Wed, 21 Sep 2011 17:15:10 +0000 (11:15 -0600)]
util: Allow to make the depth/stencil format queries without repeatedly looking up the format description.

All functions here should take struct util_format_description * IMO, to
incentive efficient code.

13 years agoutil: single call to util_format_description in fill_rect
Keith Whitwell [Wed, 21 Sep 2011 17:14:04 +0000 (11:14 -0600)]
util: single call to util_format_description in fill_rect

13 years agoutil: Handle conversion between depth stencil formats.
José Fonseca [Mon, 16 Aug 2010 10:26:13 +0000 (11:26 +0100)]
util: Handle conversion between depth stencil formats.

13 years agoi915g: Add an optimization to get rid of useless movs, in particular at the end of...
Stéphane Marchesin [Thu, 22 Sep 2011 00:54:24 +0000 (17:54 -0700)]
i915g: Add an optimization to get rid of useless movs, in particular at the end of some shaders.

13 years agoi915g: Fix some whitespace problems.
Stéphane Marchesin [Thu, 22 Sep 2011 00:59:26 +0000 (17:59 -0700)]
i915g: Fix some whitespace problems.

13 years agoi915g: Blend equation separate seems to work.
Stéphane Marchesin [Thu, 22 Sep 2011 00:58:59 +0000 (17:58 -0700)]
i915g: Blend equation separate seems to work.

13 years agoi915g: Add ifdef'd out code to dump compiled shaders.
Stéphane Marchesin [Thu, 22 Sep 2011 00:55:26 +0000 (17:55 -0700)]
i915g: Add ifdef'd out code to dump compiled shaders.

13 years agoi915g: Fix bug in shader optimizer.
Stéphane Marchesin [Thu, 22 Sep 2011 00:53:22 +0000 (17:53 -0700)]
i915g: Fix bug in shader optimizer.

13 years agoi915g: Remove stale function prototype.
Stéphane Marchesin [Thu, 22 Sep 2011 00:30:39 +0000 (17:30 -0700)]
i915g: Remove stale function prototype.

13 years agosvga: call u_default_redefine_user_buffer() to fix failed assertion
Brian Paul [Wed, 21 Sep 2011 22:32:00 +0000 (16:32 -0600)]
svga: call u_default_redefine_user_buffer() to fix failed assertion

This fixes a regression from a8cf4b6acf9ee996090cc0bb95fa3558b481108c

The problem occured when two successive glDrawArrays calls accessed
subsequent elements in user-space arrays.  The user-space array
from the first call wasn't being grown to accomodate the second
draw call's elements.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agometa: Don't hang on to program refcounts after metaops are done.
Eric Anholt [Tue, 20 Sep 2011 23:23:57 +0000 (16:23 -0700)]
meta: Don't hang on to program refcounts after metaops are done.

Fixes piglit ARB_shader_objects/clear-with-deleted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39577
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965/vs: Return a dummy value when visiting ir_texture.
Eric Anholt [Thu, 8 Sep 2011 23:09:31 +0000 (16:09 -0700)]
i965/vs: Return a dummy value when visiting ir_texture.

While the program won't successfully link in the end, this avoids
possible assertion failure in the driver during linking if
this->result isn't initialized with something already.

13 years agoi965/gen6+: When only BFC is written, use BFC as the color.
Eric Anholt [Thu, 8 Sep 2011 22:31:22 +0000 (15:31 -0700)]
i965/gen6+: When only BFC is written, use BFC as the color.

Fixes piglit vertex-program-two-side enabled back back2

13 years agoi965/gen6+: Respect the VERTEX_PROGRAM_TWO_SIDE flag for shaders.
Eric Anholt [Thu, 8 Sep 2011 22:29:02 +0000 (15:29 -0700)]
i965/gen6+: Respect the VERTEX_PROGRAM_TWO_SIDE flag for shaders.

Fixes piglit:
vertex-program-two-side enabled front back front2 back2
vertex-program-two-side enabled front back
vertex-program-two-side enabled front2 back2

13 years agomesa: Add a context flag indicating whether two-sided lighting should happen.
Eric Anholt [Thu, 8 Sep 2011 22:14:33 +0000 (15:14 -0700)]
mesa: Add a context flag indicating whether two-sided lighting should happen.

The 965 driver was ignoring the VERTEX_PROGRAM_TWO_SIDE flag and only
looking at fixed-function state.

13 years agoutil: remove stray debug code
Brian Paul [Wed, 21 Sep 2011 14:26:29 +0000 (08:26 -0600)]
util: remove stray debug code

13 years agomesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()
Brian Paul [Wed, 21 Sep 2011 14:22:07 +0000 (08:22 -0600)]
mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()

We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was
done in Yuanhan Liu's original patch.

Take geometry shaders support into account too.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
13 years agogallivm: fix build with llvm 3.0svn
Brian Paul [Wed, 21 Sep 2011 13:24:00 +0000 (07:24 -0600)]
gallivm: fix build with llvm 3.0svn

https://bugs.freedesktop.org/show_bug.cgi?id=41065

13 years agotnl: include swrast/s_chan.h to fix sse build
Brian Paul [Wed, 21 Sep 2011 12:49:09 +0000 (06:49 -0600)]
tnl: include swrast/s_chan.h to fix sse build

13 years agost/vega: fix drawing images with alpha channel
Chia-I Wu [Wed, 21 Sep 2011 03:40:27 +0000 (11:40 +0800)]
st/vega: fix drawing images with alpha channel

Checking if the paints are opaque in renderer_validate_blend() does not
work.  We could be drawing images.  Remove the check from
renderer_validate_blend() and take image drawing into consideration in
blend_use_shader().

The bug was introduced by 3f0a966807f03a364edea0272ddf45f08ab7ce4f,
which affects the lookup demo.

13 years agost/vega: fix vg_context_is_object_valid()
Chia-I Wu [Wed, 21 Sep 2011 02:48:21 +0000 (10:48 +0800)]
st/vega: fix vg_context_is_object_valid()

vg_context_is_object_valid() checks if a handle is valid by checking if
the handle is a valid key of the object hash table.  However, the keys
of the object hash table were object pointers.

Fix vg_context_add_object() to use the handles as the keys so that
vg_context_is_object_valid() works.  This bug was introduced by
99c67f27d35a4bbbbefada8117d5972c7583cf42.

13 years agoswrast: s/GLubyte/GLchan/ in a cast
Brian Paul [Wed, 21 Sep 2011 03:06:19 +0000 (21:06 -0600)]
swrast: s/GLubyte/GLchan/ in a cast

13 years agollvmpipe: silence a pointer type warning
Brian Paul [Wed, 21 Sep 2011 02:33:45 +0000 (20:33 -0600)]
llvmpipe: silence a pointer type warning

13 years agometa: use _mesa_set_enable() in more places
Brian Paul [Tue, 20 Sep 2011 17:55:58 +0000 (11:55 -0600)]
meta: use _mesa_set_enable() in more places

Avoids an extra context lookup.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agometa: use _mesa_set_enable(), fix decompress_texture_image()
Brian Paul [Tue, 20 Sep 2011 17:48:57 +0000 (11:48 -0600)]
meta: use _mesa_set_enable(), fix decompress_texture_image()

Use _mesa_set_enable() to avoid a redudant context lookup.
Need to disable the texture target in decompress_texture_image() so the
unit isn't still enabled after glGetTexImage() returns.  Arguably, the
meta restore code should do this, but it doesn't.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agost/mesa: specify source mipmap level in decompress_with_blit()
Brian Paul [Sat, 17 Sep 2011 19:21:08 +0000 (13:21 -0600)]
st/mesa: specify source mipmap level in decompress_with_blit()

This, along with the previous patch, fixes glGetTexImage() of compressed
textures for level > 0.

13 years agogallium/util: observe sampler view's first_level in util_blit_pixels_tex()
Brian Paul [Sat, 17 Sep 2011 19:19:52 +0000 (13:19 -0600)]
gallium/util: observe sampler view's first_level in util_blit_pixels_tex()

This lets us blit from a non-zero source level.

13 years agometa: fix broken sRGB mipmap generation
Brian Paul [Sat, 17 Sep 2011 17:26:54 +0000 (11:26 -0600)]
meta: fix broken sRGB mipmap generation

If we're generating a mipmap for an sRGB texture we need to bypass
sRGB->linear conversion.  Otherwise the destination mipmap level
(drawn with a textured quad) will have the wrong colors.
If we can't turn of sRGB->linear conversion (GL_EXT_texture_sRGB_decode)
we need to use the software fallback for mipmap generation.

Note: This is a candidate for the 7.11 branch.

13 years agomesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macros
Brian Paul [Tue, 20 Sep 2011 00:25:38 +0000 (18:25 -0600)]
mesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macros

The 1-bit alpha channel was incorrectly encoded.  Previously, any non-zero
alpha value for the ubyte alpha value would set A=1.  Instead, use the
most significant bit of the ubyte alpha to determine the A bit.  This is
consistent with the other channels and other OpenGL implementations.

Note: This is a candidate for the 7.11 branch.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
13 years agomesa: move last bits of GLchan stuff into swrast
Brian Paul [Sat, 17 Sep 2011 22:31:03 +0000 (16:31 -0600)]
mesa: move last bits of GLchan stuff into swrast

This removes the last remnants of the GLchan datatype and associated
macros out of core Mesa and into swrast.

13 years agomesa: remove CHAN_TYPE cruft from debug.c
Brian Paul [Sat, 17 Sep 2011 22:22:47 +0000 (16:22 -0600)]
mesa: remove CHAN_TYPE cruft from debug.c

13 years agomesa: remove unused interp/stride chan macros
Brian Paul [Sat, 17 Sep 2011 22:20:18 +0000 (16:20 -0600)]
mesa: remove unused interp/stride chan macros

13 years agomesa: remove unused UNCLAMPED_FLOAT_TO_RGB_CHAN() macro
Brian Paul [Sat, 17 Sep 2011 22:17:46 +0000 (16:17 -0600)]
mesa: remove unused UNCLAMPED_FLOAT_TO_RGB_CHAN() macro

13 years agoradeon: use _mesa_unclamped_float_rgba_to_ubyte()
Brian Paul [Sat, 17 Sep 2011 22:12:33 +0000 (16:12 -0600)]
radeon: use _mesa_unclamped_float_rgba_to_ubyte()

13 years agor200: use _mesa_unclamped_float_rgba_to_ubyte()
Brian Paul [Sat, 17 Sep 2011 22:12:27 +0000 (16:12 -0600)]
r200: use _mesa_unclamped_float_rgba_to_ubyte()

13 years agomesa: remove unused <type>_TO_CHAN() macros
Brian Paul [Sat, 17 Sep 2011 22:08:27 +0000 (16:08 -0600)]
mesa: remove unused <type>_TO_CHAN() macros

13 years agomesa: convert _mesa_unpack_color_span_chan() to ubyte
Brian Paul [Sat, 17 Sep 2011 21:55:03 +0000 (15:55 -0600)]
mesa: convert _mesa_unpack_color_span_chan() to ubyte

13 years agomesa: replace GLchan with GLubyte in texcompress_s3tc.c
Brian Paul [Sat, 17 Sep 2011 21:49:44 +0000 (15:49 -0600)]
mesa: replace GLchan with GLubyte in texcompress_s3tc.c

13 years agomesa/gallium: remove GLchan from latc, rgtc code
Brian Paul [Sat, 17 Sep 2011 21:47:03 +0000 (15:47 -0600)]
mesa/gallium: remove GLchan from latc, rgtc code

13 years agomesa: remove GLchan in texcompress_fxt1.c
Brian Paul [Sat, 17 Sep 2011 21:41:42 +0000 (15:41 -0600)]
mesa: remove GLchan in texcompress_fxt1.c

13 years agomesa: s/_mesa_make_temp_chan_image()/_mesa_make_temp_ubyte_image()
Brian Paul [Sat, 17 Sep 2011 21:36:13 +0000 (15:36 -0600)]
mesa: s/_mesa_make_temp_chan_image()/_mesa_make_temp_ubyte_image()

Another step toward eliminating the GLchan type.

13 years agomesa: move _mesa_upscale_teximage2d() to texcompress_fxt1.c
Brian Paul [Sat, 17 Sep 2011 21:25:33 +0000 (15:25 -0600)]
mesa: move _mesa_upscale_teximage2d() to texcompress_fxt1.c

Was used by no other code.

13 years agomesa: s/GLchan/GLubyte/ in mipmap generation code
Brian Paul [Sat, 17 Sep 2011 21:22:28 +0000 (15:22 -0600)]
mesa: s/GLchan/GLubyte/ in mipmap generation code

13 years agomake: Don't use builtin_stubs.cpp for standalone GLSL compiler.
Kenneth Graunke [Tue, 20 Sep 2011 06:06:53 +0000 (23:06 -0700)]
make: Don't use builtin_stubs.cpp for standalone GLSL compiler.

builtin_stubs.cpp is only supposed to be used for builtin_compiler.  It
contains a stub version of _mesa_glsl_initialize_functions() that does
nothing.

libglsl.a already contains builtin_function.cpp, the generated file that
contains a version of _mesa_glsl_initialize_functions() that actually
initializes all the built-in functions.

By mistakenly linking to builtin_stubs, glsl_compiler and glsl_test are
unable to compile any shaders that use built-in functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
13 years agoGLES2/gl2ext: upgrade to gl2ext.h version 15049
Ian Romanick [Tue, 20 Sep 2011 22:54:52 +0000 (15:54 -0700)]
GLES2/gl2ext: upgrade to gl2ext.h version 15049

13 years agomesa: Don't expose compressed paletted formats via GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS
Ian Romanick [Wed, 14 Sep 2011 16:49:09 +0000 (11:49 -0500)]
mesa: Don't expose compressed paletted formats via GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS

Fixes a bug introduced by commit faf5d65.  These formats should only
be exposed in OpenGL ES 1.x.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: Xun Fang <xunx.fang@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40860

13 years agogallium: remove trailing comma to silence warning
Brian Paul [Tue, 20 Sep 2011 22:36:21 +0000 (16:36 -0600)]
gallium: remove trailing comma to silence warning

13 years agoGallium: Increase PIPE_MAX_CLIP_PLANES to 8.
Paul Berry [Thu, 15 Sep 2011 21:37:11 +0000 (14:37 -0700)]
Gallium: Increase PIPE_MAX_CLIP_PLANES to 8.

Since Mesa is now capable of supporting up to 8 clipping planes
instead of 6, this patch updates Gallium internals to support 8
clipping planes as well.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoGallium: remove unnecessary ifdef for MAX_CLIPPED_VERTICES.
Paul Berry [Thu, 8 Sep 2011 01:18:45 +0000 (18:18 -0700)]
Gallium: remove unnecessary ifdef for MAX_CLIPPED_VERTICES.

draw_pipe_clip.c contained an ifdef to ensure that its local
definition of MAX_CLIPPED_VERTICES would not take effect if the global
MAX_CLIPPED_VERTICES (defined in src/mesa/main/config.h) was already
defined.  This was unnecessary because draw_pipe_clip.c doesn't
directly or indirectly include src/mesa/main/config.h.  Removed the
ifdef to reduce confusion.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoIncrease MAX_CLIP_PLANES to 8
Paul Berry [Thu, 8 Sep 2011 01:28:32 +0000 (18:28 -0700)]
Increase MAX_CLIP_PLANES to 8

This will allow drivers to increase ctx->Const.MaxClipPlanes to 8,
which is required for GLSL-1.30 compliance.

No driver behavior should be affected.  However, many data structures
use MAX_CLIP_PLANES as an array size, so these arrays will get
slightly larger.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoHardcode the default value of ctx->Const.MaxClipPlanes to 6.
Paul Berry [Thu, 8 Sep 2011 01:24:00 +0000 (18:24 -0700)]
Hardcode the default value of ctx->Const.MaxClipPlanes to 6.

Previously this value was set to MAX_CLIP_PLANES, which is defined to
be 6.  But MAX_CLIP_PLANES needs to be increased to 8 to support
GLSL-1.30-compliant drivers.  This patch hard-codes the default value
of ctx->Const.MaxClipPlanes to 6, so that when MAX_CLIP_PLANES is
increased, it won't affect drivers that do not support 8 clip planes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Remove bogus assertion on MAX_CLIP_PLANES.
Paul Berry [Tue, 13 Sep 2011 22:40:07 +0000 (15:40 -0700)]
i965: Remove bogus assertion on MAX_CLIP_PLANES.

This patch removes the assertion "MAX_CLIP_PLANES == 6" from the i965
driver.  This assertion is unnecessary; nothing in the driver requires
MAX_CLIP_PLANES to be 6.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agomesa: Update clipping code to use ctx->Const.MaxClipPlanes.
Paul Berry [Thu, 8 Sep 2011 00:44:28 +0000 (17:44 -0700)]
mesa: Update clipping code to use ctx->Const.MaxClipPlanes.

To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8.
To avoid breaking drivers that do not yet support 8 clip planes, this
patch modifies the Mesa core code that pertains to clipping to use
ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLANES, since
ctx->Const.MaxClipPlanes will remain 6 for drivers that only support 6
clip planes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoscons: Unbreak mingw build.
José Fonseca [Tue, 20 Sep 2011 19:50:27 +0000 (20:50 +0100)]
scons: Unbreak mingw build.

13 years agoscons: MacOSX build fixes.
José Fonseca [Tue, 20 Sep 2011 19:40:05 +0000 (20:40 +0100)]
scons: MacOSX build fixes.

13 years agoglsl_to_tgsi: implement ir_binop_all_equal and ir_binop_any_nequal for native integers
Bryan Cain [Mon, 19 Sep 2011 21:46:44 +0000 (16:46 -0500)]
glsl_to_tgsi: implement ir_binop_all_equal and ir_binop_any_nequal for native integers

13 years agoi965/vs: Add support for compute-to-MRF.
Eric Anholt [Tue, 6 Sep 2011 20:21:24 +0000 (13:21 -0700)]
i965/vs: Add support for compute-to-MRF.

Removes 1.8% of the instructions from 97% of the vertex shaders in
shader-db.

13 years agoi965/vs: Do VUE writes using the MRF file instead of hardware register.
Eric Anholt [Tue, 6 Sep 2011 19:32:33 +0000 (12:32 -0700)]
i965/vs: Do VUE writes using the MRF file instead of hardware register.

We'll only do compute-to-MRF on accesses to this file.

13 years agoi965/vs: Handle destinations in the MRF file.
Eric Anholt [Tue, 6 Sep 2011 19:29:15 +0000 (12:29 -0700)]
i965/vs: Handle destinations in the MRF file.

We've been referencing MRFs through the HW_REG file so far, but that
makes it harder to handle compute-to-MRF and similar optimizations.

13 years agoi965/vs: Add a function for how many MRFs get written as part of a SEND.
Eric Anholt [Tue, 6 Sep 2011 19:26:42 +0000 (12:26 -0700)]
i965/vs: Add a function for how many MRFs get written as part of a SEND.

This will be used for compute-to-mrf, which needs to know when MRFs
get overwritten.

13 years agoi965/vs: Remove dead fields of src_reg.
Eric Anholt [Tue, 6 Sep 2011 18:56:53 +0000 (11:56 -0700)]
i965/vs: Remove dead fields of src_reg.

These were copy and pasted from the FS, and are never used.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965/vs: Add support for simple algebraic optimizations.
Eric Anholt [Fri, 2 Sep 2011 22:18:29 +0000 (15:18 -0700)]
i965/vs: Add support for simple algebraic optimizations.

We generate silly code for array access, and it's easier to generally
support the cleanup than to specifically avoid the bad code in each
place we might generate it.

Removes 4.6% of instructions from 41.6% of shaders in shader-db,
particularly savage2/hon and unigine.

v2: Fixes by Ken: Make is_zero/one member functions, and fix a
    progress flag.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965: Fix polygon stipple offset state flagging.
Eric Anholt [Mon, 19 Sep 2011 16:26:50 +0000 (09:26 -0700)]
i965: Fix polygon stipple offset state flagging.

_NEW_WINDOW_POS wasn't a real Mesa state flag, but we were missing
_NEW_BUFFERS to update the stipple offset when FBO binding or window
size changed, and _NEW_POLYGON to update when stippling gets enabled.

Fixes oglconform's tristrip test.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
13 years agoi965: Add missing _NEW_POLYGON flag to polygon stipple upload.
Eric Anholt [Mon, 19 Sep 2011 16:25:49 +0000 (09:25 -0700)]
i965: Add missing _NEW_POLYGON flag to polygon stipple upload.

Because we skip the pattern upload when stippling is disabled, we need
to check again when it might have been turned on.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
13 years agoi965: Fix compiler warnings.
Eric Anholt [Tue, 20 Sep 2011 17:19:50 +0000 (10:19 -0700)]
i965: Fix compiler warnings.

13 years agomesa: fix error handling for glMaterial*
Yuanhan Liu [Tue, 20 Sep 2011 05:32:50 +0000 (13:32 +0800)]
mesa: fix error handling for glMaterial*

Trigger GL_INVALID_ENUM error if the face paramter is not a valid value.

Trigger GL_INVALID_VALUE error if the GL_SHININESS value is out side
[0, ctx->Constant.MaxShiniess].

v2: fix the max shininess value.

v3: suggested by Brian, move the face check into glMaterialfv function
    to reduce code duplicate. Also, refactor the error message.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/egl: add support for null platform
Chia-I Wu [Tue, 20 Sep 2011 06:01:45 +0000 (14:01 +0800)]
st/egl: add support for null platform

The backend calls null_sw_create() to create sw_winsys.  And that is
pretty much it...

13 years agoegl: add null platform
Chia-I Wu [Tue, 20 Sep 2011 06:01:26 +0000 (14:01 +0800)]
egl: add null platform

The null platform has no window or pixmap surface (but pbuffer surface).
And the only valid display is EGL_DEFAULT_DISPLAY.  It is useful for
offscreen rendering.  It works everywhere becase no window system is
required.

13 years agoconfigs: remove rest of APP_LIB_DEPS lines
Dave Airlie [Tue, 20 Sep 2011 07:22:59 +0000 (08:22 +0100)]
configs: remove rest of APP_LIB_DEPS lines

pointed out by GArik_ on #radeon.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi965/fs: Implement texelFetch() on Gen4.
Kenneth Graunke [Tue, 6 Sep 2011 23:39:01 +0000 (16:39 -0700)]
i965/fs: Implement texelFetch() on Gen4.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Implement texelFetch() on Ivybridge.
Kenneth Graunke [Fri, 26 Aug 2011 00:43:58 +0000 (17:43 -0700)]
i965/fs: Implement texelFetch() on Ivybridge.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Implement texelFetch() on Ironlake and Sandybridge.
Kenneth Graunke [Fri, 26 Aug 2011 00:13:37 +0000 (17:13 -0700)]
i965/fs: Implement texelFetch() on Ironlake and Sandybridge.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoglapi: Update generated file modified by previous commit
Ian Romanick [Tue, 6 Sep 2011 20:05:15 +0000 (13:05 -0700)]
glapi: Update generated file modified by previous commit

13 years agoglapi: Don't emit remap data for individual extensions
Ian Romanick [Tue, 6 Sep 2011 20:02:13 +0000 (13:02 -0700)]
glapi: Don't emit remap data for individual extensions

All of the extensions actually supported by Mesa have been remapped by
remap.c for a long time.  Emitting all of these data structures is
just clutter.

Drivers that need additional functions remapped, should add
'offset="assign"' to the function definition in the .xml file.

The changes to remap_helper.h are in a follow-on ~8700 line patch that
would surely be rejected by the mailing list.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chia-I Wu <olv@lunarg.com>
13 years agomesa: Delete stale comment about MESAX extensions
Ian Romanick [Sat, 20 Aug 2011 21:17:45 +0000 (14:17 -0700)]
mesa: Delete stale comment about MESAX extensions

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
13 years agomesa: Replace _mesa_rgba_logicop_enabled(ctx) with ctx->Color.ColorLogicOpEnabled
Ian Romanick [Fri, 9 Sep 2011 21:27:38 +0000 (14:27 -0700)]
mesa: Replace _mesa_rgba_logicop_enabled(ctx) with ctx->Color.ColorLogicOpEnabled

Since GL_EXT_blend_logic_op is removed, _mesa_rgba_logicop_enabled(ctx)
just returns ctx->Color.ColorLogicOpEnabled.  That seems kind of silly.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
13 years agomesa: Use ColorLogicOpEnabled instead of _LogicOpEnabled
Ian Romanick [Fri, 9 Sep 2011 21:23:15 +0000 (14:23 -0700)]
mesa: Use ColorLogicOpEnabled instead of _LogicOpEnabled

Since GL_EXT_blend_logic_op is removed, _LogicOpEnabled and
ColorLogicOpEnabled always have the same value.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
13 years agomesa: Remove support for GL_EXT_blend_logic_op
Ian Romanick [Fri, 9 Sep 2011 21:14:42 +0000 (14:14 -0700)]
mesa: Remove support for GL_EXT_blend_logic_op

Support is removed for four reasons:

1. The implementation was broken with respect to separate blend
equations.  The GL_EXT_blend_equation_separate spec says:

    "If EXT_blend_logic_op and EXT_blend_equation_separate are both
    supported, the logic op blend equation should be supported separately
    for RGB and alpha as with the other blend equation modes."

But Mesa's implementation of GL_LOGIC_OP specifically forbids this.

2. No hardware supported by Mesa can support separate blend equations
involving GL_LOGIC_OP.

3. No applications could be found that use this extension.

4. No other Linux OpenGL drivers support this extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Cc: Brian Paul <brianp@vmware.com>
13 years agost/mesa: Remove support for GL_EXT_blend_logic_op
Ian Romanick [Fri, 9 Sep 2011 21:07:54 +0000 (14:07 -0700)]
st/mesa: Remove support for GL_EXT_blend_logic_op

It was broken, and it isn't really useful anyway.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Cc: Brian Paul <brianp@vmware.com>
13 years agomesa: Remove unused _mesa_enable_imaging_extensions function
Ian Romanick [Thu, 8 Sep 2011 16:58:13 +0000 (09:58 -0700)]
mesa: Remove unused _mesa_enable_imaging_extensions function

The last user of this function was driInitExtensions, and that function
was removed in a previous commit.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
13 years agoautogen.sh: Honor NOCONFIGURE environment variable
Colin Walters [Sat, 17 Sep 2011 15:21:30 +0000 (11:21 -0400)]
autogen.sh: Honor NOCONFIGURE environment variable

See http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: Throw an error when starting conditional render on an active query.
Eric Anholt [Fri, 9 Sep 2011 00:17:31 +0000 (17:17 -0700)]
mesa: Throw an error when starting conditional render on an active query.

From the NV_conditional_render spec:

    BeginQuery sets the active query object name for the query type given by
    <target> to <id>.  If BeginQuery is called with an <id> of zero, if the
    active query object name for <target> is non-zero, if <id> is the active
    query object name for any query type, or if <id> is the active query
    object for condtional rendering (Section 2.X), the error INVALID OPERATION
    is generated.

Fixes piglit nv_conditional_render-begin-while-active.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Throw an error instead of asserting for condrender with query == 0.
Eric Anholt [Thu, 8 Sep 2011 23:52:44 +0000 (16:52 -0700)]
mesa: Throw an error instead of asserting for condrender with query == 0.

From the NV_conditional_render spec:

    BeginQuery sets the active query object name for the query type given by
    <target> to <id>.  If BeginQuery is called with an <id> of zero, if the
    active query object name for <target> is non-zero, if <id> is the active
    query object name for any query type, or if <id> is the active query
    object for condtional rendering (Section 2.X), the error INVALID OPERATION
    is generated.

Fixes piglit nv_conditional_render-begin-zero.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add support for Begin/EndConditionalRender in display lists.
Eric Anholt [Thu, 8 Sep 2011 23:42:39 +0000 (16:42 -0700)]
mesa: Add support for Begin/EndConditionalRender in display lists.

Fixes piglit nv_conditional_render-dlist.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix an autoconf build-system bug related to glsl_to_tgsi
Marek Olšák [Fri, 16 Sep 2011 19:51:58 +0000 (21:51 +0200)]
mesa: fix an autoconf build-system bug related to glsl_to_tgsi

st_glsl_to_tgsi.cpp was completely ignored by makedepend because it was
not included in ALL_SOURCES, which caused that the file was not recompiled
when certain header files were changed (like glsl/ir.h).

The first part of this commit is just a consolidation.
The second part is the fix.