summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.c
AgeCommit message (Collapse)Author
2014-07-16sna/gen2+: Remove assertion on draw->type for fillsChris Wilson
I overlooked the tiling-fill path passing down a temporary DrawableRec into the fill_boxes callback - invalidating the assertion. Fixes regression from commit 43176b9bfafe389c4b9ed676f4e50e3b06f858c4 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 30 21:01:11 2014 +0100 sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c62 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-02sna: Use the threaded compositor for picture conversionsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn boChris Wilson
One day, we will move the width/height/bpp to the bo itself... Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Fix uninitialisable variableChris Wilson
sna_render.c: In function 'sna_render_picture_downsample': sna_render.c:822: warning: 'priv' may be used uninitialized in this function introduced in commit ded05e8abb248664124d2b86f77c27497a252c4e Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 23 22:15:56 2014 +0100 sna: Allow scratch pixmap to allocate linear GPU bo Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna: Fix the usual "x = y" typos in creating boxesChris Wilson
Fixes regression from commit 1d74b2e07d125ad95b9db6c9c032e90faf2bfa60 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 24 08:58:51 2014 +0100 sna: Decompose self-copy into overlapping/non-overlapping regions Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna: Decompose self-copy into overlapping/non-overlapping regionsChris Wilson
We only need to stage the copy for the overlapping portion of the self-copy, for the rest we can do in a single pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna/dri2: Add a dash more assertsChris Wilson
References: https://bugs.freedesktop.org/attachment.cgi?id=101618 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Allow scratch pixmap to allocate linear GPU boChris Wilson
When allocating a scratch pixmap, we do so in the expectation that rendering on the GPU is always preferrable, so even allocate a small linear bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: First copy to overlap temporary must be using GXcopyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Update damage pointer after the implicit reductionChris Wilson
sna_damage_contains_box() routine implicitly reduces the damage before performing its check. This may alter and even destroy the damage entry, so pass in the handle so that it can be updated correctly. References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Auto-retire upload proxiesChris Wilson
This was disabled in commit 9f4f855ba37966fb91d31e9081d03cf72affb154 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon May 26 07:06:18 2014 +0100 sna: Implicit release of upload buffers considered bad as retiring the buffers during the command setup could free one of the earlier bo used in the command. But discarding the snooped bo could still be advantageous. So restore the automatic discard of upload proxies, but make sure we only do between operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matti Hämäläinen <ccr@tnsp.org>
2014-06-05sna/dri2: Enable immediate buffer exchangesChris Wilson
The primary benefit of this is avoid the extra blit when using a compositor and instead propagate the compositor flip on the frontbuffer to the scanout, or equivalently allows a fullscreen game to flip onto the scanout without intervention by TearFree. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Unexport kgem_get_unique_id()Chris Wilson
This should always be set during bo creation Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-28Silence CLang (almost)Chris Wilson
Fix up all the warnings about implicit enum conversions. The container_of() macro remains defunct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-27sna: Handle bad picture format/depth mismatchesChris Wilson
Scaling the output feed in an invalid picture->format/depth combination which causes the fallback downsampling function to explode. Whilst this is a bug in the higher layer, we can handle the error anyway. References: https://bugs.freedesktop.org/show_bug.cgi?id=79320 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-26sna: Implicit release of upload buffers considered badChris Wilson
Currently upload buffers are automatically decoupled when the buffer is retired. As retiring can happen during command setup after we have selected which bo to render with, this can free the bo we plan to use. Which is bad. Instead of making the release of upload buffers automatic, we manually check whether the buffer is idle before use as a source to consider scrapping it and replacing it with a real GPU bo. This is likely to keep upload buffers alive for longer (limiting reuse between Pixmaps but making reuse of the buffer within a Pixmap more likely) which is both good and bad. (Good - may improve the content cache, bad - may increase the amount of memory used by upload buffers for arbitrary long periods.) Reported-by: Matti Hämäläinen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79238 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-28sna: Factor in destination sizes for choosing intermediate tiling bo sizeChris Wilson
When tiling, factor in the destination usage of the aperture in case that reduces the available aperture for the intermediate bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Move sigtrap wrapping closer to threaded sw compositeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23sna: Avoid erroneous discarding operations for partial compositesChris Wilson
Composite operations were presumed to cover their entire width x height area. However, a few paths submit boxes that do not cover the clip region and so the optimisation made during prepare to discard completely overwritten data is incorrect (and leads to corruption - stale data is seen which the client expected to have been overdrawn). So along these more unusual paths, we must add a flag to prevent the overzealous discard. Notably, xfce4 triggers this as it uses a lot of unantialiased trapezoids in its theme drawing. References: https://bugs.freedesktop.org/show_bug.cgi?id=69528 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28sna: Tidy a split conditional in an picture uploadChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna: Pass usage hint down to render fill routinesChris Wilson
For the scanlines emitted for rendering Core drawing primitives, it is preferable to use the BLT engine, so pass those hints down. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Apply the non-relaxed fencing partial paranoia everywhereChris Wilson
This is required to ensure that the tiled offsets are tile-row aligned. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1232546 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Fix regression in picture extractionChris Wilson
This is a little helper function, that just returns a bool, not the error code used by the render backends. Instead the caller tries an alternative method of extraction before giving up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Catch SIGBUS to prevent X deathChris Wilson
We know that when we access either a CPU or GTT mmap we are vulernable to receiving a SIGBUS. In fact, we can catch these and abort the operation preventing X and all of its clients from randomly dieing. This helps for instance if you try and use a 1GiB frontbuffer on a 2GiB machine... For complete protection, we also need to catch signals for all GTT maps, such as VBO and staging buffers. (TBD) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Trigger fallback after intermediate pixmap allocation failureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18intel: Compile fixes for base install of SLED11.sp3Chris Wilson
Highlights of that distribution include xorg-xserver-1.6.5, kernel 3.0.76 and gcc-4.3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-14sna: Rename sna_pixmap_get_bo()Chris Wilson
Mark how dangerous this function is by giving it a __ prefix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29sna: Suppress a few harmless warningsChris Wilson
Mostly of the only used in debugging path variety. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19sna: Tidy a few DBG regarding cached uploadsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-13sna: Skip copying to the intermediate target if we will completely overwrite itChris Wilson
Occasionally when forced to use an intermediate destination surface, we know that we will completely overwrite the contents of the surface and so we can forgo the initial copy from the target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-28sna: Markup when a gradient is opaqueChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-28sna: Compensate redirect drawing subrectangle inside an offset pixmapChris Wilson
Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66249 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-28sna/blt: Refine op placement logic for handling current source locationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-26sna/gen4+: Fix determination of intermediate extentsChris Wilson
Complete logic fail for finding the bounding box of the boxes to be copied. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66168 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-11sna: Make sure the source is coherent on the CPU before uploadingChris Wilson
Similar to 7d91051c, but along the render path rather than CopyArea. Makes the presumption that for the upload path the region is stored on the CPU explicit. References: https://bugs.freedesktop.org/show_bug.cgi?id=61628 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-28sna: Make the backend identifier more informativeChris Wilson
This is useful, for example, with the multiple gen7 variants. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-01sna: Be careful not to preemptively upload portions of a SHM pixmapChris Wilson
Only upload the portion of the pixmap being used for this rendering operation, as outside of that may remain undefined and to be written by the client before a future operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-23sna: Convert out-of-bounds sample to CLEARChris Wilson
If asked to perform pixelformat conversion of a sample that resides outside the valid area, we can simply substitute CLEAR. Bugzila: http://bugs.freedesktop.org/show_bug.cgi?id=62681 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-18sna: Add a pair of sanity checks before creating the redirection targetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-12sna: Missing git-add for 09862a85eba243bChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-12sna: Mark redirect proxies with a unique idChris Wilson
This helps gen3 in particular as it uses the unique_id field of a bo to detect changes in render target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-12sna: Apply the source offset to the transform when fixing up gradientsChris Wilson
Otherwise pixman will apply the source transform to the offsets. Reported-by: Ognian Tenchev <drJeckyll@Jeckyll.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62198 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Improve handling of migrated userptr boChris Wilson
Superficially fixes gimp-2.9 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Only use the GPU bo after migratingChris Wilson
If we choose not to migrate the damage to the GPU bo, then it will be incoherent. This just flattens the logic out as priv->gpu_bo should be NULL here anyway. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22sna: Refuse to create larger than max temporary upload boChris Wilson
The maximum size is determined by available RAM, if we exceed it we greatly increase the risk of swap thrashing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22sna: Allow picture fixup in channel format if not changing RGB depthChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13Revert "sna: Avoid promoting SHM CPU bo to GPU to maintain coherence with ↵Chris Wilson
SHM clients" This reverts commit f743cd5734ca502aa8bdb0e1327fe84d6ce82755.
2013-02-09sna: Fix alignment of the base of partial buffers for pre-G33 chipsetsChris Wilson
The older chipsets have much more restrictive alignment rules for the base address of tiled but unfenced objects. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1120108 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-09sna: Promote to GPU is only partially damaged on the CPU but busy on the GPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08sna/gen4: Split the have_render flag in separate prefer_gpu hintsChris Wilson
The idea is to implement more fine-grained checks as we may want different heuristics for desktops with GT1s than for mobile GT2s, etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>