mesa.git
14 years agonv50: plug memory leak in miptree creation/destruction
Christoph Bumiller [Fri, 4 Dec 2009 22:16:32 +0000 (23:16 +0100)]
nv50: plug memory leak in miptree creation/destruction

Keeping this dynamically allocated for texture arrays.
Since we don't use it to store zslice offsets anymore
it's either 1 or 6 integers (cube) ...

14 years agonv50: use copies of tgsi src nv50_regs
Christoph Bumiller [Wed, 2 Dec 2009 18:59:07 +0000 (19:59 +0100)]
nv50: use copies of tgsi src nv50_regs

So we can use the 'mod' member without concern
if a source is used multiple times in 1 insn.

14 years agonv50: support vertex program textures
Christoph Bumiller [Thu, 10 Dec 2009 19:50:02 +0000 (20:50 +0100)]
nv50: support vertex program textures

14 years agor300: disable blit debugging info
Maciej Cencora [Fri, 11 Dec 2009 23:50:26 +0000 (00:50 +0100)]
r300: disable blit debugging info

14 years agor300: emit number of used colorbuffers to pass radeon cs checker
Maciej Cencora [Sun, 22 Nov 2009 14:12:24 +0000 (15:12 +0100)]
r300: emit number of used colorbuffers to pass radeon cs checker

14 years agor300: setup render target format for r300/r400 cards too
Maciej Cencora [Sat, 21 Nov 2009 20:18:41 +0000 (21:18 +0100)]
r300: setup render target format for r300/r400 cards too

14 years agor300: finish blit support for r300
Maciej Cencora [Sat, 21 Nov 2009 17:16:29 +0000 (18:16 +0100)]
r300: finish blit support for r300

14 years agomore blit fixes
Maciej Cencora [Tue, 10 Nov 2009 18:47:04 +0000 (19:47 +0100)]
more blit fixes

14 years agoblit WIP
Maciej Cencora [Mon, 9 Nov 2009 22:01:35 +0000 (23:01 +0100)]
blit WIP

14 years agor300: use accelerated emit for CopyTex[Sub]Image functions
Maciej Cencora [Sun, 8 Nov 2009 21:01:17 +0000 (22:01 +0100)]
r300: use accelerated emit for CopyTex[Sub]Image functions

14 years agor300: accelerated blit support
Maciej Cencora [Sun, 8 Nov 2009 21:01:12 +0000 (22:01 +0100)]
r300: accelerated blit support

14 years agor300: fix wrong assertion
Maciej Cencora [Sun, 8 Nov 2009 20:44:24 +0000 (21:44 +0100)]
r300: fix wrong assertion

14 years agor300: export translateTexFormat function
Maciej Cencora [Sat, 7 Nov 2009 21:48:23 +0000 (22:48 +0100)]
r300: export translateTexFormat function

14 years agor300: refactor PVS code and constants emission
Maciej Cencora [Sat, 7 Nov 2009 20:13:55 +0000 (21:13 +0100)]
r300: refactor PVS code and constants emission

14 years agor300: refactor R500 fragment program emission
Maciej Cencora [Sat, 7 Nov 2009 18:51:44 +0000 (19:51 +0100)]
r300: refactor R500 fragment program emission

14 years agor300: refactor color buffer setup
Maciej Cencora [Sat, 7 Nov 2009 20:18:08 +0000 (21:18 +0100)]
r300: refactor color buffer setup

14 years agor300: use _mesa_meta_Clear for buffer clears
Maciej Cencora [Sat, 7 Nov 2009 19:03:57 +0000 (20:03 +0100)]
r300: use _mesa_meta_Clear for buffer clears

14 years agor300: minor texture code refactoring
Maciej Cencora [Fri, 11 Dec 2009 23:00:34 +0000 (00:00 +0100)]
r300: minor texture code refactoring

14 years agogallium: added comment for pipe_reference() return value
Brian Paul [Fri, 11 Dec 2009 23:50:25 +0000 (16:50 -0700)]
gallium: added comment for pipe_reference() return value

