mesa.git
13 years agomesa: Reuse existing make_2d_mipmap for 2D array generation.
Eric Anholt [Thu, 29 Sep 2011 21:48:04 +0000 (14:48 -0700)]
mesa: Reuse existing make_2d_mipmap for 2D array generation.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Make the uncompressed sw mipmap gen path do a Map per 1D array slice.
Eric Anholt [Thu, 29 Sep 2011 21:09:07 +0000 (14:09 -0700)]
mesa: Make the uncompressed sw mipmap gen path do a Map per 1D array slice.

This also fixes what was probably a bug in 1D arrays with border.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: When storing texture data for a 1D array, map each slice separately.
Eric Anholt [Wed, 28 Sep 2011 18:17:11 +0000 (11:17 -0700)]
mesa: When storing texture data for a 1D array, map each slice separately.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoswrast: When asked to map a slice of a 1D array, give back that slice.
Eric Anholt [Wed, 28 Sep 2011 18:15:01 +0000 (11:15 -0700)]
swrast: When asked to map a slice of a 1D array, give back that slice.

Until now, we've been treating 1D arrays as a single slice, and each
array slice is actually just a row of the 2D texture.  While swrast
still stores them this way, hardware drivers think that 1D arrays have
actual separate slices not stored as contiguous rows.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Consolidate texture validation copy code, and reuse it correctly.
Eric Anholt [Wed, 28 Sep 2011 23:07:56 +0000 (16:07 -0700)]
intel: Consolidate texture validation copy code, and reuse it correctly.

The path for ->Data was failing to be called for the FBO draw offset
fallback, and also had mismatched compressed texture support code.

This drops the intel_prepare_render() in the blit path.  We aren't
copying to/from a GL_FRONT buffer, so it doesn't matter.

13 years agointel: Clean up the function chain for mapping texture images for swrast.
Eric Anholt [Wed, 28 Sep 2011 22:25:30 +0000 (15:25 -0700)]
intel: Clean up the function chain for mapping texture images for swrast.

Too many separate functions each called from one location (in
different files).  This code should all die soon when swrast starts
using MapTextureImage.

13 years agointel: Make PBO TexImage use AllocTextureImageBuffer like non-PBO does.
Eric Anholt [Wed, 28 Sep 2011 19:27:56 +0000 (12:27 -0700)]
intel: Make PBO TexImage use AllocTextureImageBuffer like non-PBO does.

Now that whole block that also lives in AllocTextureImageBuffer can go
away.

13 years agointel: Rely on Mesa core for glTexImage storage.
Eric Anholt [Mon, 1 Aug 2011 22:24:14 +0000 (15:24 -0700)]
intel: Rely on Mesa core for glTexImage storage.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Allocate s8z24 separate renderbuffers from AllocTextureImageBuffer().
Eric Anholt [Wed, 28 Sep 2011 19:30:45 +0000 (12:30 -0700)]
intel: Allocate s8z24 separate renderbuffers from AllocTextureImageBuffer().

Before, we were only allocating these from our TexImage, so if the
texture image was set up in any other way (non-accelerated
glGenerateMipmaps()), they'd be missing or wrong.

13 years agointel: Add an AllocTextureImageBuffer() implementation using miptrees.
Eric Anholt [Wed, 21 Sep 2011 21:43:20 +0000 (14:43 -0700)]
intel: Add an AllocTextureImageBuffer() implementation using miptrees.

Now we can rely on Mesa core for uploads of data without introducing
an extra copy at validate time.

13 years agomesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.
Brian Paul [Tue, 2 Aug 2011 06:04:12 +0000 (23:04 -0700)]
mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.

Now that we can zero-copy generate the mipmaps into brand new
glTexImage()-generated storage using MapTextureImage(), we no longer
need to allocate image->Data in mipmap generate.  This requires
deleting the drivers' old overrides of the miptree tracking after
calling _mesa_generate_mipmap at the same time, or the drivers
promptly lose our newly-generated data.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Stop lowering integer division to multiply and reciprocal.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:57 +0000 (17:37 -0700)]
i965: Stop lowering integer division to multiply and reciprocal.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Reverse the operands for INT DIV prior to Gen6.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:56 +0000 (17:37 -0700)]
i965: Reverse the operands for INT DIV prior to Gen6.

Apparently on Gen4 and 5, the denominator comes first.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/vs: Implement integer quotient and remainder math operations.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:55 +0000 (17:37 -0700)]
i965/vs: Implement integer quotient and remainder math operations.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Implement integer quotient and remainder math operations.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:54 +0000 (17:37 -0700)]
i965/fs: Implement integer quotient and remainder math operations.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Set the signed/unsigned type bit in Gen4/5 math messages.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:53 +0000 (17:37 -0700)]
i965: Set the signed/unsigned type bit in Gen4/5 math messages.

