Commit graph

41852 commits

Author SHA1 Message Date
Brian Paul
fb7a8dedfa softpipe: rename some functions for consistency 2011-01-18 14:02:01 -07:00
Henri Verbeet
9e964baaf3 r600g: Kill trailing whitespace. 2011-01-18 20:57:04 +01:00
Henri Verbeet
7e2e8d09f7 r600g: Remove the unused eg_states_inc.h and r600_states_inc.h. 2011-01-18 20:57:04 +01:00
Henri Verbeet
495dec0a2b r600g: Simplify some r600_bc_add_alu_type() calls to r600_bc_add_alu(). 2011-01-18 20:57:04 +01:00
Brian Paul
90ff6178a2 vbo: initialize num_instances in a few places
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=33247
There might still be some issues with drawing multiple instances
with VBO splitting to investigate someday.
2011-01-18 12:18:32 -07:00
Eric Anholt
d5a53ad271 ra: Take advantage of the adjacency list in finding a node to spill.
This revealed a bug in ra_get_spill_benefit where we only considered
the benefit of the first adjacency we were to remove, explaining some
of the ugly spilling I've seen in shaders.  Because of the reduced
spilling, it reduces the runtime of glsl-fs-convolution-1 36.9% +/-
0.9% (n=5).
2011-01-18 10:17:50 -08:00
Eric Anholt
ea8e21856e ra: Remove unused "name" field in regs. 2011-01-18 10:17:48 -08:00
Eric Anholt
604022abed ra: Take advantage of the adjacency list in ra_select() too.
Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).
2011-01-18 10:17:44 -08:00
Eric Anholt
7cf648da63 ra: Add an adjacency list to trade space for time in ra_simplify().
This was recommended in the original paper, but I figued "make it run"
before "make it fast".  Now we make it fast.  Reduces the runtime of
glsl-fs-convolution-1 by 12.7% +/- 0.6% (n=5).
2011-01-18 10:17:40 -08:00
Eric Anholt
58c988ada5 glsl: Skip the rest of loop unrolling if no loops were found.
Shaves 1.6% (+/- 1.0%) off of ff_fragment_shader glean texCombine time
(n=5).
2011-01-18 10:17:37 -08:00
Eric Anholt
754b9c5363 ra: Trade off some space to get time efficiency in ra_set_finalize().
Our use of the register allocator in i965 is somewhat unusual.
Whereas most architectures would have a smaller set of registers with
fewer register classes and reuse that across compilation, we have 1,
2, and 4-register classes (usually) and a variable number up to 128
registers per compile depending on how many setup parameters and push
constants are present.  As a result, when compiling large numbers of
programs (as with glean texCombine going through ff_fragment_shader),
we spent much of our CPU time in computing the q[] array.  By keeping
a separate list of what the conflicts are for a particular reg, we
reduce glean texCombine time 17.0% +/- 2.3% (n=5).

We don't expect this optimization to be useful for 915, which will
have a constant register set, but it would be useful if we were switch
to this register allocator for Mesa IR.
2011-01-18 10:17:34 -08:00
Brian Paul
5b58b8c579 softpipe: added some null pointer checks
This shouldn't really be needed but it may help with
http://bugs.freedesktop.org/show_bug.cgi?id=32309
2011-01-18 09:59:28 -07:00
Brian Paul
c97e4532bb softpipe: s/tex_cache/fragment_tex_cache/
Just to be more consistant with the vertex and geometry tex cache fields.
2011-01-18 09:59:28 -07:00
José Fonseca
843f537cfb Remove executables from source tree. 2011-01-18 15:25:30 +00:00
Andre Maasikas
4ef3e261a4 r600c: preserve correct buffer when using fbo
Hopefully better than previous - this passes more mipgen tests
2011-01-18 16:25:19 +02:00
Andre Maasikas
0a85845c9e r600: set border color as RGBA
border color is RGBA for samples - this passes texenv tests
2011-01-18 16:21:14 +02:00
Andre Maasikas
52fbff2130 r600c: use STATE_FB_WPOS_Y_TRANSFORM variable to do wpos transform
use introduced STATE_FB_WPOS_Y_TRANSFORM variable (thanks Marek)
this gets coords also right when using fbo
2011-01-18 16:21:13 +02:00
Eric Anholt
e4be665bbd i965: Fix dead pointers to fp->Parameters->ParameterValues[] after realloc.
Fixes texrect-many regression with ff_fragment_shader -- as we added
refs to the subsequent texcoord scaling paramters, the array got
realloced to a new address while our params[] still pointed at the old
location.
2011-01-17 16:27:55 -08:00
Brian Paul
96a2e89dde llvmpipe: enable PIPE_CAP_INDEP_BLEND_FUNC
The driver was saying that independend blend functions was not supported,
but it really was.  The driver was using the per-target independend blend
factors but the state tracker was only setting the 0th one (per the
Gallium spec).