14 years agomesa: minor reformatting/rewrapping in dd.h
Brian Paul [Mon, 16 Nov 2009 19:54:39 +0000 (12:54 -0700)]
mesa: minor reformatting/rewrapping in dd.h

14 years agomesa: remove unused ctx->Driver.ActiveTexture() hook
Brian Paul [Mon, 16 Nov 2009 19:50:54 +0000 (12:50 -0700)]
mesa: remove unused ctx->Driver.ActiveTexture() hook

14 years agomesa: updated comment
Brian Paul [Mon, 16 Nov 2009 19:43:32 +0000 (12:43 -0700)]
mesa: updated comment

14 years agoRevert "scons: Pass -fno-strict-aliasing to gcc."
Brian Paul [Fri, 11 Dec 2009 17:11:45 +0000 (10:11 -0700)]
Revert "scons: Pass -fno-strict-aliasing to gcc."

This reverts commit a2937a2f4ecf22a5a4242cd0a350f20228f50232.

Per Jose's comment, We don't want this on master.

14 years agoMerge branch 'mesa_7_7_branch'
Brian Paul [Fri, 11 Dec 2009 17:04:07 +0000 (10:04 -0700)]
Merge branch 'mesa_7_7_branch'

Conflicts:
src/gallium/state_trackers/xorg/xorg_xv.c
src/mesa/drivers/dri/intel/intel_span.c

14 years agoMerge branch 'mesa_7_6_branch' into mesa_7_7_branch
Brian Paul [Fri, 11 Dec 2009 16:51:27 +0000 (09:51 -0700)]
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch

14 years agodocs: updated 7.6.1 relnotes with GLSL fixes
Brian Paul [Fri, 11 Dec 2009 16:41:34 +0000 (09:41 -0700)]
docs: updated 7.6.1 relnotes with GLSL fixes

14 years agomesa: remove unnecessary loop in _mesa_remove_output_reads()
Brian Paul [Fri, 11 Dec 2009 16:40:33 +0000 (09:40 -0700)]
mesa: remove unnecessary loop in _mesa_remove_output_reads()

14 years agoMerge branch 'mesa_7_6_branch' into mesa_7_7_branch
Brian Paul [Fri, 11 Dec 2009 16:22:00 +0000 (09:22 -0700)]
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch

14 years agomesa: check dst reg in _mesa_find_free_register()
Brian Paul [Fri, 11 Dec 2009 16:16:25 +0000 (09:16 -0700)]
mesa: check dst reg in _mesa_find_free_register()

If a register was only being used as a destination (as will happen when
generated condition-codes) we missed its use.  So we'd errantly return
a register index that was really in-use, not free.

Fixes bug 25579.

14 years agosparc: additional preprocessor test for SPARC 64-bit
Aurelien Jarno [Fri, 11 Dec 2009 15:46:54 +0000 (08:46 -0700)]
sparc: additional preprocessor test for SPARC 64-bit

14 years agoscons: Tweak MSVC release options.
José Fonseca [Fri, 11 Dec 2009 15:16:22 +0000 (15:16 +0000)]
scons: Tweak MSVC release options.

Enable whole program optimizations and fast math.

14 years agosvga: Add a missing dependency from the prescale state.
José Fonseca [Fri, 11 Dec 2009 14:14:03 +0000 (14:14 +0000)]
svga: Add a missing dependency from the prescale state.

Thanks for Keith to finding this.

Fixes Jedi Knight 2 menus.

14 years agosvga: Always pass SVGA3D_SURFACE_HINT_DYNAMIC.
José Fonseca [Fri, 11 Dec 2009 13:15:12 +0000 (13:15 +0000)]
svga: Always pass SVGA3D_SURFACE_HINT_DYNAMIC.

Since we're reusing buffers we're effectively transforming all
of them into dynamic buffers.

It would be nice to not cache long lived static buffers. But there
is no way to detect the long lived from short lived ones yet. A
good heuristic would be buffer size.

14 years agosvga: Keep tight control of texture handle ownership.
José Fonseca [Fri, 11 Dec 2009 12:29:02 +0000 (12:29 +0000)]
svga: Keep tight control of texture handle ownership.

