mesa.git
15 years agodocs: document cell, glGetTexLevelParameter() fixes
Brian Paul [Fri, 23 Oct 2009 20:42:32 +0000 (14:42 -0600)]
docs: document cell, glGetTexLevelParameter() fixes

15 years agomesa: fix GL_TEXTURE_INTERNAL_FORMAT query for compressed formats
Brian Paul [Fri, 23 Oct 2009 20:40:40 +0000 (14:40 -0600)]
mesa: fix GL_TEXTURE_INTERNAL_FORMAT query for compressed formats

Need to return the actual compressed format when the user originally
requested a generic compressed format.

15 years agomesa: added _mesa_compressed_format_to_glenum()
Brian Paul [Fri, 23 Oct 2009 20:37:41 +0000 (14:37 -0600)]
mesa: added _mesa_compressed_format_to_glenum()

Maps a compressed MESA_FORMAT_x to correspding GLenum.  Needed for
querying a texture's actual format when a generic format was originally
requested.

15 years agomesa: change s3tc vs. fxt1 priority when choosing compressed formats
Brian Paul [Fri, 23 Oct 2009 20:37:14 +0000 (14:37 -0600)]
mesa: change s3tc vs. fxt1 priority when choosing compressed formats

15 years agoARB prog parser: Fix parameter array size comparison
Ian Romanick [Tue, 20 Oct 2009 17:58:14 +0000 (10:58 -0700)]
ARB prog parser: Fix parameter array size comparison

Array indexes are invalid when >= the maximum, but array sizes are
only in valid when > the maximum.  This prevented programs from
declaring a single maximum size array.

See the piglit vp-max-array test.

15 years agointel: flush old context before binding new context
Brian Paul [Fri, 23 Oct 2009 00:32:48 +0000 (18:32 -0600)]
intel: flush old context before binding new context

Per the GLX spec, when changing rendering contexts, the old context
should first be flushed.

15 years agoglx: don't destroy context immediately if it's currently bound
Brian Paul [Fri, 23 Oct 2009 00:19:01 +0000 (18:19 -0600)]
glx: don't destroy context immediately if it's currently bound

According to the GLXDestroyContext() man page, the context should not
immediately be destroyed if it's bound to some thread.  Wait until it's
unbound to really delete it.  The code for doing the later part is
already present in MakeContextCurrent() so no change was needed there.

15 years agomesa: code refactoring- new _mesa_finish(), _mesa_flush()
Brian Paul [Fri, 23 Oct 2009 00:16:10 +0000 (18:16 -0600)]
mesa: code refactoring- new _mesa_finish(), _mesa_flush()

15 years agoprogs/xdemos: fix command line flag typo
Brian Paul [Thu, 22 Oct 2009 23:11:59 +0000 (17:11 -0600)]
progs/xdemos: fix command line flag typo

15 years agoi965: fix hacked Fallback usage in brw_prepare_vertices()
Brian Paul [Thu, 22 Oct 2009 22:45:50 +0000 (16:45 -0600)]
i965: fix hacked Fallback usage in brw_prepare_vertices()

Setting intel->Fallback = 1 clobbered any fallback state that was already
set.  Not sure where this hack originated (the git history is a little
convoluted).  Define and use a new BRW_FALLBACK_DRAW bit instead.  This
shouldn't break anything and could potentially fix some bugs (but no
specific ones are known).

15 years agointel: define INTEL_FALLBACK_DRIVER for drivers
Brian Paul [Thu, 22 Oct 2009 22:45:03 +0000 (16:45 -0600)]
intel: define INTEL_FALLBACK_DRIVER for drivers

15 years agointel: Fallback field is a bitmask, use GLbitfield
Brian Paul [Thu, 22 Oct 2009 22:33:36 +0000 (16:33 -0600)]
intel: Fallback field is a bitmask, use GLbitfield

15 years agoi965: remove unused brw_context::tmp_fallback field
Brian Paul [Thu, 22 Oct 2009 22:32:08 +0000 (16:32 -0600)]
i965: remove unused brw_context::tmp_fallback field

