mesa.git
14 years agoglsl/pp: Do not try to enable extension `all'.
Michal Krol [Tue, 16 Feb 2010 09:04:58 +0000 (10:04 +0100)]
glsl/pp: Do not try to enable extension `all'.

14 years agonv50: use hw idx buffers where we can
Ben Skeggs [Tue, 16 Feb 2010 05:43:51 +0000 (15:43 +1000)]
nv50: use hw idx buffers where we can

14 years agoprogs/redbook: use glew
Brian Paul [Tue, 16 Feb 2010 01:04:00 +0000 (18:04 -0700)]
progs/redbook: use glew

14 years agonouveau: fix for latest libdrm
Ben Skeggs [Mon, 15 Feb 2010 06:45:39 +0000 (16:45 +1000)]
nouveau: fix for latest libdrm

14 years agowgl: Be lenient when sharing contexts.
José Fonseca [Mon, 15 Feb 2010 19:34:38 +0000 (19:34 +0000)]
wgl: Be lenient when sharing contexts.

My first reading of MS docs was wrong. It says:

  All rendering contexts of a shared display list must use an identical
  pixel format. Otherwise the results depend on the implementation of
  OpenGL used.

That is, it is OK to share contexts with different pixel formats.

Adobe Premiere Pro tries to do that: share lists between a rgbx8 and a
rgba8 pixel format.

14 years agoprogs/redbook: Temporarily disable the demos that extensions not part of windows...
José Fonseca [Mon, 15 Feb 2010 21:47:20 +0000 (21:47 +0000)]
progs/redbook: Temporarily disable the demos that extensions not part of windows to fix build.

14 years agoscons: A less magic way of not building progs by default.
José Fonseca [Mon, 15 Feb 2010 20:48:24 +0000 (20:48 +0000)]
scons: A less magic way of not building progs by default.

The problem with the old way is that passing 'progs/subdir' as argument
would fail.

14 years agoglsl/pp: Fix handling of if/elif/else cases.
Michal Krol [Mon, 15 Feb 2010 20:33:22 +0000 (21:33 +0100)]
glsl/pp: Fix handling of if/elif/else cases.

Once if/elif evalutes to true, all subsequent conditions are always false.

14 years agoprogs/redbook: test image for new redbook tests
Brian Paul [Mon, 15 Feb 2010 16:55:44 +0000 (09:55 -0700)]
progs/redbook: test image for new redbook tests

14 years agoprogs/redbook: add additional tests for GL 1.4
Brian Paul [Mon, 15 Feb 2010 16:55:01 +0000 (09:55 -0700)]
progs/redbook: add additional tests for GL 1.4

14 years agodocs: document glMultiDrawElements() fix
Brian Paul [Mon, 15 Feb 2010 15:57:34 +0000 (08:57 -0700)]
docs: document glMultiDrawElements() fix

(cherry picked from commit ab6bcef99a53217db752659ace105ddfd9b25ebb)

14 years agovbo: fix broken glMultiDrawElements()
Brian Paul [Mon, 15 Feb 2010 15:57:17 +0000 (08:57 -0700)]
vbo: fix broken glMultiDrawElements()

Seems to be a regression from commit 60b08eb1fdf287d28ec66b9282513ab35a61aee0.

(cherry picked from commit c5a4cfb03ff17955c049f16ac805f5837ea4b633)

14 years agoglu/sgi: Add assert to check for null pointer dereference.
Vinson Lee [Mon, 15 Feb 2010 10:14:02 +0000 (02:14 -0800)]
glu/sgi: Add assert to check for null pointer dereference.

14 years agomesa: Remove pointless comparison of unsigned integer with a negative constant.
Vinson Lee [Mon, 15 Feb 2010 10:01:20 +0000 (02:01 -0800)]
mesa: Remove pointless comparison of unsigned integer with a negative constant.

14 years agoglsl/pp: Add asserts to check for null pointer deferences.
Vinson Lee [Mon, 15 Feb 2010 08:30:31 +0000 (00:30 -0800)]
glsl/pp: Add asserts to check for null pointer deferences.