The texture owns the surface handle. All derivatives need to keep
a reference to texture.

This fixes several assertions failures starting up Jedi Knight 2.

Should cause no change for DRM surface sharing -- reference count still
done as before there.

14 years agosvga: Fix mixed signed comparisons.
José Fonseca [Fri, 11 Dec 2009 12:09:02 +0000 (12:09 +0000)]
svga: Fix mixed signed comparisons.

14 years agoscons: Pass -fno-strict-aliasing to gcc.
José Fonseca [Fri, 11 Dec 2009 12:08:32 +0000 (12:08 +0000)]
scons: Pass -fno-strict-aliasing to gcc.

Strict aliasing tule violations were fixed on master, but
they're still causing problem in this branch, so disable this assumptions.

Do not apply this fix to master (revert when you merge).

14 years agoscons: Make it work with MinGW build of LLVM 2.6.
José Fonseca [Wed, 25 Nov 2009 18:06:12 +0000 (18:06 +0000)]
scons: Make it work with MinGW build of LLVM 2.6.

LLVM 2.5 is no longer supported on windows.

14 years agomesa: Initialize variable in MatchInstruction.
Vinson Lee [Fri, 11 Dec 2009 02:51:51 +0000 (18:51 -0800)]
mesa: Initialize variable in MatchInstruction.

14 years agomesa: Assign _mesa_lookup_parameter_index return value to GLint.
Vinson Lee [Fri, 11 Dec 2009 02:32:33 +0000 (18:32 -0800)]
mesa: Assign _mesa_lookup_parameter_index return value to GLint.

14 years agoi915: Add missing break statement in i915_debug_packet.
Vinson Lee [Fri, 11 Dec 2009 02:21:59 +0000 (18:21 -0800)]
i915: Add missing break statement in i915_debug_packet.

14 years agoglsl: Increase size of array in_slang_lookup_constant from 4 to 16.
Vinson Lee [Fri, 11 Dec 2009 01:50:35 +0000 (17:50 -0800)]
glsl: Increase size of array in_slang_lookup_constant from 4 to 16.

For some cases, _mesa_GetIntegerv reads up to params[15].

14 years agoprogs/samples: Byte swap individual members of struct _rawImageRec.
Vinson Lee [Thu, 10 Dec 2009 23:41:13 +0000 (15:41 -0800)]
progs/samples: Byte swap individual members of struct _rawImageRec.

14 years agointel: Remove ARGB internal_format == GL_RGB hacks
Ian Romanick [Wed, 9 Dec 2009 07:25:26 +0000 (23:25 -0800)]
intel: Remove ARGB internal_format == GL_RGB hacks

Now that XRGB is supported, we don't need to hack around cases of an RGBA
format buffer with an internal format of GL_RGB.

14 years agointel: Make RGB textures use XRGB8888
Ian Romanick [Wed, 9 Dec 2009 07:24:58 +0000 (23:24 -0800)]
intel: Make RGB textures use XRGB8888

14 years agointel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers.
Ian Romanick [Wed, 9 Dec 2009 05:15:36 +0000 (21:15 -0800)]
intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers.

14 years agoi965: Fix handling of drawing to MESA_FORMAT_XRGB8888
Ian Romanick [Wed, 9 Dec 2009 05:13:05 +0000 (21:13 -0800)]
i965: Fix handling of drawing to MESA_FORMAT_XRGB8888

It turns out that 965 and friends cannot actually render to an xRGB
surfaces.  Instead, the surface has to be RGBA with writes to alpha
disabled and the blend function modified to always use 1.0 for
destination alpha.

14 years agointel: Use spantmp2 GL_BGR / GL_UNSIGNED_INT_8_8_8_8_REV for XRGB8888
Ian Romanick [Wed, 9 Dec 2009 05:12:18 +0000 (21:12 -0800)]
intel: Use spantmp2 GL_BGR / GL_UNSIGNED_INT_8_8_8_8_REV for XRGB8888

14 years agospantmp2: Add support for GL_BGR / GL_UNSIGNED_INT_8_8_8_8_REV
Ian Romanick [Wed, 9 Dec 2009 05:10:45 +0000 (21:10 -0800)]
spantmp2: Add support for GL_BGR / GL_UNSIGNED_INT_8_8_8_8_REV

