aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/spu/spu_command.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-111-2/+2
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* gallium: adapt all code to the renamed depth/stencil formatsRoland Scheidegger2010-03-301-2/+2
|
* cell: Rename pipe formats.José Fonseca2010-03-011-2/+2
|
* gallium: Simplify PIPE_ALIGN_VAR.José Fonseca2010-01-121-2/+2
| | | | | | gcc allows pre-fix variable attributes. Suggested by Ian Romanick.
* gallium: Generalize the alignment macros to other compilers and any alignment.José Fonseca2010-01-121-3/+2
|
* gallium: remove PIPE_TEX_FILTER_ANISOLuca Barbieri2010-01-061-4/+0
| | | | | | | | | | | | | | | | | | 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.
* cell: allocate batch buffers w/ 16-byte alignmentJonathan Adamczewski2009-01-121-26/+26
| | | | | | | | | | | 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().
* CELL: use variant-length fragment ops programsRobert Ellison2008-11-211-27/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* CELL: two-sided stencil fixesRobert Ellison2008-11-111-2/+4
| | | | | | | | | | | | | | | | | | | 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.
* CELL: stencil bug fixesRobert Ellison2008-10-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cell: fix a number of fence issuesBrian Paul2008-10-281-1/+1
| | | | Plus add assertions to check status, alignment, etc.
* cell: implement fencing for texture buffersBrian Paul2008-10-221-3/+35
| | | | | | | 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.
* cell: add new debug flag (cache) to report texture cache stats on exitBrian Paul2008-10-171-1/+2
|
* cell: clean up various texture-related thingsBrian Paul2008-10-161-15/+9
| | | | | Distinguish among texture targets in codegen. progs/demos/cubemap.c runs correctly now too.
* cell: start some performance measurementsBrian Paul2008-10-151-0/+15
| | | | | Use the spu_write_decrementer() and spu_read_decrementer() functions to measure time. Convert to milliseconds according to the system timebase value.
* cell: send rasterizer state to SPUs in proper way, remove front_winding hackBrian Paul2008-10-151-0/+8
|
* cell: remove some old, pre-batchbuffer stuffBrian Paul2008-10-151-19/+0
|
* cell: simplify spu debug codeBrian Paul2008-10-151-26/+21
|
* cell: propogate blend color to SPUs for the fallback fragment ops codeBrian Paul2008-10-151-0/+1
|
* cell: additional debugBrian Paul2008-10-151-0/+1
|
* cell: initial bits for 3D texture supportBrian Paul2008-10-141-2/+11
|
* cell: support for cubemapsBrian Paul2008-10-141-3/+14
| | | | Though, progs/demos/cubemap.c doesn't quite work right...
* cell: support NPOT textures, clamp/repeat mode, normalized/unorm texcoordsBrian Paul2008-10-141-5/+43
| | | | glDrawPixels works now.
* cell: use minify vs magnify filtersBrian Paul2008-10-141-12/+38
|
* cell: basic mipmap filtering works nowBrian Paul2008-10-141-5/+16
| | | | Though, only GL_MIPMAP_NEAREST / GL_LINEAR works right now.
* cell: initial work for mipmap texture filteringBrian Paul2008-10-131-13/+24
|
* cell: remove old texture-related fieldsBrian Paul2008-10-131-3/+0
|
* cell: remove old texture codeBrian Paul2008-10-131-2/+0
|
* cell: do texture sampling/filtering for four pixels at a time.Brian Paul2008-10-131-2/+9
|
* cell: add support for fragment shader constant buffersBrian Paul2008-10-071-0/+22
|
* cell: move command processing code into new spu_command.c fileBrian Paul2008-09-261-0/+599