Commit graph

115447 commits

Author SHA1 Message Date
Jonathan Adamczewski
921ec940f0 cell: new spu_shuffle.h header
Facilitates creation of shuffle patterns for use with spu_shuffle()
and si_shufb() intrinsics.

To be used by subsequent patches.
2009-01-04 18:46:44 -07:00
Brian Paul
8f6e2f8620 cell: initial codegen support for fragment shader loops
Basic for/while loops work now.
Only one level of loop nesting is supported at this time (same for if/else).
The progs/glsl/mandelbrot demo works, but the colors are too dim.
2009-01-04 18:40:48 -07:00
Brian Paul
38b526999c cell: add support for PIPE_CAP_TEXTURE_MIRROR_REPEAT query
We don't really support this texwrap mode yet, but this enables GL 2.1
2009-01-04 18:38:42 -07:00
Brian Paul
7ba6869308 cell: clean-up, improve SPU code generation
Start on ARL and address-relative indexing too.
2009-01-04 10:14:19 -07:00
Brian Paul
6cbaa2226f gallium: fix MaxTextureCoordUnits init
Fixes Cell regression.
2009-01-04 10:04:44 -07:00
Brian
9832f92850 cell: fix typo (s/10/0) 2009-01-03 14:44:34 -07:00
Brian
fa4fec2d1b demos: remove redundant Makefile lines from prev merge 2009-01-03 14:39:49 -07:00
Brian Paul
724ed5b84b mesa: fix warning about possibly undefined var in GLSL compiler 2009-01-02 17:30:08 -07:00
Brian Paul
19aed38919 softpipe: increase number of texture samplers/units to PIPE_MAX_SAMPLERS (16) 2009-01-02 16:55:33 -07:00
Brian Paul
d917ad5dbd gallium: assorted state tracker fixes for > 8 texture samplers 2009-01-02 16:54:11 -07:00
Brian Paul
84cffc2e7f mesa: replace CC with APP_CC in progs/glsl/Makefile 2009-01-02 16:52:00 -07:00
Brian Paul
0815ebccfc Merge commit 'origin/master' into gallium-0.2
Conflicts:

	src/mesa/main/ffvertex_prog.c
	src/mesa/main/texenvprogram.c
2009-01-02 16:32:26 -07:00
Brian Paul
eb9bbc5265 gallium: fix texcoord loop for rasterpos attributes 2009-01-02 16:16:36 -07:00
Brian Paul
15a3fdb63e gallium: clamp MaxVertexTextureImageUnits against Mesa limit 2009-01-02 16:16:36 -07:00
Brian Paul
a57417eff6 mesa: remove redudant lines for libglapi.a 2009-01-02 16:16:36 -07:00
Brian Paul
1fad6ccb75 mesa: fix another "out of samplers" problem
Now only the samplers that are actually used by texture() functions are
saved in the uniform variable list.  Before, we could run out of samplers
if too many were declared while only some of them were actually used.
2009-01-02 12:28:37 -07:00
Brian Paul
4a6ad999ea i965: increase number of texture samplers to 16
This lets GLSL shaders use up to 16 samplers.
Fixed function is still limited to 8 textures.
Tested with progs/glsl/samplers.c
2009-01-01 14:05:30 -07:00
Brian Paul
3b891a502b i965: comments, clean-ups, re-order some functions 2009-01-01 14:05:30 -07:00
Brian Paul
32e03c4a2f i965: added OPCODE_NRM3/4 2009-01-01 14:05:30 -07:00
Brian Paul
e262da8040 i965: fix comment 2009-01-01 14:05:30 -07:00
Brian Paul
914fcbafdb i965: indentation and formatting fixes 2009-01-01 14:05:30 -07:00
Brian Paul
131ac5b465 i965: implement OPCODE_NRM3/NRM4 2009-01-01 14:05:30 -07:00
Brian Paul
23b0ad4d7e i965: whitespace, comment changes 2009-01-01 14:05:30 -07:00
Brian Paul
1d03f2834f mesa: comments, whitespace changes 2009-01-01 14:05:30 -07:00
Brian Paul
46b8fe00c9 demos: added progs/glsl/samplers.c to test all available texture samplers 2009-01-01 14:02:17 -07:00
Brian Paul
dfada459aa mesa: updated comments about GLSL constants 2009-01-01 08:07:54 -07:00
Brian Paul
e9b34885b8 mesa: increase max texture image units and GLSL samplers to 16
The max texture coord units is still 8.  All the fixed-function paths are
still limited to 8 too.  But GLSL shaders can use more samplers now.

Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8.  This just simplifies the code in a few
places; the extra elements aren't accessible to the user.

