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
Ian Romanick
3832706f81
glsl2: Initialize ast_declarator_list::invariant in constructor
2010-07-01 17:10:11 -07:00
Ian Romanick
12873fa4e3
glsl2: Don't bounds check unsize array redeclarations
...
This along with several previous commits fix test CorrectUnsizedArray.frag.
2010-07-01 14:10:19 -07:00
Ian Romanick
127308b4be
glsl2: Add gl_MaxTextureCoords
2010-07-01 13:30:50 -07:00
Ian Romanick
cd00d5b88c
glsl2: Default delcaration of gl_TexCoord is unsized
2010-07-01 13:17:54 -07:00
Dan Nicholson
442c37e2ef
Use GLW_CFLAGS when building libGLw
...
We check for libX11 and libXt, so we might as well use the CFLAGS
pkg-config tells us about.
2010-07-01 13:00:02 -07:00
John Hein
9617254a1e
Use GLUT_CFLAGS when building glut
...
Fix this build error (in MesaGLUT-7.6.1)...
glut_cmap.c:23:66: error: X11/Xmu/StdCmap.h: No such file or directory
...by not preventing the cflags that pkg-config finds for glut dependencies
(including 'xmu') from being used.
Defining GLUT_CFLAGS before running the pkg-config prevents the
cflags found by pkg-config from being used.
This patch lets GLUT_CFLAGS that configure & pkg-config work
so hard to set actually get used.
Also make sure the generated configs/autoconf defines GLUT_CFLAGS
used in (at least) src/glut/glx/Makefile.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-07-01 13:00:02 -07:00
Ian Romanick
5466b63968
glsl2: Change order of semaintic checks on variable declarations
...
This will make it easier to support more (valid) kinds of redeclarations.
2010-07-01 12:56:49 -07:00
Fernando Carrijo
d2fe97a209
mesa: Purge macros NEED_EVENTS and NEED_REPLIES
...
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-07-01 13:07:07 -06:00
Brian Paul
1d298a3764
gallium/cso: unbind sampler views in cso_release_all()
2010-07-01 13:07:07 -06:00
Brian Paul
5b90f83aee
mesa: free xform feedback hash table
2010-07-01 13:07:07 -06:00
Brian Paul
30f46e7b4c
st/mesa: fix comment
2010-07-01 13:07:07 -06:00
Eric Anholt
411fb36b7c
ir_to_mesa: Fill in remaining ops, remove default case for expression types.
...
We should now have support for all the expression types we need for
GLSL 1.20.
2010-07-01 11:24:38 -07:00
Eric Anholt
8761fcc2bf
ir_to_mesa: Add support for ir_unop_rcp.
...
This isn't used at the moment, but will be soon.
2010-07-01 11:23:02 -07:00
Eric Anholt
d1b07167b9
glsl2: Update README for what I've been thinking about with expr types work.
2010-07-01 11:07:58 -07:00
Eric Anholt
8a1f186cc5
glsl2: Add a pass to convert mod(a, b) to b * fract(a/b).
...
This is used by the Mesa IR backend to implement mod, fixing glsl-fs-mod.
2010-07-01 11:07:23 -07:00
Eric Anholt
9acf618f24
glsl2: Remove dead member from dead code visitor.
2010-07-01 11:07:22 -07:00
Eric Anholt
d925c91730
glsl2: Add ir_unop_fract as an expression type.
...
Most backends will prefer seeing this to seeing (a - floor(a)), so
represent it explicitly.
2010-07-01 11:07:22 -07:00
Brian Paul
17c176eb73
llvmpipe: silence pointer type warnings
2010-07-01 09:15:31 -06:00
José Fonseca
8d93f360c5
gallivm: Support 4 x unorm8 in lp_build_fetch_rgba_aos().
...
Uses code and ideas from Brian Paul.
2010-07-01 15:02:17 +01:00
José Fonseca
b919bb7f61
gallivm: Allow to conversions to/from registers of different sizes.
...
Allow for example to convert from 4 x float32 to 4 x unorm8 and vice versa.
Uses code and ideas from Brian Paul.
2010-07-01 15:02:15 +01:00
José Fonseca
a70ec096aa
gallivm: Support extended swizzles in lp_build_swizzle1_aos().
...
And rename to lp_build_swizzle_aos().
2010-07-01 15:02:12 +01:00
José Fonseca
e277d5c1f6
gallivm: Setup a global optimization pass.
...
Modules are still free to setup their own optimization passes, but for the
normal case it should not be necessary.
2010-07-01 15:02:10 +01:00
José Fonseca
83ced5a918
llvmpipe: Remove lp_build_swizzle2_aos().
...
Unnecessary special case.
2010-07-01 15:02:04 +01:00
Eric Anholt
5e4dd061d1
ir_to_mesa: Add support for discard instructions.
...
Fixes glsl-fs-discard-01.
2010-06-30 17:31:06 -07:00
Eric Anholt
f5b3b2a01a
glsl2: Don't break sign() down by vector components.
2010-06-30 17:29:12 -07:00
Eric Anholt
3acd92a91f
ir_to_mesa: Add support for ir_unop_sign.
...
Fixes glsl-fs-sign, glsl-vs-sign.
2010-06-30 17:29:12 -07:00
Eric Anholt
e558786a3e
i965: Add support for OPCODE_SSG.
...
The old compiler didn't use SSG, and instead emitted SGT/SGT/SUB. We
can do a little better for SSG than we do for the SGT series.
2010-06-30 17:29:09 -07:00
Eric Anholt
d6ebe9b16b
ir_to_mesa: Add missing no-op type conversions.
...
Fixes glsl-fs-step.
2010-06-30 16:23:32 -07:00