This is really for MESA_FORMAT_XRGB8888.  Clearly spantmp2.h needs some
re-work.  Any volunteers?

14 years agointel: name in intel_create_renderbuffer was always 0, remove
Ian Romanick [Wed, 9 Dec 2009 01:03:20 +0000 (17:03 -0800)]
intel: name in intel_create_renderbuffer was always 0, remove

14 years agointel: Use texformat accessor to get bytes-per-pixel
Ian Romanick [Wed, 9 Dec 2009 00:06:13 +0000 (16:06 -0800)]
intel: Use texformat accessor to get bytes-per-pixel

14 years agointel: softwareBuffer in intel_alloc_renderbuffer_storage was always false, remove
Ian Romanick [Tue, 8 Dec 2009 23:51:18 +0000 (15:51 -0800)]
intel: softwareBuffer in intel_alloc_renderbuffer_storage was always false, remove

14 years agointel: Axe intel_renderbuffer::texformat
Ian Romanick [Tue, 8 Dec 2009 17:57:27 +0000 (09:57 -0800)]
intel: Axe intel_renderbuffer::texformat

Since the texformat branch merge, the value of intel_renderbuffer::texformat
is just a copy of gl_renderbuffer::Format.

14 years agointel: Flush the render/texture cache when finishing render to texture.
Eric Anholt [Wed, 9 Dec 2009 19:36:45 +0000 (11:36 -0800)]
intel: Flush the render/texture cache when finishing render to texture.

Back when we were flushing the entire batch at BindFramebuffer, the kernel
would notice the domain transition when someone went to texture from it and
flush for us.  We no longer do the batch flushing every time, so we get to
do aggressive flushing until we move batchbuffer handling to libdrm.

Fixes piglit fbo-flushing.  Bug #25377.  No noticeable performance loss
on cairo-gl (so this is better than batch flushing).

14 years agoprogs/util: Byte swap individual members of struct _rawImageRec.
Vinson Lee [Thu, 10 Dec 2009 21:24:15 +0000 (13:24 -0800)]
progs/util: Byte swap individual members of struct _rawImageRec.

14 years agoglsl: Fix array out-of-bounds access by _slang_lookup_constant.
Vinson Lee [Thu, 10 Dec 2009 20:37:10 +0000 (12:37 -0800)]
glsl: Fix array out-of-bounds access by _slang_lookup_constant.

14 years agomesa: Fix array out-of-bounds access by _mesa_TexParameteriv.
Vinson Lee [Thu, 10 Dec 2009 20:11:09 +0000 (12:11 -0800)]
mesa: Fix array out-of-bounds access by _mesa_TexParameteriv.

14 years agomesa: Fix default (swrast) GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS.
Eric Anholt [Thu, 10 Dec 2009 18:03:16 +0000 (10:03 -0800)]
mesa: Fix default (swrast) GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS.

The swrast pipeline shouldn't have any problem with all the frag and vert
textures being bound at the same time.  Note that this may result in
DRI drivers that don't set this limit having an improbable return
(fragment + vertex < combined), but it seems like it shouldn't cause
problems for apps.

14 years agost/xorg: fix yv12 plus some cleanups in the upload code
Zack Rusin [Thu, 10 Dec 2009 18:01:53 +0000 (13:01 -0500)]
st/xorg: fix yv12 plus some cleanups in the upload code

14 years agost/xorg: enable yv12 for xv
Zack Rusin [Wed, 18 Nov 2009 17:06:32 +0000 (12:06 -0500)]
st/xorg: enable yv12 for xv

14 years agointel: Attempt to fix up after "Update vertex texture code."
Eric Anholt [Thu, 10 Dec 2009 17:16:37 +0000 (09:16 -0800)]
intel: Attempt to fix up after "Update vertex texture code."

The MaxCombinedTextureImageUnits is the total number of samplers that can
be bound between vertex, geometry, and fragment, not 0.  This should report
the correct value on 965 now.  Other DRI drivers may also need updating if
their MaxVertexTextureImageUnits != 0 (for example, if using the sw vertex
pipeline).

