Commit Graph

81 Commits

Author SHA1 Message Date
Eric Anholt
cb4ef34214 intel: Init num_fences to clean up valgrind warning.
Valgrind doesn't know that a successful getparam sets the target of the
pointer, so just set the value beforehand.
2009-07-02 14:07:09 -07:00
Eric Anholt
b8e638d489 i965: Disable texture tiling by default.
I haven't fixed all the regressions yet, and it'll be easy to re-enable when
the known problems are fixed.
2009-06-23 19:31:43 -07:00
Brian Paul
8d48222791 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/main/api_validate.c
2009-06-16 18:25:52 -06:00
Shuang He
d027e8feff intel: Release fb backing regions in intelDestroyBuffer()
Fixes memory leak when destroying framebuffers.
2009-06-15 16:19:30 -06:00
Eric Anholt
b30dc2c66a i915: Add an option for testing the effect of early Z in classic mode.
The early Z stuff is supposed to be unsafe without some more work in the
enable/disable path (in particular, how do we want to get it disabled on
the way out to the X Server?), but at the moment is 6% in OA.
2009-06-09 16:12:43 -07:00
Brian Paul
42e9bde0fa intel: remove extra \n from warning string 2009-06-09 08:53:56 -06:00
Eric Anholt
1ba96651e1 intel: Add support for tiled textures.
This is about a 30% performance win in OA with high settings on my GM45,
and experiments with 915GM indicate that it'll be around a 20% win there.
Currently, 915-class hardware is seriously hurt by the fact that we use
fence regs to control the tiling even for 3D instructions that could live
without them, so we spend a bunch of time waiting on previous rendering in
order to pull fences off.  Thus, the texture_tiling driconf option defaults
off there for now.
2009-06-04 14:00:43 +00:00
Robert Ellison
bc3270e99f i965: send all warnings through _mesa_warning()
One warning message:
   drm_i915_getparam: -22

was still being sent to fprintf().  This causes all Piglit tests to fail,
even with MESA_DEBUG=0.

Using _mesa_warning() to emit the message allows the general Mesa controls
for messages like this to be applied.
2009-05-14 10:36:33 -06:00
Eric Anholt
e7aef006e5 i965: Use GTT maps when available to upload vertex arrays and system VBOs.
This speeds up OA on my GM45 by 21% (more than the original CPU cost of
the upload path).  We might still be able to squeeze a few more percent out
by avoiding repeatedly mapping/unmapping buffers as we upload elements into
them.
2009-04-06 10:58:52 -07:00
Eric Anholt
5cca1ceb81 intel: Clean up some a leftover from sedding of bufmgr context->screen move. 2009-04-06 10:31:13 -07:00
Eric Anholt
66175aac76 Fix DRI2 accelerated EXT_texture_from_pixmap with GL_RGB format.
This requires upgrading the interface so that the argument to
glXBindTexImageEXT isn't just dropped on the floor.  Note that this only
fixes the accelerated path on Intel, as Mesa's texture format support is
missing x8r8g8b8 support (right now, GL_RGB textures get uploaded as a8r8gb8,
but in this case we're not doing the upload so we can't really work around it
that way).

Fixes bugs with compositors trying to use shaders that use alpha channels, on
windows without a valid alpha channel.  Bug #19910 and likely others as well.

Reviewed-by:	Ian Romanick <ian.d.romanick@intel.com>
2009-03-20 10:41:28 -07:00
Brian Paul
0f04a1d3f8 mesa: remove last of _mesa_unreference_framebuffer() calls 2009-03-07 11:32:18 -07:00
Eric Anholt
40bc2748c2 intel: Add always_flush_batch driconf option for making small batchbuffers.
This can improve debugging with INTEL_DEBUG=batch,sync by giving smaller
batchbuffers.
2009-03-05 19:42:18 -08:00
Eric Anholt
f3687284c1 intel: Add always_flush_cache driconf option for debugging cache flush failure.
I keep wanting to hack this knob in as a one-time thing, so it seemed useful
to have all the time.
2009-03-05 19:42:17 -08:00
Eric Anholt
160c3617fc intel: Disable creating DRI2 FBconfigs with depth size != color size.
While it's a nice idea to be able to allow clients to choose a smaller
(or bigger for 16bpp screens!) depth size, right now DRI2 hands back a buffer
with a size that matches the drawable, rather than being based off of the
visual.  This led to problems in readback as parts of the driver disagreed
on what format the depth buffer was really in.