14 years agodraw: Add assert to check input of memcpy.
Vinson Lee [Mon, 15 Feb 2010 06:58:26 +0000 (22:58 -0800)]
draw: Add assert to check input of memcpy.

14 years agoglu/sgi: Move initialization of members to top of Curve constructor.
Vinson Lee [Mon, 15 Feb 2010 06:26:30 +0000 (22:26 -0800)]
glu/sgi: Move initialization of members to top of Curve constructor.

This is a modification of commit 53d448657bd300ab68b2869b2fba76a627699baf.

The members cpts and spts are possibly used as arguments later in
the constructor.

14 years agoglu/sgi: Initialize members of class Curvelist.
Vinson Lee [Mon, 15 Feb 2010 06:18:41 +0000 (22:18 -0800)]
glu/sgi: Initialize members of class Curvelist.

14 years agoglu/sgi: Initialize members of class Curve.
Vinson Lee [Mon, 15 Feb 2010 06:04:59 +0000 (22:04 -0800)]
glu/sgi: Initialize members of class Curve.

14 years agoglu/sgi: Initialize member of class Pool.
Vinson Lee [Mon, 15 Feb 2010 05:45:01 +0000 (21:45 -0800)]
glu/sgi: Initialize member of class Pool.

14 years agoglx: Silence uninitialized variable warning.
Vinson Lee [Mon, 15 Feb 2010 05:02:18 +0000 (21:02 -0800)]
glx: Silence uninitialized variable warning.

14 years agost/mesa: minor assorted clean-ups
Brian Paul [Mon, 15 Feb 2010 04:54:17 +0000 (21:54 -0700)]
st/mesa: minor assorted clean-ups

14 years agost/mesa: change some function return types
Brian Paul [Mon, 15 Feb 2010 04:46:51 +0000 (21:46 -0700)]
st/mesa: change some function return types

14 years agost/mesa: move per-fragment shader fields to local vars
Brian Paul [Mon, 15 Feb 2010 03:47:34 +0000 (20:47 -0700)]
st/mesa: move per-fragment shader fields to local vars

14 years agost/mesa: use _mesa_clone_fragment_program()
Brian Paul [Mon, 15 Feb 2010 01:50:49 +0000 (18:50 -0700)]
st/mesa: use _mesa_clone_fragment_program()

14 years agor600: use new program cloning functions
Brian Paul [Mon, 15 Feb 2010 01:46:56 +0000 (18:46 -0700)]
r600: use new program cloning functions

14 years agor300: use new program cloning functions
Brian Paul [Mon, 15 Feb 2010 01:46:51 +0000 (18:46 -0700)]
r300: use new program cloning functions

14 years agoglsl: use new program cloning functions
Brian Paul [Mon, 15 Feb 2010 01:46:37 +0000 (18:46 -0700)]
glsl: use new program cloning functions

14 years agomesa: added _mesa_clone_vertex/fragment_program()
Brian Paul [Mon, 15 Feb 2010 02:09:04 +0000 (19:09 -0700)]
mesa: added _mesa_clone_vertex/fragment_program()

To reduce casting elsewhere...

14 years agor600: Silence uninitialized variable warnings.
Vinson Lee [Mon, 15 Feb 2010 04:49:09 +0000 (20:49 -0800)]
r600: Silence uninitialized variable warnings.

14 years agor300g: fix the size of constant buffers
Marek Olšák [Sun, 14 Feb 2010 23:04:32 +0000 (00:04 +0100)]
r300g: fix the size of constant buffers

4 more piglit tests pass, sweet.

14 years agopython/retrace: Reconstruct blend state from binary blobs.
José Fonseca [Mon, 15 Feb 2010 00:25:43 +0000 (00:25 +0000)]
python/retrace: Reconstruct blend state from binary blobs.

14 years agopython: Reconstruct blend state objects from binary blobs.
José Fonseca [Mon, 15 Feb 2010 00:22:59 +0000 (00:22 +0000)]
python: Reconstruct blend state objects from binary blobs.