It never mattered before since we only did floating point math.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Fix message and response length calculations for INT DIV.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:52 +0000 (17:37 -0700)]
i965: Fix message and response length calculations for INT DIV.

Both POW and INT DIV need a message length of 2; previously, we only
checked for POW.

Also, BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER has a response
length of 2; previously, we only checked for SINCOS.  We don't use this
message, but in case we ever decide to, we may as well fix it now.

While we're at it, just move these computations into
brw_set_math_message, since they're entirely based on the function.
This fixes it for both brw_math and the old backend's brw_math_16.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Fix assertions about register types for INT DIV in brw_math.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:51 +0000 (17:37 -0700)]
i965: Fix assertions about register types for INT DIV in brw_math.

BRW_MATH_FUNCTION_REMAINDER was missing.  Also, it seems worthwhile to
assert that INT DIV's arguments are signed/unsigned integers.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoir_to_mesa: Don't assertion fail on integer modulus.
Kenneth Graunke [Thu, 29 Sep 2011 00:37:50 +0000 (17:37 -0700)]
ir_to_mesa: Don't assertion fail on integer modulus.

Drivers implementing GLSL 1.30 want to do integer modulus, and until we
can stop generating code via ir_to_mesa, it's easier to make it silently
generate rubbish code.  Multiply will do.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agor300/compiler: Fix error in OMOD optimization
Tom Stellard [Sat, 1 Oct 2011 22:22:24 +0000 (15:22 -0700)]
r300/compiler: Fix error in OMOD optimization

