summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/spu/spu_main.c
AgeCommit message (Collapse)Author
2008-11-21CELL: use variant-length fragment ops programsRobert Ellison
This is a set of changes that optimizes the memory use of fragment operation programs (by using and transmitting only as much memory as is needed for the fragment ops programs, instead of maximal sizes), as well as eliminate the dependency on hard-coded maximal program sizes. State that is not dependent on fragment facing (i.e. that isn't using two-sided stenciling) will only save and transmit a single fragment operation program, instead of two identical programs. - Added the ability to emit a LNOP (No Operation (Load)) instruction. This is used to pad the generated fragment operations programs to a multiple of 8 bytes, which is necessary for proper operation of the dual instruction pipeline, and also required for proper SPU-side decoding. - Added the ability to allocate and manage a variant-length struct cell_command_fragment_ops. This structure now puts the generated function field at the end, where it can be as large as necessary. - On the PPU side, we now combine the generated front-facing and back-facing code into a single variant-length buffer (and only use one if the two sets of code are identical) for transmission to the SPU. - On the SPU side, we pull the correct sizes out of the buffer, allocate a new code buffer if the one we have isn't large enough, and save the code to that buffer. The buffer is deallocated when the SPU exits. - Commented out the emit_fetch() static function, which was not being used.
2008-11-11CELL: two-sided stencil fixesRobert Ellison
With these changes, the tests/stencil_twoside test now works. - Eliminate blending from the stencil_twoside test, as it produces an unneeded dependency on having blending working - The spe_splat() function will now work if the register being splatted and the destination register are the same - Separate fragment code generated for front-facing and back-facing fragments. Often these are the same; if two-sided stenciling is on, they can be different. This is easier and faster than generating code that does both tests and merges the results. - Fixed a cut/paste bug where if the back Z-pass stencil operation were different from all the other operations, the back Z-fail results were incorrect.
2008-10-15cell: simplify spu debug codeBrian Paul
2008-09-26cell: move command processing code into new spu_command.c fileBrian Paul
2008-09-26cell: move debug-related declarationsBrian Paul
2008-09-26cell: move debug macros into new spu_debug.hBrian Paul
2008-09-26cell: move really_clear_tiles()Brian Paul
2008-09-26cell: align instruction buffers to 8-byte, not 32-byte boundaryBrian Paul
2008-09-26cell: checkpoint: support for function calls in SPU shadersBrian Paul
Will be used for instructions like SIN/COS/POW/TEX/etc. The PPU needs to know the address of some functions in the SPU address space. Send that info to the PPU/main memory rather than patch up shaders on the SPU side. Not finished/tested yet...
2008-09-19cell: make sure the fragment ops and fragment shader code buffer is at a ↵Brian Paul
32-byte boundary To make sure even/odd instructions hit the right pipes.
2008-09-19cell: issue warning to stderr when using fallback fragment opsBrian Paul
2008-09-19cell: the test for CELL_DEBUG_FRAGMENT_OP_FALLBACK in ↵Brian Paul
cmd_state_fragment_ops() was inverted
2008-09-17CELL: fleshing out the blending fragment opsRobert Ellison
- Added two new debug flags (to be used with the CELL_DEBUG environment variable). The first, "CELL_DEBUG=fragops", activates SPE fragment ops debug messages. The second, "CELL_DEBUG=fragopfallback", will eventually be used to disable the use of generated SPE code for fragment ops in favor of the default fallback reference routine. (During development, though, the parity of this flag is reversed: all users will get the reference code *unless* CELL_DEBUG=fragopfallback is set. This will prevent hiccups in code generation from affecting the other developers.) - Formalized debug message usage and macros in spu/spu_main.c. - Added lots of new code to ppu/cell_gen_fragment.c to extend the number of supported source RGB factors from 4 to 15, and to complete the list of supported blend equations. More coming, to complete the source and destination RGB and alpha factors, and to complete the rest of the fragment operations...
2008-09-11cell: initial support for fragment shader code generation.Brian Paul
TGSI shaders are translated into SPE instructions which are then sent to the SPEs for execution. Only a few opcodes work, no swizzling yet, no support for constants/immediates, etc.
2008-09-11cell: clean-up, commentsBrian Paul
2008-09-11cell: asst. clean-upBrian Paul
2008-09-11cell: checkpoint: remove more of the old per-fragment codeBrian Paul
2008-09-11cell: checkpoint commit of new per-fragment processingBrian Paul
Do code generation for alpha test, z test, stencil, blend, colormask and framebuffer/tile read/write as a single code block. Ian's previous blend/z/stencil test code is still there but mostly disabled and will be removed soon.
2008-09-11cell: minor change to Z float/int conversion code (avoid switch)Brian Paul
2008-09-05cell: code clean-up, commentsBrian Paul
2008-09-04cell: implement CELL_DEBUG env/options varBrian Paul
Options so far: "checker" module tile clear color by SPU ID to see where the tiles are "sync" to do synchronous DMA (only partially implemented)
2008-04-03cell: minor texture improvementsBrian
Precompute tiles_per_row. Use ushort multiplies in a few places. New comments.
2008-04-01cell: more multi-texture fixes (mostly working now)Brian
2008-04-01cell: turn off some debug outputBrian
2008-04-01cell: checkpoint: more multi-texture workBrian
2008-04-01cell: enable #define CACHE_STATS to print a cache report upon exitBrian
2008-03-31cell: more work for multi-texture supportBrian
2008-03-31cell: initial work to support multi-textureBrian
2008-03-27gallium: replace PIPE_ATTRIB_MAX with PIPE_MAX_ATTRIBSBrian
The later follows the naming scheme of other limits. Keep the old definition until all possible usage is updated.
2008-03-26cell: Implement code-gen for logic opIan Romanick
This also implements code-gen for the float-to-packed color conversion. It's currently hardcoded for A8R8G8B8, but that can easily be fixed as soon as other color depths are supported by the Cell driver.
2008-03-21cell: Remove unnecessary default_blend work-aroundIan Romanick
I suspect that there was some other bug in the blend code-gen that made this work-around necessary.
2008-03-20cell: Use code-gen for alpha blendIan Romanick
So far this is only tested when GL_BLEND is disabled.
2008-03-18cell: Fix depth read / write for s8z24.Ian Romanick
Stencil is still broken.
2008-03-18cell: Minor changes to make stencil not crashIan Romanick
I'm not sure these are quite correct. The reflect demo doesn't assert anymore, but it doesn't produce correct results either. SPE-based vertex shader code needs to be disabled for relfect to run.
2008-03-17cell: Don't segfault when unbinding alpha / stencil / depth test stateIan Romanick
2008-03-17cell: Initial code-gen for alpha / stencil / depth testingIan Romanick
Alpha test is currently broken because all per-fragment testing occurs before alpha is calculated. Stencil test is currently broken because the Z-clear code asserts if there is a stencil buffer.
2008-02-27cell: Use unified data cache for textures tooIan Romanick
2008-02-25cell: Trivial compiler warning clean-ups.Ian Romanick
2008-02-21Cell: Initial pass at unified data cacheIan Romanick
2008-02-19Cell: emit vertex shaders and uniforms more intelligentlyIan Romanick
2008-02-15Cell: Enable code gen for SPE attribute fetchIan Romanick
Doubles are still unsupported.
2008-02-15Code reorganization: update build.José Fonseca
Update the Makefiles and includes for the new paths. Note that there hasn't been no separation of the Makefiles yet, and make is jumping all over the place. That will be taken care shortly. But for now, make should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm might require some minor tweaks.
2008-02-15Code reorganization: move files into their places.José Fonseca
This is in a separate commit to ensure renames are properly preserved.