These changes haven't been extensively tested yet, but sanity checking has
been done.

It should be possible to increase the max image units/samplers to 32 without
doing anything special.  Beyond that we'll need longer bitfields in a few
places.
2008-12-31 12:00:17 -07:00
José Fonseca
1d77835668 python: Pass a zero offset to util_draw_vertex_buffer. 2008-12-31 15:03:35 +00:00
José Fonseca
e96985b026 util: List new file in SConscript. 2008-12-31 13:29:09 +00:00
José Fonseca
e228433823 Merge commit 'origin/gallium-0.1' into gallium-0.2 2008-12-31 13:06:22 +00:00
José Fonseca
43d70a12d4 i915: Avoid ptr->int conversion. 2008-12-31 13:02:06 +00:00
José Fonseca
2f24bc6984 draw: Avoid integer overflow converting pointers on 64bit archs.
Not really an error, as we only care for the lower 4 bits.
2008-12-31 13:02:06 +00:00
Eric Anholt
bfebeffc00 intel: Share passthrough transform setup between glBitmap and glDrawPixels.
The DrawPixels path was missing glViewport care, so blender's toolbar icons
would go to the wrong places.

Bug #19118.
2008-12-31 00:35:17 -08:00
Eric Anholt
e1a9217554 intel: Add support for glBitmap as metaops using GL calls.
This lets us avoid software fallbacks when clients forget to turn some state
off (engine demo) or just do crazy things to test conformance (OGLC).

This should probably be brought into mesa generic code so other drivers can
make use of it.

Bug #19016.
2008-12-31 00:10:29 -08:00
Brian Paul
c789bd376f Merge commit 'origin/master' into gallium-0.2
Conflicts:

	src/mesa/main/config.h
2008-12-30 18:01:15 -07:00
Brian Paul
e8d7db31e2 mesa: fix bug in evaluation of structure fields
Fixes incorrect size information.  See bug 19273.
2008-12-30 17:50:39 -07:00
Brian Paul
c6537ac8b8 mesa: allow variable indexing into the predefined uniform variable arrays
This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work.

When a built-in uniform array is indexed with a variable index we need to
"unroll" the whole array into the parameter list (aka constant buffer) because
we don't know which elements may be accessed at compile-time.  In the case of
the gl_LightSource array of size [8], we emit 64 state references into the
parameter array (8 elements times 8 vec4s per gl_LightSourceParameters
struct).

Previously, we only allowed constant-indexed references to uniform arrays
(such as gl_LightSource[2].position) which resulted in a single state reference
being added to the parameter array, not 64.  We still optimize this case.

Users should be aware that using "gl_LightSource[i].ambient" in their shaders
is a bit expensive since state validation will involve updating all 64
light source entries in the parameter list.
2008-12-30 17:11:32 -07:00
Brian Paul
ca0540e25c mesa: better error message when running out of GLSL samplers 2008-12-30 17:03:09 -07:00
Brian Paul
6f346ec0b8 mesa: comments for some state vars 2008-12-30 17:00:36 -07:00
Brian Paul
432e9fa852 mesa: increase max constants/uniforms to 256 (vec4 vectors) 2008-12-30 17:00:06 -07:00
José Fonseca
369115e4c7 gallium: Initialize var before use. 2008-12-30 19:21:30 +00:00
José Fonseca
70894676c2 glut: List new source file in sconscript. 2008-12-30 17:22:24 +00:00
José Fonseca
9972d7147b mesa: Do not specify types in bitfields.
As advised by gcc -pedantic.
2008-12-30 17:21:25 +00:00
José Fonseca
72f993b5b1 draw: Do not specify types in bitfields.
As advised by gcc -pedantic.
2008-12-30 17:21:15 +00:00
José Fonseca
0e0fb49c45 gallium: Remove unused variables. 2008-12-30 17:15:34 +00:00
José Fonseca
b3b7c757a9 gallium: Don't redefine INLINE.
INLINE is commonly used in third-party headers.
2008-12-30 17:14:48 +00:00
José Fonseca
975e58499a scons: Specify C99 throughout all the tree.
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.

Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2008-12-30 17:13:38 +00:00
José Fonseca
42d0079002 rtasm: Remove spurious semi-colons after function bodies. 2008-12-30 17:06:51 +00:00
José Fonseca
8e63beff56 gdi: Remove accidental keypresses. 2008-12-30 16:35:46 +00:00
Brian Paul
49a3fabed8 mesa: updated compilation documentation 2008-12-30 07:57:16 -07:00