Classic compiler mistake.  In the example below, the OMOD optimization
was combining instructions 4 and 10, but since there was an instruction
(#8) in between them that wrote to the same registers as instruction 10,
instruction 11 was reading the wrong value.

Example of the mistake:

Before OMOD:
4: MAD temp[0].y, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
10: MUL temp[2].x, const[1].y___, temp[0].y___;
11: FRC temp[5].x, temp[2].x___;

After OMOD:
4: MAD temp[2].x / 8, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
11: FRC temp[5].x, temp[2].x___;

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

13 years agor300/compiler: Rewrite source swizzles when using OMOD
Tom Stellard [Sat, 1 Oct 2011 22:21:05 +0000 (15:21 -0700)]
r300/compiler: Rewrite source swizzles when using OMOD

13 years agor300/compiler: Fix rc_normal_rewrite_writemask()
Tom Stellard [Sat, 1 Oct 2011 22:18:18 +0000 (15:18 -0700)]
r300/compiler: Fix rc_normal_rewrite_writemask()

This function had not been updated to use conversion swizzles.

13 years agor300/compiler: Use consistent src swizzles for transcendent instructions
Tom Stellard [Sun, 2 Oct 2011 04:06:12 +0000 (21:06 -0700)]
r300/compiler: Use consistent src swizzles for transcendent instructions

Source swizzles for transcendent instructions were being stored in the X
channel regardless of what channel the instruction was writing.
This was causing problems for some helper functions that were expecting
source swizzles to occupy channels corresponding to the instruction's
writemask.  This commit makes transcendent instructions follow the same
convention as normal instructions for representing source swizzles.

Previous behavior:
LG2 temp[0].y, input[0].x___;

Current behavior:
LG2 temp[0].y, input[0]._x__;

13 years agomesa: Respect GL_RASTERIZER_DISCARD for various meta-type operations.
Eric Anholt [Fri, 30 Sep 2011 06:13:44 +0000 (23:13 -0700)]
mesa: Respect GL_RASTERIZER_DISCARD for various meta-type operations.

From the EXT_transform_feedback spec:

    Primitives can be optionally discarded before rasterization by calling
    Enable and Disable with RASTERIZER_DISCARD_EXT. When enabled, primitives
    are discared right before the rasterization stage, but after the optional
    transform feedback stage. When disabled, primitives are passed through to
    the rasterization stage to be processed normally. RASTERIZER_DISCARD_EXT
    applies to the DrawPixels, CopyPixels, Bitmap, Clear and Accum commands as
    well.

And the GL 3.2 spec says it applies to ClearBuffer* as well.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.
Eric Anholt [Thu, 29 Sep 2011 22:15:02 +0000 (15:15 -0700)]
mesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.

Fixes piglit ARB_color_buffer_float/api-get

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoRevert "vbo: Don't discount stride == 0 for testing all varyings in VBOs."
Eric Anholt [Mon, 26 Sep 2011 23:22:17 +0000 (16:22 -0700)]
Revert "vbo: Don't discount stride == 0 for testing all varyings in VBOs."

This reverts commit d631c19db47181129811080bfa772b210d762d4d.

The commit was broken, and ended up returning false all the time
because nobody in the world binds every single possible vertex array.
On further reflection, we don't want to discount stride == 0: This
function is just used for deciding to calculate whether to compute the
bonuds on the index, and there's no sense in computing index bounds
when stride == 0.

For the separate question of "how much data do I upload for this
vertex element?", the i965 driver was fixed to upload the data.

Fixes a regression of about 2x in 3DMMES, and most importantly, makes
Hammerfight playable.

13 years agoi965: Make sure to upload the data for a collection of Stride == 0 arrays.
Eric Anholt [Mon, 26 Sep 2011 23:14:40 +0000 (16:14 -0700)]
i965: Make sure to upload the data for a collection of Stride == 0 arrays.

Commit d631c19db47181129811080bfa772b210d762d4d avoided this problem
by forcing the driver to get the min/max index, but that commit was
broken, so just fix the driver problem (confusion between "do I need
to upload any data?" and "do I need the index bounds in order to
upload any data?").

13 years agomesa: Delay s_texcombine.c memory allocation until it's used.
Eric Anholt [Thu, 22 Sep 2011 19:52:43 +0000 (12:52 -0700)]
mesa: Delay s_texcombine.c memory allocation until it's used.

Generally we're using fragment programs in all our drivers, so wasting
4MB for code that's never called is pretty lame.  Reduces i965 memory
allocation for a short shader program from 21,932,128B to 17,737,816B.

13 years agotnl: Delay results allocation until we actually need them.
Eric Anholt [Thu, 22 Sep 2011 18:28:19 +0000 (11:28 -0700)]
tnl: Delay results allocation until we actually need them.

Decreases i965 peak memory allocation for a trivial shader program
from 23,483,048B to 21,932,128B, since we never actually use tnl for
rendering.

13 years agoi965/vs: Fix swizzle related assertion
Ian Romanick [Fri, 30 Sep 2011 23:24:35 +0000 (16:24 -0700)]
i965/vs: Fix swizzle related assertion

As innocuous as it seemed, ebca47a basically broke the world (e.g.,
>200 piglit regressions).  In vec4_visitor::emit_block_move,
src->swizzle was expected to be BRW_SWIZZLE_NOOP before setting it to
a swizzle that would replicate the existing channels of the source
type to a vec4 (e.g., .xyyy for a vec2).

The original assertion seems to have been a little bogus.  In addition
to being BRW_SWIZZLE_NOOP, src->swizzle might already be a swizzle
that would replicate the existing channels of the source type to a
vec4.  In other words, it might already have the value that we're
about to assign to it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agomesa: number of combiner terms to pop depends on GL_NV_texture_env_combine4
Brian Paul [Sat, 1 Oct 2011 14:27:46 +0000 (08:27 -0600)]
mesa: number of combiner terms to pop depends on GL_NV_texture_env_combine4

If GL_NV_texture_env_combine4 is not supported, setting the fourth
combiner term would generate a GL error.
Of course, I noticed this right after committing the previous patch
to use a loop in the first place.  <sigh>

Note that GL_EXT_texture_env_combine is always supported so the first
three combiner terms are always accepted.

13 years agomesa: s/INLINE/inline/
Brian Paul [Sat, 1 Oct 2011 03:03:42 +0000 (21:03 -0600)]
mesa: s/INLINE/inline/

INLINE is still seen in some files (some generated files, etc) but this
is a good start.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agor600: include version.h for _mesa_override_glsl_version() prototype
Brian Paul [Sat, 1 Oct 2011 03:12:04 +0000 (21:12 -0600)]
r600: include version.h for _mesa_override_glsl_version() prototype

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: use !! to simplify some _mesa_set_enable() calls in attrib.c
Brian Paul [Sat, 1 Oct 2011 03:03:42 +0000 (21:03 -0600)]
mesa: use !! to simplify some _mesa_set_enable() calls in attrib.c

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: use loop in pop_texture_group() to restore 4 combiner terms
Brian Paul [Sat, 1 Oct 2011 03:03:42 +0000 (21:03 -0600)]
mesa: use loop in pop_texture_group() to restore 4 combiner terms

There's four combiner terms (not 3) with GL_NV_texture_env_combine4.
Use a loop to make the code a little more compact.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Refactor hash_table_{find,remove} to share some code
Ian Romanick [Wed, 17 Aug 2011 18:48:07 +0000 (11:48 -0700)]
mesa: Refactor hash_table_{find,remove} to share some code

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Document an odd side-effect of hash_table_insert
Ian Romanick [Wed, 17 Aug 2011 18:43:11 +0000 (11:43 -0700)]
mesa: Document an odd side-effect of hash_table_insert

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove unused field gl_program::Varying
Ian Romanick [Tue, 16 Aug 2011 18:06:54 +0000 (11:06 -0700)]
mesa: Remove unused field gl_program::Varying

Lots of things set and copy this field around, but nothing uses it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Use Add linker_error instead of fail_link
Ian Romanick [Thu, 22 Sep 2011 23:56:58 +0000 (16:56 -0700)]
mesa: Use Add linker_error instead of fail_link

See also 8aadd89.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agor600g: fix a compiler warning
Marek Olšák [Fri, 30 Sep 2011 21:06:51 +0000 (23:06 +0200)]
r600g: fix a compiler warning

13 years agogallium/docs: update the documentation of capabilities
Marek Olšák [Fri, 30 Sep 2011 21:02:06 +0000 (23:02 +0200)]
gallium/docs: update the documentation of capabilities

Still like 13 caps are undocumented.

13 years agor600g: move all files from winsys/r600 into drivers/r600
Marek Olšák [Tue, 27 Sep 2011 14:42:01 +0000 (16:42 +0200)]
r600g: move all files from winsys/r600 into drivers/r600

Be sure to reconfigure after this commit.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agowinsys/radeon: move GEM domains out of the drivers into winsys
Marek Olšák [Mon, 26 Sep 2011 23:10:20 +0000 (01:10 +0200)]
winsys/radeon: move GEM domains out of the drivers into winsys

The drivers don't need to care about the domains. All they need to set
are the bind and usage flags. This simplifies the winsys too.

This also fixes on r600g:
- fbo-depth-GL_DEPTH_COMPONENT32F-copypixels
- fbo-depth-GL_DEPTH_COMPONENT16-copypixels
- fbo-depth-GL_DEPTH_COMPONENT24-copypixels
- fbo-depth-GL_DEPTH_COMPONENT32-copypixels
- fbo-depth-GL_DEPTH24_STENCIL8-copypixels
I can't explain it.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agowinsys/radeon: remove a redundant parameter 'size' from buffer_from_handle
Marek Olšák [Tue, 27 Sep 2011 00:08:15 +0000 (02:08 +0200)]
winsys/radeon: remove a redundant parameter 'size' from buffer_from_handle

It's part of pb_buffer already.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agor600g: remove struct radeon (or what's left of it)
Marek Olšák [Sat, 17 Sep 2011 12:10:20 +0000 (14:10 +0200)]
r600g: remove struct radeon (or what's left of it)

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agor600g: move family and chip_class from struct radeon to r600_screen
Marek Olšák [Sat, 17 Sep 2011 11:56:09 +0000 (13:56 +0200)]
r600g: move family and chip_class from struct radeon to r600_screen

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agor600g: merge r600_bo with r600_resource
Marek Olšák [Sun, 11 Sep 2011 20:24:38 +0000 (22:24 +0200)]
r600g: merge r600_bo with r600_resource

I have moved 'last_flush' and 'binding' from r600_bo to winsys/radeon.
The other members are now part of r600_resource.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
13 years agogallium: add PIPE_CAP_TEXTURE_BARRIER
Marek Olšák [Tue, 27 Sep 2011 21:18:17 +0000 (23:18 +0200)]
gallium: add PIPE_CAP_TEXTURE_BARRIER

Same issue as with conditional_render.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agogallium: add PIPE_CAP_CONDITIONAL_RENDER
Marek Olšák [Tue, 27 Sep 2011 21:08:04 +0000 (23:08 +0200)]
gallium: add PIPE_CAP_CONDITIONAL_RENDER

We were checking whether render_condition is set. That was not reliable,
because it's always set with trace and noop regardless of driver support.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agogallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS
Marek Olšák [Tue, 27 Sep 2011 20:22:06 +0000 (22:22 +0200)]
gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS

This removes:
- PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS
- PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS
in favor of the that new per-shader cap.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agogallium: remove PIPE_CAP_TEXTURE_MIRROR_REPEAT
Marek Olšák [Mon, 26 Sep 2011 20:50:00 +0000 (22:50 +0200)]
gallium: remove PIPE_CAP_TEXTURE_MIRROR_REPEAT

All drivers support it (well, except Cell). The boolean option is going away
from core Mesa too.

This is a follow-up to Ian Romanick's patch
"mesa: Remove ARB_texture_mirrored_repeat extension enable flag".

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi915: out-of-bounds write in calc_live_regs()
Chris Wilson [Fri, 30 Sep 2011 21:10:33 +0000 (22:10 +0100)]
i915: out-of-bounds write in calc_live_regs()

From a Coverity defect report.

src/mesa/drivers/dri/i915/i915_fragprog.c
   301  /*
   302   * TODO: consider moving this into core
   303   */
   304  static bool calc_live_regs( struct i915_fragment_program *p )
   305  {
   306      const struct gl_fragment_program *program = &p->FragProg;
   307      GLuint regsUsed = 0xffff0000;
-> 308      uint8_t live_components[16] = { 0, };
   309      GLint i;
   310
   311      for (i = program->Base.NumInstructions - 1; i >= 0; i--) {
   312          struct prog_instruction *inst =
&program->Base.Instructions[i];
   313          int opArgs = _mesa_num_inst_src_regs(inst->Opcode);
   314          int a;
   315
   316          /* Register is written to: unmark as live for this and
preceeding ops */
   317          if (inst->DstReg.File == PROGRAM_TEMPORARY) {
-> 318              if (inst->DstReg.Index > 16)
   319                 return false;
   320
-> 321              live_components[inst->DstReg.Index] &= ~inst->DstReg.WriteMask;
   322              if (live_components[inst->DstReg.Index] == 0)
   323                  regsUsed &= ~(1 << inst->DstReg.Index);
   324          }
   325
   326          for (a = 0; a < opArgs; a++) {
   327              /* Register is read from: mark as live for this and preceeding ops */
   328              if (inst->SrcReg[a].File == PROGRAM_TEMPORARY) {
   329                  unsigned c;
   330
   331                  if (inst->SrcReg[a].Index > 16)
   332                     return false;
   333
   334                  regsUsed |= 1 << inst->SrcReg[a].Index;
   335
   336                  for (c = 0; c < 4; c++) {
   337                      const unsigned field = GET_SWZ(inst->SrcReg[a].Swizzle, c);
   338
   339                      if (field <= SWIZZLE_W)
   340                          live_components[inst->SrcReg[a].Index] |= (1U << field);
   341                  }
   342              }
   343          }
   344
   345          p->usedRegs[i] = regsUsed;
   346      }

Reported-by: Vinson Lee <vlee@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40022
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965: Assign instead of compare inside assert
Chris Wilson [Fri, 30 Sep 2011 20:58:59 +0000 (21:58 +0100)]
i965: Assign instead of compare inside assert

This is from a Coverity defect report.

src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
  1314  void
  1315  vec4_visitor::emit_block_move(dst_reg *dst, src_reg *src,
  1316                                const struct glsl_type *type, bool
predicated)
...
  1351     /* Do we need to worry about swizzling a swizzle? */
->1352     assert(src->swizzle = BRW_SWIZZLE_NOOP);
  1353     src->swizzle = swizzle_for_size(type->vector_elements);

Reported-by: Vinson Lee <vlee@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40158
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965/gen6: Fix assign instead of compare in assert
Chris Wilson [Fri, 30 Sep 2011 20:48:18 +0000 (21:48 +0100)]
i965/gen6: Fix assign instead of compare in assert

This is from a Coverity defect report.

src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
   268  static void
   269  check_gen6_math_src_arg(struct brw_reg src)
   270  {
   271     /* Source swizzles are ignored. */
   272     assert(!src.abs);
   273     assert(!src.negate);
-> 274     assert(src.dw1.bits.swizzle = BRW_SWIZZLE_XYZW);
   275  }

Reported-by: Vinson Lee <vlee@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40214
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoglcpp: Add a test for #elif with an undefined macro.
Carl Worth [Fri, 30 Sep 2011 05:24:18 +0000 (22:24 -0700)]
glcpp: Add a test for #elif with an undefined macro.

As written, this test correctly raises an error for #elif being used
with an undefined macro (and not as an argument to "defined"). If the
preceding #if were '#if 1' then this diagnositc would correctly be
hidden. That allows code such as the following to not raise an error:

#ifndef MAYBE_UNDEFINED
#elif MAYBE_UNDEFINED < 5
...
#endif

So this test case is working as expected already. We add it here just
to improve test coverage.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agoglcpp: Raise error if defining any macro containing two consecutive underscores
Carl Worth [Fri, 30 Sep 2011 04:44:52 +0000 (21:44 -0700)]
glcpp: Raise error if defining any macro containing two consecutive underscores

The specification reserves any macro name containing two consecutive
underscores, (anywhere within the name). Previously, we only raised
this error for macro names that started with two underscores.

Fix the implementation to check for two underscores anywhere, and also
update the corresponding 086-reserved-macro-names test.

This also fixes the following two piglit tests:

spec/glsl-1.30/preprocessor/reserved/double-underscore-02.frag
spec/glsl-1.30/preprocessor/reserved/double-underscore-03.frag

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agoglcpp: Implement token pasting for non-function-like macros
Carl Worth [Fri, 30 Sep 2011 00:04:47 +0000 (17:04 -0700)]
glcpp: Implement token pasting for non-function-like macros

This is as simple as abstracting one existing block of code into a
function call and then adding a single call to that function for the
case of a non-function-like macro.

This fixes the recently-added 097-paste-with-non-function-macro test
as well as the following piglit tests:

spec/glsl-1.30/preprocessor/concat/concat-01.frag
spec/glsl-1.30/preprocessor/concat/concat-02.frag

Also, the concat-04.frag test now passes for the right reason. The
test is intended to fail the compilation, but before this commit it
was failing compilation (and hence passing the test) for the wrong
reason.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agoglcpp: Test a non-function-like macro using the token paste operator
Carl Worth [Fri, 30 Sep 2011 00:04:09 +0000 (17:04 -0700)]
glcpp: Test a non-function-like macro using the token paste operator

Apparently we never implemented this, (but we've got a GLSL 1.30 test
in piglit that is exercising this case).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agoglcpp: Fix two (or more) successive applications of token pasting
Carl Worth [Thu, 29 Sep 2011 23:51:08 +0000 (16:51 -0700)]
glcpp: Fix two (or more) successive applications of token pasting

There was already a loop here to look for multiple token pastes, but
it was mistakenly incrementing the iterator counter after performing
one paste.

Instead, leave the loop iterator in place to coalesce as many tokens
as necessary into one.

This fixes the recently add 096-paste-twice test as well as the
following piglit test:

spec/glsl-1.30/preprocessor/concat/concat-03.frag

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agoglcpp: Add a test for a macro that implements token pasting twice.
Carl Worth [Thu, 29 Sep 2011 23:50:40 +0000 (16:50 -0700)]
glcpp: Add a test for a macro that implements token pasting twice.

This is something that piglit is exercising that currently fails.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
13 years agomesa: Remove unused tnl items from dd_functions
Chad Versace [Wed, 28 Sep 2011 23:59:08 +0000 (16:59 -0700)]
mesa: Remove unused tnl items from dd_functions

Remove NeedValidate and ValidateTnlModule.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agometa: fix GetTexImage() for luminance, l/a, intensity formats
Brian Paul [Fri, 30 Sep 2011 14:15:30 +0000 (08:15 -0600)]
meta: fix GetTexImage() for luminance, l/a, intensity formats

The GL spec says that luminance values are returned as (l, 0, 0, 1),
L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1).
Use the pixel transfer scale controls to implement that.
This fixes a few failures in the new piglit getteximage-formats
test when getting a compressed L or L/A image.

13 years agomesa: add _NEW_CURRENT_ATTRIB in _mesa_program_state_flags()
Brian Paul [Fri, 30 Sep 2011 14:15:30 +0000 (08:15 -0600)]
mesa: add _NEW_CURRENT_ATTRIB in _mesa_program_state_flags()

If color material mode is enabled, constant buffer entries related
to the material coefficients will depend on glColor.  So add
_NEW_CURRENT_ATTRIB to the bitset returned for material-related
constants in _mesa_program_state_flags().

This fixes a bug exercised by the new piglit draw-arrays-colormaterial
test.

Note: This is a candidate for the 7.11 branch.

13 years agost/mesa: implement AllocTextureImageBuffer() driver hook
Brian Paul [Fri, 30 Sep 2011 14:15:30 +0000 (08:15 -0600)]
st/mesa: implement AllocTextureImageBuffer() driver hook

This hasn't been needed so far since none of the core Mesa code paths
that call ctx->Driver.AllocTextureImageBuffer() are used with the
state tracker.  That will change in upcoming patches.
Note that this function duplicates some code seen in the st_TexImage()
function.  That can be cleaned up later.

13 years agomesa: simplify parameters to GetTexImage() driver hook
Brian Paul [Fri, 30 Sep 2011 14:15:30 +0000 (08:15 -0600)]
mesa: simplify parameters to GetTexImage() driver hook

The target, level and texObj can be obtained through the texImage
parameter.  We could make similar changes for the TexImage() hooks too.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoxorg/vmwgfx: Kill this target. It's not used anymore.
Thomas Hellstrom [Thu, 29 Sep 2011 19:41:21 +0000 (21:41 +0200)]
xorg/vmwgfx: Kill this target. It's not used anymore.

This fixes a build error introduced with commit
"winsys/svga: Update to vmwgfx kernel module 2.1"
if both the svga driver and the xorg state tracker was enabled
at the same time.

If needed we can re-add a minimal target for basic functionality.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agointel: include version.h to get _mesa_override_glsl_version() prototype
Brian Paul [Thu, 29 Sep 2011 22:29:30 +0000 (16:29 -0600)]
intel: include version.h to get _mesa_override_glsl_version() prototype

13 years agogallium: Set renderbuffer's InternalFormat when rendering to texture
Simon Farnsworth [Thu, 29 Sep 2011 13:51:41 +0000 (14:51 +0100)]
gallium: Set renderbuffer's InternalFormat when rendering to texture

When an FBO is rendering to a texture (rather than a renderbuffer),
Gallium sets up an internal renderbuffer to handle the rendering, and
copies over enough texture state to make this work.

InternalFormat was missed out, causing glTexCopyImage to take a slow
path unnecessarily.

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

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agowinsys/svga: Update to vmwgfx kernel module 2.1
Thomas Hellstrom [Wed, 28 Sep 2011 07:13:50 +0000 (09:13 +0200)]
winsys/svga: Update to vmwgfx kernel module 2.1

Introduces fence objecs and a size limit on query buffers.
The possibility to map the fifo from user-space is gone, and
replaced by an ioctl that reads the 3D capabilities.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecranz <jakob@vmware.com>
13 years agost/xa: Don't call fence_reference with an unitialized fence handle as dst
Thomas Hellstrom [Thu, 1 Sep 2011 09:19:02 +0000 (11:19 +0200)]
st/xa: Don't call fence_reference with an unitialized fence handle as dst

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agost/xa: surfaces and sampler views are per context
Thomas Hellstrom [Fri, 8 Jul 2011 08:03:07 +0000 (10:03 +0200)]
st/xa: surfaces and sampler views are per context

Don't store references to these on the surface but on the context.
References to transfers are still stored on the surface since we allow
only a single map of a surface at a time.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agomesa: Remove ARB_texture_mirrored_repeat extension enable flag
Ian Romanick [Wed, 31 Aug 2011 01:04:41 +0000 (18:04 -0700)]
mesa: Remove ARB_texture_mirrored_repeat extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64, mga, and savage
(Savage3D and other pre-Savage4).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove EXT_blend_subtract extension enable flag
Ian Romanick [Wed, 31 Aug 2011 00:55:26 +0000 (17:55 -0700)]
mesa: Remove EXT_blend_subtract extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on i810, mach64, mga,
savage, sis, and tdfx (Voodoo Banshee and Voodoo3).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove EXT_stencil_wrap extension enable flag
Ian Romanick [Wed, 31 Aug 2011 00:48:11 +0000 (17:48 -0700)]
mesa: Remove EXT_stencil_wrap extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove EXT_texture_lod_bias extension enable flag
Ian Romanick [Wed, 31 Aug 2011 00:33:51 +0000 (17:33 -0700)]
mesa: Remove EXT_texture_lod_bias extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64, mga, or r128.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove EXT_texture_env_combine extension enable flag
Ian Romanick [Wed, 31 Aug 2011 00:24:13 +0000 (17:24 -0700)]
mesa: Remove EXT_texture_env_combine extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x).
This patch does not change the situation in any way.

It looks like the only hardware supported by Mesa that cannot do
ARB_texture_env_combine is pre-NV10 NVIDA chips.  It appears that
these chips cannot do the GL_SUBTRACT mode.  Based on looking at older
copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported
ARB_texture_env_combine on those chips either.

This extension was previously not supported on mach64, mga (G200),
r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove EXT_texture_env_add extension enable flag
Ian Romanick [Tue, 30 Aug 2011 23:51:57 +0000 (16:51 -0700)]
mesa: Remove EXT_texture_env_add extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x).
This patch does not change the situation in any way.