15 years agoi965: remove unused BRW_FALLBACK_TEXTURE bit
Brian Paul [Thu, 22 Oct 2009 22:26:54 +0000 (16:26 -0600)]
i965: remove unused BRW_FALLBACK_TEXTURE bit

The value was probably wrong too.
It was the same as INTEL_FALLBACK_DRAW_BUFFER.

15 years agor600: set barrier for tex inst if dst is used earlier, might overwrite it otherwise
Andre Maasikas [Wed, 21 Oct 2009 16:04:21 +0000 (19:04 +0300)]
r600: set barrier for tex inst if dst is used earlier, might overwrite it otherwise

15 years agor600: need to export something from PS
Andre Maasikas [Wed, 21 Oct 2009 09:23:27 +0000 (12:23 +0300)]
r600: need to export something from PS

 Also avoids empty shader for "END" - seems to be somewhat valid fp
 Maybe this can be done differently in the future (fake FRAG_RESULT_COLOR
 already in Map_Fragment_Program() or is there a way to program the chip
 to not hang in case of no exports.

15 years agor600: add beginnings of ARL instruction
Andre Maasikas [Tue, 20 Oct 2009 08:45:39 +0000 (11:45 +0300)]
r600: add beginnings of ARL instruction

15 years agoprogs/trivial: check if GL_ARB_occlusion_query is supported
Brian Paul [Tue, 20 Oct 2009 22:22:03 +0000 (16:22 -0600)]
progs/trivial: check if GL_ARB_occlusion_query is supported

15 years agocell: fix compilation on cell
Marc Dietrich [Sun, 18 Oct 2009 15:28:34 +0000 (08:28 -0700)]
cell: fix compilation on cell

s/LERP/LRP/

15 years agomesa: Fix Mac OS build.
Vinson Lee [Tue, 20 Oct 2009 16:43:46 +0000 (10:43 -0600)]
mesa: Fix Mac OS build.

strtod_l needs the xlocale.h header on Mac OS. It's possible other
non-Linux OSes would need this header too.

15 years agor300: fix texture size handling with size > 2048
Mathias Fröhlich [Mon, 19 Oct 2009 15:47:21 +0000 (11:47 -0400)]
r300: fix texture size handling with size > 2048

The in kernel texture check fails because of both
bit11 flags being set on 16x16 textures. It tuns out
that these bits are still set and not cleared in the
pp_txpitch field of the texture. The attached patch
at least helps for this case on my machine. It clears
the bit 11 from the pitch field if the texture is smaller
and masks out that hight bits on the conventional width
and height field.

Fixes bug 24584

15 years agor600: Fix size calculation for 24 bit depth
Robert Noland [Mon, 19 Oct 2009 14:47:39 +0000 (09:47 -0500)]
r600: Fix size calculation for 24 bit depth

size was being calculated based on 3 bytes per pixel with 24 bit depth
instead of 4 bytes.  This caused corruption in the bottom 25% of objects.
This finishes fixing the menu/text corruption in compiz/kde4.

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agor300: fix vertex program parameters limits
Maciej Cencora [Fri, 16 Oct 2009 18:21:17 +0000 (20:21 +0200)]
r300: fix vertex program parameters limits

15 years agodocs: document GLSL float parsing bug fix
Brian Paul [Fri, 16 Oct 2009 13:38:39 +0000 (07:38 -0600)]
docs: document GLSL float parsing bug fix

15 years agomesa: use C locale for _mesa_strtod()
Brian Paul [Wed, 14 Oct 2009 20:19:03 +0000 (14:19 -0600)]
mesa: use C locale for _mesa_strtod()

_mesa_strtod() is used for shader/program parsing where the decimal
point character is always '.'  Use strtod_l() with a "C" locale to
ensure correct string->double conversion when the actual locale uses
another character such as ',' for the decimal point.

Fixes bug 24531.

15 years agoUse the right pitch when rendering to a texture
Owen Taylor [Wed, 14 Oct 2009 20:20:07 +0000 (16:20 -0400)]
Use the right pitch when rendering to a texture

We need to get the pitch from the texture level we are rendering to,
rather than just using the base texel width.

15 years agor600: FRAG_ATTRIB_WPOS and FRAG_ATTRIB_FOGC appear to be supported.
Robert Noland [Wed, 14 Oct 2009 19:04:24 +0000 (14:04 -0500)]
r600: FRAG_ATTRIB_WPOS and FRAG_ATTRIB_FOGC appear to be supported.

Report unsupported attributes while I'm here.

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agor600: cleanup in r600_cs_process_relocs().
Robert Noland [Wed, 14 Oct 2009 19:02:12 +0000 (14:02 -0500)]
r600: cleanup in r600_cs_process_relocs().

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agoradeon: return EINVAL for 0 length buffers.
Robert Noland [Wed, 14 Oct 2009 18:58:56 +0000 (13:58 -0500)]
radeon: return EINVAL for 0 length buffers.

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agor600: fix tfp1 bo size
Andre Maasikas [Thu, 15 Oct 2009 15:24:49 +0000 (11:24 -0400)]
r600: fix tfp1 bo size

Setting the wrong bo size resulting in an incomplete
read cache flush when reading the texture.  This fixes the
compiz text corruption.

[agd5f: take hw pitch alignment into account]

15 years agor600: implement ProgramStringNotify
Andre Maasikas [Mon, 12 Oct 2009 11:57:45 +0000 (14:57 +0300)]
r600: implement ProgramStringNotify

need this to properly test with piglit/glean vert/fragprog tests
copied mostly from r300, many thanks to osiris, nha, airlied, others...

15 years agor600: LIT dst.y gets value from src.x
Andre Maasikas [Mon, 12 Oct 2009 09:58:40 +0000 (12:58 +0300)]
r600: LIT dst.y gets value from src.x

seems I overlooked this when removing hardcoded swizzles for this
one previously

15 years agor600: DPH adds w comp of second operand, so set first one to 1 instead
Andre Maasikas [Mon, 12 Oct 2009 09:20:26 +0000 (12:20 +0300)]
r600: DPH adds w comp of second operand, so set first one to 1 instead

15 years agor600: fixup KIL instruction a bit
Andre Maasikas [Fri, 9 Oct 2009 07:46:12 +0000 (10:46 +0300)]
r600: fixup KIL instruction a bit

- KILLGT takes 2 arguments
- arb KIL has no dst register
- add TODO about clause ending but currently piglit fp-kil passes and
  does not hang the card

15 years agor600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask
Andre Maasikas [Mon, 28 Sep 2009 08:23:49 +0000 (11:23 +0300)]
r600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask

makes blend functions work better

Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agor600: user correct alpha blend factor
Andre Maasikas [Mon, 28 Sep 2009 07:42:35 +0000 (10:42 +0300)]
r600: user correct alpha blend factor

Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agor600: clear position enable bit when when wpos is not used by FP
Andre Maasikas [Tue, 29 Sep 2009 06:46:29 +0000 (09:46 +0300)]
r600: clear position enable bit when when wpos is not used by FP

Makes doom3 alot nicer..

15 years agomesa: regenerated lex.yy.c w/ _mesa_strtod()
Brian Paul [Thu, 15 Oct 2009 14:59:13 +0000 (08:59 -0600)]
mesa: regenerated lex.yy.c w/ _mesa_strtod()

15 years agomesa: Use _mesa_strtod in the lexer for assembly shaders
Neil Roberts [Wed, 14 Oct 2009 22:25:04 +0000 (23:25 +0100)]
mesa: Use _mesa_strtod in the lexer for assembly shaders

See bug 24531.

15 years agoprogs/Makefile: remove extra quoting
Brian Paul [Wed, 14 Oct 2009 15:37:40 +0000 (09:37 -0600)]
progs/Makefile: remove extra quoting

This reverts part of commit 115edf24a9128b79dfa5f30482c990e2cb898357 and
fixes the error: "/bin/sh: line 0: test: too many arguments".

15 years agoFix build when PROGRAM_DIRS is empty.
Tom Fogal [Tue, 13 Oct 2009 17:55:34 +0000 (10:55 -0700)]
Fix build when PROGRAM_DIRS is empty.

SUBDIRS just takes PROGRAM_DIRS value.  If PROGRAM_DIRS gets set
to the empty string (as can happen when building only OSMesa), a
'for' loop will lack anything to iterate over, causing a parse
error.

This fixes the issue by making sure SUBDIRS is the null string
when PROGRAM_DIRS is, and wrapping the for loops in if's, causing
them only to execute if there are directories to iterate over.

15 years agoac: Fix AIX shared library builds.
Tom Fogal [Tue, 13 Oct 2009 17:55:33 +0000 (10:55 -0700)]
ac: Fix AIX shared library builds.

AIX uses ".a" for both static and shared library extensions.

15 years agoi965: Fix the last valid address setting for the index buffer.
Eric Anholt [Sun, 11 Oct 2009 18:16:03 +0000 (11:16 -0700)]
i965: Fix the last valid address setting for the index buffer.

Again, last valid address, not first invalid address.  Fixes regression
in 255e5be265133280293bbfd8b2f9b74b2dec50bb that the kernel now catches
and caused piglit draw_elements_base_vertex to fail.

15 years agoi965: Fix the bounds emitted in the vertex buffer packets.
Eric Anholt [Sun, 11 Oct 2009 18:04:09 +0000 (11:04 -0700)]
i965: Fix the bounds emitted in the vertex buffer packets.

It's the address of the last valid byte, not the address of the first
invalid byte.

This should also fix problems with rendering with the new sanity checks in
the kernel.

15 years agosoftpipe: revert 564df9dc5f6335eb8dc68f3c69cf054d2142663c
Brian Paul [Sat, 10 Oct 2009 15:18:14 +0000 (09:18 -0600)]
softpipe: revert 564df9dc5f6335eb8dc68f3c69cf054d2142663c

This change silenced valgrind warnings but broke progs/tests/drawbuffers.
The problem is we don't know the surface's state when we start caching it
(it may or may not be initialized/cleared/etc).  So "clearing" it here was
presumptuous.  Leaving the code in place (but disabled) for reference and
when using valgrind.

Fixes bug 24401

15 years agoradeon: fix scissor regression
Alex Deucher [Fri, 9 Oct 2009 19:44:32 +0000 (15:44 -0400)]
radeon: fix scissor regression

fixes fdo bug 24248

15 years agodocs: fix aux buffer bug 24426
Brian Paul [Fri, 9 Oct 2009 19:23:07 +0000 (13:23 -0600)]
docs: fix aux buffer bug 24426

15 years agost/mesa: create aux buffers according to visual
Brian Paul [Fri, 9 Oct 2009 19:20:28 +0000 (13:20 -0600)]
st/mesa: create aux buffers according to visual

Fixes bug 24426 for gallium.

15 years agomesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()
Brian Paul [Fri, 9 Oct 2009 19:22:00 +0000 (13:22 -0600)]
mesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()

Fixes bug 24426.

15 years agomesa: regenerated gl_mangle.h file
Brian Paul [Thu, 8 Oct 2009 15:17:13 +0000 (09:17 -0600)]
mesa: regenerated gl_mangle.h file

15 years agogallium/xlib: call XQueryExtension() in glXQueryExtension()
Brian Paul [Wed, 7 Oct 2009 20:43:27 +0000 (14:43 -0600)]
gallium/xlib: call XQueryExtension() in glXQueryExtension()

See bug 24321.

15 years agomesa/xlib: call XQueryExtension() in glXQueryExtension()
Brian Paul [Wed, 7 Oct 2009 20:42:14 +0000 (14:42 -0600)]
mesa/xlib: call XQueryExtension() in glXQueryExtension()

See bug 24321.

15 years agomesa: don't need to free textures, VBOs, etc. in _mesa_meta_free()
Brian Paul [Wed, 7 Oct 2009 20:07:49 +0000 (14:07 -0600)]
mesa: don't need to free textures, VBOs, etc. in _mesa_meta_free()

They're freed by the normal context deallocation code.
Fixes Blender crash, bug 24185.

15 years agoshader_api: Fix bounds checking of glUniform and glUniformMatrix
Nicolai Hähnle [Sat, 3 Oct 2009 14:30:16 +0000 (16:30 +0200)]
shader_api: Fix bounds checking of glUniform and glUniformMatrix

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
15 years agoprog_parameter: Document the fact that Size may be > 4
Nicolai Hähnle [Sat, 3 Oct 2009 14:18:57 +0000 (16:18 +0200)]
prog_parameter: Document the fact that Size may be > 4

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agodocs: fix glXQueryDrawable() bugs
Brian Paul [Wed, 7 Oct 2009 15:41:00 +0000 (09:41 -0600)]
docs: fix glXQueryDrawable() bugs

15 years agomesa/xlib: fix glXQueryDrawable() bugs, see bug 24320
Brian Paul [Wed, 7 Oct 2009 15:40:22 +0000 (09:40 -0600)]
mesa/xlib: fix glXQueryDrawable() bugs, see bug 24320

15 years agogallium/xlib: fix glXQueryDrawable() bugs, see bug 24320
Brian Paul [Wed, 7 Oct 2009 15:40:04 +0000 (09:40 -0600)]
gallium/xlib: fix glXQueryDrawable() bugs, see bug 24320

15 years agoprogs/xdemos: test glXQueryDrawable()
Brian Paul [Wed, 7 Oct 2009 15:11:23 +0000 (09:11 -0600)]
progs/xdemos: test glXQueryDrawable()

15 years agoprogs/xdemos: fix swapped parameters to CreatePbuffer()
Brian Paul [Wed, 7 Oct 2009 15:10:48 +0000 (09:10 -0600)]
progs/xdemos: fix swapped parameters to CreatePbuffer()

15 years agoswrast: s/GLfloat/GLuint/ in bzero()
Brian Paul [Wed, 7 Oct 2009 14:07:53 +0000 (08:07 -0600)]
swrast: s/GLfloat/GLuint/ in bzero()

15 years agoswrast: add missing returns
Brian Paul [Wed, 7 Oct 2009 01:05:23 +0000 (19:05 -0600)]
swrast: add missing returns

15 years agoprogs/test: Fix MSVC build.
Vinson Lee [Wed, 7 Oct 2009 13:54:31 +0000 (07:54 -0600)]
progs/test: Fix MSVC build.

15 years agomesa/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
Brian Paul [Wed, 7 Oct 2009 13:45:15 +0000 (07:45 -0600)]
mesa/xlib: return 0 for errorBase, eventBase in glXQueryExtension()

A little better than leaving the values undefined, I think.
See bug 24321.

15 years agogallium/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
Brian Paul [Wed, 7 Oct 2009 13:43:12 +0000 (07:43 -0600)]
gallium/xlib: return 0 for errorBase, eventBase in glXQueryExtension()

A little better than leaving the values undefined, I think.
See bug 24321.

15 years agointel: use driReadDrawable in do_copy_texsubimage()
Brian Paul [Mon, 5 Oct 2009 20:26:16 +0000 (14:26 -0600)]
intel: use driReadDrawable in do_copy_texsubimage()

15 years agointel: use driReadDrawable, not driDrawable in do_blit_readpixels()
Brian Paul [Mon, 5 Oct 2009 20:25:36 +0000 (14:25 -0600)]
intel: use driReadDrawable, not driDrawable in do_blit_readpixels()

15 years agointel: remove a buffer equality test in _mesa_make_current()
Brian Paul [Mon, 5 Oct 2009 20:07:29 +0000 (14:07 -0600)]
intel: remove a buffer equality test in _mesa_make_current()

Before, if we called glXMakeCurrent() to change a context's window binding
while an FBO was bound, we weren't updating the intel->driDrawable and
intel->driReadDrawable fields.  This could cause us to dereference a null
pointer elsewhere.

15 years agomesa: fix return value when clipping {Read,Draw}Pixels height <= 0
Brian Paul [Mon, 5 Oct 2009 17:10:31 +0000 (11:10 -0600)]
mesa: fix return value when clipping {Read,Draw}Pixels height <= 0

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from master, commit 7aeaca33c331f70d507fc83583b13b8d9fc3e847)

