Olivier Galibert
982df3c1a5
llvmpipe: Color slot interpolation can be flat or perspective, not linear.
...
Fixes a bunch of glsl 1.10 interpolation piglit tests.
Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-05-16 13:12:04 +01:00
Brian Paul
550de24c17
llvmpipe: add cast to silence warning
2012-05-11 16:16:11 -06:00
Marek Olšák
bb4c5d72d7
Merge branch 'gallium-userbuf'
...
Conflicts:
src/gallium/docs/source/screen.rst
src/gallium/drivers/nv50/nv50_state.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_draw.c
2012-05-11 16:38:13 +02:00
James Benton
0b0f4628d6
llvmpipe: Added support for color masks in AoS blending.
...
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-05-02 10:12:48 +01:00
Marek Olšák
0b7d48cbad
gallium: add void *user_buffer to pipe_constant_buffer
...
This reduces CPU overhead when updating constants.
2012-04-30 01:18:48 +02:00
Marek Olšák
507337864f
gallium: change set_constant_buffer to be UBO-friendly
2012-04-30 01:09:57 +02:00
Tom Stellard
6b63e25b3d
gallium: Prefix #defines in tgsi_exec.h with TGSI_
2012-01-30 13:37:00 -05:00
José Fonseca
ec4d691474
llvmpipe: Update for TGSI_INTERPOLATE_COLOR.
...
Not thoroughly tested nor reviewed. But should at least prevent the
assertion failure.
2012-01-11 17:35:14 +00:00
Dave Airlie
24668a38d1
llvmpipe: fix blending for intensity formats
...
This fixes the piglit fbo-blending-formats test for standard, ARB_texture_float
and EXT_texture_snorm.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-31 12:37:48 +00:00
José Fonseca
6cf7245f69
llvmpipe: Trim the fragment shader cached based on LLVM IR instruction count.
...
Number of fragment shader variants is not very representative of the
memory used by LLVM, neither is number of shader instructions, as often
texture sampling constitutes most of the generated code.
This change adds an additional trim criteria: least recently used
fragment shader variants will be freed until the total number of LLVM IR
instruction falls below a specified threshold.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-08 17:59:33 +00:00
José Fonseca
f32c7232a8
llvmpipe,draw,gallivm: Ensure we don't walk beyond the end of the shader variant list.
...
u_simple_list.h uses a sentinel element, and not a NULL element. So
ensure list is not empty when reducing the list of shader variants.
Something I noticed while trying to free variants more aggressively.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-08 17:59:33 +00:00
José Fonseca
d7edd5db31
llvmpipe: Remove unused variables.
...
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14 10:06:01 +00:00
José Fonseca
b8d1242c0b
llvmpipe: Prevent segfault during fs variant cache shrinking.
2011-09-29 17:43:38 +01:00
Brian Paul
7e86d9bd8c
llvmpipe: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33284
2011-01-19 18:46:59 -07:00
Brian Paul
652901e95b
Merge branch 'draw-instanced'
...
Conflicts:
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/glsl/ir_set_program_inouts.cpp
src/mesa/tnl/t_vb_program.c
2011-01-15 10:24:08 -07:00
Vinson Lee
442fcd0620
llvmpipe: Remove unnecessary headers.
2010-12-22 00:55:41 -08:00
Brian Paul
1d6f3543a0
gallivm/llvmpipe: implement system values and instanceID
2010-12-08 19:04:11 -07:00
Brian Paul
efc82aef35
gallivm/llvmpipe: squash merge of the llvm-context branch
...
This branch defines a gallivm_state structure which contains the
LLVMBuilderRef, LLVMContextRef, etc. All data structures built with
this object can be periodically freed during a "garbage collection"
operation.
The gallivm_state object has to be passed to most of the builder
functions where LLVMBuilderRef used to be used.
Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_state_setup.c
2010-11-30 16:35:12 -07:00
Brian Paul
2996ce72b1
llvmpipe: add a cast
2010-11-02 11:53:14 -06:00
Brian Paul
9fbf744389
llvmpipe: assign context's frag shader pointer before using it
...
The call to draw_bind_fragment_shader() was using the old fragment
shader. This bug would have really only effected the draw module's
use of the fragment shader in the wide point stage.
2010-11-02 11:50:37 -06:00
José Fonseca
85a08f8fc7
gallivm: Remove the EMMS opcodes.
...
Unnecessary now that lp_set_target_options() successful disables MMX code
emission.
2010-10-28 20:42:02 +01:00
Keith Whitwell
0072acd447
Merge remote branch 'origin/master' into lp-setup-llvm
...
Conflicts:
src/gallium/drivers/llvmpipe/lp_setup_coef.c
src/gallium/drivers/llvmpipe/lp_setup_coef.h
src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c
src/gallium/drivers/llvmpipe/lp_setup_point.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_state_derived.c
src/gallium/drivers/llvmpipe/lp_state_fs.h
2010-10-17 19:09:42 -07:00
José Fonseca
a0add0446c
llvmpipe: Fix bad refactoring.
...
'i' and 'chan' have random values here, which could cause a buffer
overflow in debug builds, if chan > 4.
2010-10-17 09:58:04 -07:00
Keith Whitwell
ac98519c4e
llvmpipe: validate color outputs against key->nr_cbufs
2010-10-15 14:49:13 +01:00
Keith Whitwell
ffab84c9a2
llvmpipe: check shader outputs are non-null before using
2010-10-15 14:49:13 +01:00
Keith Whitwell
0a1c900103
llvmpipe: don't pass frontfacing as a float
2010-10-15 13:27:47 +01:00
Brian Paul
3d7479d705
llvmpipe: code to dump bytecode to file (disabled)
2010-10-14 17:28:24 -06:00
Keith Whitwell
f0bd76f28d
llvmpipe: don't try to emit non-existent color outputs
2010-10-14 14:08:20 +01:00
José Fonseca
95c18abb03
llvmpipe: Unbreak Z32_FLOAT.
...
Z32_FLOAT uses <4 x float> as intermediate/destination type,
instead of <4 x i32>.
The necessary bitcasts got removed with commit
5b7eb868fd
Also use depth/stencil type and build contexts consistently, and
make the depth pointer argument a ordinary <i8 *>, to catch this
sort of issues in the future (and also to pave way for Z16 and
Z32_FLOAT_S8_X24 support).
2010-10-13 15:25:15 +01:00
José Fonseca
986cb9d5cf
llvmpipe: Use lp_tgsi_info.
2010-10-11 13:06:25 +01:00
José Fonseca
307df6a858
gallivm: Cleanup the rest of the flow module.
2010-10-09 21:39:14 +01:00
José Fonseca
d45c379027
gallivm: Remove support for Phi generation.
...
Simply rely on mem2reg pass. It's easier and more reliable.
2010-10-09 20:14:03 +01:00
José Fonseca
cc40abad51
gallivm: Don't generate Phis for execution mask.
2010-10-09 12:55:31 +01:00
Keith Whitwell
5b7eb868fd
llvmpipe: clean up shader pre/postamble, try to catch more early-z
...
Specifically, can do early-depth-test even when alpahtest or
kill-pixel are active, providing we defer the actual z write until the
final mask is avaialable.
Improves demos/fire.c especially in the case where you get close to
the trees.
2010-10-09 11:44:45 +01:00
Keith Whitwell
aa4cb5e2d8
llvmpipe: try to be sensible about whether to branch after mask updates
...
Don't branch more than once in quick succession. Don't branch at the
end of the shader.
2010-10-09 11:44:45 +01:00
Keith Whitwell
d2cf757f44
gallivm: specialized x8z24 depthtest path
...
Avoid unnecessary masking of non-existant stencil component.
2010-10-09 11:44:09 +01:00
Keith Whitwell
954965366f
llvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs
...
Better than GALLIVM_DEBUG if you're only interested in fragment shaders.
2010-10-09 11:43:23 +01:00
Keith Whitwell
40d7be5261
llvmpipe: use alloca for fs color outputs
...
Don't try to emit our own phi's, let llvm mem2reg do it for us.
2010-10-09 11:43:23 +01:00
Keith Whitwell
8009886b00
llvmpipe: defer attribute interpolation until after mask and ztest
...
Don't calculate 1/w for quads which aren't visible...
2010-10-09 11:42:48 +01:00
José Fonseca
1c32583581
gallivm: Only apply min/max_lod when necessary.
2010-10-06 18:50:57 +01:00
José Fonseca
446dbb9217
llvmpipe: Dump a few missing shader key flags.
2010-10-06 11:41:08 +01:00
Keith Whitwell
591e1bc34f
llvmpipe: make debug_fs_variant respect variant->nr_samplers
2010-10-06 11:40:30 +01:00
José Fonseca
87267c71f6
llvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.
...
Makes AoS blending easier, and state more canonical.
2010-09-22 15:02:39 +01:00
José Fonseca
b556bb7c44
llvmpipe: When failing free fs shader too.
2010-09-21 17:51:29 +01:00
Brian Paul
955d76c3d2
llvmpipe: maintain fragment shader state for draw module
2010-09-20 12:52:16 -06:00
Keith Whitwell
5b4c43d985
llvmpipe: use llvm for attribute interpolant calculation
...
Basically no change relative to hard-coded version, but this will
be useful for other changes later.
2010-09-18 08:40:17 +01:00
Keith Whitwell
0986355425
llvmpipe: add DEBUG_FS to dump variant information
2010-09-16 17:34:58 +01:00
Vinson Lee
aeb83928fd
llvmpipe: Initialize variable for potentially unhandled switch case.
2010-09-14 00:17:13 -07:00
Keith Whitwell
67b957781d
llvmpipe: pass linear masks to fragment shader
...
Fragment shader can extract the correct bits for each quad.
2010-09-12 15:03:49 +01:00
José Fonseca
853953dc3c
llvmpipe: Only generate the whole shader specialization for opaque shaders.
...
If not opaque, then the color buffer will have to be read any way,
therefore the specialization is pointless.
2010-09-12 10:15:48 +01:00