summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_shader.c
AgeCommit message (Collapse)Author
2010-09-21r600g: Removed debug code.Tilman Sauerbeck
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20r600g: use pipe context for flushing inside mapJerome Glisse
This allow to share code path btw old & new, also remove check on reference this might make things a little slower but new design doesn't use reference stuff. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-20r600g: Implemented the Z and W component write for the SCS opcode.Tilman Sauerbeck
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20r600g: Honour destination operand's writemask in the SCS implementation.Tilman Sauerbeck
If we are not going to write to the X or Y components of the destination vector we also don't need to prepare to compute SIN or COS. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20r600g: add missing BC_INST wrapper for evergreenDave Airlie
2010-09-19r600g: Fix false and true.Corbin Simpson
2010-09-19r600g; add uses waterfall to asm cf for r6xx.Dave Airlie
On r6xx if an MOVA instruction is emitted we should set this bit.
2010-09-17r600g: move constant buffer creation behind winsys abstraction.Dave Airlie
this paves the way for moving to pb bufmgrs now.
2010-09-17r600g: attempt to abstract kernel bos from pipe driver.Dave Airlie
introduce an abstraction layer between kernel bos and the winsys BOs. this is to allow plugging in pb manager with minimal disruption to pipe driver.
2010-09-16r600g: Use clamped math for RCP and RSQ.Tilman Sauerbeck
This is likely only correct for OpenGL and not other state trackers. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-15r600g: misc cleanupJohn Doe
Avoid using r600_screen structure to get ptr to radeon winsys structure. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-15r600g: Silence uninitialized variable warning.Vinson Lee
2010-09-10r600g: Implemented the y component write for the LOG opcode.Tilman Sauerbeck
This makes the 'vp1-LOG test' piglit test work. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-10r600g: add initial evergreen supportDave Airlie
adds shader opcodes + assembler support (except ARL) uses constant buffers add interp instructions in fragment shader adds all evergreen hw states adds evergreen pm4 support. this runs gears for me on my evergreen
2010-09-08r600g: Added missing r600_bc_add_literal() calls to XPD implementation.Tilman Sauerbeck
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: Added preliminary support for the LOG opcode.Tilman Sauerbeck
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: Added missing abs-ification to RSQ.Tilman Sauerbeck
This makes the 'fp1-RSQ test 2' piglit test work. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-08r600g: split opcodes out and add wrapper around usage.Dave Airlie
This splits the r600 opcodes out of the sq file and adds a wrapper so we can convert to evergreen opcodes later without touching these functions too much.
2010-09-08r600g: add support for constants in memory buffers.Dave Airlie
DX9 constants were in the constant file, and evergreen no longer support cfile. r600/700 can also use constants in memory buffers, so add the code (disabled for now) to enable that as precursor for evergreen.
2010-09-08r600g: abstract the hw states out behind a vtbl.Dave Airlie
this is step one towards evergreen support, it lets us plug in whole new hw level states.
2010-09-02r600g: fix thinko in shadow code.Dave Airlie
spotted by taiu on irc
2010-09-01r600g: refix db/cb stateJerome Glisse
Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01r600g: avoid dynamic allocation of statesJerome Glisse
Make state statically allocated, this kills a bunch of code and avoid intensive use of malloc/free. There is still a lot of useless duplicate function wrapping that can be kill. This doesn't improve yet performance, needs to avoid memcpy states in radeon_ctx_set_draw and to avoid rebuilding vs_resources, dsa, scissor, cb_cntl, ... states at each draw command. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-01r600g: fix glean texCube and shadows.Dave Airlie
add cube and shadow support to the texture code.
2010-08-31r600g: fix up depth write swizzles.Dave Airlie
For some reason r600c, emits extra instructions in the FP to do the depth write output swizzle, I'm not sure this is required, so here I'm doing it in the exports. this fixes the mesa trivial demos tri-depthwrite and tri-depthwrite2, it doesn't fix the glsl1 gl_FragDepth writing test however.
2010-08-31r600g: fix fp-fragment-position test.Dave Airlie
2010-08-31r600g: fix typo in last commitDave Airlie
2010-08-31r600g: fix position input to fragment shader.Dave Airlie
this fixes a few if the fs shader tests, 10 more piglits
2010-08-31r600g: remove unneeded function call from scsDave Airlie
2010-08-31r600g: make LIT work properlyDave Airlie
this is a bit of a workaround, something is wrong with the literal emits here so we just use the trig copy function to copy the immd to a temp at start of op. fix VP/FP LIT tests
2010-08-31r600g: fixup trig functions when input is a literalDave Airlie
So as the trig functions used up the literal spots for the PI work, if the arg0 was an immediate we'd hit failure, so copy the literal before starting. add some tracking of max temp used to avoid trashing temp regs. 5 more piglits, fp1 COS,SCS,SIN tests
2010-08-31r600g: make sure LIT splits constantsDave Airlie
2010-08-31r600g: fix constant splittingDave Airlie
constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.
2010-08-31r600g: fix LIT testsDave Airlie
2010-08-31r600g: add missing literalsDave Airlie
Also add an error if we hit this problem again, we need to do this better possibly tying the literal addition to the last flag. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30r600g: fixup states generation in winsys.Dave Airlie
The current states code had an unhealthy relationship between that had to somehow magically align themselves, editing either place meant renumbering all states after the one you were on, and it was pretty unapproachable code. This replaces the huge types structures with a simple type + sub type struct, which is keyed on an stype enum in radeon.h. Each stype can have a per-shader type subclassing (4 types supported, PS/VS/GS/FS), and also has a number of states per-subtype. So you have 256 constants per 4 shaders per one CONSTANT stype. The interface from the driver is changed to pass in the tuple, (stype, id, shader_type), and we look for this. If radeon_state_shader ever shows up on profile, it could use a hashtable based on stype/shader_type to speed things up. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30r600g: add DST opcode support.Dave Airlie
2010-08-30r600g: add SCS support.Dave Airlie
2010-08-30r600g: fix warning introduced by last commit.Dave Airlie
2010-08-30r600g: add initial relative support to assemblerDave Airlie
passes another ~20 piglits. /me starts to run out low hanging fruit around now.
2010-08-30r600g: add KILP supportDave Airlie
passes glsl1-discard tests
2010-08-30r600g: fix SSG and op3 neg writingDave Airlie
8 more piglits, mainly the two SSG tests.
2010-08-30r600g : add basic loop support.Dave Airlie
Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c. 17 piglits more on r300g.tests.
2010-08-30r600g: use the values from the correct literalsBas Nieuwenhuizen
Created an array for literals as we should not always use the last declared literal. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30r600g: added literals where needed for POW instructionBas Nieuwenhuizen
Fixes size calculation for the bytecode buffer. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-27Revert "r600g: simplify states"Dave Airlie
This reverts commit bd25e23bf3740f59ce8859848c715daeb9e9821f. 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-27r600g: add initial if/else/endif supportDave Airlie
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-27r600g: optimise op2 and swapped op2 emission.Dave Airlie
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-27r600g: add exp support in theory.Dave Airlie
though it isn't passing the test, and this instruction is pure bonghits.
2010-08-27r600g: add DPH support.Dave Airlie