summaryrefslogtreecommitdiff
path: root/src/sna/sna_glyphs.c
AgeCommit message (Collapse)Author
2013-02-10sna: Backport to squeeze - Xorg-1.6, pixman-0.16, libdrm-2.4.21Chris Wilson
The principle change is to switch to the old Privates API and undo the Region renames. The downside is that this ignores the critical bugfixes made to the xserver since xorg-1.6 - but I assume that whoever wants to run the latest hardware on the old xservers is also backporting those stability fixes... 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-01-18sna: Replace double negative '!RegionNotEmpty' with the equivalent RegionNilChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02sna: Micro-optimise glyph_valid()Chris Wilson
Note that this requires fixing up the glyph->info if the xserver didn't create a GlyphPicture. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30sna: Unify gen4 acceleration againChris Wilson
After disabling render-to-Y, 965g seems just as happy with the new code paths as g4x. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30Convert generation counter to octalChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30sna: Prevent gen4 from rendering to I915_TILING_YChris Wilson
It always seems to end up in a hang... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-23sna/gen4: Revert changes to 965g[m]Chris Wilson
The changes tested on g45/gm45 prove to be highly unstable on 965gm, suggesting a radical difference in the nature of the bugs between the two generations. In theory, g4x has additional features that could be exploited over and above gen4 which may prove interesting in the future. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-23sna/gen4: Force composite(WHITE, glyph) for building the glyphstring maskChris Wilson
For reasons that are not apparent, if we don't composite with source/mask for the glyph strings, there appears to be some cache corruption. About as bizarre as the rest of gen4 idiosynacracies. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna: Propagate failures from compositing glyph masksChris Wilson
So that we can fallback correctly. This is primarily using for debugging failure paths... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10sna: Workaround issue with global glyph privates and shared ZaphodHeadsChris Wilson
Under ZaphodHeads we end up with multple screens accessing the common sna_glyph_key and so cause conflicting updates and erroneous references into the screen-local texture atlases. Two approaches can be tried here. Transition to a screen-specific private key introduced with xorg-1.13, or to move the glyph cache (and the rest of the gpu state tracker) down into the device private rather than screen private. This is neither of those, but a workaround to avoid reusing the incorrect entries from shared screens. Reported-by: Stephen Liang <inteldriver@angrywalls.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54707 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06sna/prime: Distinguish forms of pinned pixmapChris Wilson
So that we can allow prime to replace the backing bo of currently exported pixmaps through DRI2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-04sna: Port prime interfacingChris Wilson
Preliminary prime support. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16sna/glyphs: Fix potential leak of glyph extents (for many lists of many formats)Chris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12sna: Fix compilation without pixman glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-12sna: Make the failure to create render caches non-fatalChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-08sna: Add DBG option to disable discarding of glyph masksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-08sna: Minor DBG for fallback glyphs and discarding the maskChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30sna: Prefer not to create a GPU bo without RENDER accelerationChris Wilson
Unless that bo happens to be used on a render chain to the scanout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22sna/glyphs: Also discard the glyph mask for bitmaps with an opaque sourceChris Wilson
Though I expect all such glyphs to be caught by the non-overlapping checks... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21sna: Refresh experimental userptr vmap supportChris Wilson
Bring the code uptodate with both kernel interface changes and internal adjustments following the creation of CPU buffers with set-cacheing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna/glyphs: Perform the fallback mask reduce before moving the glyph pointersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna/glyphs: A repeat of the earlier typo for pixman glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna/glyphs: Fix typo and render glyphs to the small maskChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna: Enable pixman_glyphs if availableChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna: Add some DBG for selecting glyph pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-12sna/glyphs: Fix array allocation for list_extentsChris Wilson
Originally I intended to skip assigning the box on the last list. However, loop simplicity failed and now we run the risk of writing beyond the end of stack_extents, and overwriting the list_extents pointer. Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-12sna/glyphs: Apply mask reduction along fallback paths as wellChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-12sna: Rearrange the tests for dropping the glyph maskChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-11sna: Discard the mask for "non-overlapping" glyphsChris Wilson
If we can acheive the same rasterisation results without the mask, rendering the glyphs-to-dst is so much faster that it outweighs the cost of checking for overlapping glyphs. The penalty is then for code that correctly declared that it required a mask, who now have an extra ~10% overhead in the processing of their glyphs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-09sna: Check for overlapping glyphs within each list, then overlapping listsChris Wilson
Spotted by Zhigang Gong is this optimisation to avoid the problem with multiple lines passed in a single request (using multiple lists). As the start of line will overlap with the previous line when we use the simple bbox comparison, we always declare those runs as overlapping and so we cannot substitute a glyph mask. However, we can reduce the problem to only checking for overlapping glyphs within a list and then checking for overlapping lists. Very, very clever. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-09sna: Simplify the DBG incarnationChris Wilson
It was only ever used in conjunction with HAS_DEBUG_FULL. For debug purposes it is as easy to redefine DBG locally. By simplifying the DBG macro we can create it consistently and so reduce the number of compiler warnings. Long term, this has to be dynamic. Sigh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-08sna: Fixup fb wrapperChris Wilson
To accommodate changes in the Xserver and avoid breakage; would have been much easier had the fb been exported in the first place.
2012-07-06sna: Refactor a common function: is_clipped()Chris Wilson
Had I done this earlier, I would not have the bug in the open-coded version. Le sigh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-05sna: Fix clipping of glyphs-to-dst for partially obscurred windowsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-17sna: Composite glyphs inplace if the CPU is already all-damagedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-15sna: Tweaks for DBG missing glyphs through fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-15sna: Don't trim prepare for glyphs_via_maskChris Wilson
If we pass the expected width/height without passing the per-glyph offset into the preparation function, we make the erroneous mistake of analysing the glyph cache only for the mask extents and so will miss glyphs that we need to upload for the operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-12sna: Remove a pair of empty stub functionsChris Wilson
The export wrappers for the glyph cache constructor/destructor existed in case there was a need to add more routines. Since that never happened, remove the extra step of indirection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31sna/glyphs: Clip the damage to the drawable for unclipped glyphs-to-dstChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31sna/glyphs: Don't apply drawable offsets twiceChris Wilson
The offsets from image_from_pict() already include the drawable offset so we need not apply them twice. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31sna/glyphs: Fix upconverting of glyphs via gpuChris Wilson
When using the mask instead of the src for adding the glyphs we need to pass the glyph coordinates through the mask coordinates rather than the source. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-31sna/glyphs: use add(WHITE, glyph, mask) for channel expansionChris Wilson
If the glyph format does not match the mask format we can not simply add the two together, but must first perform a channel expansion (or contraction) by multiplying the glyph against a WHITE source. Normally the glyph and the mask are equivalent formats and so we hit the fast path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23intel: convert sna/uxa to using new glyph picture accessors.Dave Airlie
The compat-api.h takes care of old/new servers. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-17sna/glyphs: Pass the extents to the backend for preparing to composite glyphsChris Wilson
This information should not be required, but it might come in handy, so pass it along. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03sna: Minor glyph fallback fixesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-01sna: Fast-path unclipped glyphsChris Wilson
Avoid the redundant computation of the glyph intersection with the drawable bounding box. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-06sna/glyphs: Prefer a temporary upload mask for large glyph masksChris Wilson
If the required temporary mask is larger than the 3D pipeline can handle, just render to a CPU buffer rather than redirect every glyph composition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22sna: Force fallbacks if the destination is unattachedChris Wilson
Since the removal of the ability to create a backing pixmap after the creation of its parent, it no longer becomes practical to attempt rendering with the GPU to unattached pixmaps. So having made the decision never to render to that pixmap, perform the test explicitly along the render paths. This fixes a segmentation fault introduced in 8a303f195 (sna: Remove existing damage before overwriting with a composite op) which assumed the existence of a backing pixmap along a render path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-08sna: Fix handling of large glyphs following large and shared buffer workChris Wilson
Part of the large buffer handling was to move the decision making about whether to create GPU bo for a pixmap to creation time. The single instance where we change our minds later is involving large glyphs which we choose not to cache. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>