Eric Anholt
013bbbbb0a
glsl2: Add support for ir_unop_neg to ir_mat_op_to_vec
2010-08-13 17:47:00 -07:00
Eric Anholt
2f4fe15168
glsl2: Move the common optimization passes to a helper function.
...
These are passes that we expect all codegen to be happy with. The
other lowering passes for Mesa IR are moved to the Mesa IR generator.
2010-08-13 17:47:00 -07:00
Kenneth Graunke
c55aa4292f
glsl2: Refresh autogenerated bison parser.
2010-08-13 17:16:43 -07:00
Vinson Lee
07ca55b7fa
Fix an MSVC build error (bugzilla 29570).
2010-08-13 17:11:21 -07:00
Ian Romanick
768b55a526
glsl2: Remove unnecessary use of 'struct' before type names
...
In C++ you don't have to say 'struct' or 'class' if the declaration of
the type has been seen. Some compilers will complain if you use
'struct' when 'class' should have been used and vice versa.
Fixes bugzilla #29539 .
2010-08-13 16:46:43 -07:00
Ian Romanick
d960b61ea3
Add missing intmax_t and uintmax_t
2010-08-13 16:22:38 -07:00
Ian Romanick
a77a6bc008
glsl2: Use stdint.h instead of inttypes.h
2010-08-13 16:22:21 -07:00
Brian Paul
e8000ffeaf
mesa: assorted clean-ups, var type changes, assertions in prog_optimize.c
2010-08-13 15:59:25 -06:00
Benjamin Segovia
9021c56a57
mesa: more/better program optimizations
...
This is the patch from Benjamin's Aug 11, 2010 email with minor fixes
(such as moving declarations before code)
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-13 15:59:25 -06:00
Ian Romanick
23f6017d70
glsl2: Commit generated file changed by previous commit
2010-08-13 14:50:53 -07:00
Ian Romanick
ab18be74ac
glsl2: Use --nounistd to fix MSVC build
...
Also remove the --never-interactive command line option for the
preprocessor lexer. This was already done for main compiler lexer.
2010-08-13 14:50:53 -07:00
Ian Romanick
c33e78f62b
linker: Assign attrib location 0 if gl_Vertex is not used
...
If gl_Vertex is not used in the shader, then attribute location 0 is
available for use.
Fixes piglit test case glsl-getattriblocation (bugzilla #29540 ).
2010-08-13 14:50:48 -07:00
George Sapountzis
5c0a0f2198
st/dri: make dri_drawable_validate_att static
2010-08-13 23:08:02 +03:00
George Sapountzis
c14b4371ed
st/dri: move TFP code to dri_drawable.c
...
This is based on a patch by nobled <nobled@dreamwidth.org> and allows the TFP
extension to be enabled for DRISW also. This patch does not enable TFP for DRISW
though, because testing on xephyr segfaults here (for both classic and gallium):
Program received signal SIGSEGV, Segmentation fault.
0x00786a4a in _mesa_GenTextures (n=1, textures=0xbfffee4c) at main/texobj.c:788
788 ASSERT_OUTSIDE_BEGIN_END(ctx);
(gdb)
(gdb) where
\#0 0x00786a4a in _mesa_GenTextures (n=1, textures=0xbfffee4c) at main/texobj.c:788
\#1 0x0817a004 in __glXDisp_GenTextures ()
\#2 0x08168498 in __glXDispatch ()
\#3 0x0808b6ce in Dispatch ()
\#4 0x08084435 in main ()
The TFP code is generic except for the teximage call. We need to verify that
DRISW correclty implements whatever hook teximage finally calls.
2010-08-13 22:58:11 +03:00
nobled
5270deaab6
st/dri: Fix segmentation fault in sw drivers
2010-08-13 22:57:26 +03:00
George Sapountzis
d3758feb6b
st/dri: dri_drawable_get_format is shared between DRI2 and DRISW
2010-08-13 22:20:19 +03:00
Jakob Bornecrantz
204d4cbea0
glsl2: Include string.h in preprocessor
2010-08-13 18:36:55 +01:00
Ian Romanick
103453659d
glsl2: Commit generated files changed by previous two commits
2010-08-13 09:34:52 -07:00
Ian Romanick
5c77efc0b2
glsl2: Avoid token name collisions with names used by Windows header files
2010-08-13 09:30:56 -07:00
Ian Romanick
5b9f3db719
glsl2: Eliminate tokens for square matrix short names
...
MAT2 and MAT2X2, for example, are treated identically by the parser.
The language version based error checking (becuase mat2x2 is not
available in GLSL 1.10) is already done in the lexer.
2010-08-13 09:29:39 -07:00
José Fonseca
3a3cdb909d
scons: Build the new glsl2 code.
2010-08-13 13:55:34 +01:00
José Fonseca
1ca2945f84
talloc: Make it compile with MSVC, MinGW, and Xcode/gcc4.0.
...
Based on Aras Pranckevičius' patch.
2010-08-13 13:53:04 +01:00
José Fonseca
e6032b1d96
talloc: Import 2.0.1 code.
2010-08-13 12:31:10 +01:00
Vinson Lee
48def868d9
mesa: Clean up header file inclusion in vf.h.
...
Remove mtypes.h.
Include glheader.h for GL symbols.
2010-08-13 01:23:39 -07:00
Vinson Lee
5dbd3fe3d4
swrast: Clean up header file inclusion in ss_vb.h.
...
Remove unnecessary header swrast_setup.h.
2010-08-13 00:48:34 -07:00
Vinson Lee
c7f24afcaf
swrast: Clean up header file inclusion in ss_triangle.h.
...
Remove ss_context.h.
Include mtypes.h for GLcontext symbol.
2010-08-12 23:56:52 -07:00
Vinson Lee
8829e0c3f3
swrast: Clean up header file inclusion in ss_context.h.
...
Remove mtypes.h and swrast_setup.h.
Include glheader.h for GL symbols.
2010-08-12 23:51:16 -07:00
Vinson Lee
db0c6810f9
mesa: Include missing header in programopt.h.
...
Include mtypes.h for GLcontext and gl_register_file symbols.
2010-08-12 23:28:25 -07:00
Marek Olšák
bac59b336b
r300g: do not support separate depth/stencil clear in the driver
...
It doesn't work well with Hyper-Z, so put the burden on the state tracker.
2010-08-13 08:23:06 +02:00
Marek Olšák
aa6bdd38af
r300g: fix fastfill when color and Z clear are invoked separately
...
This always restores the previous depth clear value after CBZB clear.
2010-08-13 04:41:38 +02:00
Marek Olšák
4985ce1755
r600g: update shader caps
...
Sent on ML by Владимир.
These values are what fglrx returns.
2010-08-13 03:28:35 +02:00
Ian Romanick
0dc39f481a
glsl2: Use MIN2 from macros.h instead of open coding it
2010-08-12 18:01:14 -07:00
Marek Olšák
16e782b83f
r300g: disable depth clamp for now
...
It breaks Regnum Online in that it renders random triangles
all over the screen.
https://bugs.freedesktop.org/show_bug.cgi?id=29518
2010-08-13 02:59:01 +02:00
Vinson Lee
06928ba3c3
mesa: fpclassify is available with MinGW.
...
This patch fixes the MinGW build.
2010-08-12 17:37:00 -07:00
Dave Airlie
527ac905f6
r600g: fix warning in the winsys
2010-08-13 10:22:46 +10:00
Dave Airlie
f2804e7062
r600g: fix memory leaks running gears.
...
I noticed gears memory usage was heading skywards, some r600 "states"
aren't properly refcounted, and the ctx->state is never freed.
2010-08-13 10:22:46 +10:00
Vinson Lee
26c042c30a
translate_test: Fix compilation with MSVC.
2010-08-12 17:12:56 -07:00
Vinson Lee
ca70bf8c9d
scons: Add main/querymatrix.c to SCons build.
...
Commit 87eb667759 added querymatrix.c to
make but not to SCons.
2010-08-12 16:34:22 -07:00
Ian Romanick
261bbc011d
glsl2: Use Elements from main/compiler.h instead of open-coding
2010-08-12 15:05:39 -07:00
Brian Paul
c59c6c0122
glsl: print to stderr like other program printing code
2010-08-12 16:00:03 -06:00
Brian Paul
2d83e3fa0d
mesa: check for null shader->InfoLog before printing
2010-08-12 16:00:01 -06:00
Vinson Lee
56450d5f11
mesa: Fix FreeBSD build with llvm enabled.
...
On FreeBSD LC_CTYPE_MASK is not available but 'llvm-config --cppflags'
adds the compiler flag -D_GNU_SOURCE to the build.
2010-08-12 14:54:30 -07:00
Luca Barbieri
b9abe7f62c
translate_test: fix compilation on non-POSIX platforms
...
Use a kludgy function based on rand() instead of drand48()
2010-08-12 22:10:09 +02:00
Ian Romanick
4ca4edd20e
glsl2: Commit generated file changed by previous commit
2010-08-12 10:09:05 -07:00
Ian Romanick
188f60fb05
glsl2: Add missing include of string.h
...
Makes the build happy on non-GCC platforms.
2010-08-12 10:09:05 -07:00
Luca Barbieri
4d946c4e8a
translate_test: improve
...
1. Generate random data specifically for float and doubles, so that
they end up in [0, 1] range
2. Don't test useless conversions like SCALED <-> NORM
3. Poison the buffers before testing
2010-08-12 18:36:21 +02:00
Jakob Bornecrantz
4f51762b07
gallium: Link DRI drivers with g++ and test with CXX
...
New shader compiler need libc++ runtime. This works already if
we are using llvm so this just covers the !llvm case.
2010-08-12 16:04:11 +01:00
Marek Olšák
f668ea11bd
Revert "u_blitter: unify clear_depth_stencil and flush_depth_stencil"
...
This reverts commit de4784e365 .
2010-08-12 13:35:16 +02:00
Andre Maasikas
e62e5b0922
r600: add support for draw_elements_base_vertex
...
use VTX_BASE_VTX_LOC for offset, last time using INDEX_OFFSET was
probably a wrong register for this
2010-08-12 12:44:10 +03:00
Vinson Lee
17bcfaa475
mesa: Clean up header file inclusion in prog_uniform.h.
...
Remove mtypes.h.
Remove prog_statevars.h.
Include glheader.h for GL symbols.
2010-08-12 00:33:48 -07:00