Fixes the remainder of bug #19447.
2009-02-26 00:20:39 -08:00
Eric Anholt
119f34e2a5 intel: Fix up x8r8g8b8 renderbuffer format so that alpha=1 spans code happens.
I was lured into a false sense of security by the fact that the spans code was
already there, and a bunch of tests didn't catch the problem.  oglconform's
mask.c did, though.

Bug #19970.
2009-02-25 23:01:57 -08:00
Eric Anholt
60953059ea intel: Clean up several 965 memory leaks on context destroy. 2009-02-17 10:58:32 -08:00
Eric Anholt
5d5ae371ea intel: Add x8r8g8b8 visuals to DRI1 fbconfigs alongside a8r8gb8.
This involved fixing driConcatConfigs to not return const (which had made a
mess of a previous patch too).
2009-02-10 18:45:18 -08:00
Michel Dänzer
eaf15db895 gallium: Fixups for driCreateConfigs MSAA support.
Add the MSAA samples array or make sure its contents are initialized.
2009-02-10 13:47:49 +01:00
Brian Paul
e13593678f re-add MSAA support
(cherry picked from commit f7d80aa006)

This also involved adding the new MSAA fields to driCreateConfigs().

Also, re-add prog_instructions->Sampler field for i965 driver.  Will
have to revisit that.
2009-02-09 11:16:20 -07:00
Eric Anholt
24ff169486 intel: Correct FBconfig color masks with DRI2. Fail at copy and paste.
This still leaves us with a broken depth 32 visual, but now it's the server's
visual setup that's at fault.
2009-01-31 12:04:07 -08:00
Eric Anholt
3ee21f30cd intel: Expose more FBconfigs in the 3D driver.
We can support any combination of (a8r8g8b8, x8r8g8b8, r5g6b5) x (z0,z24,z24s8)
on either class of chipsets.  The only restriction is no mixing bpp when also
mixing tiling.  This shouldn't be occurring currently.
2009-01-30 13:46:37 -08:00
Brian Paul
6c244b0f32 intel: #include clean-ups 2009-01-26 12:39:29 -07:00
Brian Paul
aae2729aeb intel: make intelUpdateScreenFromSAREA() static 2009-01-26 12:39:28 -07:00
Brian Paul
66c7f06413 intel: remove unused var 2009-01-26 12:39:28 -07:00
Brian Paul
4006c5e452 intel: move intelInitExtensions() and related code into new intel_extensions.c 2009-01-26 12:39:28 -07:00
Brian Paul
6fcebbe719 intel: Move swap-related functions from intel_buffers.c to new intel_swapbuffers.c 2009-01-26 12:39:28 -07:00
Timo Aaltonen
39e6d0d810 [intel] Go back to using the typedef for the sarea struct
The upstream linux kernel headers and libdrm kernel headers disagree on the
tag name for the sarea struct: _drm_i915_sarea vs drm_i915_sarea.  They
both typedef it to drm_i915_sarea_t though, so just use that.
2009-01-20 11:52:32 -05:00
Dave Airlie
b359350017 Remove third buffer support from Mesa.
This is part of the deprecated pageflipping infrastructure.
2008-12-23 15:01:53 -08:00
Dave Airlie
cd031749a7 intel: restore old vertex submit paths for i8xx hardware.
Intel docs state that only 830/845 have VBOs, 855/865 don't. So
lets just not use them on i8xx at all.

This restores the old pre-vbo code and uses it on all 8xx hw.
2008-12-02 20:31:14 +10:00
Keith Whitwell
5a46e17671 mesa: standardize on C99's uint*_t instead of u_int*_t 2008-09-21 09:45:00 -07:00
Brian Paul
ecadb51bbc mesa: added "main/" prefix to includes, remove some -I paths from Makefile.template 2008-09-18 15:17:05 -06:00
Eric Anholt
904f31a624 intel: Destroy bufmgr in screen destroy, not context.
Caused server crashes on second context creation since
7e0bbdcf03.

