summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/spu/spu_command.c
AgeCommit message (Collapse)Author
2010-03-30gallium: adapt all code to the renamed depth/stencil formatsRoland Scheidegger
2010-03-01cell: Rename pipe formats.José Fonseca
2010-01-12gallium: Simplify PIPE_ALIGN_VAR.José Fonseca
gcc allows pre-fix variable attributes. Suggested by Ian Romanick.
2010-01-12gallium: Generalize the alignment macros to other compilers and any alignment.José Fonseca
2010-01-06gallium: remove PIPE_TEX_FILTER_ANISOLuca Barbieri
This patch removes PIPE_TEX_FILTER_ANISO. Anisotropic filtering is enabled if and only if max_anisotropy > 1.0. Values between 0.0 and 1.0, inclusive, of max_anisotropy are to be considered equivalent, and meaning to turn off anisotropic filtering. This approach has the small drawback of eliminating the possibility of enabling anisotropic filter on either minification or magnification separately, which Radeon hardware seems to support, is currently support by Gallium but not exposed to OpenGL. If this is actually useful it could be handled by splitting max_anisotropy in two values and adding an appropriate OpenGL extension. NOTE: some fiddling & reformatting by keithw to get this patch to apply. Hopefully nothing broken in the process.
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-30CELL: stencil bug fixesRobert Ellison
Two definitive bugs in stenciling were fixed. The first, reversed registers in the generated Select Bytes (selb) instruction, caused the stenciling INCR and DECR operations to fail dramatically, putting new values in where old values were supposed to be and vice versa. The second caused stencil tiles to not be read and written from main memory by the SPUs. A per-spu flag, spu.read_depth, was used to indicate whether the SPU should be reading depth tiles, and was set only when depth was enabled. A second flag, spu.read_stencil, was set when stenciling was enabled, but never referenced. As stenciling and depth are in the same tiles on the Cell, and there is no corresponding TAG_WRITE_TILE_STENCIL to complement TAG_WRITE_TILE_COLOR and TAG_WRITE_TILE_Z, I fixed this by eliminating the unused "spu.read_stencil", renaming "spu.read_depth" to "spu.read_depth_stencil", and setting it if either stenciling or depth is enabled. I also added an optimization to the fragment ops generation code, that avoids calculating stencil values and/or stencil writemask when the stencil operations are all KEEP.
2008-10-28cell: fix a number of fence issuesBrian Paul
Plus add assertions to check status, alignment, etc.
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: add new debug flag (cache) to report texture cache stats on exitBrian Paul
2008-10-16cell: clean up various texture-related thingsBrian Paul
Distinguish among texture targets in codegen. progs/demos/cubemap.c runs correctly now too.
2008-10-15cell: start some performance measurementsBrian Paul
Use the spu_write_decrementer() and spu_read_decrementer() functions to measure time. Convert to milliseconds according to the system timebase value.
2008-10-15cell: send rasterizer state to SPUs in proper way, remove front_winding hackBrian Paul
2008-10-15cell: remove some old, pre-batchbuffer stuffBrian Paul
2008-10-15cell: simplify spu debug codeBrian Paul
2008-10-15cell: propogate blend color to SPUs for the fallback fragment ops codeBrian Paul
2008-10-15cell: additional debugBrian 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: support NPOT textures, clamp/repeat mode, normalized/unorm texcoordsBrian Paul
glDrawPixels works now.
2008-10-14cell: use minify vs magnify filtersBrian Paul
2008-10-14cell: basic mipmap filtering works nowBrian Paul
Though, only GL_MIPMAP_NEAREST / GL_LINEAR works right now.
2008-10-13cell: initial work for mipmap texture filteringBrian Paul
2008-10-13cell: remove old texture-related fieldsBrian Paul
2008-10-13cell: remove old texture codeBrian Paul
2008-10-13cell: do texture sampling/filtering for four pixels at a time.Brian Paul
2008-10-07cell: add support for fragment shader constant buffersBrian Paul
2008-09-26cell: move command processing code into new spu_command.c fileBrian Paul