summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_state_emit.c
AgeCommit message (Collapse)Author
2009-02-24cell: overhaul cell teximage codeBrian Paul
Updated to use the new pipe_transfer functions, etc. Texturing is working again. Though there's some bugs in mipmap texturing but I believe those predate the pipe_transfer changes.
2009-02-07cell: compile fix: pipe_constant_buffer no longer has size fieldBrian Paul
2009-01-12cell: allocate batch buffers w/ 16-byte alignmentJonathan Adamczewski
Replace cell_batch{align,alloc)*() with cell_batch_alloc16(), allocating multiples of 16 bytes that are 16 byte aligned. Opcodes are stored in preferred slot of SPU machine word. Various structures are explicitly padded to 16 byte multiples. Added STATIC_ASSERT().
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-22cell: implement fencing for texture buffersBrian Paul
If we delete a texture, we need to keep the underlying tiled data buffer around until any rendering that references it has completed. Keep a list of buffers referenced by a rendering batch. Unref/free them when the associated batch's fence is executed/signalled.
2008-10-17cell: more efficient state emit for textures/samplersBrian Paul
2008-10-15cell: send rasterizer state to SPUs in proper way, remove front_winding hackBrian Paul
2008-10-15cell: propogate blend color to SPUs for the fallback fragment ops codeBrian Paul
2008-10-14cell: initial bits for 3D texture supportBrian Paul
2008-10-14cell: support for cubemapsBrian Paul
Though, progs/demos/cubemap.c doesn't quite work right...
2008-10-14cell: now do texture twiddling in the right way, at the right time.Brian Paul
Also handles images smaller than 32x32 now.
2008-10-13cell: initial work for mipmap texture filteringBrian Paul
2008-10-07cell: add support for fragment shader constant buffersBrian Paul
2008-10-07cell: remove old codeBrian Paul
2008-10-07cell: memset() key to zeroBrian Paul
2008-10-07cell: use new keymap to save/re-use fragment ops codeBrian Paul
2008-09-26cell: remove unneeded blend/depth_stencil subclassesBrian Paul
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: put cell_ prefix on gen_fragment_function()Brian Paul
2008-09-11cell: disable NEW_VS emitBrian 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-04cell: assorted comments, clean-ups, etc.Brian Paul
2008-08-25cell: asst fixes to get driver building/running again.Brian
Note that SPU vertex transformation is disabled at this time.
2008-08-24gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul
Also, rename p_tile.[ch] to u_tile.[ch]
2008-03-31cell: more work for multi-texture supportBrian
2008-03-31cell: initial work to support multi-textureBrian
2008-03-27cell: include cell_state_per_fragment.h to silence warningBrian
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-20cell: Use code-gen for alpha blendIan Romanick
So far this is only tested when GL_BLEND is disabled.
2008-03-20cell: use pipe_framebuffer_state.width, heightBrian
2008-03-18cell: Move and (conditionally) silence debug codeIan Romanick
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-03-10cell: sync up with sampler/texture state-setting changesBrian
2008-02-19Cell: emit vertex shaders and uniforms more intelligentlyIan Romanick
2008-02-15Code reorganization: move files into their places.José Fonseca
This is in a separate commit to ensure renames are properly preserved.