Commit graph

38321 commits

Author SHA1 Message Date
Eric Anholt
d20c276618 i965: Don't strip negate/abs flags when assigning uniform locations.
Fixes glsl-algebraic-sub-zero-4.
2010-08-27 14:42:35 -07:00
Eric Anholt
f0aa2d6118 i965: Add missing handling for BRW_OPCODE_SEL.
Fixes 4 piglit tests about min, max, and clamp.
2010-08-27 14:11:25 -07:00
Eric Anholt
38d01c5b27 i965: Mask out higher bits of the result of BRW_CMP producing a boolean.
When it says it sets the LSB, that's not just a hint as to where the
result goes.  Only the LSB is modified.  Fixes 20 piglit cases.
2010-08-27 13:59:36 -07:00
Eric Anholt
4229a93cc7 i965: Fix the types of immediate integer values.
When we're trying to do integer ops, handing a float in doesn't help.
2010-08-27 13:59:36 -07:00
Eric Anholt
41e75cde26 i965: Add translation for RNDD and RNDZ.
Fixes:
glsl-fs-any.
glsl1-integer division with uniform var
2010-08-27 13:59:36 -07:00
Eric Anholt
31c9f468f3 i965: Add support for ir_binop_mod using do_mod_to_fract.
Fixes glsl-fs-mod.
2010-08-27 13:59:36 -07:00
Jerome Glisse
48d8814c03 r600g: fix vbo size
Silence the kernel, vbo size is size - 1.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-27 16:54:00 -04:00
Brian Paul
9ce0d92ae7 mesa: move null ptr check (fdo bug 29843) 2010-08-27 14:35:52 -06:00
Nick Bowler
f57df7f213 mesa: Use the format info to identify packed depth/stencil formats.
Due to a misunderstanding of the Z24_X8 and X8_Z24 formats, the earlier
patch created depth/stencil wrappers for them.  This broke swrast.

Use the format info instead, which only identifies Z24_S8 and S8_Z24 as
packed depth/stencil.  It also has the advantage of being nicer code.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-27 14:31:00 -06:00
Brian Paul
579fce2524 mesa: use atexit() handler to release GLSL compiler memory
This releases a bunch of memory that was showing up as leaks with
valgrind.

If atexit() isn't widely supported we may need to add some #ifdef
tests around the call.
2010-08-27 14:30:59 -06:00
Brian Paul
b820bf979a glsl2: restructure header file for C++ and C inclusion
As it was, the header could not be cleanly #included by a C source.
2010-08-27 14:30:59 -06:00
Brian Paul
1be5d1c887 glsl2: remove 'extern' keyword in .c file 2010-08-27 14:30:59 -06:00
Eric Anholt
53290900db i965: Fix swapped instructions in ir_unop_abs and ir_unop_neg.
Fixes glsl-fs-neg and 5 other tests.
2010-08-27 13:19:28 -07:00
Eric Anholt
2776ad2641 i965: Add generate() handling for AND, OR, XOR.
10 more piglit tests pass.
2010-08-27 13:16:22 -07:00
Eric Anholt
130368f910 i965: Add support for if instructions in the new FS backend.
20 more piglit tests pass.
2010-08-27 13:15:05 -07:00
Eric Anholt
a0ffee2cd7 i965: When encountering an unknown opcode in new FS backend, print its name. 2010-08-27 13:14:52 -07:00
Eric Anholt
40932c1752 i965: Fix the maximum grf counting in the new FS backend.
glsl-algebraic-rcp-rsq managed to use 33 registers, and we claimed to
only use 32, so the write to g32 would go stomping over the precious
g0 of some other thread.
2010-08-27 12:21:40 -07:00
Eric Anholt
166b3fa29d i965: Validate the IR tree after doing our custom optimization passes.
This wouldn't catch the last failure fixed in them, because we don't
validate assignments well (due to the fact that we've got a pretty
glaring inconsistency in how we handle assignment writemasking), but
it could catch other failure we may produce.
2010-08-27 12:19:17 -07:00
Eric Anholt
55ced33675 i965: Add a bit of support for matrices to the new FS. 2010-08-27 12:02:15 -07:00
Eric Anholt
91a037b5e1 i965: Fix destination writemasking in the new FS. 2010-08-27 12:02:15 -07:00
Eric Anholt
0435cb348a i965: Fix swizzling in vector splitting for the new FS backend.
We weren't smearing a component of a split RHS out to reach an unsplit
LHS's writemask, so gl_FragColor (always unsplit) would often get
uninitialized values.

