Commit graph

13455 commits

Author SHA1 Message Date
Zack Rusin
5022ee43fc Make branching work :) Simply allow output variables as valid
operand inputs when they've been assigned already.
2007-10-24 19:26:09 -04:00
Zack Rusin
1c5fec714d Simplify branch handling. Prepare for proper decleration extraction. 2007-10-24 19:20:32 -04:00
Brian
7636aac54b Fix glDrawElements + VBO rendering when ptr/offset is not zero.
When an index VBO is bound, glDrawElement's indices pointer is really an
offset into the element buffer.  Add that offset to the prims[i].start
value before calling pipe->draw_elements().
Fixes vbo.c conform test.
2007-10-24 14:40:09 -06:00
Brian
40a0b053f7 Revert "Undo indexOffset change (I think, git???)"
This reverts commit 11ce6244a7.
2007-10-24 14:35:40 -06:00
Brian
11ce6244a7 Undo indexOffset change (I think, git???) 2007-10-24 14:34:40 -06:00
Brian
3733b1f2e9 add to git 2007-10-24 12:43:52 -06:00
Brian
f68fce1f1f Implement gl_PointCoord attribute for GLSL fragment shaders.
Contains the normalized fragment position within a point sprite.
2007-10-24 12:38:07 -06:00
Brian
3a345e0003 print CAL label 2007-10-24 12:32:42 -06:00
Brian
e506514dbb fix bug in RET code 2007-10-24 12:32:42 -06:00
Brian
4eafe69a2a better debug output 2007-10-24 12:32:42 -06:00
Brian
76a4fd098f a bit more work for optimizing clears in tile cache (not enabled yet) 2007-10-24 12:32:42 -06:00
Brian
b78e90807a flush pipe in draw_stencil_pixels() 2007-10-24 12:32:42 -06:00
Brian
47f2e97019 get_tile() for z16, z32, s8z24 surfaces needs to return 4 floats per pixel (for depth texture sampling) 2007-10-24 12:32:42 -06:00
Brian
af96043167 added a pipe->flush() call in xmesa_clear() 2007-10-24 12:32:41 -06:00
Zack Rusin
02cf317ed6 Add copyright headers and do some cleanups. 2007-10-24 12:48:06 -04:00
Zack Rusin
9d4b51aab8 Remove the silly function and remove the bogus comment. 2007-10-24 11:41:28 -04:00
Zack Rusin
d76a7b61bb Cleanup some code. 2007-10-24 11:21:05 -04:00
Zack Rusin
5040eefbb7 Implement arl, lerp opcodes and do a first stab at if/endif
handling and branching support.
2007-10-24 11:21:05 -04:00
Zack Rusin
ba823b3ded Implement cross product and abs opcode 2007-10-24 11:21:05 -04:00
Zack Rusin
1248b9776b Implement extended swizzling. 2007-10-24 11:21:05 -04:00
Zack Rusin
743e96eec5 Implement SGE and SLT 2007-10-24 11:21:04 -04:00
Zack Rusin
b04430efd9 Introduce linux-llvm target. Remove the llvm code from the default build for now.
Cleanup some of the debugging output.
2007-10-24 11:21:04 -04:00
Zack Rusin
ba88751716 Align the load/stores. Reduce the amount of debugging output. 2007-10-24 11:21:04 -04:00
Zack Rusin
6815a9af6c Cleanup some of the debugging output code 2007-10-24 11:21:04 -04:00
Zack Rusin
3b772a277f Make lit work but in a very lame way - will have to be rewritten. 2007-10-24 11:21:04 -04:00
Zack Rusin
d4d8d7c468 Muchos fixos. gears kinda works. and cases don't crash.
glorious
2007-10-24 11:21:04 -04:00
Zack Rusin
e9a623d6a6 implement min and max 2007-10-24 11:21:04 -04:00
Zack Rusin
3ae767dd07 Fix some warnings and implement lg2 2007-10-24 11:21:04 -04:00
Zack Rusin
c6a1beb18f Implement frc and floor 2007-10-24 11:21:04 -04:00
Zack Rusin
1c955171c8 Implement ex2 opcode 2007-10-24 11:21:04 -04:00
Zack Rusin
bd38f4d921 Implement dst opcode 2007-10-24 11:21:04 -04:00
Zack Rusin
3c558e17f0 Implement dph opcode 2007-10-24 11:21:04 -04:00
Zack Rusin
7abe3364b2 Implement dot4 opcode 2007-10-24 11:21:04 -04:00
Zack Rusin
e20294be11 Implement pow/rcp and sub opcodes 2007-10-24 11:21:04 -04:00
Zack Rusin
fcbde5e9f4 Add the "add" opcode and assert one vp if an opcode isn't supported 2007-10-24 11:21:03 -04:00
Zack Rusin
b0f8069343 Refactor the tgsi->llvm storage translator 2007-10-24 11:21:03 -04:00
Zack Rusin
3975f34fd3 Implement basic opcode translation and storage translation. 2007-10-24 11:21:03 -04:00
Zack Rusin
fa2962d148 Draw first triangle. Start on the llvm builder. 2007-10-24 11:21:03 -04:00
Zack Rusin
5e0205023e Cleanup some of the testing code. Implement first pass at actually
running shaders in llvm.
2007-10-24 11:21:03 -04:00
Zack Rusin
5ffdada717 Execution engine is a singleton, for now keep it in the pipe. 2007-10-24 11:21:03 -04:00
Zack Rusin
9e6d58fac2 Generate the base shader. 2007-10-24 11:21:03 -04:00
Zack Rusin
2dbba8b024 Implement the conversion and do the initial execution pass. 2007-10-24 11:21:03 -04:00
Zack Rusin
11bc1f015a Stub out some conversion. 2007-10-24 11:21:03 -04:00
Zack Rusin
b2e529982e Initial stab at LLVM integration. 2007-10-24 11:21:03 -04:00
Brian
4664261f8d Fix vertex cache bug that allows multiple vertices to fall into the same slot.
Need to set the slot's bit in draw->vcache.referenced even when there was a
cache hit since flushing the primitive buffer will have cleared the bitfield
but not the cache's vertex indexes.

Fixes a bug found when drawing long triangle fans but could be hit by other
prim types as well.

An alternate fix would be to call draw_vertex_cache_invalidate() from
draw_vertex_cache_unreference().
2007-10-23 15:08:54 -06:00
Brian
3df65af849 added comment 2007-10-23 15:02:02 -06:00
Brian
40e46d0727 In get_vertex(), slot was computed using & 31. Replace with % VCACHE_SIZE.
Also, assert that index is not too large before indexing array.
2007-10-23 12:32:02 -06:00
Brian
be04999982 adjust coords in wide_line() to be conformant 2007-10-23 11:38:17 -06:00
Brian
112a1580f6 properly init dst reg's CondMask/Swizzle fields 2007-10-23 10:54:50 -06:00
Brian
e69943e6dd bump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many instructions 2007-10-23 10:23:01 -06:00