summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-27sna/gen2: Reset BLT registers across 2D/3D context switchesHEADmasterChris Wilson1-0/+12
It appears the hardware trashes the BLT registers after a 3D context switch, so we need to reload. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Fast path typically unclipped tiled rectsChris Wilson1-89/+75
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Use private identifier for internal scratch pixmapsChris Wilson5-4/+10
This was meant to be a part of the previous commit. These are the scratch pixmaps for which we truly do want to allocate GPU-only. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Create scratch pixmap on the CPUChris Wilson1-5/+2
Contrary to earlier belief, the only usage of CREATE_PIXMAP_USAGE_SCRATCH in the dix/mi are either along paths unused by us or more importantly for operations which are detrimental to create GPU-only buffers. So create CPU pixmaps instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Tweak zero line spans to include missing last segmentChris Wilson1-8/+70
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Fix advance through clip boxes for fill->boxesChris Wilson1-5/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Fix PolyPoint not to always send 512 boxesChris Wilson1-3/+3
Just emit the remaining boxes! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Use fill->boxes to pack PolyFillRectangleChris Wilson1-68/+84
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Use fill->boxes for rectilinear blitsChris Wilson1-182/+321
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Clip PolyLines to the current clip boxChris Wilson1-2/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Handle singular clip regions for PolyRectanglesChris Wilson1-105/+219
Otherwise X will crash! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna/io: Update batch mode after submitting partial requestsChris Wilson1-6/+15
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Further improve use of fill->boxes for PolyRectangleChris Wilson1-285/+183
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna/blt: After submitting the batch, it will be emptyChris Wilson1-2/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna/blt: Convert Copy with color 0 into a ClearChris Wilson1-0/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Suppress an overwritten fillChris Wilson1-0/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna/gen2: Cache the last solid colour for spansChris Wilson2-3/+8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna/composite: Discard opaque masksChris Wilson3-0/+17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27sna: Fix debug compilation, again.Chris Wilson7-10/+10
2011-10-27sna: Handle degenerate copy area whilst wedgedChris Wilson1-0/+10
We want to return early to avoid handing the empty box as the lower code makes the assumption that it has work to do. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna/blt: Rename the composite pathsChris Wilson1-24/+24
Whilst re-reading, I found the old naming scheme slightly muddled and not nearly as descriptive as it should be. Hopefully this slight tweak reads better in 6 months time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna/blt: Share the common fill->boxes between blt and render pathsChris Wilson1-81/+120
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna: Inline box_intersect()Chris Wilson1-1/+1
Most of this branchy function is spent in manipulating the stack for the function call, so inline it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna: Use fill->boxes to unroll FillSpansChris Wilson1-104/+156
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna: Use fill->boxes to unroll PolyPointChris Wilson1-37/+46
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26sna: Use the new fill->boxes for PolyRectangleChris Wilson1-63/+49
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26self-copy-damageChris Wilson1-1/+2
2011-10-26sna: Convert diagonal zero-width lines into blitsChris Wilson9-91/+1020
This is slower than falling back to swrast for x11perf (up to 4x slower on SNB), it is still faster than doing that rasterisation through a WC-mapping and much faster in ordinary usage due to avoiding the readback hit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23sna: Flatten the branching for fill-spansChris Wilson1-79/+204
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23sna/blt: Upload the box using a single 64-bit instructionChris Wilson1-6/+3
So long as we have 64-bit instructions of course! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23sna: Execute blits directly for PolyRectangleChris Wilson1-1/+557
By constructing the batch buffer directly for PolyRectangle, rather than via miPolyRectangle->(PolyFillRectangle/PolyLine), we dramatically reduce the CPU overhead and can saturate the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Fix debug compilationChris Wilson1-9/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Treat a bo marked as being last seen on the GPU as requiring a flushChris Wilson1-2/+1
We are hitting this path upon retiring the old scanout buffer following a page-flip. We want to treat this as being hot and available for reuse, so mark it as such until the next retirement pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Fast path unclipped pointsChris Wilson3-16/+216
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Fast path for unclipped rectanglesChris Wilson4-44/+241
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Optimise reduce_damage() to handle all-damaged pixmapsChris Wilson1-0/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Fast-path unclipped fill spansChris Wilson1-11/+47
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Short-circuit GetWindowPixmap() to speed-up pixmap retrievalChris Wilson2-3/+15
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Micro-optimise PolyLine bltChris Wilson1-33/+38
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Remove the memset(0) of the fill opChris Wilson6-3/+26
The backends are all expected to initialise the state required. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Pass a BoxRec to the fill opChris Wilson9-22/+167
For many of the core drawing routines, passing a BoxRec for the fill is more convenient since they already have one generated by the clip intersection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Check whether we can blt whilst determining the PolyLine extentsChris Wilson1-39/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna: Speed-up blitting of unclipped linesChris Wilson1-76/+141
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna/damage: Stash the last freed damage for quick reallocationChris Wilson1-2/+11
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21sna/damage: Only track the mode globallyChris Wilson2-118/+125
As damage accumulation is handled modally, we do not need to track the mode per elt and so attempt to simplify the code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-20sna: Actually apply the composite offset for the self-copyChris Wilson3-11/+175
I translated the region to copy by the composite pixmap offset, only failed to use the translated region for the actual copy command (using instead the original boxes). Fix that mistake by avoiding the temporary region entirely and applying the translation inplace. We also have to be careful in the case of copying between two composited windows that have different offsets into the same screen pixmap. This fixes the regression introduced with a3466c8b69af (sna/accel: Implement a simpler path for CopyArea between the same pixmaps). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-20sna/dri: Perform a little dance to restore the gpu status on release of the boChris Wilson2-2/+12
As the bo is outside of our control whilst it is under the influence of an external renderer, we try to maintain it on the gpu so as to avoid unnecessary ping-pong. But once it is wholly back under our control, we want to stop paying the penalty for sharing it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19sna: Reuse any partial write buffer for readbackChris Wilson3-17/+21
Take advantage of any available temporary buffer that we reuse for readback knowing that it is the last operation in the batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19sna: Add some debug to discern the nature of the Cr fallbackChris Wilson1-4/+28
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19sna: Clean up some debug messages for 64bitChris Wilson2-5/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>