aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen_buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-101-1/+1
|
* r300: use the new parent/child pools for transfers (v2)Nicolai Hähnle2016-10-051-3/+3
| | | | | | v2: slab_alloc_st -> slab_alloc Reviewed-by: Marek Olšák <[email protected]>
* gallium: switch drivers to the slab allocator in src/utilMarek Olšák2016-09-061-3/+3
|
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Roland Scheidegger <[email protected]>
* winsys/radeon: remove use_reusable_pool parameter from buffer_createNicolai Hähnle2016-04-271-2/+2
| | | | | | All callers set this parameter to true. Reviewed-by: Marek Olšák <[email protected]>
* u_upload_mgr: pass alignment to u_upload_data manuallyMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove radeon_winsys_cs_handleMarek Olšák2015-12-111-7/+2
| | | | | | | | "radeon_winsys_cs_handle *cs_buf" is now equivalent to "pb_buffer *buf". Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/drivers: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/radeon: unify buffer_wait and buffer_is_busy in the winsys interfaceMarek Olšák2015-08-071-1/+1
| | | | | | The timeout parameter covers both cases. Reviewed-by: Alex Deucher <[email protected]>
* r600g/radeonsi: Use write-combined CPU mappings of some BOs in GTTMichel Dänzer2014-07-231-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* r300g/swtcl: fix geometry corruption by uploading indices to a bufferMarek Olšák2013-07-151-2/+5
| | | | | | | | | | | | | The splitting of a draw call into several draw commands was broken, because the split sometimes took place in the middle of a primitive. The splitting was supposed to be dealing with the case when there are more indices than the maximum size of a CS. This commit throws that code away and uses a real index buffer instead. https://bugs.freedesktop.org/show_bug.cgi?id=66558 Cc: [email protected]
* r300g: don't check for vertex and index buffer bind flagsMarek Olšák2013-01-041-2/+1
|
* winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr insteadMarek Olšák2012-12-121-6/+6
|
* r300g: handle map flag DISCARD_WHOLE_RESOURCEMarek Olšák2012-12-011-3/+33
| | | | | This should improve performance in apps which trigger this codepath. (e.g. Wine does)
* gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák2012-10-311-2/+2
| | | | | | | | Reviewed-by: Brian Paul <[email protected]> v2: update relnotes-9.1 v3: use align_malloc and align_free for malloced buffers in r300g v4: document the new CAP in the docs
* gallium: remove unused data pointer from pipe_transferMarek Olšák2012-10-181-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-48/+32
| | | | | | | | | | | | | | "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]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* r300g/swtcl: malloc vertex and index buffers (don't use radeon DRM to get them)Marek Olšák2012-05-121-8/+10
| | | | | | Vertex and index buffers are never used by hardware, only by Draw. SWTCL chipsets usually have very little memory, so this might help with stability and reliability.
* r300g: remove slab allocator for pipe_resource (used mainly for user buffers)Marek Olšák2012-05-121-4/+3
|
* r300g: remove user_buffer_createMarek Olšák2012-05-121-27/+0
|
* gallium: remove pipe_resource::user_ptrMarek Olšák2012-04-301-4/+0
| | | | It's unused now.
* gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-301-1/+1
| | | | | | | Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe. User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
* r300g: make r300_buffer_transfer_unmap a no-opMarek Olšák2012-04-291-7/+1
| | | | It's a no-op already in the winsys.
* r300g: use u_default_transfer_inline_writeMarek Olšák2012-04-291-29/+1
|
* winsys/radeon: simplify buffer map/unmap functionsMarek Olšák2012-04-291-5/+5
| | | | | The idea is not to use pb_map and pb_unmap wrappers, calling straight into the winsys.
* r300g: don't share u_upload_mgr with u_vbuf, create its ownMarek Olšák2012-04-241-1/+1
|
* u_vbuf: remove u_vbuf_resourceMarek Olšák2012-04-241-28/+26
|
* gallium: add user_ptr in pipe_resourceMarek Olšák2012-04-241-0/+2
| | | | I need to access the pointer in st/mesa when I only have pipe_resource.
* gallium: remove deprecated PIPE_TRANSFER_DISCARDMarek Olšák2012-01-051-1/+1
| | | | PIPE_TRANSFER_DISCARD_RANGE is defined the same.
* u_upload_mgr: remove the 'flushed' parameterMarek Olšák2012-01-051-2/+1
| | | | | | Not used by anybody. Reviewed-by: Brian Paul <[email protected]>
* r300g: mapping buffers for read should be unsynchronizedMarek Olšák2011-12-241-1/+9
| | | | The GPU never uses them for write.
* winsys/radeon: move managing GEM domains back to driversMarek Olšák2011-12-241-7/+3
| | | | | | | | This partially reverts commit 363ff844753c46ac9c13866627e096b091ea81f8. It caused severe performance drops in Nexuiz. Reported by Phoronix. Tested by me on r300g and by IRC people on r600g.
* r300g: force buffer placements to GTT on big endian machinesMarek Olšák2011-11-031-0/+6
|
* winsys/radeon: move GEM domains out of the drivers into winsysMarek Olšák2011-09-301-3/+1
| | | | | | | | | | | | | | | The drivers don't need to care about the domains. All they need to set are the bind and usage flags. This simplifies the winsys too. This also fixes on r600g: - fbo-depth-GL_DEPTH_COMPONENT32F-copypixels - fbo-depth-GL_DEPTH_COMPONENT16-copypixels - fbo-depth-GL_DEPTH_COMPONENT24-copypixels - fbo-depth-GL_DEPTH_COMPONENT32-copypixels - fbo-depth-GL_DEPTH24_STENCIL8-copypixels I can't explain it. Reviewed-by: Alex Deucher <[email protected]>
* r300g: remove useless variables in some structuresMarek Olšák2011-09-291-2/+0
|
* winsys/radeon: remove usage parameter from buffer_createMarek Olšák2011-07-251-2/+1
|
* r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák2011-04-181-7/+6
| | | | | Renaming a few files, types, and functions. Also make the winsys independent of r300g.
* Revert "r300g: handle DISCARD_WHOLE_RESOURCE for buffers"Marek Olšák2011-04-081-25/+10
| | | | | | | | | | | | | This reverts commit 437c748bf5072d2bded77a00c74c51cdb8b510e5. The commit is wrong for several reasons. One of them is when we grab a new buffer, we should update all the states it is bound in, including all parallel contexts. I don't think this is even doable. The correct solution would be upload data via a temporary buffer and do resource_copy_region to the original one. https://bugs.freedesktop.org/show_bug.cgi?id=36088
* r300g: handle DISCARD_WHOLE_RESOURCE for buffersMarek Olšák2011-04-031-10/+25
|
* gallium: kill is_resource_referencedMarek Olšák2011-03-111-16/+0
| | | | Only st/xorg used it and even incorrectly with regards to pipelined transfers.
* r300g: remove tracking whether vertex buffers need to be validatedMarek Olšák2011-02-181-5/+0
| | | | | This was getting hard to maintain and didn't really bring any real benefits. Instead, validate buffers when the vertex array state is dirty.
* r300g: do not create a user buffer struct for misaligned ushort indices fallbackMarek Olšák2011-02-141-2/+1
|
* r300g: prevent NULL pointer dereference in r300_buffer_createMarek Olšák2011-02-111-3/+3
| | | | | Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=33185
* r300g: import the last bits of libdrm and cleanup the whole thingMarek Olšák2011-02-111-10/+8
| | | | | | | | | | | | | | Based on Dave's branch. The majority of this commit is a cleanup, mainly renaming things. There wasn't much code to import, just ioctl calls. Also done: - implemented unsynchronized bo_map (important optimization!) - radeon_bo_is_referenced_by_cs is no longer a refcount hack - dropped the libdrm_radeon dependency I'm surprised that this has resulted in less code in the end.
* r300g: add a way to change texture properties arbitrarilyMarek Olšák2011-02-101-0/+2
| | | | So that we can implement resource_copy on arbitrary data.
* r300g: consolidate buffers and textures to r300_resourceMarek Olšák2011-02-101-30/+12
| | | | Transfers and create/destroy are still handled separately.
* r300g: use the same upload buffer for vertices and indicesMarek Olšák2011-02-081-1/+1
|
* r300g: use the new vertex buffer managerMarek Olšák2011-02-071-73/+28
|
* r300g: Make the buffer and texture vbtls static const.Henri Verbeet2011-02-031-1/+1
|