14 years agotrace: Dump blend state as a binary blob.
José Fonseca [Mon, 15 Feb 2010 00:22:29 +0000 (00:22 +0000)]
trace: Dump blend state as a binary blob.

Gallium interfaces are too fluid -- XML or not is just too much work
trying to accommodate for differences in traces.

SWIG generated bindings are also full of quirks, making unmarshalling
the XML from too hard.

Finally, this is the first step for faster tracing.

14 years agotrace: Fix constant buffer unwrapping.
José Fonseca [Mon, 15 Feb 2010 00:19:22 +0000 (00:19 +0000)]
trace: Fix constant buffer unwrapping.

Pointer unwrapping should happen before dump the pointer, so that
the real pipe driver pointers are shown, instead of the trace driver's.

14 years agoutil: Avoid dumping masked state. Other minor improvements.
José Fonseca [Sun, 14 Feb 2010 23:54:22 +0000 (23:54 +0000)]
util: Avoid dumping masked state. Other minor improvements.

14 years agoos: A stream for debug logging.
José Fonseca [Sun, 14 Feb 2010 23:53:42 +0000 (23:53 +0000)]
os: A stream for debug logging.

Just a wrapper around os_log_message. Although it would probably make
more sense to be the other way around.

Also some comment fixes.

14 years agotrace: No need to dump reference counts.
José Fonseca [Sun, 14 Feb 2010 23:25:01 +0000 (23:25 +0000)]
trace: No need to dump reference counts.

14 years agopython: Pretty-printing of blend state.
José Fonseca [Sun, 14 Feb 2010 23:24:08 +0000 (23:24 +0000)]
python: Pretty-printing of blend state.

14 years agoutil: Helper functions to dump all state objects.
José Fonseca [Sun, 14 Feb 2010 23:20:42 +0000 (23:20 +0000)]
util: Helper functions to dump all state objects.

14 years agoos: Add a growable string stream.
José Fonseca [Sun, 14 Feb 2010 23:07:21 +0000 (23:07 +0000)]
os: Add a growable string stream.

14 years agoos: Complement/improve stream inline helpers.
José Fonseca [Sun, 14 Feb 2010 23:04:04 +0000 (23:04 +0000)]
os: Complement/improve stream inline helpers.

14 years agoos: Fix bad calloc.
José Fonseca [Sun, 14 Feb 2010 23:03:10 +0000 (23:03 +0000)]
os: Fix bad calloc.

14 years agotrace: Update for os_stream changes.
José Fonseca [Sun, 14 Feb 2010 16:55:38 +0000 (16:55 +0000)]
trace: Update for os_stream changes.

14 years agoutil: Update for os_stream changes.
José Fonseca [Sun, 14 Feb 2010 16:55:25 +0000 (16:55 +0000)]
util: Update for os_stream changes.

14 years agoos: Make streams abstract.
José Fonseca [Sun, 14 Feb 2010 16:55:04 +0000 (16:55 +0000)]
os: Make streams abstract.

Also replace windows kernel stream with null implementation. It was
severely limited and no easy means to test it now.

14 years agoglut: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 21:47:58 +0000 (13:47 -0800)]
glut: Silence uninitialized variable warning.

14 years agollvmpipe: Silence unused value warning.
Vinson Lee [Sun, 14 Feb 2010 21:23:21 +0000 (13:23 -0800)]
llvmpipe: Silence unused value warning.

14 years agosvga: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 21:10:08 +0000 (13:10 -0800)]
svga: Silence uninitialized variable warning.

14 years agor300: add half_float_vertex support
Marek Olšák [Sun, 14 Feb 2010 20:58:00 +0000 (21:58 +0100)]
r300: add half_float_vertex support

14 years agomesa: Don't pass paramter to __builtin_clz which would hve undefined result.
Pauli Nieminen [Sun, 14 Feb 2010 12:16:20 +0000 (14:16 +0200)]
mesa: Don't pass paramter to __builtin_clz which would hve undefined result.