15 years agoFix building of GLSL demos which use M_PI
Jon TURNEY [Fri, 24 Jul 2009 19:33:25 +0000 (20:33 +0100)]
Fix building of GLSL demos which use M_PI

Some <math.h> files do not define M_PI, in which case, provide our own definition

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
15 years agoUse _mesa_select_tex_image() rather than hardcoding face 0.
Michel Dänzer [Mon, 5 Oct 2009 10:31:51 +0000 (12:31 +0200)]
Use _mesa_select_tex_image() rather than hardcoding face 0.

Fixes crash loading a map in sauerbraten with

hwmipmap 1

in ~/.sauerbraten/config.cfg.

15 years agor200: remove subpixel offset from viewport
Frederic Crozat [Sun, 4 Oct 2009 21:46:40 +0000 (17:46 -0400)]
r200: remove subpixel offset from viewport

Fixes bug fdo 20340 for r200.

15 years agor300: Workaround problem on R500 with very large fragment programs
Nicolai Hähnle [Fri, 2 Oct 2009 23:26:38 +0000 (01:26 +0200)]
r300: Workaround problem on R500 with very large fragment programs

The non-KMS interface is to blame here. In theory, a proper fix
could be produced that works for the KMS interface only, but it
require cleaning a lot of mess. Easier to just do it right in r300g.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agodocs: document default texture binding fix
Brian Paul [Fri, 2 Oct 2009 15:58:16 +0000 (09:58 -0600)]
docs: document default texture binding fix