Fixes a piglit fbo-drawbuffers2-blend regression.
See https://bugs.freedesktop.org/show_bug.cgi?id=33215
2011-01-17 16:51:13 -07:00
Brian Paul
afeebecd95 st/mesa: move PIPE_CAP_INDEP_BLEND_FUNC code 2011-01-17 16:51:12 -07:00
Chad Versace
774750a32f doxygen: Add doxyfile for glsl module 2011-01-17 13:52:40 -08:00
Chad Versace
a54e2de4bb glsl: Refresh autogenerated parser files 2011-01-17 10:20:47 -08:00
Chad Versace
a9bf8c12ee glsl: Remove redundant semantic check in parser
The removed semantic check also exists in ast_type_specifier::hir(), which
is a more natural location for it.

The check verified that precision statements are applied only to types
float and int.
2011-01-17 10:20:47 -08:00
Chad Versace
08a286c9cc glsl: Add support for default precision statements
* Add new field ast_type_specifier::is_precision_statement.
* Add semantic checks in ast_type_specifier::hir().
* Alter parser rules accordingly.
2011-01-17 10:20:47 -08:00
Chad Versace
889e1a5b6c glsl: Add semantic checks for precision qualifiers
* Check that precision qualifiers only appear in language versions 1.00,
  1.30, and later.
* Check that precision qualifiers do not apply to bools and structs.

Fixes the following Piglit tests:
* spec/glsl-1.30/precision-qualifiers/precision-bool-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-02.frag
2011-01-17 09:41:25 -08:00
Chad Versace
33279cd2d3 glsl: Fix parser rule for type_specifier
Do not assign a value to ast_type_specifier::precision when no precision
qualifier is present.
2011-01-17 09:41:25 -08:00
Chad Versace
aaa31bf8f4 glsl: Change default value of ast_type_specifier::precision
Change default value to ast_precision_none, which denotes the absence of
a precision of a qualifier.

Previously, the default value was ast_precision_high. This made it
impossible to detect if a precision qualifier was present or not.
2011-01-17 09:41:25 -08:00
Chad Versace
1eb0f17fa4 glsl: Check that 'centroid in' does not occur in vertex shader
The check is performed only in GLSL versions >= 1.30.

From section 4.3.4 of the GLSL 1.30 spec:
   "It is an error to use centroid in in a vertex shader."

Fixes Piglit test
spec/glsl-1.30/compiler/storage-qualifiers/vs-centroid-in-01.vert
2011-01-17 09:41:25 -08:00
Chad Versace
8faaa4a672 glsl: Check that interpolation quals only apply to vertex ins and fragment outs
The check is performed only in GLSL versions >= 1.30.

Fixes the following Piglit tests:
* spec/glsl-1.30/compiler/interpolation-qualifiers/fs-smooth-02.frag
* spec/glsl-1.30/compiler/interpolation-qualifiers/vs-smooth-01.vert
2011-01-17 09:41:25 -08:00
Chad Versace
605aacc67d glsl: Check that interpolation qualifiers do not precede 'varying'
... and 'centroid varying'. The check is performed only in GLSL
versions >= 1.30.

