summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_shader.c
AgeCommit message (Collapse)Author
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
2010-08-25r600g: simplify statesJerome Glisse
Directly build PM4 packet, avoid using malloc (no states are bigger than 128 dwords), remove unecessary informations, remove pm4 building in favor of prebuild pm4 packet. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-24r600g: add XPD supportDave Airlie
ported from r600c.
2010-08-24r600g: add CMP support.Dave Airlie
ported from r600c, fixes fp-cmp, glsl1-sqrt*
2010-08-23r600g: export one component per pixel + r7xx uncompression shaderJerome Glisse
We need to always at least export one component (wether it's depth or color. Add valid r7xx shader program for depth decompression. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22r600g: depth buffer likely needs decompression when used as textureJerome Glisse
Before using depth buffer as texture, it needs to be decompressed (tile pattern of db are different from one used for colorbuffer like texture) Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-21r600g: partialy fix texturing from depth buffer + initial support for untilingJerome Glisse
Partialy fix texturing from depth buffer, depth buffer is tiled following different tile organisation that color buffer. This properly set the tile type & array mode field of texture sampler when sampling from db resource. Add initial support to untiling buffer when transfering them, it's kind of broken by corruption the vertex buffer of previous draw. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-20r600g: add POW instructionJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-20r600g: cleanup definition, fix segfault when no valid pixel shaderJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-19r600g: update comments about ALU src operandsAlex Deucher
2010-08-19r600g: add sin/cosDave Airlie
This pretty much ports the code from r600c, however it doesn't always seem to work quite perfectly, but I can't find anything in this code that is wrong. I'm guessing either literal input or constants aren't working always.
2010-08-19r600g: add SSG, SEQ, SGT and SNEDave Airlie
2010-08-18r600g: add FRC, FLR, DDX and DDYDave Airlie
the first two are straight op2's and the DDX/DDY are taken from r600c.
2010-08-18r600g: add SGE and SLE opcodesDave Airlie
fixes fp-set-01 and glsl-fs-step
2010-08-18r600g: add TXB supportDave Airlie
fixes biased texturing tests
2010-08-18r600g: fix TXP vs TEX in shader.Dave Airlie
Don't do perspective for TEX, and also copy input to a temporary for TEX also add tex opcode names
2010-08-18r600g: add two simple tgsi opcodes.Dave Airlie
makes glsl-fs-log2 and glsl1-integer division with uniform var pass
2010-08-17r600g: fix fake pixel outputJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11r600g: accept empty frag prog shaderJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11r600g: add src negation supportJerome Glisse
Should fix few glBitmap cases. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-11r600g: add point/sprite rendering supportJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>