Commit graph

38347 commits

Author SHA1 Message Date
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
Eric Anholt
3dff682b65 i965: Abort on gl_FragDepth in the new FS backend for now.
It hangs the GPU due to FB_WRITE handling being incomplete.  There are
bigger issues to handle first.
2010-08-26 17:06:25 -07:00
Eric Anholt
1a3de23509 i965: Fix up and actually enable the NewShader and NewShaderProgram hooks. 2010-08-26 17:00:30 -07:00
Eric Anholt
fa2deb3ddc i965: Hack in avoidance of c++ reserved keyword in libdrm.
I'm also fixing this upstream in libdrm, but this avoids new libdrm
dependency for the moment.
2010-08-26 15:43:36 -07:00
Eric Anholt
363d0f6774 i965: Add GLSL IR-level source annotation and comments to new FS debug.
This should make debugging way easier, as now we have context for
reading large programs.
2010-08-26 14:55:44 -07:00
Eric Anholt
7268bd82f6 i965: Use the implied move in brw_math() in the new FS. 2010-08-26 14:55:44 -07:00
Eric Anholt
e85f8272d0 i965: Add support for in varyings to the new FS codegen.
At least some tests, like glsl-vs-sign, now work.
2010-08-26 14:55:44 -07:00
Eric Anholt
dcb7c0009b i965: Start building the codegen visitor.
This can successfully emit a real program that generates magenta now.
2010-08-26 14:55:44 -07:00
Eric Anholt
9763d0a82a i965: Start building direct GLSL2 IR to 965 assembly codegen.
Our channel-expressions and vector-splitting changes now happen into a
private copy of the IR that we maintain for ourselves.  Uniform
assignment still happens by the core, so we continue using Mesa IR
generation not just for swrast fallbacks but also for uniform values
(since there's no storage for their contents other than
shader_program->FragmentProgram->Parameters->ParameterValues).  And
most importantly, at the moment no actual codegen is hooked up other
than emitting our favorite color to the framebuffer.
2010-08-26 14:55:44 -07:00
Eric Anholt
c1dfdcb93a i965: Add new pass to split vectors into scalar variables
Combined with the previous pass, this lets other optimization passes
do their work thanks to ir_tree_grafting.  Still have regression in
instruction count with INTEL_NEW_FS, but register count is even
better.
2010-08-26 14:55:44 -07:00
Eric Anholt
3a8ad33dde i965: Add a pass for the FS to reduce vector expressions down to scalar.
This is a step towards implementing a GLSL IR backend for the 965
fragment shader.  Because it has downsides with the current codegen,
it is hidden under the environment variable INTEL_NEW_FS.

This results in an increase in instruction count at the moment (1444
-> 1752 for glsl-fs-raytrace, 345 -> 359 on my demo), because dot
products are turned into a series of multiplies and adds instead of a
custom expansion of MULs and MACs, and by not splitting the variable
types up we don't get tree grafting and thus there are extra moves of
temporary storage.  However, register count drops for the non-GLSL
path (64 -> 56 on my demo shader) because the register allocator sees
all the sub-operations.
2010-08-26 14:55:43 -07:00
Eric Anholt
a1bebf73df i965: Start building 965 FS backend. 2010-08-26 14:55:43 -07:00
Brian Paul
4418a493c2 llvmpipe: fix PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS query
Fixes crashes in glean glsl1 and demos/src/glsl/vert-tex.
See comments for details.
2010-08-26 15:54:51 -06:00
José Fonseca
98ccee9ea6 graw: Add copyright headers to the interfaces. 2010-08-26 22:32:47 +01:00
Eric Anholt
264ba1ab88 ir_to_mesa: Don't assume that an ir_dereference_array is of a variable.
Fixes:
glsl-array-bounds-02 (software)
glsl-array-bounds-04
glsl-array-bounds-06 (software)
glsl-array-bounds-08
2010-08-26 11:23:09 -07:00
Eric Anholt
2db7bb9c66 glsl: Add a quick hack to constant folding to reduce duplicated work.
Reduces runtime of glsl-max-varyings 92% on my system.
2010-08-26 10:53:20 -07:00
Vinson Lee
9b4384c322 st/mesa: Remove unnecessary header. 2010-08-26 10:38:28 -07:00
José Fonseca
64b5a81e19 scons: Fix inverted logic. 2010-08-26 18:29:04 +01:00
Brian Paul
b8c53caac8 docs: update news.html with 7.8.2 release info 2010-08-26 11:24:22 -06:00
Brian Paul
30cd76ebbd docs: remove links to tungstengraphics.com, and misc updates 2010-08-26 11:20:48 -06:00
Brian Paul
59c9144e37 docs: remove link to old memory.html page 2010-08-26 11:20:48 -06:00
José Fonseca
58087b8d27 scons: Add glsl_symbol_table.cpp 2010-08-26 18:19:57 +01:00
Eric Anholt
9629dbf4f2 i965: Add support for destination RelAddr writes in the VS.
Fixes: glsl-vs-varying-array
2010-08-26 09:53:01 -07:00
Eric Anholt
b72c85df55 i965: Fix the test for variable indexing of shader inputs.
Shader inputs appear in source registers, not dst registers.  Catches
unsupported shaders in glsl-fs-varying-array and Humus
RaytracedShadows.
2010-08-26 09:53:01 -07:00
Ian Romanick
de3b40d8cd glsl2: Remove a couple FINISHME comments that have already been resolved 2010-08-26 09:24:58 -07:00