From page 29 (page 35 of the PDF) of the GLSL 1.30 spec:
   "interpolation qualifiers may only precede the qualifiers in, centroid
    in, out, or centroid out in a declaration. They do not apply to the
    deprecated storage qualifiers varying or centroid varying."

Fixes Piglit test
spec/glsl-1.30/compiler/interpolation-qualifiers/smooth-varying-01.frag.
2011-01-17 09:41:24 -08:00
Chad Versace
0e2f8936c8 glsl: Add method ast_type_qualifier::interpolation_string()
If an interpolation qualifier is present, then the method returns that
qualifier's string representation. For example, if the noperspective bit
is set, then it returns "noperspective".
2011-01-17 09:41:24 -08:00
Brian Paul
5a64626ee5 vbo: init num_instances in split_prims()
Fixes a VTK regression after adding GL_ARB_draw_instanced.
2011-01-17 09:56:58 -07:00
Brian Paul
6179f7e38e tnl: assert that num_instances > 0 2011-01-17 09:40:16 -07:00
Brian Paul
72f2551017 mesa: s/primcount/numInstances/
primcount is also a parameter to glMultiDrawElements().  Use numInstances
to avoid confusion between these things.
2011-01-17 09:33:49 -07:00
Dave Airlie
2bf52e7c28 nouveau: fix build against out of tree libdrm
For doing builds against a separated libdrm these cflags are needed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-17 15:42:34 +10:00
Christian König
ef3b8042e0 r600g: fix PIPE_CAP_INSTANCED_DRAWING warning 2011-01-16 23:52:53 +01:00
Christian König
b61afe13f1 r600g: fix alu inst group merging for relative adressing 2011-01-16 21:43:17 +01:00
Christoph Bumiller
a4742c6a07 nvc0: fix and enable instanced drawing and arrays 2011-01-16 14:10:46 +01:00
Chia-I Wu
326332a130 d3d1x: Fix broken build.
st/egl native.h changed its interface in
a22a332fc7.
2011-01-16 20:58:17 +08:00
Brian Paul
d136d1d2e1 mesa: minor tweaks in _mesa_set_fetch_functions() 2011-01-15 20:41:26 -07:00
Brian Paul
aad7219f80 mesa: add comment for _mesa_get_srgb_format_linear() 2011-01-15 20:41:06 -07:00
Brian Paul
bfad484505 mesa: move declarations before code 2011-01-15 20:37:57 -07:00
Dave Airlie
608ccfe316 docs: add GL_EXT_texture_sRGB_decode to relnotes 2011-01-16 12:54:57 +10:00
Dave Airlie
527bf67682 gallium: add EXT_texture_sRGB_decode.
This uses a sampler view to access the texture with the alternate format.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-16 12:54:07 +10:00
Dave Airlie
9b1a15e1cb i965: add support for EXT_texture_sRGB_decode
We just choose the texture format depending on the srgb decode bit
for the sRGB formats.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-16 12:54:06 +10:00
Dave Airlie
edc2dd8e47 mesa/swrast: implement EXT_texture_sRGB_decode
This implements the extension by choosing a different set of texture
fetch functions when the texture parameter changes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-16 12:54:06 +10:00
Christian König
ac6334145e r600d: fix some bugs added reworking literal handling
If a literal slot isn't used it should be set
to 0 instead of an uninitialized value. Also the
channels for pre R700 trig functions were incorrect.
And most important literals were not counted against ndw,
resulting in an invalid force_add_cf detection.
2011-01-16 03:30:25 +01:00
Brian Paul
3bee900a72 docs: document GL_ARB_draw_buffers_blend 2011-01-15 18:38:46 -07:00
Brian Paul
b3ca110594 mesa: implement glGet queries for GL_ARB_draw_buffers_blend 2011-01-15 18:35:45 -07:00
Brian Paul
44c2122a73 mesa: display list support for GL_ARB_draw_buffers_blend functions 2011-01-15 18:35:45 -07:00