Commit Graph

2601 Commits

Author SHA1 Message Date
Chris Wilson 5e04ded2bc i915: Fix missing texture offset for mask.
In commit e581ceb, I modified the shader generation to accommodate mixed
textures and solids but missed applying the new computed sampler for the
mask.

References:

  Bug 23803 [bisected i915] gnome characters disappear
  http://bugs.freedesktop.org/show_bug.cgi?id=23803

  Bug 25031 rendering and color corruption since 14109abf
  http://bugs.freedesktop.org/show_bug.cgi?id=25031

  Bug 25047 [945GM bisected] rendercheck/repeat/triangles regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25047

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30 11:12:03 +00:00
Chris Wilson a8ea20100d debug: Don't always flush the batch when emitting a debugging flush
I incorrectly changed the logic in 285f286 and caused the batch to
always be flushed when debugging, instead of merely inserting a MI_FLUSH
between operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30 10:13:18 +00:00
Chris Wilson c10850c63f overlay: Fix build after 646b4a9483
The compile cleanup was not without fault... Apparently I don't have
XVMC enabled anymore and so missed that this variable is actually used.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30 09:07:57 +00:00
Chris Wilson 3f11bbec42 uxa-glyphs: Enable TILING_X on glyph caches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30 00:58:05 +00:00
Chris Wilson 19d8c0cf50 uxa: PutImage acceleration
Avoid waiting on dirty buffer object by streaming the upload to a fresh,
non-GPU hot buffer and blitting to the destination.

This should help to redress the regression reported in bug 18075:

  [UXA] XPutImage performance regression
  https://bugs.freedesktop.org/show_bug.cgi?id=18075

Using the particular synthetic benchmark in question on a g45:

Before:
   9542.910448 Ops/s; put composition (!); 15x15
   5623.271889 Ops/s; put composition (!); 75x75
   1685.520362 Ops/s; put composition (!); 250x250

After:
  40173.865300 Ops/s; put composition (!); 15x15
  28670.280612 Ops/s; put composition (!); 75x75
   4794.368601 Ops/s; put composition (!); 250x250

which while not stellar performance is at least an improvement. As
anticipated this has little impact on the non-fallback RENDER paths, for
instance the current cairo-xlib backend is unaffected by this change.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30 00:36:49 +00:00
Chris Wilson f7540f0609 Only flush batch during prepare access if it may modify the pixmap.
As we track when a pixmap is active inside a batch buffer, we can avoid
unnecessary flushes of the batch when mapping a pixmap back to the CPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29 22:42:07 +00:00
Chris Wilson 9a2c18fb92 batch: Emit a 'pipelined' flush when using a dirty source.
Ensure that the render caches and texture caches are appropriately
flushed when switching a pixmap from a target to a source.

This should fix bug 24315,
  [855GM] Rendering corruption in text (usually)
  https://bugs.freedesktop.org/show_bug.cgi?id=24315

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29 22:42:07 +00:00
Chris Wilson 285f286597 batch: Track pixmap domains.
In order to detect when we require cache flushes we need to track which
domains the pixmap currently belongs to. So to do so we create a device
private structure to hold the extra information and hook it up.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29 22:42:03 +00:00
Chris Wilson 646b4a9483 Cleanup a few compiler warnings.
Simple warnings for unused variables and C99-style declarations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29 10:54:29 +00:00
Daniel Kahn Gillmor eda2bb2678 Makefile.am: Add missing .g4i to be included in the tar file.
Apparently Debian packages were having to manually add these files
back in. Distribute them in the first place like we meant to.
2009-11-20 01:53:13 +01:00
Gaetan Nadon bb994ce018 .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-11-14 09:23:55 -05:00
Gaetan Nadon 67bbda0bdd .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-11-14 09:23:55 -05:00
Chris Wilson c180baf43b i915: Derive the correct target color from the pixmap by checking its format
Particularly noting to route alpha to the green channel when blending
with a8 destinations.

Fixes:

  rendercheck/repeat/triangles regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25047

introduced with commit 14109a.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-13 20:20:52 +00:00
Chris Wilson 14109abf28 i915: Fix texture sampling coordinates.
RENDER specifies that texels should sampled from the pixel centre. This
corrects a number of failures in the cairo test suite and a few
off-by-one bug reports.

  Grey border around images
  https://bugs.freedesktop.org/show_bug.cgi?id=21523

