summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_shader.c
AgeCommit message (Collapse)Author
2011-01-07r600g: Update some comments for Evergreen.Henri Verbeet
2011-01-07r600g: Split ALU clauses based on used constant cache lines.Henri Verbeet
2010-12-24r600g: hack around property unknown issues.Dave Airlie
should fix https://bugs.freedesktop.org/show_bug.cgi?id=32619 Need to add proper support for properties later. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-15r600g: fix pow(0, 0) evaluating to NaNFredrik Höglund
We have to use the non-IEEE compliant version of MUL here, since log2(0) is -inf, and 0 * -inf is NaN in IEEE arithmetic. candidates for 7.10 branch
2010-12-07r600g: remove dead codeJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-06r600g: avoid useless shader rebuild at draw callJerome Glisse
Avoid rebuilding constant shader state at each draw call, factor out spi update that might change at each draw call. Best would be to update spi only when revealent states change (likely only flat shading & sprite point). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-06r600g: build fetch shader from vertex elementsJerome Glisse
Vertex elements change are less frequent than draw call, those to avoid rebuilding fetch shader to often build the fetch shader along vertex elements. This also allow to move vertex buffer setup out of draw path and make update to it less frequent. Shader update can still be improved to only update SPI regs (based on some rasterizer state like flat shading or point sprite ...). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-05r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().Henri Verbeet
2010-12-03r600g: indentation fixJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-03r600g: set address of pop instructions to next instructionFabian Bieler
2010-12-03r600g: dump raw shader output for debuggingJerome Glisse
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-11-23r600g: Removed duplicated call to tgsi_split_literal_constant().Tilman Sauerbeck
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-11-23r600g: Only compare active vertex elementsMathias Fröhlich
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-11-19r600g: use full range of VS resources for vertex samplersAlex Deucher
Now that we have fetch shaders, the full range of VS resources can be used for sampling.
2010-11-19r600g: use meaningful defines for chiprevAlex Deucher
Makes the code much clearer.
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>