Commit Graph

26126 Commits

Author SHA1 Message Date
Brian Paul 89b31c9619 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.
2009-10-16 07:36:50 -06:00
Owen Taylor 3f30b0709b 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.
2009-10-15 11:33:08 -04:00
Robert Noland 16c6a3b71e 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>
2009-10-15 11:29:52 -04:00
Robert Noland a176b1c5d8 r600: cleanup in r600_cs_process_relocs().
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-15 11:29:45 -04:00
Robert Noland e5d6450c2c radeon: return EINVAL for 0 length buffers.
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-15 11:29:35 -04:00
Andre Maasikas 22a0029a68 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]
2009-10-15 11:24:49 -04:00
Andre Maasikas a3fec14101 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...
2009-10-15 11:22:18 -04:00
Andre Maasikas 606becc7f3 r600: LIT dst.y gets value from src.x
seems I overlooked this when removing hardcoded swizzles for this
one previously
2009-10-15 11:21:15 -04:00
Andre Maasikas 74c31e5d05 r600: DPH adds w comp of second operand, so set first one to 1 instead 2009-10-15 11:20:04 -04:00
Andre Maasikas 95851d8cb2 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
2009-10-15 11:18:53 -04:00
Andre Maasikas bf68e54a4d 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>
2009-10-15 11:17:09 -04:00
Andre Maasikas 5101215a64 r600: user correct alpha blend factor
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-10-15 11:16:53 -04:00
Andre Maasikas f7285bdffc r600: clear position enable bit when when wpos is not used by FP
Makes doom3 alot nicer..
2009-10-15 11:16:41 -04:00
Brian Paul 6f8b4d9e36 mesa: regenerated lex.yy.c w/ _mesa_strtod() 2009-10-15 08:59:13 -06:00
Neil Roberts 269f16cd96 mesa: Use _mesa_strtod in the lexer for assembly shaders
See bug 24531.
2009-10-15 08:57:07 -06:00
Brian Paul 31f7e8efb2 progs/Makefile: remove extra quoting
This reverts part of commit 115edf24a9 and
fixes the error: "/bin/sh: line 0: test: too many arguments".
2009-10-14 09:37:53 -06:00
Tom Fogal 115edf24a9 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.
2009-10-13 16:22:09 -06:00
Tom Fogal 9282edfaa0 ac: Fix AIX shared library builds.
AIX uses ".a" for both static and shared library extensions.
2009-10-13 16:22:06 -06:00
Eric Anholt f3be27c0cf i965: Fix the last valid address setting for the index buffer.
Again, last valid address, not first invalid address.  Fixes regression
in 255e5be265 that the kernel now catches
and caused piglit draw_elements_base_vertex to fail.
2009-10-11 11:21:03 -07:00
Eric Anholt a82da7fa26 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.
2009-10-11 11:21:03 -07:00
Brian Paul 768481ed40 softpipe: revert 564df9dc5f
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
2009-10-10 09:18:14 -06:00
Alex Deucher 194ede4bf9 radeon: fix scissor regression
fixes fdo bug 24248
2009-10-09 15:44:32 -04:00
Brian Paul 2738681e84 docs: fix aux buffer bug 24426 2009-10-09 13:23:07 -06:00
Brian Paul 6164f1fe79 st/mesa: create aux buffers according to visual
Fixes bug 24426 for gallium.
2009-10-09 13:22:15 -06:00
Brian Paul ce64e063a8 mesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()
Fixes bug 24426.
2009-10-09 13:22:00 -06:00
Brian Paul f7fb30f03b mesa: regenerated gl_mangle.h file 2009-10-08 09:19:42 -06:00
Brian Paul ee3fbe7067 gallium/xlib: call XQueryExtension() in glXQueryExtension()
See bug 24321.
2009-10-07 14:43:27 -06:00
Brian Paul 9f002e4aaa mesa/xlib: call XQueryExtension() in glXQueryExtension()
See bug 24321.
2009-10-07 14:42:16 -06:00
Brian Paul 7dd2c0afd6 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.
2009-10-07 14:07:49 -06:00
Nicolai Hähnle 9fde81bb20 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>
2009-10-07 20:36:23 +02:00
Nicolai Hähnle ae351599f1 prog_parameter: Document the fact that Size may be > 4
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-07 20:33:55 +02:00
Brian Paul cdcd9da480 docs: fix glXQueryDrawable() bugs 2009-10-07 09:41:38 -06:00
Brian Paul c3eef6021a mesa/xlib: fix glXQueryDrawable() bugs, see bug 24320 2009-10-07 09:41:38 -06:00
Brian Paul 0526100a5c gallium/xlib: fix glXQueryDrawable() bugs, see bug 24320 2009-10-07 09:41:38 -06:00
Brian Paul f36425b569 progs/xdemos: test glXQueryDrawable() 2009-10-07 09:41:38 -06:00
Brian Paul 846a6b0695 progs/xdemos: fix swapped parameters to CreatePbuffer() 2009-10-07 09:41:38 -06:00
Brian Paul edbaa717b4 swrast: s/GLfloat/GLuint/ in bzero() 2009-10-07 08:07:53 -06:00
Brian Paul 14f21c7850 swrast: add missing returns 2009-10-07 08:05:28 -06:00
Vinson Lee 4b3cbecb3a progs/test: Fix MSVC build. 2009-10-07 07:54:31 -06:00
Brian Paul e3fff3daf0 mesa/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul f9904edf53 gallium/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul 79892e7976 intel: use driReadDrawable in do_copy_texsubimage() 2009-10-05 14:26:16 -06:00
Brian Paul 3b7ec94c0d intel: use driReadDrawable, not driDrawable in do_blit_readpixels() 2009-10-05 14:25:36 -06:00
Brian Paul 3b29dcbb5e 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.
2009-10-05 14:07:29 -06:00
Brian Paul a8768bbc9d mesa: fix return value when clipping {Read,Draw}Pixels height <= 0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

(cherry picked from master, commit 7aeaca33c3)
2009-10-05 11:10:31 -06:00
Jon TURNEY a15d9ca9cc 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>
2009-10-05 11:07:23 -06:00
Michel Dänzer 43750f1575 Use _mesa_select_tex_image() rather than hardcoding face 0.
Fixes crash loading a map in sauerbraten with

hwmipmap 1

in ~/.sauerbraten/config.cfg.
2009-10-05 12:31:51 +02:00
Frederic Crozat 3856c3cc46 r200: remove subpixel offset from viewport
Fixes bug fdo 20340 for r200.
2009-10-04 17:50:16 -04:00
Nicolai Hähnle bbe384c86a 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>
2009-10-03 01:39:13 +02:00
Brian Paul c01a77d304 docs: document default texture binding fix 2009-10-02 09:58:16 -06:00