It's not clear to me if there's going to be a valid value for this
limit other than MaxTextureImageUnits + MaxVertexTextureImageUnits (+
MaxGeometryTextureImageUnits eventually).  If not, then we should probably
just move this into the core at Get time.

Bug #25518 (wine regression).  Fixes piglit vp-combined-image-units.

14 years agomesa: Fix SCons build.
Vinson Lee [Thu, 10 Dec 2009 06:34:07 +0000 (22:34 -0800)]
mesa: Fix SCons build.

Commit cd6b8dd9e82fedc55d033131fbc0f8ee950567c8 deleted
src/mesa/state_tracker/st_cb_get.c.

14 years agowinsys/intel: fix dereferencing of opaque type due to pipe_reference changes
Roland Scheidegger [Thu, 10 Dec 2009 02:51:35 +0000 (03:51 +0100)]
winsys/intel: fix dereferencing of opaque type due to pipe_reference changes

14 years agomesa: Fix array out-of-bounds access by _mesa_TexGend.
Vinson Lee [Thu, 10 Dec 2009 01:59:23 +0000 (17:59 -0800)]
mesa: Fix array out-of-bounds access by _mesa_TexGend.

_mesa_TexGend calls _mesa_TexGenfv, which uses the params argument
as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_Lighti.
Vinson Lee [Thu, 10 Dec 2009 01:34:50 +0000 (17:34 -0800)]
mesa: Fix array out-of-bounds access by _mesa_Lighti.

_mesa_Lighti calls _mesa_Lightiv, which uses the params argument
as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_Lightf.
Vinson Lee [Thu, 10 Dec 2009 01:11:30 +0000 (17:11 -0800)]
mesa: Fix array out-of-bounds access by _mesa_Lightf.

14 years agor300g: fix routing of vertex streams if TCL is bypassed
Marek Olšák [Tue, 8 Dec 2009 23:45:18 +0000 (00:45 +0100)]
r300g: fix routing of vertex streams if TCL is bypassed

Generating mipmaps finally works, among other things. Yay!

14 years agor300g: always disable unused colorbuffers
Marek Olšák [Tue, 8 Dec 2009 20:53:19 +0000 (21:53 +0100)]
r300g: always disable unused colorbuffers

14 years agor300g: make pow(0,0) return 1 instead of NaN in the R500 fragment shader
Marek Olšák [Tue, 8 Dec 2009 03:55:32 +0000 (04:55 +0100)]
r300g: make pow(0,0) return 1 instead of NaN in the R500 fragment shader

Unfortunately we can't fix this easily in the R300 fragment shader,
and it's probably not worth the effort.

14 years agor300g: clean up r300_emit_aos
Marek Olšák [Tue, 8 Dec 2009 23:55:51 +0000 (00:55 +0100)]
r300g: clean up r300_emit_aos

14 years agomesa: Fix array out-of-bounds access by _mesa_PointParameteri.
Vinson Lee [Wed, 9 Dec 2009 21:15:05 +0000 (13:15 -0800)]
mesa: Fix array out-of-bounds access by _mesa_PointParameteri.

_mesa_PointParameteri calls _mesa_PointParameterfv, which uses the
params argument as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_PointParameterf.
Vinson Lee [Wed, 9 Dec 2009 21:00:22 +0000 (13:00 -0800)]
mesa: Fix array out-of-bounds access by _mesa_PointParameterf.

_mesa_PointParameterf calls _mesa_PointParameterfv, which uses the
params argument as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_LightModelf.
Vinson Lee [Wed, 9 Dec 2009 20:43:28 +0000 (12:43 -0800)]
mesa: Fix array out-of-bounds access by _mesa_LightModelf.

_mesa_LightModelf calls _mesa_LightModelfv, which uses the
params argument as an array.

14 years agor600 : add pre-compile mesa shader calling interface, in order to handle
Richard Li [Wed, 9 Dec 2009 20:39:16 +0000 (15:39 -0500)]
r600 : add pre-compile mesa shader calling interface, in order to handle
complex built-in shader instructions.