Fixes: glsl-algebraic-add-add-1 (and probably many others).
2010-08-27 12:02:15 -07:00
Zack Rusin
83e3a2d970 graw: fix the build (missing header) 2010-08-27 13:09:38 -04:00
Brian Paul
c8e0970667 mesa: free the fallback texture object in free_shared_state() 2010-08-27 10:51:47 -06:00
Brian Paul
476adf796b mesa: fix double-underscore naming 2010-08-27 10:21:59 -06:00
Keith Whitwell
55f4eab93c llvmpipe: use util_iround in place of round
Fix mingw build.
2010-08-27 13:43:06 +01:00
Keith Whitwell
04f8560dd8 util: fix typo in MAX4
Thanks to Michal for spotting it.
2010-08-27 13:34:12 +01:00
Keith Whitwell
aea6b415de llvmpipe: eliminate tri->dx, tri->dy values
Use an internal struct for line setup information.
2010-08-27 13:08:55 +01:00
Hui Qi Tay
29ec116e8f llvmpipe: point sprites rasterization
Point sprites now done in the rasterizer setup code instead of
going through the draw module.
2010-08-27 13:08:54 +01:00
Hui Qi Tay
2cd72dd459 llvmpipe: native point rasterization with better pixel rasterization
A few subpixel_snap and fixed width changes.

Conflicts:

	src/gallium/drivers/llvmpipe/lp_setup_point.c
2010-08-27 13:08:54 +01:00
Hui Qi Tay
57d84d9ca4 llvmpipe: native point rasterization
Conflicts:

	src/gallium/drivers/llvmpipe/lp_setup_context.h
	src/gallium/drivers/llvmpipe/lp_setup_line.c
	src/gallium/drivers/llvmpipe/lp_setup_tri.c
2010-08-27 13:08:54 +01:00
Keith Whitwell
3783053fa5 llvmpipe: update line rasterization code to current master 2010-08-27 13:08:54 +01:00
Keith Whitwell
e826d0e817 util: add MIN4, MAX4 2010-08-27 13:08:54 +01:00
Hui Qi Tay
b91553355f llvmpipe: native line rasterization with correct pixel rasterization
Line rasterization that follows diamond exit rule.
Can still optimize logic for start/endpoints.
2010-08-27 13:08:54 +01:00
Hui Qi Tay
5286dd7016 llvmpipe: native rasterization for lines
Rasterize lines directly by treating them as 4-sided polygons.
Still need to check the exact pixel rasteration.
2010-08-27 13:08:54 +01:00
Keith Whitwell
c95ca04b63 llvmpipe: add lp_setup_coef to makefile 2010-08-27 11:18:11 +01:00
Keith Whitwell
0be0ad5d58 llvmpipe: intrinsics version of triangle coeficient calculation
Looks nice, but makes almost no impact on performance - maybe
a percent or so in isosurf, nothing elsewhere.  May be of use
later on.
2010-08-27 09:47:22 +01:00
Vinson Lee
af8f037db2 gallium: Remove unnecessary header from p_shader_tokens.h.
Remove p_compiler.h.
2010-08-27 00:40:42 -07:00
Vinson Lee
ec21ed1ce7 tgsi: Include missing header in tgsi_parse.h.
Include p_compiler.h for boolean and INLINE symbols.
2010-08-27 00:34:32 -07:00
Vinson Lee
57421cb464 tgsi: Include missing header in tgsi_info.h.
Include p_compiler.h for uint symbol.
2010-08-27 00:31:27 -07:00
Vinson Lee
0b9b8694d9 tgsi: Include missing header in tgsi_dump.h.
Include p_compiler.h for uint symbol.
2010-08-27 00:26:59 -07:00
Vinson Lee
43ed82bdb2 gallium: Remove unnecessary header from p_format.h.
Remove p_compiler.h.
2010-08-27 00:15:04 -07:00
Vinson Lee
1b83ede8cc graw: Include missing header in graw.h.
Include p_compiler.h for PUBLIC symbol.
2010-08-27 00:07:38 -07:00
Vinson Lee
677623a6c8 r300g: Include missing header in r300_texture.h.
Include p_compiler.h for uint32_t and boolean symbols.
2010-08-27 00:04:50 -07:00
Kenneth Graunke
67ffbbbb5d Fix typo in function name "shading_laguage_version". 2010-08-26 23:07:45 -07:00
Dave Airlie
2184f3ec30 Revert "r600g: simplify states"
This reverts commit bd25e23bf3.

Apart from introducing a lot of hex magic numbers and being highly impenetable code,
it causes lots of lockups on an average piglit run that always runs without lockups.

Always run piglit before/after doing big things like this.
2010-08-27 15:45:58 +10:00
Dave Airlie
a03d456f5a r600g: add initial if/else/endif support
this adds handling for some more CF instructions and conditions
also adds parameter for stack size emission

These seem to pass on VS with the stack size hack but not on FS,

TODO: fix FS + stack size calcs
2010-08-27 15:30:07 +10:00
Dave Airlie
d8fb13bae3 r600g: optimise op2 and swapped op2 emission.
this makes op2 emission smaller, since it skips instructions
that don't write to the dst. not sure if this could have unwanted
side effects but try it and see.
2010-08-27 15:29:04 +10:00
Dave Airlie
36d91be75e r600g: add exp support in theory.
though it isn't passing the test, and this instruction is pure bonghits.
2010-08-27 15:29:04 +10:00
Dave Airlie
e57437ccd6 r600g: add DPH support. 2010-08-27 15:29:03 +10:00
Eric Anholt
a4d97d3726 i965: Add preliminary support for uniforms to the new FS backend.
+269 piglits
2010-08-26 17:11:18 -07:00