15 years agomesa: fix incorrect default texture binding in unbind_texobj_from_texunits()
Brian Paul [Fri, 2 Oct 2009 15:55:07 +0000 (09:55 -0600)]
mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()

If we deleted a currently bound texture, we were always reverting the texture
binding to the default 1D texture rather than the proper default texture.

15 years agogallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
Brian Paul [Fri, 2 Oct 2009 13:52:27 +0000 (07:52 -0600)]
gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()

The parameter is a bitmask.

15 years agoxlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
Brian Paul [Fri, 2 Oct 2009 13:51:15 +0000 (07:51 -0600)]
xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()

The parameter is a bitmask.

15 years agogallium/xlib: return GLX_RGBA_BIT or GLX_COLOR_INDEX_BIT in get_config()
Brian Paul [Fri, 2 Oct 2009 13:47:49 +0000 (07:47 -0600)]
gallium/xlib: return GLX_RGBA_BIT or GLX_COLOR_INDEX_BIT in get_config()

This reverts part of commit a6b84aef4ad3a7bac40704146a98977c62bfb6e8

15 years agogallium: replace // comments with /* */
Brian Paul [Fri, 2 Oct 2009 13:31:42 +0000 (07:31 -0600)]
gallium: replace // comments with /* */

15 years agogallium: remove // comment and extra whitespace
Brian Paul [Fri, 2 Oct 2009 13:26:28 +0000 (07:26 -0600)]
gallium: remove // comment and extra whitespace

