Vinson Lee
b5ce878fa7
mesa: Reduce header file inclusion in texcompress_fxt1.h.
...
texcompress_fxt1.h doesn't use any additional symbols added by mtypes.h.
2010-08-03 00:04:14 -07:00
Vinson Lee
f7d29d5881
mesa: Reduce header file inclusion in syncobj.h.
...
syncobj.h doesn't use any additional symbols that is added by context.h.
2010-08-02 23:53:23 -07:00
Eric Anholt
c8babd5d9b
glsl2: Fix typo in clamp() constant builtin using uint instead of int.
...
I take back the bad things I've said about the signed/unsigned
comparison warning now.
2010-08-02 17:50:20 -07:00
Eric Anholt
47f305a4fc
ir_to_mesa: Add support for 1.20 uniform initializers.
...
Fixes:
glsl-uniform-initializer-1
glsl-uniform-initializer-2
glsl-uniform-initializer-3
glsl-uniform-initializer-4
glsl1-GLSL 1.20 uniform array constructor
2010-08-02 17:47:35 -07:00
Eric Anholt
5704ed27dd
glsl2: Don't consider uniform initializers as constant expressions.
...
We were happily optimizing away the body of
glsl-uniform-initializer-* to never use the uniforms.
2010-08-02 17:47:35 -07:00
Eric Anholt
b10bb527ea
Initialize a couple of HasIndex2 fields on Mesa IR src regs.
2010-08-02 17:47:35 -07:00
Eric Anholt
26675e37bc
ir_to_mesa: Support for struct uniforms.
...
Fixes glsl-uniform-struct.
2010-08-02 17:47:35 -07:00
Eric Anholt
9c02412cdc
ir_to_mesa: Add a constructor for ir_to_mesa_src_reg.
...
This helps makes sure we don't miss any new fields, and makes totally
uninitialized src_regs be PROGRAM_UNDEFINED.
2010-08-02 17:47:35 -07:00
Carl Worth
1575070bfe
glsl2: Use talloc_zero_size instead of talloc_size to allocate ast_node objects.
...
This is a zero-ing function, (like calloc), to avoid bugs due to
accessing uninitialized values. Thanks to valgrind for noticing the
use of uninitialized values.
2010-08-02 17:27:56 -07:00
Jerome Glisse
f031817450
r600g: split alu block to conform to limit + RCP opcode
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-02 17:41:52 -04:00
Ian Romanick
42f3e7b6d7
glsl_type: Use string key for array type hash
2010-08-02 13:53:33 -07:00
Ian Romanick
955ceef47f
Keep a local copy of the symbol name in the symbol table
...
The symbol_header structure that tracks symbols with a particular name
may have a different (longer) life time than the symbols it tracks.
Not keeping a local copy of the name can lead to use-after-free
errors. For example, the following sequence would trigger such an
error:
char *copy = strdup(name);
_mesa_symbol_table_push_scope(st);
_mesa_symbol_table_add_symbol(st, 0, name, NULL);
_mesa_symbol_table_pop_scope(st);
free(name);
_mesa_symbol_table_find_symbol(st, 0, copy);
With this change, the symbol table keeps a local copy of the name that
has the same life time as the symbol_header for that name. This
resolves some use-after-free errors with built-in functions in the
GLSL compiler.
2010-08-02 13:53:32 -07:00
Ian Romanick
7ffe40532f
glsl2: Clean-up two 'unused variable' warnings
2010-08-02 13:53:32 -07:00
Ian Romanick
cf41c8a0d8
glsl2: Make glsl_types::ctx private again
2010-08-02 13:53:32 -07:00
Eric Anholt
eb7e120f0f
glsl2: Fix expression type in builtin tan().
...
Fixes glsl-fs-tan-1.
2010-08-02 12:33:18 -07:00
Eric Anholt
ee7666b5ac
glsl2: Add validation that talloc ownership of ir_* names is right.
2010-08-02 12:08:52 -07:00
Eric Anholt
e75dbf66d0
glsl2: Fix validation for ir_unop_not.
...
We use vector ir_unop_not to implement builtin not(), and that seems fine.
2010-08-02 12:06:34 -07:00
Eric Anholt
47f3f22311
glsl2: Add support for floating constants like "1f".
...
Fixes glsl-floating-constant-120.
2010-08-02 11:26:43 -07:00
Jerome Glisse
313df41562
r600g: add autogenerated reg definition + debug print cleanup
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-02 14:22:58 -04:00
Eric Anholt
960ba0014a
glsl2: Initialize the ARB_fcc fields of ir_variable.
...
Fixes intermittent failure in glsl-arb-fragment-coord-conventions.
2010-08-02 11:20:32 -07:00
Eric Anholt
b8db38e1c4
glsl2: Also initialize the identifier field of parameter_declarator.
...
The non-named parameter grammar understandably doesn't set the
identifier field. Fixes intermittent failures about void main(void)
{} having a named void parameter.
2010-08-02 11:04:54 -07:00
Eric Anholt
004e924014
glsl2: Fix spelling of "precision" in error output.
2010-08-02 10:59:46 -07:00
Eric Anholt
f311d8e9e9
glsl2: Don't add mesa/program/ as an include dir. Let includes say program/.
2010-08-02 10:59:46 -07:00
Aras Pranckevicius
31747155ea
glsl2: Give the path within src/mesa/ for headers instead of relying on -I.
2010-08-02 10:59:46 -07:00
Aras Pranckevicius
b35703df10
glsl2: initialize is_array and array_size of ast_parameter_declarator
...
The non-array path of glsl_parser.ypp wasn't setting is_array to false.
2010-08-02 10:59:42 -07:00
Mario Kleiner
646d2e9fbc
radeon: Add DRI2 flush extension support, so we synchronize properly.
...
When a DRI2 swap buffer is pending we need to make sure we
have the flush extension so radeon doesn't resume rendering to
or reading from the not yet blitted front buffer.
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28341
https://bugs.freedesktop.org/show_bug.cgi?id=28410
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-08-02 13:29:44 -04:00
Jerome Glisse
3d39f56a87
Revert "radeon: Add DRI2 flush extension to so we synchronize properly."
...
This reverts commit 8446f257b3 .
2010-08-02 13:28:15 -04:00
Marek Olšák
afa925066c
r300g: fix hardlock when using more than one stuffed sprite coords
...
If texture coordinates come from the vertex shader, there are always
4 components in the rasterizer input packet, but if the coordinates
are stuffed (like for point sprites), there are only 2 or 3 components
(based on GB_ENABLE) and if we rasterize more, it locks up.
2010-08-02 17:26:23 +02:00
Mario Kleiner
8446f257b3
radeon: Add DRI2 flush extension to so we synchronize properly.
...
When DRI2 swap buffer is pending (copy buffer not pageflipping)
we need to make sure we have the flush extension so radeon doesn't
resume rendering on the not yet blitted front buffer.
Modified version of Jerome's patch to add flush extension
in the correct place.
This prepares a possible fix for:
https://bugs.freedesktop.org/show_bug.cgi?id=28341
https://bugs.freedesktop.org/show_bug.cgi?id=28410
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-08-02 10:43:51 -04:00
Kristian Høgsberg
1f1928db00
glx: Drop _Xglobal_lock while we create and initialize glx display
2010-08-02 09:53:44 -04:00
Andre Maasikas
d6a5f94ea4
r600: fix sin,cos functions on r600
...
r600 doesnt need the same normalization as r700 - instead it requires
range to be truncated to -pi..pi
I left the range trunc also effective on r700 althouch according the docs
it has sufficent range (-512*PI, +512*PI). The instructions seem
to be used not too often to cause perf loss because of this
Based on patches and testing by Conn Clark and Alain Perrot
2010-08-02 15:11:22 +03:00
Michal Krol
c1f33097f4
util: Fix unpacking of R8G8Bx_SNORM format.
...
Apparently, we must always use integers to perform calculations,
otherwise the results won't match D3D's CxV8U8 definition.
2010-08-02 14:06:37 +02:00
Dave Airlie
4af5f11c32
r600g: add stencil op/func translation
2010-08-02 16:27:15 +10:00
Dave Airlie
3f4ec394b0
r600g: initial alpha test state
2010-08-02 16:27:15 +10:00
Dave Airlie
7bcd39ce50
r600g: add initial blend state.
...
migrates cb_cntl to be regenerated
2010-08-02 16:27:01 +10:00
Dave Airlie
01984cf34f
r600g: set correct tex coord type for rect textures.
2010-08-02 14:56:20 +10:00
Dave Airlie
919750a557
r600g: make r600_db_format static.
...
this isn't used anywhere else yet.
2010-08-02 14:31:49 +10:00
Eric Anholt
6a41626e90
glsl2: Make non-square matrix keywords not keywords pre-120.
...
Fixes glsl-mat-110.
2010-08-01 19:11:10 -07:00
Dave Airlie
aef4500ca4
draw: fix warning in sse code.
...
Not sure if this will actually fix the issue, but it fixes the warning.
2010-08-02 08:57:14 +10:00
Marek Olšák
a87cedbde0
r300g: fix microtiling on RS6xx
...
Getting tiling right has always been tricky.
There are so many subtle details...
2010-08-01 22:16:57 +02:00
Eric Anholt
b42519108d
ir_to_mesa: Add support for MESA_GLSL=log.
...
This is the option that dumps shader source to files in the current
directory.
2010-08-01 11:41:02 -07:00
Eric Anholt
93b10bd353
glcpp: Add a testcase for the failure in compiling xonotic's shader.
...
gcc and mesa master agree that this is OK.
2010-08-01 11:40:07 -07:00
Vinson Lee
9846b06271
mesa: Remove inclusion of compiler.h from mtypes.h.
...
mtypes.h does not use any symbols from compiler.h.
Also add the required headers for files that depended on symbols from
compiler.h but were indirectly including compiler.h through mtypes.h.
2010-07-31 23:04:41 -07:00
Vinson Lee
e7242b6e8a
mesa: Remove unnecessary header from mm.h.
2010-07-31 20:53:42 -07:00
Vinson Lee
ca2ceca5b1
mesa: Add headers containing sybmols used by mm.c.
2010-07-31 20:51:13 -07:00
Vinson Lee
1d74a1674c
r600g: Remove unnecessary header.
2010-07-31 19:23:14 -07:00
Vinson Lee
8b909144a1
mesa: Reduce header file inclusion in get.h.
...
get.h only needs the GL headers.
2010-07-31 16:28:13 -07:00
Vinson Lee
9e75ac7d25
mesa: Include missing headers in vtxfmt.h.
...
Include compiler.h for INLINE symbol.
Include mtypes.h for GLcontext symbol.
2010-07-31 16:15:08 -07:00
Vinson Lee
dda9b80d07
mesa: Include missing header in shared.h.
...
Include mtypes.h for GLcontext symbol.
2010-07-31 16:13:05 -07:00
Vinson Lee
da93fba85d
mesa: Include missing header in restart.h.
2010-07-31 16:10:14 -07:00