This extension was previously not supported on mach64, mga (G200),
savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo
Banshee).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Remove ARB_multitexture extension enable flag
Ian Romanick [Tue, 30 Aug 2011 23:45:50 +0000 (16:45 -0700)]
mesa: Remove ARB_multitexture extension enable flag

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_CLIENT_ACTIVE_TEXTURE in OpenGL ES
2.x).  This patch does not change the situation in any way.

This extension was previously not supported on i810, mga (G200), or
tdfx (Voodoo Banshee).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agollvmpipe: Convert some of the null checks back to asserts.
José Fonseca [Thu, 29 Sep 2011 10:07:24 +0000 (11:07 +0100)]
llvmpipe: Convert some of the null checks back to asserts.

This turns some of the null check warnings in commit
023ca40d80670ac0eee8c755ca5f54b1e7c2712e back to asserts, as
the underlying cause of fdo bug 40591 should be fixed now.

13 years agollvmpipe: Also reset the state in lp_scene_bin_reset
José Fonseca [Thu, 29 Sep 2011 09:54:29 +0000 (10:54 +0100)]
llvmpipe: Also reset the state in lp_scene_bin_reset

Prevents segfaults when a opaque tile is found without state change.

13 years agollvmpipe: Prevent segfault during fs variant cache shrinking.
José Fonseca [Wed, 28 Sep 2011 19:23:13 +0000 (20:23 +0100)]
llvmpipe: Prevent segfault during fs variant cache shrinking.