__builtin_clz with parameter 0 has undefined value. When
using -O3 optimizing this would result to too large next
power of two value.

Fix is to check if passed value is 1 and modify formula
for that case.

14 years agor300g: set the correct tiling flags for renderbuffers
Marek Olšák [Fri, 12 Feb 2010 01:48:03 +0000 (02:48 +0100)]
r300g: set the correct tiling flags for renderbuffers

MACRO_SWITCH is applied to samplers but not renderbuffers. This commit
fixes incorrect rendering to large and small mipmaps where the large ones
are macrotiled and the small ones are not and both are emitted
in the same CS.

Note that this is still disabled by default (rework of texture transfers
is next).

14 years agor300g: add macrotiling support to texture setup
Marek Olšák [Mon, 8 Feb 2010 02:17:24 +0000 (03:17 +0100)]
r300g: add macrotiling support to texture setup

14 years agoradeong: flush when changing tiling flags of BO referenced by CS
Marek Olšák [Thu, 11 Feb 2010 23:48:44 +0000 (00:48 +0100)]
radeong: flush when changing tiling flags of BO referenced by CS

14 years agor300g: accelerate blitting for all formats by faking the texture format
Marek Olšák [Sun, 14 Feb 2010 03:57:03 +0000 (04:57 +0100)]
r300g: accelerate blitting for all formats by faking the texture format

14 years agosrc/glu/mesa: fix mem leak (bug 26559)
Brian Paul [Sun, 14 Feb 2010 17:02:42 +0000 (10:02 -0700)]
src/glu/mesa: fix mem leak (bug 26559)

14 years agosrc/glu/mini: fix mem leak (bug 26559)
Brian Paul [Sun, 14 Feb 2010 17:02:32 +0000 (10:02 -0700)]
src/glu/mini: fix mem leak (bug 26559)

14 years agoprogs/objviewer: close file (bug 26559)
Brian Paul [Sun, 14 Feb 2010 17:02:01 +0000 (10:02 -0700)]
progs/objviewer: close file (bug 26559)

14 years agoprogs/fp: close file (bug 26559)
Brian Paul [Sun, 14 Feb 2010 16:51:49 +0000 (09:51 -0700)]
progs/fp: close file (bug 26559)

14 years agor300g: fix texture formats: A4R4G4B4_UNORM, A1R5G5B5_UNORM, R5G6B5_UNORM
Marek Olšák [Sun, 7 Feb 2010 10:36:00 +0000 (11:36 +0100)]
r300g: fix texture formats: A4R4G4B4_UNORM, A1R5G5B5_UNORM, R5G6B5_UNORM

14 years agoscons: Control caching via new SCONS_CACHE_DIR environment variable.
José Fonseca [Sun, 14 Feb 2010 15:34:39 +0000 (15:34 +0000)]
scons: Control caching via new SCONS_CACHE_DIR environment variable.

This serves several purposes:
- disable caching in situations were is it useless or undesired
- share caches among all trees
- simplify purging the cache (when it's a single location)
- move the cache out of the tree, since that slows downs IDEs considerably

To retain previous behavior just define do

  export SCONS_CACHE_DIR=$PWD/build/cache

before invoking scons.

14 years agollvmpipe: s/debug_dump_/util_dump_/
José Fonseca [Sun, 14 Feb 2010 15:21:06 +0000 (15:21 +0000)]
llvmpipe: s/debug_dump_/util_dump_/

14 years agogallivm: s/debug_dump_/util_dump_/
José Fonseca [Sun, 14 Feb 2010 15:20:57 +0000 (15:20 +0000)]
gallivm: s/debug_dump_/util_dump_/

14 years agoutil: Rename u_debug_dump.[ch] -> u_dump.[ch].
José Fonseca [Sun, 14 Feb 2010 15:20:34 +0000 (15:20 +0000)]
util: Rename u_debug_dump.[ch] -> u_dump.[ch].

I have more plans for this than mere debugging -- it will be an helper
to provide human readible representations of all gallium state for
the python state tracker.

14 years agomesa: Add missing include.
José Fonseca [Sun, 14 Feb 2010 13:28:29 +0000 (13:28 +0000)]
mesa: Add missing include.

14 years agogallium: Remove previously forgotten pf_name() prototype.
José Fonseca [Sun, 14 Feb 2010 13:28:17 +0000 (13:28 +0000)]
gallium: Remove previously forgotten pf_name() prototype.

14 years agodraw: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:27:00 +0000 (13:27 +0000)]
draw: Use util_format_name().

