summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_shader.c
AgeCommit message (Collapse)Author
2010-11-19r600g: translate ARR instruction for evergreenAlex Deucher
evergreen variant of: 9f7ec103e26c67cb077fd7d94d2fb68562b86c40
2010-11-19r600g: add fetch shader capabilitiesJerome Glisse
Use fetch shader instead of having fetch instruction in the vertex shader. Allow to restrict shader update to a smaller part when vertex buffer input layout changes. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-11-17r600g: code cleanup (indent, trailing space, empty line ...)Jerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-11-09r600g: translate ARR instructionKeith Whitwell
2010-11-03r600g: propogate resource usage flags to winsys, use to choose bo domainsKeith Whitwell
This opens the question of what interface the winsys layer should really have for talking about these concepts. For now I'm using the existing gallium resource usage concept, but there is no reason not use terms closer to what the hardware understands - eg. the domains themselves.
2010-10-24r600g: Also clear bc data when we're destroying a shader.Tilman Sauerbeck
[airlied: remove unused vars] Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-24r600g: Added r600_pipe_shader_destroy().Tilman Sauerbeck
Not yet complete. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-21r600g: initial translate state supportDave Airlie
2010-10-20r600g: Ensure r600_src is initialized in tgsi_exp function.Vinson Lee
Silences these GCC warnings. r600_shader.c: In function 'tgsi_exp': r600_shader.c:2339: warning: 'r600_src[0].rel' is used uninitialized in this function r600_shader.c:2339: warning: 'r600_src[0].abs' is used uninitialized in this function r600_shader.c:2339: warning: 'r600_src[0].neg' is used uninitialized in this function r600_shader.c:2339: warning: 'r600_src[0].chan' is used uninitialized in this function r600_shader.c:2339: warning: 'r600_src[0].sel' is used uninitialized in this function
2010-10-17r600g: add evergreen ARL support.Dave Airlie
Thanks to Alex Deucher for pointing out the FLT to int conversion is necessary and writing an initial patch, this brings about 20 piglits, and I think this is the last piece to make evergreen and r600 equal in terms of features.
2010-10-15r600g: evergreen interpolation support.Dave Airlie
On evergreen, interpolation has moved into the fragment shader, with the interpolation parmaters being passed via GPRs and LDS entries. This works out the number of interps required and reserves GPR/LDS storage for them, it also correctly routes face/position values which aren't interpolated from the vertex shader. Also if we noticed nothing is to be interpolated we always setup perspective interpolation for one value otherwise the GPU appears to lockup. This fixes about 15 piglit tests on evergreen.
2010-10-15r600g: handle absolute modifier in shader translatorKeith Whitwell
This was being classed as unsupported in one place but used in others. Enabling it seems to work fine. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-14r600g: select linear interpolate if tgsi input requests itDave Airlie
2010-10-14r600g: fixup typo in macro nameDave Airlie
2010-10-14r600g: fixup pos/face ena/address properlyDave Airlie
2010-10-14r600g: only pick centroid coordinate when asked.Dave Airlie
TGSI tells us when to use this, its not hooked up from GLSL to MESA to TGSI yet though.
2010-10-14r600g: Fix texture sampling with swizzled coordsFredrik Höglund
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-13r600g: fix relative addressing when splitting constant accessesStephan Schmid
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-13r600g: add shader stencil export support.Dave Airlie
2010-10-11r600g: add TXL opcode support.Dave Airlie
fixes glsl1-2D Texture lookup with explicit lod (Vertex shader)
2010-10-11r600g: enable vertex samplers.Dave Airlie
We need to move the texture sampler resources out of the range of the vertex attribs. We could probably improve this using an allocator but this is the simple answer for now. makes mesa-demos/src/glsl/vert-tex work.
2010-10-07r600g: fix Z export enable bits.Dave Airlie
we should be checking output array not input to decide. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-07r600g: fix evergreen interpolation setupAndre Maasikas
interp data is stored in gpr0 so first interp overwrote it and subsequent ones got wrong values reserve register 0 so it's not used for attribs. alternative is to interpolate attrib0 last (reverse, as r600c does)
2010-10-05r600g: drop use_mem_constant.Dave Airlie
since we plan on using dx10 constant buffers everywhere.
2010-10-04r600g: allow r600_bo to be a sub allocation of a big boJerome Glisse
Add bo offset everywhere needed if r600_bo is ever a sub bo of a bigger bo. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04r600g: rename radeon_ws_bo to r600_boJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-10-04r600g: the code to check whether a new vertex shader is needed was wrongDave Airlie
this code was memcmp'ing two structs, but refcounting one of them afterwards, so any subsequent memcmp was never going to work. again this stops unnecessary uploads of vertex program,
2010-10-01r600g: Remove unused variable.Vinson Lee
Fixes this GCC warning. r600_shader.c: In function 'tgsi_split_literal_constant': r600_shader.c:818: warning: unused variable 'index'
2010-10-01r600g: setup basic loop consts on r600 + evergreen.Dave Airlie
this sets up a single loop constant like r600c does.
2010-10-01r600g: only set the Z export if shader exports it.Dave Airlie
2010-10-01r600g: add assembler support for other vtx fetch fields.Dave Airlie
this shouldn't change behaviour, just push the choice of what to do out to the shader.
2010-09-30r600g: fix constant & literal src splitting, also fix mplayer gl2 shaderJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-30r600g: clean up some code from move to new paths.Dave Airlie
mainly remove 2 suffix from function names
2010-09-29r600g: more cleanupJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29r600g: cleanupJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-29r600g: delete old pathJerome Glisse
Lot of clean can now happen. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-26r600g: Silence uninitialized variable warnings.Vinson Lee
Fixes these GCC warnings. r600_shader.c: In function 'tgsi_tex': r600_shader.c:1611: warning: 'src2_chan' may be used uninitialized in this function r600_shader.c:1611: warning: 'src_chan' may be used uninitialized in this function
2010-09-24r600g: fixup VP->FP output->input routing.Dave Airlie
We need to map the TGSI semantics to each other using the hw semantic ids. this fixes glsl-kwin-blur and glsl-routing.
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