Tom Stellard
7f57530943
r300/compiler: Print debug info for flow control instructions.
2010-07-03 04:27:09 +02:00
Tom Stellard
82d0602c1f
r300/compiler: Enable hardware IF statements for r500 cards.
2010-07-03 04:27:09 +02:00
Tom Stellard
1732751242
r300/compiler: In the peephole optimizer, ELSE should mark the end of a
...
block.
2010-07-03 04:27:09 +02:00
Tom Stellard
29a1d6aee7
r300/compiler: Correctly calculate the max number of iterations for loops.
2010-07-03 04:27:09 +02:00
Tom Stellard
697d666d78
r300/compiler: Handle loops in deadcode analysis.
...
This also allows us to split the loop emulation into two phases. A
tranformation phase which either unrolls loops or prepares them to be
emulated, and the emulation phase which unrolls remaining loops until the
instruction limit is reached. The second phase is completed after the
deadcode analysis in order to get a more accurate count of the number of
instructions in the body of loops.
2010-07-03 04:27:09 +02:00
Kenneth Graunke
83035574db
Refresh autogenerated file builtin_function.cpp.
2010-07-02 18:20:19 -07:00
Kenneth Graunke
7e908a6a27
glcpp: Add #error support.
2010-07-02 18:03:58 -07:00
Kenneth Graunke
2070f9f5be
glsl2: Fix for dead strings being stored in the symbol table.
2010-07-02 18:03:58 -07:00
Kenneth Graunke
e2a358348b
ir_to_mesa: Fix uninitalized value.
2010-07-02 18:03:58 -07:00
Kenneth Graunke
ddc3aa0783
glsl2/builtins: Use vector ops in the 130 version of "sign."
2010-07-02 18:03:58 -07:00
Kenneth Graunke
9a7ac272fb
glsl2/builtins: Use vector ops in "smoothstep."
2010-07-02 18:03:58 -07:00
Brian Paul
91c37599f6
osmesa: remove old renderbuffer before adding new
...
Fixes fd.o bug 10966 when OSMesaMakeCurrent() was called twice.
NOTE: This is a candidate for the 7.8 branch.
2010-07-02 18:22:53 -06:00
Brian Paul
7cc58c1992
mesa: updated instruction comments
2010-07-02 18:22:53 -06:00
Eric Anholt
b0ac07e3de
ir_to_mesa: Fix up implementation of ir_unop_exp.
...
OPCODE_EXP is not to ir_unop_exp what OPCODE_EX2 is to ir_unop_exp2.
It's the weird VP approximation helper opcode. Just implement it with
OPCODE_POW instead.
Fixes glsl-fs-exp.
2010-07-02 17:06:32 -07:00
Eric Anholt
4e7d5d0e74
i965: Add support for the DP2 opcode, which we use for dot(vec2, vec2).
...
The original glsl compiler would generate a.x * b.x + a.y * b.y, which
we would do mul+mul+add for instead of this mul+mac.
Fixes glsl-fs-dot-vec2.
2010-07-02 17:06:23 -07:00
Eric Anholt
8f25d198e5
ir_to_mesa: Add support for scalar * mat, vec * mat.
...
This is not tested by piglit currently.
2010-07-02 17:06:08 -07:00
Eric Anholt
b61f4241f3
ir_to_mesa: Add support for shadow comparison to texture instructions.
...
piglit lacks tests for this currently.
2010-07-02 17:06:06 -07:00
Eric Anholt
d3983ca032
ir_to_mesa: Move projection handling out of ir_tex so txb and txl get it.
...
Fixes:
glsl-fs-texture2dproj-bias
glsl-fs-texture2dproj-bias-2
2010-07-02 17:06:05 -07:00
Ian Romanick
4d962e66e3
glsl2: Print the linking info log in the stand-alone compiler
2010-07-02 14:57:07 -07:00
Eric Anholt
de75dfac4e
ir_to_mesa: Add support for projected non-shadow/bias/lod texturing.
...
Fixes:
glsl-fs-texture2dproj
glsl-fs-texture2dproj-2
2010-07-02 14:50:02 -07:00
Brian Paul
ae8164a67b
mesa: add geometry shader fields to gl_shader_program
...
These 3 fields are per shader-program. Copy them into the geometry
program at link time for convenient access later.
Also, add some missing glGetProgramiv() queries.
2010-07-02 15:36:14 -06:00
Eric Anholt
cab95c228b
ir_to_mesa: Fix sparse swizzling of src regs when a writemask is present.
...
Fixes glsl-fs-texture2d-masked.
2010-07-02 14:08:20 -07:00
Eric Anholt
28faa12dc2
ir_to_mesa: Don't forget to run the Mesa IR optimization passes.
...
With how we generate assignments, the trivial copy propagation in it
is really important, and some drivers will really want the register
allocation, too.
2010-07-02 11:38:02 -07:00
Eric Anholt
9a0e421983
glsl2: Add a pass to break ir_binop_div to _mul and _rcp.
...
This results in constant folding of a constant divisor.
2010-07-02 11:27:06 -07:00
José Fonseca
d981bde384
gallivm: Do 4ubyte AoS texture filtering for any format that can be expressed.
...
Except if it has only one channel, as it would take the same number of
instructions.
2010-07-02 18:45:49 +01:00
José Fonseca
e70b20fa83
gallivm: Use util_format_description::fetch_rgba_8unorm() when available.
2010-07-02 18:45:49 +01:00
José Fonseca
a2d360b915
util: Add a fetch_rgba_8unorm.
...
Not always implemented, but useful in situations where we want 8unorms
and the samples comes as 8unorms as we needlessly convert to/from
floats.
2010-07-02 18:45:49 +01:00
José Fonseca
7071eefdb2
gallivm: Support multiple pixels in lp_build_fetch_rgba_aos().
...
This allows to do the unpacking of formats that fit in 4 x unorm8 in
parallel, 4 pixels at a time.
2010-07-02 18:45:49 +01:00
José Fonseca
eb20c57f03
gallivm: Move lp_build_rgba8_to_f32_soa() to lp_bld_format_soa.c
...
It will be more useful here.
2010-07-02 18:45:49 +01:00
José Fonseca
bb1546f55b
gallivm: Move gather functions to its own module.
...
They need to grow, and they provide basic functionality which is not
specific to sampling.
2010-07-02 18:45:49 +01:00
José Fonseca
e29ef44cf1
gallivm: Check inputs/outputs in lp_build_conv()
2010-07-02 18:45:49 +01:00
José Fonseca
9b69545c42
util: Expose util_format_fits_8unorm().
2010-07-02 18:45:48 +01:00
Brian Paul
6e83420ee0
mesa: fix texenv generation when num color bufs == 0
...
Before, if there were no color buffers enabled (with glDrawBuffers(GL_NONE))
when the texenv program was generated, we'd emit writes to OUTPUT[1] but
the OutputsWritten mask was 0. This inconsistency caused an assertion to
fail later in the Mesa->TGSI translation.
Fixes fd.o bug 28169
NOTE: this is a candidate for the 7.8 branch (and depends on commit
b6b9b17d27 ).
2010-07-02 10:16:08 -06:00
Brian Paul
7a5a0b205e
softpipe: fix incorrect blend func index passed to blend_quad()
...
Need to pass the index indicating which blend terms to use, not which
color buffer we're blending into.
Rename the parameter to blend_quad() and add comments to be more clear
about this.
2010-07-02 09:56:57 -06:00
Brian Paul
fbc6c316d2
softpipe: better assertions
2010-07-02 09:53:08 -06:00
Brian Paul
291bcfd831
mesa: add missing error checks in _mesa_program_parameteri()
2010-07-02 09:09:06 -06:00
Brian Paul
e3c961de36
main: change some GS field types, added comments
2010-07-02 09:07:36 -06:00
Brian Paul
b6b9b17d27
mesa: make the number of draw buffers part of the texenv program key state
...
All the state that effects the program should be in the key.
This didn't help with bug 28169 but is a good fix anyway.
NOTE: this is a low-priority candidate for the 7.8 branch. In practice,
this issue might never be hit.
2010-07-02 08:14:54 -06:00
Brian Paul
e845765f0f
gallium/cso: check for set_vertex_sampler_views != NULL before calling it
...
Not all drivers implement this method.
Fixes regression reported by Chris Rankin and bug 28889.
2010-07-02 08:08:22 -06:00
José Fonseca
53d3f0c788
mesa: Silence warning.
2010-07-02 11:50:01 +01:00
José Fonseca
3cc4301c14
gallivm: Code generate YUV format unpacking.
2010-07-02 11:50:01 +01:00
José Fonseca
37f4c2f906
gallivm: Fix 4 x unorm8 -> 4 x float conversion.
...
Also fix the test.
2010-07-02 11:50:00 +01:00
Dave Airlie
8556b77c56
r600: use gallium list macros instead of making our own.
...
before this change, r600 glxinfo segfaulted in the list code, and I wasn't
debugging another linked list implementation, its 2010 after all.
So add the two missing list macros to the gallium header from X.org list header file (after fixing them), then port all r600 lists to the new header.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-02 15:27:17 +10:00
Ian Romanick
667f4e1940
glsl2: Conditionally allow optional extensions to be enabled
...
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
2010-07-01 20:40:08 -07:00
Ian Romanick
efb6b24223
glsl2: Append _TOK to some parser tokens
...
This prevents conflicts with defines elsewhere in Mesa and allows
including mtypes.h in the compiler.
2010-07-01 20:40:08 -07:00
Ian Romanick
06143ea094
glsl2: Conditionally define preprocessor tokens for optional extensions
...
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
2010-07-01 20:40:08 -07:00
Ian Romanick
2d12236117
glsl2: Define preprocessor tokens for extensions
...
Currently only GL_ARB_draw_buffers and GL_ARB_texture_rectangle are
defined because those extensions are always enabled. This make
tex_rect-03.frag pass.
2010-07-01 20:40:08 -07:00
Ian Romanick
6f0823da09
glsl2: Support AST-to-IR translation of invariant keyword
2010-07-01 20:39:08 -07:00
Brian Paul
44732103b2
mesa: extension flags and version testing for GL 3.x features
2010-07-01 20:03:32 -06:00
Brian Paul
120a9f46cd
mesa: entrypoints for GL 3.1 primitive restart
2010-07-01 20:03:31 -06:00