Commit graph

12190 commits

Author SHA1 Message Date
Michel Dänzer
86a03e43ce Double amount of memory allocated for generated shader code.
The code generated for the glxgears vertex shader didn't fit, causing a crash.
2007-10-03 20:35:19 +02:00
Michel Dänzer
344464bf2e Track fragment and vertex shader code generation via pipe shader state objects.
Unfortunately, the generated fragment shader code is effectively unusable until
it handles quad->mask.
2007-10-03 20:33:23 +02:00
Michel Dänzer
ce765a7fb7 intel_winsys: Adapt to DRM changes (again).
It was decided after all to stick to 'pipes' here, even though the actual
meaning is now 'planes'.
2007-10-03 18:39:39 +02:00
Zack Rusin
07cd46d111 In vertex shaders also expect the template to be stack allocated
structure so allocate a private copy of it.
2007-10-03 12:01:18 -04:00
Zack Rusin
b46926c4be Unify the definitions of the 4 component dot product into one
location.
2007-10-03 10:33:38 -04:00
Zack Rusin
cdd38d487a Unify handling of userplanes and regular planes to simplify
the clipping code.
(really done by Keith)
2007-10-03 10:33:38 -04:00
Zack Rusin
a7e997cfc5 Get rid of ST_NEW_SHADER flag and the dependency on _NEW_PROGRAM
which is being hit all the time. Done by Keith really.
2007-10-03 10:33:38 -04:00
Zack Rusin
5e4309ee92 Explain a little better what we're doing here. 2007-10-03 08:50:27 -04:00
Zack Rusin
51345cb3c4 Make softpipe behave more like a real driver by always allocating something
in the state functions.
2007-10-03 08:47:36 -04:00
Brian
4b6cc36b2b clean-ups 2007-10-02 19:44:55 -06:00
Brian
355f8f7eed Implement/use fragment kill results 2007-10-02 19:16:57 -06:00
Brian
ff9949d05c Implement TGSI_OPCODE_SNE with micro_ne() 2007-10-02 17:13:06 -06:00
Brian
066ccec494 Separate TGSI_OPCODE_KIL and TGSI_OPCODE_KILP (predicated).
These correspond to the NV and ARB-style fragment program KIL instructions.
The former is really supposed to examine the NV condition codes but Mesa's
GLSL compiler always emits unconditional KIL instructions.
2007-10-02 17:07:30 -06:00
Brian
ca34912bf7 assert that program length > 1 (some code, plus END) 2007-10-02 16:57:19 -06:00
Brian
ae28d19bbf added MESA_FORMAT_Z16 in st_mesa_format_to_pipe_format(), for Glean 2007-10-02 16:56:02 -06:00
Brian
d781cdc8fa Generate a texenv fragment program if there's a GLSL vertex shader but no GLSL fragment shader.
This allows Glean glsl1 test to get pretty far.
2007-10-02 16:55:21 -06:00
Brian
c9dceb17c0 Push mask stacks upon CAL, pop upon RET.
Still need to handle conditional RET statements...
2007-10-02 16:24:40 -06:00
Brian
4d155a32d2 added license and interpreter comments 2007-10-02 16:17:34 -06:00
Brian
53a6a55c7c Implement CONT statement. 2007-10-02 16:05:07 -06:00
Brian
fe1d15acc7 added micro_trunc(), re-order some code 2007-10-02 15:17:37 -06:00
Brian
8955bc3458 Minor optimization: no-op CAL when ExecMask==0x0. 2007-10-02 14:25:43 -06:00
Brian
6aab3e3d26 Added TGSI_FILE_OUTPUT case in fetch_src_file_channel().
GLSL output variables (such as vertex varyings) can be read (they're not
write-only).
2007-10-02 14:17:47 -06:00
Brian
4ad80ad5cf Implement CAL/RET and a call stack for subroutines.
The glsl/brick.c shader demo runs now.
2007-10-02 14:05:21 -06:00
Brian
5e49ec339d Added TGSI_OPCODE_END
Halt program execution when we get to END instruction.  The GLSL compiler
puts subroutines after the end instruction so we have to stop before then.
2007-10-02 13:49:38 -06:00
Brian
4726489248 Fold expand_program() into tgsi_exec_prepare() 2007-10-02 13:41:56 -06:00
Brian
e2009d0871 no more need for tgsi_exec_machine_run2(), remove dead code 2007-10-02 11:49:43 -06:00
Brian
9ac03856f5 remove dead code 2007-10-02 11:47:21 -06:00
Brian
0d13ade0cd Move tgsi machine state init/allocations so they're done less frequently.
This, plus expanding all instructions ahead of time, seems to have improved
the performance of program execution by 8x or so.
2007-10-02 11:46:11 -06:00
Brian
57d3770f35 checkpoint: unpack all instructions before interpretation. Actual looping works. 2007-10-02 10:38:56 -06:00
Brian
cdf99a9fad comments/code for min/max_lod - revisit someday 2007-10-01 18:10:53 -06:00
Brian
4c19f95a39 use i915_miptree_layout when using an i915 2007-10-01 15:39:15 -06:00
Brian
f8b2148a2b avoid updating vertex format when it doesn't really change 2007-10-01 14:46:19 -06:00
Brian
a24031d50c don't crash in RasterPos if feedback not implemented yet 2007-10-01 13:55:16 -06:00
Brian
3c41589420 disable debug printf 2007-10-01 13:54:37 -06:00
Brian
726060680b don't crash when fog enabled, still not rendered correctly though 2007-10-01 13:54:24 -06:00
Brian
dab288b982 remove specular color assertion (the path works) 2007-10-01 13:50:24 -06:00
Brian
b13618c316 fix a few vert/frag program items to get i915 driver going again 2007-10-01 13:45:53 -06:00
Brian
2727cfddbf hack in some code to test loops, break 2007-09-29 10:44:05 -06:00
Brian
78f3cd1e08 Initial conditional execution support for loops and BRK instruction.
Also, instead of passing cond mask to each micro op, just apply it in the
store_dest() function.
2007-09-29 10:43:29 -06:00
Brian
91550f0a17 remove unused tgsi_exec_cond_* types 2007-09-29 09:51:11 -06:00
Brian
9405ec6251 temporary hack to test nested conditionals 2007-09-28 21:04:56 -06:00
Brian
fc38c82771 Initial implementation of IF/ELSE/ENDIF using conditional masking.
mach->CondMask controls writing to each of the 4 components in a quad.
mach->CondMaskStack handles nested conditionals.
Only a few of the micro ops (add/sub/mul/store) have been updated to obey CondMask at this time.
2007-09-28 21:04:34 -06:00
Brian
ae7f200788 fix bug causing unnecessary translations 2007-09-28 20:31:24 -06:00
Brian
bbcbd362a9 remove old debug code, fix warning 2007-09-28 16:20:10 -06:00
Brian
78876bf61c fix st_use_program() 2007-09-28 16:19:51 -06:00
Brian
636480cc9c Instead of linked program pairs, keep a list of vertex programs translated for each fragment program. 2007-09-28 15:39:39 -06:00
Brian
f14ece2d2c Use texture->first_level, not 0, when not mipmapping.
Fixes crash when GL_BASE_LEVEL!=0.
Also, remove old assertion.
2007-09-28 15:39:39 -06:00
José Fonseca
f971bdc051 Gallium's doxygen documentation. 2007-09-28 18:48:15 +01:00
José Fonseca
59424e2d34 Update x86's static and profile configs. 2007-09-28 18:18:50 +01:00
Zack Rusin
8731e391f5 Use sse only if GALLIUM_SSE is defined 2007-09-28 12:29:30 -04:00