c0a73ddda801c6cde0183735625dea95842f9c27 |
|
12-Apr-2017 |
Emil Velikov <emil.l.velikov@gmail.com> |
Revert "freedreno: fix memory leak" This reverts commit c57a03585052e3bd7d61d1307cae9a922e663c20. As requested by Rob Clark "This seems to be causing a performance regression (reported by Nicolas).. and the leak it fixes is quite hypothetical. (Ie. hit by apps that destroy/create context many times.) On master, I think this can be solved by switching on 'reorder' by default but that is probably too much of a behaviour change for stable."
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
c57a03585052e3bd7d61d1307cae9a922e663c20 |
|
24-Mar-2017 |
Rob Clark <robdclark@gmail.com> |
freedreno: fix memory leak Otherwise blitter would still hold a ref to, for example, sampler- views. To reproduce: glmark2 -b desktop:duration=2 --run-forever Fixes: a8e6734 ("freedreno: support for using generic clear path") Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Rob Clark <robdclark@gmail.com> (cherry picked from commit c03f6f12bbe6fb491c9362b3fd5d39b9f4fd05fd)
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
5def00875de4f0895e22de94cba29131a26c0430 |
|
17-Aug-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno/a3xx: fix generic clear path Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
a8e6734a83816df2a39e5c4c49721d762caee86b |
|
11-Aug-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: support for using generic clear path 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
a909210131494a6a131855d7d344b61b81fbf40e |
|
09-Aug-2016 |
Marek Olšák <marek.olsak@amd.com> |
gallium: add render_condition_enable param to clear_render_target/depth_stencil Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
e684c32d2fdda204b79661ecf26881eae133d64a |
|
20-Jul-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: some locking Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
0739bbceecbb66ffbcf14e5b73e6df222794c264 |
|
14-Jul-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: a bit of micro-optimization Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
c44163876a2858aea219a08bd2e048b76953cff9 |
|
14-Jul-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: track batch/blit types Add a bit of extra book-keeping about blits and back-blits (from resource shadowing). If the app uploads all mipmap levels, as opposed to uploading the first level and then glGenerateMipmap(), we can discard the back-blit (as opposed to being naive and shadowing the resource for each mipmap level). Also, after a normal blit, we might as well flush the batch immediately, since there is not likely to be further rendering to the surface. Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
7f8fd02dc7cad1ddcfb610db10ffbb41e3e34e7d |
|
11-Jul-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: re-order support for hw queries 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
ba3009688892713b711ca6e9420d813f0bdce43f |
|
01-Jul-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: support discarding previous rendering in special cases Basically, to "DCE" blits triggered by resource shadowing, in cases where the levels are immediately completely overwritten. For example, mid-frame texture upload to level zero triggers shadowing and back-blits to the remaining levels, which are immediately overwritten by glGenerateMipmap(). Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
dcde4cd114e906f5c4372dbb6758026c9222cd2a |
|
28-Jun-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: spiff up some debug traces Make it easier to track batches, to ensure things happen properly when they are reordered. Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
9f219c7047b51561f6f69274d445e6a6ec41c5f8 |
|
27-Jun-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: add batch-cache and batch reordering 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
f02a64dbdd2ec147167ad60357bd46d8d964290a |
|
27-Jun-2016 |
Rob Clark <robdclark@gmail.com> |
freedreno: move more batch related tracking to fd_batch To flush batches out of order, the gmem code needs to not depend on state from fd_context (since that may apply to a more recent batch). So this all moves into batch. The one exception is the gmem/pipe/tile state itself. But this is only used from gmem code (and batches are flushed serially). The alternative would be having to re-calculate GMEM layout on every batch, even if the dimensions of the render targets are the same. Note: This opens up the possibility of pushing gmem/submit into a helper thread. Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
9e4561d3c47c2dabce43ce160915fd9bcea05a81 |
|
21-May-2016 |
Rob Clark <robclark@freedesktop.org> |
freedreno: push resource tracking down into batch Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
9bbd239a4039522d7c1023ecb21764679447bb2d |
|
20-May-2016 |
Rob Clark <robclark@freedesktop.org> |
freedreno: introduce fd_batch Introduce the batch object, to track a batch/submit's worth of ringbuffers and other bookkeeping. In this first step, just move the ringbuffers into batch, since that is mostly uninteresting churn. For now there is just a single batch at a time. Note that one outcome of this change is that rb's are allocated/freed on each use. But the expectation is that the bo pool in libdrm_freedreno will save us the GEM bo alloc/free which was the initial reason to implement a rb pool in gallium. The purpose of the batch is to eventually facilitate out-of-order rendering, with batches associated to framebuffer state, and tracking the dependencies on other batches. Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
2e117a7649c1972cf36ec874d852a3e85d4750fa |
|
04-May-2016 |
Rob Clark <robclark@freedesktop.org> |
freedreno: allow ctx->draw_vbo to fail Pretty much only happens if shader variant compile fails. But in this case, if we haven't emitted cmdstream, we don't want to set needs_flush. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
7e93b26b5d9f926346fb3651c0094fc1caade4d8 |
|
12-Apr-2016 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fix stream-out offset handling for lines/tris We need to increment offset by # of vertices, not by # of prims. Fixes a bunch of dEQP fails involving prims other than points. For example, dEQP-GLES3.functional.transform_feedback.position.lines_separate Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
0a4b0fc3154f4e3f926dcd5f2effe199c9fc6754 |
|
12-Apr-2016 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fix prims-emitted query This should only count when TF is not paused. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
d69e557f2a2c39888d83c7b52244412ee2a5594e |
|
08-Nov-2015 |
Ilia Mirkin <imirkin@alum.mit.edu> |
freedreno: add support for conditional rendering, required for GL3.0 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
ef7a5638290234a9d1f0574585174539e2c126eb |
|
15-Oct-2015 |
Rob Clark <robclark@freedesktop.org> |
freedreno: add debug option to dirty state after draw Similar to "dclear", "ddraw" will mark all state dirty after each draw. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
054526e49abb5e7fd49fed6f589cff6f1ab4c9f6 |
|
31-Jul-2015 |
Rob Clark <robclark@freedesktop.org> |
freedreno/a4xx: MRT support Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
5ca032a9a8ece0a8a43151f988215484da3c1811 |
|
31-Jul-2015 |
Rob Clark <robclark@freedesktop.org> |
freedreno: simplify/cleanup resource status tracking 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
be8a8ebe578267ab24e343c3c1347936a221468e |
|
25-Jul-2015 |
Rob Clark <robclark@freedesktop.org> |
freedreno: add transform-feedback state Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
bda1354aac9d32e236048af4d353d5530f644c34 |
|
26-Jul-2015 |
Rob Clark <robclark@freedesktop.org> |
freedreno: add resource tracking support for written buffers 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
9fc3f472784b2ba53655b715d602268bef5bf12e |
|
22-Apr-2015 |
Ilia Mirkin <imirkin@alum.mit.edu> |
freedreno/a3xx: add support for S8 and Z32F_S8 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>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
dacf22e0a34d4dc2595f3cb0dbee52318dc9d0d7 |
|
03-Apr-2015 |
Ilia Mirkin <imirkin@alum.mit.edu> |
freedreno: mark resources as being read so that writes flush the queue Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
602bc6c88dbfa34083aa9d229fb6396b008e23eb |
|
30-Mar-2015 |
Ilia Mirkin <imirkin@alum.mit.edu> |
freedreno: add core infrastructure support for MRTs Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
e091c08089f43e0a4f4edf8e5e24f2617364f044 |
|
05-Nov-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: rename draw->draw_vbo Gets rid of a namespace conflict w/ a4xx which wants an fd4_draw() version of fd_draw().. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
01b757e2b0fb97a146b0ef278b449cecab0d15e8 |
|
21-Oct-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: clear vs scissor The optimization of avoiding restore (mem2gmem) if there was a clear falls down a bit if you don't have a fullscreen scissor. We need to make the decision logic a bit more clever to keep track of *what* was cleared, so that we can (a) completely skip mem2gmem if entire buffer was cleared, or (b) skip mem2gmem on a per-tile basis for tiles that were completely cleared. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
8233b36a172820edf18ea4612f1979dc6089a1d7 |
|
15-Oct-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: inline fd_draw_emit() Manual LTO Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
9b6281a7da02759b0e7570d611e27fe541ffebd6 |
|
12-Sep-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: "fix" problems with excessive flushes 4f338c9b introduced logic to trigger a flush rather than overflowing cmdstream buffer. But the threshold was too low, triggering flushes where they were not needed. This caused problems with games like xonotic. Part of the problem is that we need to mark all state dirty between cmdstream submit ioctls, because we cannot rely on state being preserved across ioctls. But even with that, there are still some problems that are still being debugged. For now: 1) correctly mark all state dirty 2) introduce FD_MESA_DEBUG flush flag to force rendering to be flushed between each draw, to trigger problems (so that I can debug) 3) use a more reasonable threshold so for normal usecases we don't trigger the problems This at least corrects the regression, but there is still more debugging to do. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
4f338c9bbff090d606afdc22373cc7869b0d0c89 |
|
08-Sep-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: don't overflow cmdstream buffer so much We currently aren't too clever about dealing with running out of cmdstream buffer space. Since we use a single buffer for both drawing and tiling commands, we need to ensure there is enough space at the tail of the cmdstream buffer to fit the tiling commands. Until we get more clever, the easy solution is a threshold to trigger flushing rendering even if the application does not trigger flush (swap, changing render target, etc). This way we at least don't crash for apps that do several thousand draw calls (like some piglit tests do). Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
f7debd4a3e672e684fc40b3c440f0c4b6301f790 |
|
17-May-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fix index buffer offset Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
b8f78e18907be379415c8c804b634808349fc1d9 |
|
10-May-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: add support for hw queries Real GPU queries need some infrastructure to track samples per tile and accumulate the results. But fortunately this can be shared across GPU generation. See: https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
89dc2825819c0260511c6596497c8a350d9901a7 |
|
10-Feb-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fix problems if no color buf bound Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
646c16af6e23184078995bcd3fc3db00b7c21250 |
|
08-Jan-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno: add basic query support Add for now some simple/basic query support (ie. things not actually requiring the GPU). Might change around a bit when I actually add GPU queries, but for now this enables some useful performance info in the GALLIUM_HUD. For example: GALLIUM_HUD=fps+batches+batches-sysmem+batches-gmem+restores,draw-calls The driver specific specific queries are: + draw-calls + batches - number of batches per second, sum of batches-sysmem plus batches-gmem + batches-gmem - render a set of tiles in GMEM, for each tile (optionally) system mem -> gmem (restore), plus N draws, plus gmem -> system mem (resolve) per second + batches-sysmem - N draws to system memory (GMEM bypass) per second + restores - number of GMEM batches that required restore per second Ideally for GMEM rendering, you want batches-gmem to equal fps. If the app is doing something that triggers multiple passes (ie. requires extra round trip gmem <-> system memory) then the # of batches per second will go up relative to fps. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
c0766528baaef48902c87bbdaa4f5926c472269b |
|
07-Jan-2014 |
Rob Clark <robclark@freedesktop.org> |
freedreno/a3xx: support for hw binning pass The binning pass sorts vertices into which bins/tiles they apply to. The visibility information generated during the binning pass can be used to speed up the rendering pass by filtering out vertices which do not apply to the current tile. See: https://github.com/freedreno/freedreno/wiki/Adreno-tiling#optimized-approach This brings a significant fps boost. A rough assortment of tests (supertuxkart, etracer, tremulous, glmark2 'build' test, etc) seems to yield a ~35-45% fps improvement. For now, to be conservative, the binning pass is not enabled yet by default. To enable it use: FD_MESA_DEBUG=binning So far I haven't found anything that breaks with binning enabled, but I'd like a bit more testing before I enable it as default. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
2bc1fc2fb61897ab188f4a7150233827747827ff |
|
25-Oct-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: emulated unsupported primitive types Use u_primconvert to convert unsupported primitives into supported primitive plus index buffer. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
5127436a4a1a7fb56acbd2934318d3053f37af68 |
|
25-Oct-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: update generated headers pull in some fixes to draw-initiator/prim-type. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
74052347f3fe32053bed72d623e7216b7b7f5605 |
|
02-Sep-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fd_draw helper Have a single helper that all draws come through.. mainly for a convenient debug and instrumentation point. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
e95b7d89b9cd7d82b6122f9ad9bbf2249a0a8802 |
|
29-Aug-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: updates for msm drm/kms driver There where some small API tweaks in libdrm_freedreno to enable support for msm drm/kms driver. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
4c91930a257ac500029f56514c5504ad66b7cf8f |
|
21-Aug-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: fix segfault when no color buffer bound Don't crash when no color buffer bound. Something caught when starting to run piglit, fixes a hanful of piglit tests. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
e9edbf0a688c68ef0896e5d4278f411f6b6f8398 |
|
01-Jun-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: better scissor fix Actually respect rasterizer state. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
4af1dcbb7d5431ae75cc39568c99d7a20231f081 |
|
27-May-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: gmem bypass The GPU (at least a3xx, but I think also a2xx) can render directly to memory, bypassing tiling. Although it can't do this if blend, depth, and a few other features of the pipeline are enabled. This direct memory mode can be faster for some sorts of operations, such as simple blits. In particular, this significantly speeds up XA by avoiding to pull the entire dest pixmap into GMEM, render tiles, and write it all back out again. This should also speed up resource copy-region and blit. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|
18c317b21ddc2ec4538544f9dd69dc568dcf821f |
|
26-May-2013 |
Rob Clark <robclark@freedesktop.org> |
freedreno: prepare for a3xx Split the parts that are specific to adreno a2xx series GPUs from the parts that will be in common with a3xx, so that a3xx support can be added more cleanly. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/drivers/freedreno/freedreno_draw.c
|