13 years agotools/trace: Dump NULL literally.
José Fonseca [Wed, 28 Sep 2011 19:25:40 +0000 (20:25 +0100)]
tools/trace: Dump NULL literally.

Instead of None.

13 years agost/mesa: remove some old GetTexImage() code
Brian Paul [Thu, 29 Sep 2011 15:18:20 +0000 (09:18 -0600)]
st/mesa: remove some old GetTexImage() code

We can use the core Mesa code for glGetTexImage() since it handles the
image mapping/unmapping now.  We'll keep the decompress_with_blit() path
in the hope that it's faster than core Mesa's software decompression code.

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

13 years agowinsys/radeon: remove redundant member radeon_bo::size
Marek Olšák [Tue, 27 Sep 2011 02:03:07 +0000 (04:03 +0200)]
winsys/radeon: remove redundant member radeon_bo::size

It's part of pb_buffer already.

13 years agowinsys/radeon: simplify updating GEM domains for relocations
Marek Olšák [Tue, 27 Sep 2011 01:10:33 +0000 (03:10 +0200)]
winsys/radeon: simplify updating GEM domains for relocations

13 years agowinsys/radeon: simplify passing GEM domains through to GEM_CREATE
Marek Olšák [Tue, 27 Sep 2011 00:55:30 +0000 (02:55 +0200)]
winsys/radeon: simplify passing GEM domains through to GEM_CREATE