15 years agomesa: fix memory leak when generating mipmaps for compressed textures
Brian Paul [Thu, 1 Oct 2009 20:55:13 +0000 (14:55 -0600)]
mesa: fix memory leak when generating mipmaps for compressed textures

15 years agomesa: fix mem leaks
Brian Paul [Thu, 1 Oct 2009 20:52:28 +0000 (14:52 -0600)]
mesa: fix mem leaks

15 years agogallium/util: silence uninitialized var warning
Brian Paul [Thu, 1 Oct 2009 20:52:10 +0000 (14:52 -0600)]
gallium/util: silence uninitialized var warning

15 years agomesa: add missing return when out of memory
Brian Paul [Thu, 1 Oct 2009 20:51:43 +0000 (14:51 -0600)]
mesa: add missing return when out of memory

15 years agomesa: fix potential uninitialized memory reads
Brian Paul [Thu, 1 Oct 2009 20:51:26 +0000 (14:51 -0600)]
mesa: fix potential uninitialized memory reads

15 years agoglsl: fix mem leak
Brian Paul [Thu, 1 Oct 2009 20:50:45 +0000 (14:50 -0600)]
glsl: fix mem leak

15 years agost/mesa: check for null before asserts, fix possible mem leak
Brian Paul [Thu, 1 Oct 2009 20:49:34 +0000 (14:49 -0600)]
st/mesa: check for null before asserts, fix possible mem leak

