summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/freedreno_resource.h
AgeCommit message (Collapse)AuthorFilesLines
2018-12-22freedreno/a6xx: fix 3d texture layoutRob Clark1-1/+1
Maybe not 100% perfect, but seems to be a pretty good approximation of that. Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-10-17freedreno: add resource seqnoRob Clark1-0/+3
Intended to be something more compact than a 64b pointer, which could be used as a key into hashtables. Prep work for texture state objects. Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-10-17freedreno: Remove the Emacs mode linesNeil Roberts1-2/+0
These are not necessary because the corresponding settings are set via the .dir-locals.el file anyway. Most of them were missing a ‘:’ after “tab-width” which was making Emacs display an annoying warning whenever you open the file. This patch was made with: sed -ri '/-\*- mode:/,/^$/d' \ $(find src/gallium/{drivers,winsys} -name \*.\[ch\] \ -exec grep -l -- '-\*- mode:' {} \+) Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-01-14freedreno/a5xx: texture tilingRob Clark1-0/+13
Overall a nice 5-10% gain for most games. And more for things like glmark2 texture benchmark. There are some rough edges. In particular, the hardware seems to only support tiling or component swap. (Ie. from hw PoV, ARGB/ABGR/RGBA/ BGRA are all the same format but with different component swap.) For tiled formats, only ARGB is possible. This isn't a big problem for *sampling* since we also have swizzle state there (and since util_format_compose_swizzles() already takes into account the component order, we didn't use COLOR_SWAP for sampling). But it is a problem if you try to render to a tiled BGRA (for example) surface. The next patch introduces a workaround for blitter, so we can generate tiled textures in ABGR/RGBA/BGRA, but that doesn't help the render- target case. To handle that, I think we'd need to keep track that the tiled format is different from the linear format, which seems like it would get extra fun with sampler views/etc. So for now, disabled by default, enable with FD_MESA_DEBUG=ttile. In practice it works fine for all the games I've tried, but makes piglit grumpy. Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-01-14freedreno: add screen->setup_slices() for tex layoutRob Clark1-0/+1
The rules are sufficiently different for a5xx with tiled textures, so split this out into something that can be implemented per-generation. The a5xx specific implementation will come in a later patch. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-12-17freedreno: staging upload transfersRob Clark1-0/+2
In the busy && !needs_flush case, we can support a DISCARD_RANGE upload using a staging buffer. This is a bit different from the case of mid- batch uploads which require us to shadow the whole resource (because later draws in an earlier tile happen before earlier draws in a later tile). Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-12-15freedreno: use u_transfer_helperRob Clark1-1/+1
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-12-04freedreno: remove use of u_transferRob Clark1-3/+2
Freedreno doesn't treat buffers and images differently, so it's use was kind of pointless. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-12-03freedreno: avoid mem2gmem for invalidated buffersRob Clark1-0/+1
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-06-07freedreno/a5xx: LRZ supportRob Clark1-0/+9
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-06-07freedreno: drop timestamp fieldRob Clark1-1/+0
unused. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-08-16freedreno: support for using generic clear pathRob Clark1-0/+4
Since clears are more or less just normal draws, there isn't that much benefit in having hand-rolled clear path. Add support to use u_blitter instead if gen specific backend doesn't implement ctx->clear(). Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-07-30freedreno: re-order support for hw queriesRob Clark1-0/+19
Push query state down to batch, and use the resource tracking to figure out which batch(es) need to be flushed to get the query result. This means we actually need to allocate the prsc up front, before we know the size. So we have to add a special way to allocate an un- backed resource, and then later allocate the backing storage. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-07-30freedreno: add batch-cache and batch reorderingRob Clark1-14/+17
Note that I originally also had a entry-point that would construct a key and do lookup from a pipe_surface. I ended up not needing that (yet?) but it is easy-enough to re-introduce later if we need it for the blit path. For now, not enabled by default, but can be enabled (on a3xx/a4xx) with FD_MESA_DEBUG=reorder. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-07-30freedreno: push resource tracking down into batchRob Clark1-1/+2
Signed-off-by: Rob Clark <robdclark@gmail.com>
2015-11-20freedreno/a4xx: use hardware RGTC texture samplersIlia Mirkin1-0/+1
a4xx hardware has real support for RGTC so there's no need to fake it like we do on a3xx. Undo the hacks, and keep track of an "internal format" of a resource, which on a3xx will be different, triggering the transfer-time conversions to take place. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-18freedreno: add support for conditional rendering, required for GL3.0Ilia Mirkin1-0/+2
A smarter implementation would make it possible to attach this to emit state for the BY_REGION versions to avoid breaking the tiling. But this is a start. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-04freedreno: simplify/cleanup resource status trackingRob Clark1-1/+16
Collapse dirty/reading bools into status bitmask (and drop writing which should really be the same as dirty). And use 'used_resources' list for all tracking, including zsbuf/cbufs, rather than special casing the color and depth/stencil buffers. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-07-27freedreno: add resource tracking support for written buffersRob Clark1-1/+1
With stream-out (transform-feedback) we have the case where resources are *written* by the gpu, which needs basically the same tracking to figure out when rendering must be flushed. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-07-21gallium: replace INLINE with inlineIlia Mirkin1-4/+4
Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
2015-05-08util: Move gallium's linked list to utilJason Ekstrand1-1/+1
The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
2015-04-27freedreno/a3xx: add support for S8 and Z32F_S8Ilia Mirkin1-0/+3
Enables ARB_depth_buffer_float. There is no sampling support for interleaved Z32F_S8, so we store the two textures separately, one as Z32F, the other as S8. As a result, we need a lot of additional logic for restores and transfers. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-04-27freedreno: add fd_transfer to wrap around pipe_transferIlia Mirkin1-0/+11
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-04-05freedreno: keep track of buffer valid rangesIlia Mirkin1-0/+3
Copies nouveau_buffer and radeon_buffer. This allows a write to proceed to an uninitialized part of a buffer even when the GPU is using the previously-initialized portions. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-04-05freedreno: mark resources as being read so that writes flush the queueIlia Mirkin1-0/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-04-05freedreno: add a reading flag to indicate gpu is reading rscIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-12-13freedreno/a4xx: mipmapsRob Clark1-6/+28
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-12-13freedreno: helper to calc layer/level offsetRob Clark1-0/+8
Rather than duplicating this everywhere. Especially as on a4xx the layout of layers and levels differs based on texture type. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: multi-slice resources (cubemap, mipmap, etc)Rob Clark1-1/+23
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-03-11freedreno: gallium driver for adrenoRob Clark1-0/+51
Currently works on a220. Others in the a2xx family look pretty similar and should be pretty straightforward to support with the same driver. The a3xx has a new shader ISA, and while many registers appear similar, the register addresses have been completely shuffled around. I am not sure yet whether it is best to support with the same driver, but different compiler, or whether it should be split into a different driver. v1: original v2: build file updates from review comments, and remove GPL licensed header files from msm kernel v3: smarter temp/pred register assignment, fix clear and depth/stencil format issues, resource_transfer fixes, scissor fixes Signed-off-by: Rob Clark <robdclark@gmail.com>