13 years agor300g: remove useless variables in some structures
Marek Olšák [Tue, 27 Sep 2011 00:04:02 +0000 (02:04 +0200)]
r300g: remove useless variables in some structures

13 years agor300g: simplify the immd_is_good_idea function
Marek Olšák [Mon, 26 Sep 2011 21:46:42 +0000 (23:46 +0200)]
r300g: simplify the immd_is_good_idea function

13 years agoconfigure.ac: unduplicate gallium directories
Marek Olšák [Tue, 27 Sep 2011 14:51:05 +0000 (16:51 +0200)]
configure.ac: unduplicate gallium directories

It may happen when two drivers share one winsys.

13 years agor600g: convert if (query->type) into switch statements
Marek Olšák [Tue, 27 Sep 2011 22:11:57 +0000 (00:11 +0200)]
r600g: convert if (query->type) into switch statements

13 years agogallium/docs: update d3d11ddi.txt
Marek Olšák [Tue, 27 Sep 2011 19:30:13 +0000 (21:30 +0200)]
gallium/docs: update d3d11ddi.txt

13 years agost/mesa: don't compute index buffer bounds for per-instance data
Marek Olšák [Sun, 25 Sep 2011 12:19:46 +0000 (14:19 +0200)]
st/mesa: don't compute index buffer bounds for per-instance data