15 years agost/mesa: silence hidden parameter warning
Brian Paul [Thu, 1 Oct 2009 20:49:04 +0000 (14:49 -0600)]
st/mesa: silence hidden parameter warning

15 years agost/mesa: fix non-mipmap lastLevel calculation.
Brian Paul [Thu, 1 Oct 2009 19:34:49 +0000 (13:34 -0600)]
st/mesa: fix non-mipmap lastLevel calculation.

reviewed by Brian Paul.
(cherry picked from master, commit ae2daacbac7242938cffe0e2409071e030e00863)

15 years agomesa: Return -FLT_MAX instead of 0 for LG2(0).
Vinson Lee [Thu, 1 Oct 2009 19:33:20 +0000 (13:33 -0600)]
mesa: Return -FLT_MAX instead of 0 for LG2(0).

lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).

15 years agoglx: fix glXQueryContext(GLX_RENDER_TYPE)
Brian Paul [Tue, 29 Sep 2009 16:24:27 +0000 (10:24 -0600)]
glx: fix glXQueryContext(GLX_RENDER_TYPE)

The renderType parameter to CreateContext() was never used.  Also, it
was often passed as zero.  Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.

Fixes bug 24211.

15 years agoi965: Fix massive memory allocation for streaming texture usage.
Eric Anholt [Thu, 12 Feb 2009 11:54:58 +0000 (03:54 -0800)]
i965: Fix massive memory allocation for streaming texture usage.