Note that the earlier attempt to fix this was subverted by the buggy use
of 1x1R textures for solid sources -- which caused the majority of text
to disappear.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10 15:30:49 +00:00
Chris Wilson e581ceb738 i915: Use the color channels to pass along solid sources and masks.
Instead of allocating and utilising the texture samplers for 1x1R
solid sources and masks we can simply use the default diffuse and
specular colour channels and adjust the fragment shader appropriately.
The big advantage is the reduction in size of batches which should give
a good boost to glyph performance, irrespective of the additional boost
from using simpler shaders.

However, the motivating factor behind the switch is that our use of 1x1
textures turns out to be buggy...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10 15:19:23 +00:00
Chris Wilson 33cabbfca6 i915: Check for overflow before overflowing.
As the immediate victim of the overflow would be to overwrite the maximum
permissible value, the test was optimistic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10 15:19:17 +00:00
Chris Wilson 67af5a9925 Check that batch buffers are atomic.
Since batch buffers are rarely emitted by themselves but as part of a
sequence of state and vertices, the whole sequence is emitted atomically.

Here we just enforce that batches are marked as being part of an atomic
sequence as appropriate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10 15:19:08 +00:00
Eric Anholt dbb68168dc Revert "configure: make --disable-dri work even if the server supports DRI"
This reverts commit a851139c21.
It broke the build, and I don't see why we should be supporting this
anyway.

Conflicts:

	configure.ac
	src/Makefile.am
2009-11-05 16:02:02 -08:00
Eric Anholt 4c8e783d84 Fix "Remove flow-control macros for fallbacks in the 2D driver."
I guess this is the sort of failure due to rebase-happiness that makes
Linus yell at us for rebasing.
2009-11-05 16:01:32 -08:00
Daniel Vetter d0e08fe611 Kill some more #defines only needed for User-Modesetting
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-05 14:22:59 -08:00
Eric Anholt 8ff2a64964 Remove flow-control macros for fallbacks in the 2D driver.
It's poor style, and has confused new developers.
2009-11-05 14:22:56 -08:00
Jesse Barnes c87585229b Increase stride limit for IGDNG
It can go up to 32k.  Upping this lets me use my 2560x1600 and 1920x1200
monitors in an extended desktop configuration.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-11-05 13:35:34 -08:00
Rémi Cardona 3c0a43b24c configure: use CWARNFLAGS from xorg-macros.m4
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-05 16:58:35 +01:00
Rémi Cardona a851139c21 configure: make --disable-dri work even if the server supports DRI
XF86DRI is defined by the SDK so not defining it here just breaks the
build. Define HAVE_DRI instead to avoid collisions.

Note: DRI2 is still enabled/disabled entirely by SDK defines.

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-05 16:58:34 +01:00
Thomas Arnhold 751e0a3e45 Fix 64-bit compiler warnings in intel_xvmc_dump_render().
Bug #24396.
2009-10-19 11:35:30 -07:00
Eric Anholt 3e8f2eae3a XVMC: Use XCB DRI2 instead of cargo-culting our own copy of Xlib stuff. (v2)
v2: Incorporate comments from Jamey on device name handling and extension
detection.
2009-10-19 10:36:30 -07:00
Eric Anholt 38ab403d7a Enable XVMC by default on gen4. 2009-10-15 12:36:17 -07:00
Zhenyu Wang f171069608 i965 XvMC cleanup
Remove bo pin for surface buffer access, and remove access
attempt for possible unmapped framebuffer. Using xv buffer
pointer to pass current xvmc surface bo handler, which is
assigned to src image bo and handle that the same way as in Xv.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
[anholt: Fixed up for conflict against the XV rework.  Not tested, because
both mplayer and xine segfault with XVMC currently.]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15 12:36:17 -07:00
Daniel Vetter aaedeffe00 Xv overlay: fix planar YUV copy for right rotated crtcs
While copying and rotating the buffer, array access was out of bounds when
rotated to the right (RR_Rotate_270).  My buffer handling changes probably
made this bug much more likely to actually result in a SIGSEGV.

