Commit Graph

44 Commits

Author SHA1 Message Date
Brian
0fbc4c51a0 Rework _mesa_update_texture_compare_function() to only be called during
state validation/update.

Note that we're still temporarily skipping the test for an active fragment
program.  Need to fix shadow2D() ...
2007-06-11 17:16:18 -06:00
Brian
0186f1bc83 Temporarily disable the calls to _mesa_update_texture_compare_function().
This fixes the depth-peel regression reported by Brad King.
2007-06-11 16:04:36 -06:00
Ian Romanick
7b559a9102 Add support for GL_ARB_fragment_program_shadow. 2007-06-07 13:58:50 -07:00
Ian Romanick
84d1b24647 Fix ARB_fp spec conformance bug WRT shadow sampling.
The ARB_fp (and other assembly-level fragment program specs) say that the
depth comparison function is always GL_NONE in fragment program mode.
2007-06-07 13:38:06 -07:00
Brian
eab6e16522 remove some unneeded code in init_machine() 2007-05-11 15:12:40 -06:00
Brian
60d136f63c changes to get DDX/DDY working again 2007-05-02 18:45:44 -06:00
Brian
af0ae93863 only load front/back face attrib if using a shader (bug 10788) 2007-04-28 08:51:23 -06:00
Brian
ced6f76404 undo a test/debug change 2007-04-21 10:05:05 -06:00
Brian
8b5fce6bcc Put gl_program_machine into swrast structure rather than using a local variable.
Basically an easy way to make sure the memory gets initialized once (to zero)
to avoid lots of valgrind warnings.
2007-04-19 14:24:10 -06:00
Brian
17ad1d12eb Check if FRAG_RESULT_COLR is written and update span->interpMask, arrayMask.
Also, fix an assertion.
2007-03-13 10:53:16 -06:00
Brian
1c09bcfdda Implement support for GL_ARB_draw_buffers with GL_MAX_DRAW_BUFFERS > 1.
GL_MAX_DRAW_BUFFERS is currently 4.
Added gl_FragData[] output for fragment programs.
In _swrast_write_rgba_span() loop over the color outputs/renderbuffers.
2007-03-11 17:00:39 -06:00
Brian
10b5895597 Implement gl_FrontFacing for fragment shaders.
For the time being, we put the gl_FrontFacing value in the FOGC.Y input
register.  Combining FOGC and FrontFacing in one register is a bit of a
hack and may need to be changed someday.
2007-03-10 11:30:19 -07:00
Brian
4e53ce81cf remove unneeded includes 2007-02-25 20:05:22 -07:00
Brian
8b34b7da41 remove 'maxInst' parameter from _mesa_execute_program() 2007-02-25 18:26:50 -07:00
Brian
085d7d59f0 remove unused 'element' parameter from _mesa_execute_program() 2007-02-25 18:23:37 -07:00
Brian
f6803de739 Use the new unified vertex/fragment program interpreter from prog_execute.c.
Currently, DDX, DDY don't work.
2007-02-22 16:08:01 -07:00
Brian
3ed1acd13c use MAX_PROGRAM_ENV_PARAMS 2007-02-22 14:57:40 -07:00
Brian
501ee87180 Lots of changes to prog_print.c code.
Mainly, allow printing programs in either ARB, NV or "debug" formats.
2007-02-17 09:15:00 -07:00
Brian
34af2b7194 consolidate BRA with BRK, CONT 2007-02-08 14:10:19 -07:00
Brian
97125fb370 Simplify code with eval_condition(). Implement conditional BRK. 2007-02-08 13:22:31 -07:00
Brian
4aa487e796 Use IR_LOOP to represent do-while and for-loops.
Also, start moving high vs. low-level instruction selection into slang_emit.c
2007-02-07 15:12:13 -07:00
Brian
1f99a7514e BRK and CONT work the same 2007-02-06 22:34:09 -07:00
Brian
f22ed0986a Implement CONT, improve BRK.
IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes.
After emitting loop, walk over the linked list, filling in the CONT/BRK
instruction's BranchTarget field (location of the ENDLOOP instruction, or
one past).
2007-02-06 22:31:19 -07:00
Brian
2755c798f3 BRK instruction's BranchTarget field now used for efficiently breaking out of loops.
BRK's BranchTarget field actually points to the top of the loop, not the
bottom, since we don't know the later's location yet.  In the interpreter,
basically do an indirect jump to update the PC.
2007-02-05 18:01:02 -07:00
Brian
8608079647 Use IR node's BranchNode field for IF/ELSE/ENDIF instructions.
This allows us to back-patch the IF/ELSE instruction's BranchTarget field
to point to the location of the ELSE/ENDIF instructions.  No longer have to
search for ELSE/ENDIF in the interpreter.  Also makes it trivial to translate
IF/ELSE instructions into conditional/unconditional BRA instructions.
2007-02-05 17:18:10 -07:00
Brian
cf92c72797 Initial implementation of high-level flow-control instructions.
IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work.
Disabled by default though until better tested.
Implemented IR_NOT, but needs optimization.
2007-02-05 15:00:07 -07:00
Brian
01001d80e2 Initial support of loop and subroutine instructions.
New high-level flow-control instructions, both at IR level and GPU instructions
for looping and subroutines.
2007-02-05 11:28:15 -07:00
Brian
2f5b3c9607 fix maxInst argument 2007-02-02 11:37:58 -07:00
Brian
531348e814 simplify derivative-related code 2007-02-02 11:20:08 -07:00
Brian
9ab512ad8c Replace color, z, w, texture interpolants with new generic attrib interpolants. 2007-02-02 11:01:01 -07:00
Brian
462d8f5faf New span attrStart/attrStepX/attrStepY fields to replace fog, specular, etc. fields. More to come. 2007-02-02 09:46:43 -07:00
Brian
f3e507ef9f New SWspanarrays attribs[] array.
Replace texcoord[], varying[], etc. arrays with single attribs[] array, indexed
by FRAG_ATTRIB_* values.
Eliminates need to copy data into fragment program machine input registers.
Will lead to future clean-ups.
2007-02-01 09:51:48 -07:00
Brian
f673b24017 additional assertions, bump up MAX_EXEC 2007-02-01 08:18:03 -07:00
Brian
7aece10039 noise functions 2007-01-28 19:01:35 -07:00
Brian
ff13f0ea4d fixes, clean-ups, transpose span->varying array indexing 2007-01-25 10:52:48 -07:00
Brian
223d7cb3c7 fix g++ warnings/errors 2007-01-23 16:37:51 -07:00
Brian
5ae49cf3ed Initial implementation of OPCODE_IF/ELSE/ENDIF instructions. 2007-01-20 09:27:40 -07:00
Brian
0bad236cfb Added OPCODE_INT to convert 4 floats to 4 ints. 2007-01-17 15:54:14 -07:00
Brian
5e75db12d7 more debug code (disabled) 2007-01-09 17:47:13 -07:00
Brian
41a4e828d9 check if _Current == NULL for TXB 2007-01-08 16:49:43 -07:00
Brian
d22079217c Added instruction counter to catch infinite loops (temporary). 2006-12-18 16:22:27 -07:00
Brian
0031ea7d85 fix comment, handle NOP 2006-12-16 12:52:55 -07:00
Brian
c968d3d410 Renamed s_nvfragprog.[ch] to s_fragprog.[ch] 2006-12-15 08:50:02 -07:00
Brian
865f88afc0 Renamed from s_nvfragprog.[ch] 2006-12-14 15:14:14 -07:00