13 years agoglsl 1.30: Fix numerical instabilities in asinh
Paul Berry [Mon, 26 Sep 2011 22:51:39 +0000 (15:51 -0700)]
glsl 1.30: Fix numerical instabilities in asinh

The formula we were previously using for asinh:

    asinh x = ln(x + sqrt(x * x + 1))

is numerically unstable: when x is a large negative value, the quantity

    x + sqrt(x * x + 1)

is a small positive value (on the order of 1/(2|x|)).  Since the
logarithm function is very sensitive in this range, any error in the
computation of the square root manifests as a large error in the
result.

This patch changes to the equivalent formula:

    asinh x = sign(x) * ln(abs(x) + sqrt(x * x + 1))

which is only slightly more expensive to compute, and is numerically
stable for all x.

Fixes piglit tests
spec/glsl-1.30/execution/built-in-functions/[fv]s-asinh-*.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agomesa: fix signed/unsigned sscanf() warning in _mesa_override_glsl_version()
Brian Paul [Wed, 28 Sep 2011 19:16:45 +0000 (13:16 -0600)]
mesa: fix signed/unsigned sscanf() warning in _mesa_override_glsl_version()

13 years agost/mesa: include version.h and fix _mesa_override_glsl_version() call
Brian Paul [Wed, 28 Sep 2011 19:16:25 +0000 (13:16 -0600)]
st/mesa: include version.h and fix _mesa_override_glsl_version() call