14 years agoutil: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:26:51 +0000 (13:26 +0000)]
util: Use util_format_name().

14 years agocell: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:26:46 +0000 (13:26 +0000)]
cell: Use util_format_name().

14 years agollvmpipe: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:26:37 +0000 (13:26 +0000)]
llvmpipe: Use util_format_name().

14 years agonv: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:26:30 +0000 (13:26 +0000)]
nv: Use util_format_name().

14 years agor300g: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:25:22 +0000 (13:25 +0000)]
r300g: Use util_format_name().

14 years agotrace: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:25:06 +0000 (13:25 +0000)]
trace: Use util_format_name().

14 years agoxorg: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:24:58 +0000 (13:24 +0000)]
xorg: Use util_format_name().

14 years agomesa: Use util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:24:43 +0000 (13:24 +0000)]
mesa: Use util_format_name().

14 years agoutil: Add pf_name() replacement: util_format_name().
José Fonseca [Sun, 14 Feb 2010 13:23:32 +0000 (13:23 +0000)]
util: Add pf_name() replacement: util_format_name().

14 years agomakefiles: Don't complaint about changing configs if the same one is reselected.
José Fonseca [Sun, 14 Feb 2010 13:15:49 +0000 (13:15 +0000)]
makefiles: Don't complaint about changing configs if the same one is reselected.

Otherwise it creates unnecessary pain when automating builds in a build
server/farm.

14 years agopython/retrace: Interpret pipe_screen::context_create().
José Fonseca [Sun, 14 Feb 2010 12:48:11 +0000 (12:48 +0000)]
python/retrace: Interpret pipe_screen::context_create().

14 years agotrace: Fix generated XML.
José Fonseca [Sun, 14 Feb 2010 12:47:40 +0000 (12:47 +0000)]
trace: Fix generated XML.

14 years agopython: Tell swig how to index per-rendertarget blend state.
José Fonseca [Sun, 14 Feb 2010 12:06:37 +0000 (12:06 +0000)]
python: Tell swig how to index per-rendertarget blend state.

14 years agopython: Pass p_format.h as-is to swig now that it has no inlines.
José Fonseca [Sun, 14 Feb 2010 11:26:58 +0000 (11:26 +0000)]
python: Pass p_format.h as-is to swig now that it has no inlines.

14 years agoprogs/gallium/python: New home for python statetracker scripts.
José Fonseca [Sun, 14 Feb 2010 11:15:19 +0000 (11:15 +0000)]
progs/gallium/python: New home for python statetracker scripts.

14 years agoglut: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 10:04:17 +0000 (02:04 -0800)]
glut: Silence uninitialized variable warning.

14 years agor300: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 08:56:57 +0000 (00:56 -0800)]
r300: Silence uninitialized variable warning.

14 years agor600: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 08:45:23 +0000 (00:45 -0800)]
r600: Silence uninitialized variable warning.

14 years agoglu/sgi: Initialize members of class Curvelist.
Vinson Lee [Sun, 14 Feb 2010 07:56:48 +0000 (23:56 -0800)]
glu/sgi: Initialize members of class Curvelist.

14 years agollvmpipe: Silence uninitialized variable warning.
Vinson Lee [Sun, 14 Feb 2010 07:48:40 +0000 (23:48 -0800)]
llvmpipe: Silence uninitialized variable warning.

14 years agosoftpipe: Silence uninitialized variable warnings.
Vinson Lee [Sun, 14 Feb 2010 06:51:34 +0000 (22:51 -0800)]
softpipe: Silence uninitialized variable warnings.

