aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_descriptors.c
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Initial geometry shader supportMichel Dänzer2014-01-291-1/+97
| | | | | | | Partly based on the corresponding r600g work by Vadim Girlin and Dave Airlie. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: cleanup includes, add missing licenseMarek Olšák2014-01-281-0/+1
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: remove si_resource.hMarek Olšák2014-01-281-1/+0
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: move si_upload_const_buffer to a better placeMarek Olšák2014-01-281-0/+27
| | | | | | | This gets rid of another file. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Rename the commonly occurring rctx/r600 variables.Andreas Hartmetz2014-01-141-114/+114
| | | | | | The "r" stands for R600. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Rename r600->si for functions in si_resource.h.Andreas Hartmetz2014-01-141-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Rename r600->si for structs in si_pipe.h.Andreas Hartmetz2014-01-141-22/+22
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Apply si_* file naming scheme.Andreas Hartmetz2014-01-141-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* r600g,radeonsi: fix initialized buffer range tracking for DMA, add commentsMarek Olšák2013-12-121-9/+12
| | | | | | | The DMA functions modify dst_offset and size and util_range_add gets wrong values. Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: add common interface for buffer invalidationMarek Olšák2013-12-121-1/+2
| | | | | | This will be used by common code in the next commit. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCEMarek Olšák2013-12-121-0/+123
| | | | | | which can come from glBufferData and glMapBufferRange. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement accelerated buffer copyingMarek Olšák2013-12-121-0/+58
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: bind a dummy constant buffer in place of NULL buffersMarek Olšák2013-11-041-0/+6
|
* radeonsi: implement clear_buffer using CP DMA, initialize CMASK with itMarek Olšák2013-09-291-1/+84
| | | | | | | | More work needs to be done for this to be entirely shared with r600g. I'm just trying to share r600_texture.c now. The reason I put the implementation to si_descriptors.c is that the emit function had already been there.
* radeonsi: bind streamout buffers to VGT and the vertex shaderMarek Olšák2013-09-131-0/+68
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: simplify and improve flushingMarek Olšák2013-08-311-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mimics r600g. The R600_CONTEXT_xxx flags are added to rctx->b.flags and si_emit_cache_flush emits the packets. That's it. The shared radeon code tells us when the streamout cache should be flushed, so we have to check the flags anyway. There is a new atom "cache_flush", because caches must be flushed *after* resource descriptors are changed in memory. Functional changes: * Write caches are flushed at the end of CS and read caches are flushed at its beginning. * Sampler view states are removed from si_state, they only held the flush flags. * Everytime a shader is changed, the I cache is flushed. Is this needed? Due to a hw bug, this also flushes the K cache. * The WRITE_DATA packet is changed to use TC, which fixes a rendering issue in openarena. I'm not sure how TC interacts with CP DMA, but for now it seems to work better than any other solution I tried. (BTW CIK allows us to use TC for CP DMA.) * Flush the K cache instead of the texture cache when updating resource descriptors (due to a hw bug, this also flushes the I cache). I think the K cache flush is correct here, but I'm not sure if the texture cache should be flushed too (probably not considering we use TC for WRITE_DATA, but we don't use TC for CP DMA). * The number of resource contexts is decreased to 16. With all of these cache changes, 4 doesn't work, but 8 works, which suggests I'm actually doing the right thing here and the pipeline isn't drained during flushes. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* radeonsi: convert constant buffers to si_descriptorsMarek Olšák2013-08-311-2/+141
| | | | | | | | | | | | | | | There is a new "class" si_buffer_resources, which should be good enough for implementing any kind of buffer bindings (constant buffers, vertex buffers, streamout buffers, shader storage buffers, etc.) I don't even keep a copy of pipe_constant_buffer - we don't need it. The main motivation behind this is to have a well-tested infrastrusture for setting up streamout buffers. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* radeonsi: use r600_common_context, r600_common_screen, r600_resourceMarek Olšák2013-08-311-20/+19
| | | | | | | | | Also r600_hw_context_priv.h and si_state_streamout.c are removed, because they are no longer needed. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* radeonsi: add FMASK texture binding slots and resource setup (v2)Marek Olšák2013-08-171-1/+4
| | | | | | v2: bind FMASK textures to shader resource slots 16..31 Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add flexible shader descriptor management and use it for sampler viewsMarek Olšák2013-08-171-0/+355
It moves all sampler view descriptors to a buffer. It supports partial resource updates and it can also unbind resources (required for FMASK texturing). The buffer contains all sampler view descriptors for one shader stage, represented as an array. On top of that, there are N arrays in the buffer, which are used to emulate context registers as implemented by the previous ASICs (each array is a context). This uses the RCU synchronization approach to avoid read-after-write hazards as discussed in the thread: "radeonsi: add FMASK texture binding slots and resource setup" CP DMA is used to clear the descriptors at context initialization and to copy the descriptors from one context to the next. v2: - use PKT3_DMA_DATA on CIK (I'll test CIK later) - turn the bool CP DMA parameters into self-explanatory flags - add a nice simple API for packet emission to radeon_winsys.h - use 256 contexts, 128 causes texture corruption in openarena