summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.c
Commit message (Collapse)AuthorAgeFilesLines
* r600g,radeonsi: consolidate the contents of r600_resource.cMarek Olšák2014-01-281-76/+0
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* r600g: move streamout state to drivers/radeonMarek Olšák2013-08-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This streamout state code will be used by radeonsi. There are new structures r600_common_context and r600_common_screen. What is inherited by what is shown here: pipe_context -> r600_common_context -> r600_context pipe_screen -> r600_common_screen -> r600_screen The common structures reside in drivers/radeon. Currently they only contain enough functionality to be able to handle streamout. Eventually I'd like the whole pipe_screen implementation to be shared and some of the context stuff too. This is quite big, but most changes are because of the new structures and the fact r600_write_value is replaced by radeon_emit. Thanks to Tom Stellard for fixing the build for r600g/compute. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* r600g: cleanup #include recursion between r600_pipe.h and evergreen_compute.hMarek Olšák2013-03-111-0/+1
| | | | Reviewed-by: Tom Stellard <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-2/+0
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* r600g: implement color resolve for r600Marek Olšák2012-08-301-1/+1
| | | | | | | | | The blend state is different and the resolve single-sample buffer must have FMASK and CMASK enabled. I decided to have one CMASK and one FMASK per context instead of per resource. There are new FMASK and CMASK allocation helpers and a new buffer_create helper for that.
* r600g: compute support for evergreenAdam Rak2012-06-011-2/+16
| | | | | | | | | Tom Stellard: - Updated for gallium interface changes - Fixed a few bugs: + Set the loop counter + Calculate the correct number of pipes - Added hooks into the LLVM compiler
* gallium: remove user_buffer_create from the interfaceMarek Olšák2012-05-121-1/+0
| | | | Nothing uses it now.
* r600g: optimize r600_resource_vaMarek Olšák2012-04-011-11/+0
| | | | Avoid calling get_radeon_bo and inline it.
* r600g: use u_default_transfer_flush_region for all resource typesMarek Olšák2012-02-271-1/+1
|
* r600g: use u_default_transfer_inline_write for all resource typesMarek Olšák2012-02-271-1/+1
|
* r600g: merge r600_context with r600_pipe_contextMarek Olšák2012-01-311-1/+1
| | | | The split made no sense.
* r600g: add support for virtual address space on cayman v11Jerome Glisse2012-01-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Virtual address space put the userspace in charge of their GPU address space. It's up to userspace to bind bo into the virtual address space. Command stream can them be executed using the IB_VM chunck. This patch add support for this configuration. It doesn't remove the 64K ib size limit thought this limit can be extanded up to 1M for IB_VM chunk. v2: fix rendering v3: fix rendering when using index buffer v4: make vm conditional on kernel support add basic va management v5: catch the case when we already have va for a bo v6: agd5f: update on top of ioctl changes v7: agd5f: further ioctl updates v8: indentation cleanup + fix non cayman v9: rebase against lastest mesa + improvement from Marek & Michel v10: fix cut/paste bug v11: don't rely on updated radeon_drm.h Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* gallium: kill is_resource_referencedMarek Olšák2011-03-111-1/+0
| | | | Only st/xorg used it and even incorrectly with regards to pipelined transfers.
* r600g: indentation fixesJerome Glisse2010-10-011-1/+0
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: clean up some code from move to new paths.Dave Airlie2010-09-301-1/+1
| | | | mainly remove 2 suffix from function names
* r600g: cleanupJerome Glisse2010-09-291-0/+12
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: delete old pathJerome Glisse2010-09-291-14/+1
| | | | | | Lot of clean can now happen. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: alternative command stream building from contextJerome Glisse2010-09-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Winsys context build a list of register block a register block is a set of consecutive register that will be emited together in the same pm4 packet (the various r600_block* are there to provide basic grouping that try to take advantage of states that are linked together) Some consecutive register are emited each in a different block, for instance the various cb[0-7]_base. At winsys context creation, the list of block is created & an index into the list of block. So to find into which block a register is in you simply use the register offset and lookup the block index. Block are grouped together into group which are the various pkt3 group of config, context, resource, Pipe state build a list of register each state want to modify, beside register value it also give a register mask so only subpart of a register can be updated by a given pipe state (the oring is in the winsys) There is no prebuild register list or define for each pipe state. Once pipe state are built they are bound to the winsys context. Each of this functions will go through the list of register and will find into which block each reg falls and will update the value of the block with proper masking (vs/ps resource/constant are specialized variant with somewhat limited capabilities). Each block modified by r600_context_pipe_state_set* is marked as dirty and we update a count of dwords needed to emit all dirty state so far. r600_context_pipe_state_set* should be call only when pipe context change some of the state (thus when pipe bind state or set state) Then to draw primitive you make a call to r600_context_draw void r600_context_draw(struct r600_context *ctx, struct r600_draw *draw) It will check if there is enough dwords in current cs buffer and if not will flush. Once there is enough room it will copy packet from dirty block and then add the draw packet3 to initiate the draw. The flush will send the current cs, reset the count of dwords to 0 and remark all states that are enabled as dirty and recompute the number of dwords needed to send the current context. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: split pipe state creating/binding from hw state creationJerome Glisse2010-07-281-1/+0
| | | | | | | | | Split hw vs pipe states creation handling as hw states group doesn't match pipe state group exactly. Right now be dumb about that and rebuild all hw states on each draw call. More optimization on that side coming. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: cleanup resource buffer/texture messJerome Glisse2010-07-281-27/+27
| | | | | | Use a common function, fix the mess it was before. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: adapt to latest interfaces changesMarek Olšák2010-05-271-0/+68
- Wrapped the buffer and texture create/destroy/transfer/... functions using u_resource, which is then used to implement the resource functions. - Implemented texture transfers. I left the buffer and texture transfers separate because one day we'll need a special codepath for textures. - Added index_bias to the draw_*elements functions. - Removed nonexistent *REP and *FOR instructions. - Some pipe formats have changed channel ordering, so I've removed/fixed nonexistent ones. - Added stubs for create/set/destroy sampler views. - Added a naive implementation of vertex elements state (new CSO). - Reworked {texture,buffer}_{from,to}_handle. - Reorganized winsys files, removed dri,egl,python directories. - Added a new build target dri-r600.