13 years agoglsl: Add support for constant expression evaluation on trunc().
Eric Anholt [Tue, 27 Sep 2011 21:50:45 +0000 (14:50 -0700)]
glsl: Add support for constant expression evaluation on trunc().

Fixes the glsl-1.30/compiler/built-in-functions/trunc-* tests under 1.30.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965/vs: Add support for bit-shift operations.
Eric Anholt [Tue, 27 Sep 2011 21:48:56 +0000 (14:48 -0700)]
i965/vs: Add support for bit-shift operations.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Add missing _mesa_sizeof_glsl_type() for UNSIGNED_INT.
Eric Anholt [Tue, 27 Sep 2011 21:36:07 +0000 (14:36 -0700)]
mesa: Add missing _mesa_sizeof_glsl_type() for UNSIGNED_INT.

Somehow we managed to get the unsigned int vectors, but not scalar.
Fixes _mesa_problem complaints in piglit's uint tests.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965/fs: Add support for bit-shift operations.
Eric Anholt [Tue, 27 Sep 2011 21:32:42 +0000 (14:32 -0700)]
i965/fs: Add support for bit-shift operations.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglsl: Fix assertion checking types of constant bitshift expressions.
Eric Anholt [Tue, 27 Sep 2011 21:27:58 +0000 (14:27 -0700)]
glsl: Fix assertion checking types of constant bitshift expressions.

Bitshifts are one of the rare places that GLSL allows mixed base types
without an implicit conversion occurring.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>