I've checked the logs and the bug exists since rotation has been supported,
i.e.  this looks like a candidate for cherry-picking for all supported
releases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15 12:36:17 -07:00
Daniel Vetter 703e3326bb Xv overlay: further cleanups
Kill some unnecessary stuff. Small code changes, but no functional ones.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15 12:36:17 -07:00
Daniel Vetter 1c2aedfce9 Xv: fixup the disabled drmmode overlay code
This code didn't survive the global renaming of vars to saner names.
Fix it up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15 12:36:17 -07:00
Daniel Vetter 909990f40a Xv overlay: remove some more dead stuff from ums overlay support
Mostly unused definitions and variables, but also some strange ums
debug code. Also kill some now obsolete comments.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-15 12:36:17 -07:00
Chris Wilson 86bc23ab5d debug: Enable cache flushing after every operation
If DEBUG_FLUSH_CACHES is enabled then emit a MI_FLUSH after every
rendering operation. This is intended to 'fix' cases where we are
missing a required flush in the middle of a sequence of operations, such
as switching between 2D to 3D and render to sampler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-14 12:06:01 +01:00
Chris Wilson 3c0815abf2 conf: Add debugging flush options
Make the following options available via xorg.conf:
  Section "Driver"
    Option "DebugFlushBatches" "1" # Flush the batch buffer after every
                                   # single operation;

    Option "DebugFlushCaches" "1" # Include a MI_FLUSH at the end of every
                                  # batch buffer to force data to be
                                  # flushed out of cache and into memory
                                  # before the completion of the batch.

    Option "DebugWait" "1" # Wait for the completion of every batch buffer
                           # before continuing, i.e. perform synchronous
                           # rendering.
  EndSection

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-14 11:53:20 +01:00
Zhao Yakui 2f134b8444 Return failure when the enum-type output property values are not found
Failure to do so causes xrandr to report incorrect property values.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-13 12:30:21 -07:00
Albert Damen fcc2ee48b8 Drop frontbuffer from crtc in I830CloseScreen
By dropping the frontbuffer from the crtc, the new frontbuffer
can be properly added to the crtc when the xserver is reset.

Signed-off-by: Albert Damen <albrt@gmx.net>
2009-10-13 10:51:24 -07:00
Dave Airlie 8a77877f9c drmmode: with 1.7 server, set mode major doesn't get gamma setup.
Noticed this on Fedora, where 1.7 server does gamma via the randr
codepaths however kms doesn't have this call which happens in the
non set_mode_major path.

probably should be backported to released drivers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-13 09:19:31 +10:00
Jesse Barnes d8c7678dda DRI2 compat build fix: it's drawable->pScreen not drawable->screen
Fallout from the conversion; DRI2 compat path was broken.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-10-12 14:02:12 -07:00
Eric Anholt 8b2d2ff0d0 Clean up more i830_memory.c madness.
It was cooking up insane alignment values for buffers that new libdrm was
justifiably complaining about, but it turns out we don't need the alignment
values anywhere because the only case they're needed, they're computed
entirely by the kernel.  Also, the XVMC code was passing a completely unused
flag in.
2009-10-08 15:34:10 -07:00
Eric Anholt d525a0e993 Rename pScreen to screen. 2009-10-08 15:34:10 -07:00
Eric Anholt b6262dcd27 Rename pGC to gc. 2009-10-08 15:34:10 -07:00
Eric Anholt fdcfeb822d Rename pDraw to plain old drawable. 2009-10-08 15:34:10 -07:00
Eric Anholt 7bbf4ac713 Rename the xv pPriv to adaptor_priv to reflect whose private it is. 2009-10-08 15:34:09 -07:00
Eric Anholt f309d47524 Call pPixmaps plain old pixmaps. 2009-10-08 15:34:09 -07:00
Eric Anholt da0f6616ad de-pCamelHungarian the Render pictures and pixmaps. 2009-10-08 15:34:09 -07:00
Eric Anholt 050a141b7b Share several render fields between render implementations.
Also, start settling on the cairo naming for things: source, mask, and dest.
2009-10-08 15:34:09 -07:00
Eric Anholt af27a3a0a5 Rename the xf86 screen private from pScrn to scrn. 2009-10-08 15:34:09 -07:00
Eric Anholt cc5d3ba3c3 Rename the screen private from I830Ptr pI830 to intel_screen_private *intel.
This is the beginning of the campaign to remove some of the absurd use of
Hungarian in the driver.  Not that I don't like Hungarian, but I don't need
to know that pI830 is a pPointer.
2009-10-08 15:34:09 -07:00
Eric Anholt 5e44a0fa42 Remove more dead UMS code. 2009-10-06 18:08:51 -07:00
Eric Anholt 6a716a25ab Remove the reg_dumper code, now that it's been moved to intel_gpu_tools. 2009-10-06 17:58:32 -07:00