Bug #17600.
2008-09-16 17:02:41 -07:00
Eric Anholt
201d3419a6 intel: Remove dead allow_batchbuffer param. 2008-09-12 13:49:23 -07:00
Eric Anholt
35fd72756a intel: track move of bo_exec from drivers to bufmgr. 2008-09-10 13:59:45 -07:00
Eric Anholt
3628185f56 intel: track bufmgr move to libdrm_intel and bufmgr_fake irq emit/wait change. 2008-09-10 13:59:45 -07:00
Eric Anholt
7e0bbdcf03 intel: Move the bufmgr back to the screen.
Mesa requires that we be able to share objects between contexts, which means
that the objects need to be created by the same bufmgr, and the bufmgr
internally requires pthread protection for thread safety.
Rely on the bufmgr having appropriate locking.
2008-09-10 13:59:45 -07:00
Kristian Høgsberg
f56b569e9a DRI2: Drop sarea, implement swap buffers in the X server. 2008-08-29 12:13:14 -04:00
Dave Airlie
f75843a517 Revert "Revert "Merge branch 'drm-gem'""
This reverts commit 7c81124d7c.
2008-08-24 17:59:10 +10:00
Dave Airlie
7c81124d7c Revert "Merge branch 'drm-gem'"
This reverts commit 53675e5c05.

Conflicts:

	src/mesa/drivers/dri/i965/brw_wm_surface_state.c
2008-08-24 17:52:40 +10:00
Eric Anholt
53675e5c05 Merge branch 'drm-gem'
Conflicts:

	src/mesa/drivers/dri/intel/intel_span.c
	src/mesa/main/fbobject.c

This converts the i915 driver to use the GEM interfaces for object management.
2008-08-08 15:32:24 -07:00
Jesse Barnes
e9bf3e4cc9 intel: sync to vblank by default
Effectively default to vblank_mode=3 on Intel to avoid tearing by default.
Users wanting to go "as fast as possible" (despite not being able to see frames
faster than their refresh rate allows) can still set the vblank_mode manually.
2008-07-31 11:50:37 -07:00
Dave Airlie
04c98089d1 Revert "intel: disable zero-copy TFP."
This reverts commit 94979950e8.

I've fixed it instead
2008-07-25 19:57:35 +10:00
Dave Airlie
94979950e8 intel: disable zero-copy TFP.
patch from Fedora. maybe someone can fix this later but for now
lets try and release Mesa so ajax can live his life and get Xorg 7.4 out.
2008-07-25 16:31:38 +10:00
Eric Anholt
2e841880cf drm-gem: Use new GEM ioctls for tiling state, and support new swizzle modes. 2008-07-11 18:58:19 -07:00
Eric Anholt
19f585a3cf intel-gem: Fix Y-tiling span setup.
The boolean that the server gives us for whether the region is tiled was
getting used as the enum for what tiling mode.  Instead, guess the correct
tiling in screen setup.

Also, fix the Y-tiling pitch setup.  The pitch to the next tile in Y is
32 scanlines, not 8.
2008-07-02 09:10:21 -07:00
Eric Anholt
e74f54793e intel-gem: Move bit 6 x tiling swizzle to a driconf option, and add new mode.
It turns out that it's not just deviceID dependent, and there's some additional
undefined factor that determines the bit 6 swizzling.  It's now controllable
with swizzle_mode=[012] until we get a response on how to automatically detect.
2008-07-01 16:14:08 -07:00
Eric Anholt
654258a4fe Merge commit 'origin/master' into drm-gem 2008-06-18 14:07:38 -07:00
Brian Paul
8d976aedc4 comments 2008-06-11 19:33:14 -06:00
Eric Anholt
0227d91a9e [gem] Enable bo_reuse by default.
The objects are swappable, so we're less concerned by excessive object
allocation now, and it's about a 20% performance improvement.  If we get
concerns about the memory consumption from others, we can look into a
compromise position later.
2008-06-11 11:46:29 -07:00