Once we've freed a miptree, we won't see any more state cache requests
that would hit the things that pointed at it until we've let the miptree
get released back into the BO cache to be reused.  By leaving those
surface state and binding table pointers that pointed at it around, we
would end up with up to (500 * texture size) in memory uselessly consumed
by the state cache.

Bug #20057
Bug #23530

15 years agodocs: document GLSL sqrt(0) fix
Brian Paul [Wed, 30 Sep 2009 01:05:04 +0000 (19:05 -0600)]
docs: document GLSL sqrt(0) fix

15 years agoglsl: regenerated file
Brian Paul [Wed, 30 Sep 2009 00:59:37 +0000 (18:59 -0600)]
glsl: regenerated file

15 years agoglsl: rewrite sqrt(x) intrinsic to handle x=0
Brian Paul [Wed, 30 Sep 2009 00:57:13 +0000 (18:57 -0600)]
glsl: rewrite sqrt(x) intrinsic to handle x=0

Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a
divide by zero if x=0 and wind up with unpredictable results.
Now use CMP instruction to test for x<=0 and return zero in that case.

15 years agoglsl: add support for CMP instruction
Brian Paul [Wed, 30 Sep 2009 00:51:49 +0000 (18:51 -0600)]
glsl: add support for CMP instruction

15 years agodocs: fixed glXQueryContext(GLX_RENDER_TYPE)
Brian Paul [Tue, 29 Sep 2009 18:18:41 +0000 (12:18 -0600)]
docs: fixed glXQueryContext(GLX_RENDER_TYPE)

15 years agogallium/xlib: fix GLX_RENDER_TYPE query
Brian Paul [Tue, 29 Sep 2009 18:17:11 +0000 (12:17 -0600)]
gallium/xlib: fix GLX_RENDER_TYPE query

Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.

15 years agomesa/xlib: fix GLX_RENDER_TYPE query
Brian Paul [Tue, 29 Sep 2009 18:16:12 +0000 (12:16 -0600)]
mesa/xlib: fix GLX_RENDER_TYPE query

Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.

15 years agoglx: indentation fixes
Brian Paul [Tue, 29 Sep 2009 15:58:47 +0000 (09:58 -0600)]
glx: indentation fixes