14 years agoglsl: Remove unused member x from struct slang_operation.
Vinson Lee [Wed, 9 Dec 2009 19:26:24 +0000 (11:26 -0800)]
glsl: Remove unused member x from struct slang_operation.

14 years agomesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
Brian Paul [Wed, 9 Dec 2009 15:30:01 +0000 (08:30 -0700)]
mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test

This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.

14 years agoutil: Document the meaning of util_format_layout.
José Fonseca [Wed, 9 Dec 2009 10:59:38 +0000 (10:59 +0000)]
util: Document the meaning of util_format_layout.

The util_format_layout name was unfortunate and there
are  as been a lot of confusion due to this. Hopefully
this will shed some light on what it was meant for.

Bottom line is: do not rely on these values unless
you're automatically code generating pixel
packing/unpacking routines.

Suggestions for better names than util_format_layout
are welcome!

14 years agor600: fix state size prediction after dc0777d3
Andre Maasikas [Wed, 9 Dec 2009 08:51:52 +0000 (10:51 +0200)]
r600: fix state size prediction after dc0777d3

14 years agovmware/xorg: Properly detect overlay support
Jakob Bornecrantz [Tue, 8 Dec 2009 20:05:30 +0000 (21:05 +0100)]
vmware/xorg: Properly detect overlay support

14 years agovmware/core: Update vmwgfx_drm.h
Jakob Bornecrantz [Tue, 8 Dec 2009 20:03:29 +0000 (21:03 +0100)]
vmware/core: Update vmwgfx_drm.h

14 years agometa: Bind texture to unit 0 for mipmap generation
Ian Romanick [Wed, 9 Dec 2009 19:03:49 +0000 (11:03 -0800)]
meta: Bind texture to unit 0 for mipmap generation

If the active texture unit on entry to mipmap generation is not zero, bind the
texture to unit zero.

Fixes bug #24219.

14 years agomesa: Move OES_read_format support from drivers into the core.
Eric Anholt [Wed, 9 Dec 2009 18:08:07 +0000 (10:08 -0800)]
mesa: Move OES_read_format support from drivers into the core.

The assertion is that the correct read type to be using is the native
type of the underlying read renderbuffer.  For some fallback paths, this
may be worse than GL_RGBA/GL_UNSIGNED_BYTE for reads today, but it gets
all drivers the expected GL_BGRA/GL_UNSIGNED_BYTE for ARGB8888 or
GL_BGR//GL_UNSIGNED_SHORT_5_6_5_REV for rgb565 with no work.

This fixes the intel (and other) DRI drivers to report read formats that
should hit blit PBO readpixels paths.

14 years agomesa: Fix array out-of-bounds access by _mesa_LightModeli.
Vinson Lee [Wed, 9 Dec 2009 02:26:05 +0000 (18:26 -0800)]
mesa: Fix array out-of-bounds access by _mesa_LightModeli.

_mesa_LightModeli calls _mesa_LightModeliv, which uses the
params argument as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_Fogf.
Vinson Lee [Wed, 9 Dec 2009 01:51:07 +0000 (17:51 -0800)]
mesa: Fix array out-of-bounds access by _mesa_Fogf.

_mesa_Fogf calls _mesa_Fogfv, which uses the params argument
as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_TexParameteri.
Vinson Lee [Wed, 9 Dec 2009 01:25:05 +0000 (17:25 -0800)]
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.

_mesa_TexParameteri calls set_tex_parameteri, which uses the
params argument as an array.

14 years agoi965: Enable the accelerated ReadPixels path on gen4 along with pre-gen4.
Eric Anholt [Wed, 9 Dec 2009 00:15:07 +0000 (16:15 -0800)]
i965: Enable the accelerated ReadPixels path on gen4 along with pre-gen4.

Passes piglit pbo-read-argb8888, and doesn't otherwise regress quick.tests.

14 years agomesa: Fix array out-of-bounds access by _mesa_Fogi.
Vinson Lee [Wed, 9 Dec 2009 00:04:33 +0000 (16:04 -0800)]
mesa: Fix array out-of-bounds access by _mesa_Fogi.