14 years agost/python: fix build error after gallium-screen-context merge
Marek Olšák [Sun, 14 Feb 2010 02:16:00 +0000 (03:16 +0100)]
st/python: fix build error after gallium-screen-context merge

14 years agor300g: fix scons build
Marek Olšák [Sun, 14 Feb 2010 02:14:32 +0000 (03:14 +0100)]
r300g: fix scons build

14 years agosoftpipe: fix broken cubemap / mipmap selection code
Brian Paul [Sun, 14 Feb 2010 00:47:23 +0000 (17:47 -0700)]
softpipe: fix broken cubemap / mipmap selection code

This is a quick-fix for the time being...

The per-face mipmap LOD computation was invalid at cube edges.  In
mip_filter_nearest/linear() we were trying to compute LOD using
texcoords that were sometimes indexes into different cube faces.
The subtraction used to compute the partial derivatives basically
gave random values, so the LOD was unpredictable.  This fix simply
uses the same cube face for all four pixels in the quad.  The per-
face texcoords all reference the same cube face so the partial
deriviates are computed properly.

A more elaborate fix would involve computing the LOD at the same
time as we choose the cube faces.  But for now, this solution works
well and allows the piglit/cubemap test to pass.

(cherry picked from commit 1ff9cd5079b095d7050edb8dc6a7e5b8cad36e1e)

14 years agomesa: Fix compiler warnings
Karl Schultz [Sun, 14 Feb 2010 00:31:58 +0000 (17:31 -0700)]
mesa: Fix compiler warnings

Add explicit casts, fix constant types, fix variable types.
Fixes about 340 warnings in MSFT Visual Studio.

14 years agodocs: document GL_ARB_fragment_coord_conventions
Brian Paul [Sat, 13 Feb 2010 21:06:25 +0000 (14:06 -0700)]
docs: document GL_ARB_fragment_coord_conventions

14 years agomesa: enable GL_ARB_fragment_coord_conventions for sw drivers
Brian Paul [Sat, 13 Feb 2010 21:02:54 +0000 (14:02 -0700)]
mesa: enable GL_ARB_fragment_coord_conventions for sw drivers

This extension is now implemented in the GLSL compiler so it can be
enabled by other drivers where applicable.

14 years agoglsl: implement layout qualifiers
Brian Paul [Sat, 13 Feb 2010 20:57:31 +0000 (13:57 -0700)]
glsl: implement layout qualifiers

For GL_ARB_fragment_coord_conventions.

This only applies to gl_FragCoord and controls pixel center origin and
pixel center integer.  For example:

layout (origin_upper_left, pixel_center_integer) varying vec4 gl_FragCoord;

This features introduces the idea of re-declaring variables with a changed
type.  This may also apply to arrays in some cases but that's not
implemented at this time.

14 years agoglsl: added type layout field and new type compare func
Brian Paul [Sat, 13 Feb 2010 20:52:37 +0000 (13:52 -0700)]
glsl: added type layout field and new type compare func

Note: because of a weird dependency checking bug, a 'make clean' may be
needed before recompiling.

14 years agomesa: copy frag coord layout fields too
Brian Paul [Sat, 13 Feb 2010 20:51:38 +0000 (13:51 -0700)]
mesa: copy frag coord layout fields too

14 years agoglsl/cl: implement parsing for layout qualifiers
Brian Paul [Sat, 13 Feb 2010 20:50:26 +0000 (13:50 -0700)]
glsl/cl: implement parsing for layout qualifiers

For GL_ARB_fragment_coord_conventions support.

14 years agoglsl/pp: fix incorrect extension enable flag for warn mode
Brian Paul [Sat, 13 Feb 2010 20:48:32 +0000 (13:48 -0700)]
glsl/pp: fix incorrect extension enable flag for warn mode

14 years agomesa: Export GL_EXT_texture_cube_map.
José Fonseca [Sat, 13 Feb 2010 15:10:24 +0000 (15:10 +0000)]
mesa: Export GL_EXT_texture_cube_map.

Still used by some applications.