summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
AgeCommit message (Collapse)Author
2013-06-14sna/gen3+: Remove redundant clearing of clear hint in video playbackChris Wilson
The clear hint is correctly updated when performing the move-to-gpu and so it is being superfluously repeated by the callers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-13sna/gen2+: Promote a conditional dirty into an assertionChris Wilson
If the target bo is not bound when we start to emit the composite state for the operation, we are screwed. 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-14sna/gen4: Tidy testing for an active vertex buffer idChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-14sna/gen4: Drop unused gen parameter to SF state setupChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-02sna/gen4: Kill stray debugging ErrorF from previous commitChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-02sna/gen4: Break the Video rendering loop into 16 rectangle chunksChris Wilson
If we feed more than 16 rectangles into the video rendering pipeline, the GPU goes crazy and starts emitting corruption. Lalalala. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1162046 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-27sna/gen4+: Set read-write allocation mode for the target render cacheChris Wilson
As we often first clear the destination before performing a blend, we get a performance boost if that first write populates the render cache. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-14sna/gen5+: Add missing float casts in computation of scaled src offsetsChris Wilson
Without the casts, the division ends up as 0 rather than the fractional offset into the texture. The casts were missed in the claimed fix: commit 89038ddb96aabc4bc1f04402b2aca0ce546e8bf3 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Feb 28 14:35:54 2013 +0000 sna/video: Correct scaling of source offsets Reported-by: Roman Elshin <roman.elshin@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62343 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-08sna/gen4: Initialise a pair of unimportant variablesChris Wilson
Should never actually affect any results. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-28sna/video: Correct scaling of source offsetsChris Wilson
When applying pan and zoom to a mismatched video, it would inevitably miscompute the origin and scale factors. Reported-by: Matti Hamalainen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61610 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Reverse inverted assertionsChris Wilson
Oops, the assertions that we had sufficient free space was inverted. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna/gen4+: Begin specialising vertex programs for ISAChris Wilson
Allow use of advanced ISA when available by detecting support at runtime. This initial work just uses GCC to emit varying ISA, future work could use hand written code for these hot spots. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna/gen3+: Restart vertex space checks after lock contentionChris Wilson
If we end up contending for the vertex lock, we need to double check there is sufficient vertex space left for us. Bugzill: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1124576 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna/gen3+: Assert that nbox is not 0Chris Wilson
Various assertions to track down a potential programming error. References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1124576 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13sna/gen4: Restore nonrectiinear spans workaroundChris Wilson
Instead of relying on the macro, the intention was simply to use the prefer_gpu hint. However, I dropped it whilst refactoring ideas from later generations. So restore both the debug control to force spans as well as the intended workaround. Reported-by: Edward Sheldrake <ejsheldrake@gmail.com> 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>
2013-02-05sna/gen4: Remove old single-thread SF w/aChris Wilson
The alternative of disabling GPU spans seems to be far more effective. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-05sna/gen4: Disable non-rectilinear GPU span compositingChris Wilson
This seems to be the primary victim of the render corruption, so disable until the root cause is fixed. References: https://bugs.freedesktop.org/show_bug.cgi?id=55500 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/gen3+: Flush vertex threads before touching global stateChris Wilson
We need to be careful not just when finishing the current vbo to synchronize with the sharing threads, but also before we emit the batch state that no other thread will try and do the same. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29sna/gen3+: Fix a DBG for composite_boxes()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Replace the forced vertex finish with just a waitChris Wilson
When completing a batch mid-operation, we need to wait upon the other threads to complete their writes so that memory is coherent before submitting the work to the GPU. This was achieved by forcing the finish, but all that from that is the wait, which makes the handling of threads much explicit and removes the unnecessary vbo refresh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Enable threaded rasterisation for non-antialiased geometryChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Begin sketching out a threaded rasteriser for spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20sna/gen3+: And restore non-CA compositing state after the CA passChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20sna/gen3+: Reset vertex relocation state after discarding the batchChris Wilson
Fixes a regression from commit a6ecb6d31d8c543f38fca0be6b0ec82e59dcd8d2 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jan 16 09:14:40 2013 +0000 sna: Discard the batch if we are discarding the only buffer in it as we may keep a stale relocation for the vertex buffer alive if we attempt to clear the bo using the render engine before discarding it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20sna/gen3+: Handle flushing vbo for CA glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-12sna: After a size check, double check the batch before flushingChris Wilson
As we may fail the size check with an empty batch and a pair of large bo, we need to check before submitting that batch in order to not run afoul of our internal sanity checks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-06sna/gen4+: Trim the redundant float from the fill verticesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-06Revert "sna/gen4+: Backport tight vertex packing for simple renderblits"Chris Wilson
This reverts commit 8ff76fad1fadc5e309f9a12c30f883460a432049 and commit 48e4dc4bd4b2980f0f804f572d0e3fc1bb4bc21e. I forgot gen4 and gen5 do not have the 'non-normalized' bit in their sampler states.
2013-01-02sna/gen4+: Specialise linear vertex emissionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02sna/gen4+: Tidy special handling of 2s2s vertex elementsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02sna: Fast path inplace addition of solid trapezoidsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-31sna/gen4: Tweak single-thread SF w/a for solidsChris Wilson
Allow multiple threads for the rare case of compositing with a solid color. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29sna/gen4+: Try using the BLT before doing a tiled copyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28sna/gen4+: Check for a spare exec slot for an outstanding vboChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21sna/gen4: Backport tight vertex packing of renderblitsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21sna/gen4: Backport more recent state tracking tweaksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20sna/gen4+: Amalgamate all the gen4-7 vertex buffer emissionChris Wilson
Having reduced all the vb code for these generations to the same set of routines, we can refactor them into a single set of functions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20sna: Ignore throttling during vertex closeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-19sna/gen4+: Tweak preference of GPU placement for spansChris Wilson
If the CPU bo is busy, make sure we do not stall for an inplace operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18sna/video: Amalgamate the computation of source vs dest offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17sna/video: Pass along the video source offsetChris Wilson
Fortunately nobody had yet noticed that all videos were assumed to play with a matching src/dst origin. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14sna/gen2+: Experiment with not forcing migration to GPU after CPU rasterisationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-12sna/gen3+: Use nearest for unscaled videosChris Wilson
If the output is unscaled, then we do not require pixel interpolation (and planar formats are exactly subsampled). References: https://bugs.freedesktop.org/show_bug.cgi?id=58185 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-12sna/gen4: Use the single-threaded SF w/a for spans as wellChris Wilson
Fixes the flickering seen in the fishtank demo, for example. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-09sna/gen4+: Refine test for preferring GPU spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-08sna: Flush upon change of target if GPU is idleChris Wilson
The aim is to improve GPU concurrency by keeping it busy. The possible complication is that we incur more overhead due to small batches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06sna/gen4+: Add common glyph-to-dst emittersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-04sna/gen4: Workaround render corruption with multiple SF threadsChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57410 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>