_mesa_Fogi calls _mesa_Fogfv, which uses the params argument
as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_TexParameteri.
Vinson Lee [Tue, 8 Dec 2009 23:42:13 +0000 (15:42 -0800)]
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.

_mesa_TexParameteri calls set_tex_parameterf, which uses the
params argument as an array.

14 years agomesa: Fix array out-of-bounds access by _mesa_TexParameterfv.
Vinson Lee [Tue, 8 Dec 2009 22:31:38 +0000 (14:31 -0800)]
mesa: Fix array out-of-bounds access by _mesa_TexParameterfv.

_mesa_TexParameterfv calls set_tex_parameteri, which uses the
params argument as an array.

14 years agovbo: fix array index out of bounds error, and fix evaluator priorities
Brian Paul [Tue, 8 Dec 2009 22:03:15 +0000 (15:03 -0700)]
vbo: fix array index out of bounds error, and fix evaluator priorities

Fixes bug 25525.
Plus, the GL_NV_vertex_program evaluators alias and override the
convential evaluator maps, so set their state after the conventional
maps.

14 years agonouveau: use boolean instead of bool
Roland Scheidegger [Tue, 8 Dec 2009 16:51:19 +0000 (17:51 +0100)]
nouveau: use boolean instead of bool

14 years agocell: use boolean instead of bool
Roland Scheidegger [Tue, 8 Dec 2009 16:44:51 +0000 (17:44 +0100)]
cell: use boolean instead of bool

14 years agogallium: use boolean instead of bool in p_refcnt.h
Roland Scheidegger [Tue, 8 Dec 2009 16:42:49 +0000 (17:42 +0100)]
gallium: use boolean instead of bool in p_refcnt.h

all code in gallium should use boolean not bool

14 years agoMerge branch 'gallium-strict-aliasing'
Roland Scheidegger [Tue, 8 Dec 2009 18:26:20 +0000 (19:26 +0100)]
Merge branch 'gallium-strict-aliasing'

14 years agogallium: fix more potential strict aliasing issues
Roland Scheidegger [Tue, 8 Dec 2009 18:13:48 +0000 (19:13 +0100)]
gallium: fix more potential strict aliasing issues

In particular, gcc man page warns that
union a_union {
   int i;
   double d;
};

int f() {
   double d = 3.0;
   return ((union a_union *) &d)->i;
}

"might" not be ok (why not?), even though it doesn't seem to generate
any warnings. Hence don't use this and do the extra step to actually use
assignment to get the values in/out of the union.
This changes parts of 3456f9149b3009fcfce80054759d05883d3c4ee5.

14 years agotgsi: fix some off-by-one errors in shader length, instruction length
Brian Paul [Mon, 7 Dec 2009 21:12:28 +0000 (14:12 -0700)]
tgsi: fix some off-by-one errors in shader length, instruction length

The ureg and/or tgsi-simplification work introduced some inconsistencies
between the ureg and traditional TGSI construction code.

Now the tgsi_instruction::NrTokens field is consistant and the
tgsi_header::BodySize field isn't off by one.

Fixes bug 25455.

14 years agor600: and finally fix SCS
Andre Maasikas [Mon, 7 Dec 2009 15:22:03 +0000 (17:22 +0200)]
r600: and finally fix SCS

14 years agor600: remove (now) dead code
Andre Maasikas [Mon, 7 Dec 2009 14:27:05 +0000 (16:27 +0200)]
r600: remove (now) dead code

14 years agor600: fix SIN also
Andre Maasikas [Mon, 7 Dec 2009 14:23:07 +0000 (16:23 +0200)]
r600: fix SIN also

14 years agor600: use the new inline constants feature to fix COS
Andre Maasikas [Mon, 7 Dec 2009 14:09:10 +0000 (16:09 +0200)]
r600: use the new inline constants feature to fix COS

14 years agor600: add assembler support for literal(inline) constants
Andre Maasikas [Mon, 7 Dec 2009 13:23:40 +0000 (15:23 +0200)]
r600: add assembler support for literal(inline) constants

and use it in cubemap instruction sequence for testing