Commit Graph

195 Commits

Author SHA1 Message Date
Kristian Høgsberg
4b69100bdc dri: Add DRI entrypoints to create a context for a given API 2010-04-28 14:05:21 -04:00
Zhenyu Wang
cdcef6cbf4 intel: Clean up chipset name and gen num for Ironlake
Rename old IGDNG to Ironlake, and set 'gen' number for
Ironlake as 5, so tracking the features with generation num
instead of special is_ironlake flag.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-04-21 10:11:02 +08:00
Ian Romanick
4afed821ba intel: Bump intel driver date to later than the date on the 7.8 branch 2010-03-30 15:38:03 -07:00
Kristian Høgsberg
ff6bce552a intel: Remove redundant fields from struct intel_context
All these pointers are in the __DRIcontext struct, which we point to.
2010-03-30 16:48:51 -04:00
Eric Anholt
864f2bd61d i965: Add INTEL_DEBUG=glsl_force to force brw_wm_glsl.c.
I keep finding the desire to force this path to debug it instead of
cooking up goofy-looking testcases to do so.
2010-03-22 15:04:46 -07:00
Kristian Høgsberg
6de8e563ac intel: Call _mesa_make_current() after getting initial buffers
The default viewport is the window rectangle, which is set up by
_mesa_make_current().  To be able to do that we need to get the
window dimension (and buffers) first, so we have to call
intel_prepare_render() before we can call into _mesa_make_current().

Fixes #26676 and #26678.
2010-03-17 22:45:21 -04:00
Eric Anholt
bb35000b4b intel: Remove non-kernel-exec-fencing support.
Shaves 60k off the driver from removing the broken spans code.  This
means we now require 2.6.29, which seems fair given that it's a year
old and we've removed support for non-KMS already in the last release
of 2D.
2010-03-04 16:56:32 -08:00
Brian Paul
8417528e3a intel: passs correct context type to intel_prepare_render() call 2010-03-02 07:50:15 -07:00
Eric Anholt
1489f108f4 i965: Fix up some Sandybridge define checks for the structure rebase. 2010-02-25 10:53:08 -08:00
Eric Anholt
554a8f4026 intel: Start adding defines and some bits for sandybridge bringup. 2010-02-25 10:53:06 -08:00
Kristian Høgsberg
db9c151d77 intel: Call intel_prepare_render() in intelMakeCurrent()
This restores old behaviour, where we end up doing a DRI2GetBuffers()
call from intelMakeCurrent().  The idea was that we could do this
lazily, just before we start rendering.  However, if we don't do the
DRI2GetBuffers() round-trip we don't get the drawable size and higher
level mesa ends up short-cutting a number of GL calls, such as glClear().
2010-02-23 23:20:07 -05:00
Chris Wilson
5abee283d3 intel: Check that we have a bufmgr or bail out when initializing the context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:53:56 +00:00
Kristian Høgsberg
da43aa84c8 intel: Set buffer stamp before getting new buffers
This way, if we get an invalidate as we update the buffers, we
don't clobber the drawable stamp and ignore the invalidate.

Pointed-out-by: Francisco Jerez
2010-02-19 14:12:27 -05:00
Kristian Høgsberg
298be2b028 Replace the _mesa_*printf() wrappers with the plain libc versions 2010-02-19 12:32:24 -05:00
Kristian Høgsberg
d449627829 intel: Implement the DRI2 invalidate function properly
This uses a stamp mechanisms to mark the DRI drawable as invalid.
Instead of immediately updating the buffers we just bump the drawable
stamp and call out to DRI2GetBuffers "later".

"Later" used to be at LOCK_HARDWARE time, and this patch brings back
callouts at the points where we used to call LOCK_HARDWARE.  A new function,
intel_prepare_render(), is called where we used to call LOCK_HARDWARE,
and if the buffers are invalid, we call out to DRI2GetBuffers there.

This lets us invalidate buffers only when notified instead of on
every glViewport() call.  If the loader calls the DRI invalidate
entrypoint, we disable viewport triggered buffer invalidation.

Additionally, we can clean up the old viewport mechanism a bit,
since we can just invalidate the buffers and not worry about
reentrancy and whatnot.
2010-02-17 21:53:16 -05:00
Francisco Jerez
61d26bc82e dri2: Event driven buffer validation.
When a buffer invalidation event is received from the X server, the
"invalidate" hook of the DRI2 flush extension is executed: A generic
implementation (dri2InvalidateDrawable) is provided that just bumps
the "pStamp" sequence number in __DRIdrawableRec.

For old servers not supporting buffer invalidation events, the
invalidate hook will be called before flushing the fake front/back
buffer (that's typically once per frame -- not a lot worse than the
situation we were in before).

No effort has been made on preserving backwards compatibility with
version 2 of the flush extension, but I think it's acceptable because
AFAIK no released stack is making use of it.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-16 10:38:50 -05:00
Vinson Lee
4be324386c intel: Remove unused variable. 2010-02-12 14:37:07 -08:00
Kristian Høgsberg
2f517b8e5a intel: Avoid dri_bo_flink() in intel_update_renderbuffers()
Now that we track the global name in struct intel_region, we can just
look it up there.
2010-02-12 16:30:39 -05:00
Kristian Høgsberg
cc57baff5f i915: Remove always-true irq_active struct intel_screen field 2010-02-11 16:56:44 -05:00
Kristian Høgsberg
5777dee02c i915: Drop intelScreenPrivate typedef and just call it struct intel_screen 2010-02-11 16:49:26 -05:00
Vinson Lee
c6e26d76c7 intel: Remove unnecessary headers. 2010-01-30 19:11:31 -08:00
Eric Anholt
7aed23c362 intel: Don't do client-side frame throttling with DRI2 SwapBuffers.
The server side does the throttling on our behalf now by putting the
client to sleep, so we don't need our previous hacks for limiting the
number of outstanding frames.  Same effect as
7d4e674b21.
2010-01-25 22:57:33 -08:00
Eric Anholt
c7fc9bfb22 Revert "intel: Use the new DRI2 flush invalidate entrypoint to signal frame done."
This reverts commit 7d4e674b21.  It broke
throttling in the non-new-DRI2 case.
2010-01-25 22:57:33 -08:00
Brian Paul
9b22427911 Merge branch 'mesa_7_7_branch'
Conflicts:

	src/mesa/drivers/dri/intel/intel_screen.c
	src/mesa/drivers/dri/intel/intel_swapbuffers.c
	src/mesa/drivers/dri/r300/r300_emit.c
	src/mesa/drivers/dri/r300/r300_ioctl.c
	src/mesa/drivers/dri/r300/r300_tex.c
	src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-25 14:46:17 -07:00
Vinson Lee
fb6bff3712 intel: Remove unnecessary headers. 2010-01-23 14:33:29 -08:00
Eric Anholt
7d4e674b21 intel: Use the new DRI2 flush invalidate entrypoint to signal frame done.
Previously for frame throttling we would wait on the first batch after
a swap before emitting another swap, because we had no hook after a
swap was emitted.  This meant that if an app managed to squeeze
everything it for a frame had into one batch, it would lock-step with
the GPU.  With the swapbuffers changes, we now have the entrypoint we
want.

This takes the WoW intro screen from 25% GPU idle and visibly jerky to
4-5% GPU idle and rather smooth.  Other apps such as OpenArena have
run into this problem as well.
2010-01-19 11:07:51 -08:00
Jesse Barnes
c6ef705e41 Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesa
Conflicts due to DRI1 removal:
	src/mesa/drivers/dri/intel/intel_context.c
	src/mesa/drivers/dri/intel/intel_screen.c
2010-01-11 15:23:29 -05:00
Kristian Høgsberg
7c50d29f7c intel/DRI2: add DRI2flushExtension support with invalidate hook
Needed to support the SwapBuffers code properly.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-01-08 12:40:58 -05:00
Kristian Høgsberg
5a0b60aa1b intel: Remove remaining dri2.enabled tests 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
d282128ff6 intel: Remove struct intel_framebuffer
With the vsync fields no longer relevant and by refactoring the code
to no longer use color_rb[0-1] we can just use struct gl_framebuffer
directly.
2010-01-04 11:48:02 -05:00
Kristian Høgsberg
a6e1d3edac intel: Remove client-side vblank code 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
5bc4b886e4 intel: Drop intelWindowMoved()
Everything this functions does under DRI2 is also taken care of
by intel_draw_buffer(), which is always called where intelWindowMoved()
is called.
2010-01-04 11:48:02 -05:00
Kristian Høgsberg
f55d0920cd intel: Drop DRI1 static regions 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
01dc463e5d intel: Drop LOCK/UNLOCK_HARDWARE() 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
d61f07318c Remove leftover __DRI{screen,drawable,context}Private references
As part of the DRI driver interface rewrite I merged __DRIscreenPrivate
and __DRIscreen, and likewise for __DRIdrawablePrivate and
__DRIcontextPrivate.  I left typedefs in place though, to avoid renaming
all the *Private use internal to the driver.  That was probably a
mistake, and it turns out a one-line find+sed combo can do the mass
rename.  Better late than never.
2010-01-04 11:48:00 -05:00
Eric Anholt
1e4677a61f intel: Remove dead fthrottle_mode option. We only do IRQ waits.
Noticed by clang.
2009-12-28 18:51:18 -08:00
Eric Anholt
f677480389 intel: Replace some gen3 IS_* checks with context structure usage.
Shaves 400 bytes or so from i915_dri.so.
2009-12-22 14:20:27 -08:00
Eric Anholt
0b87f143c4 intel: Replace IS_G4X() across the driver with context structure usage.
Saves ~2KB of code.
2009-12-22 14:20:26 -08:00
Eric Anholt
1c96e85c9d intel: Replace IS_IGDNG checks with intel->is_ironlake or needs_ff_sync.
Saves ~480 bytes of code.
2009-12-22 14:20:26 -08:00
Ian Romanick
71678a7ede intel: Replace release info in DRIVER_DATE with "DEVELOPMENT" 2009-12-21 18:46:17 -08:00
Ian Romanick
a4b6b42885 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/mesa/main/version.h
2009-12-21 18:45:31 -08:00
Ian Romanick
164b583852 intel: Bump driver date to reflect status as final Q4 driver RC 2009-12-21 18:27:50 -08:00
Eric Anholt
827ba44f6e intel: Remove non-GEM support.
This really isn't supported at this point.  GEM's been in the kernel for
a year, and the fake bufmgr never really worked.
2009-11-19 11:47:22 +01:00
Eric Anholt
667760f53c intel: Remove dead intel_context members and move some packing around. 2009-11-19 11:47:21 +01:00
Ian Romanick
a736d3f439 intel: Remove unused enable_imaging parameter to intelInitExtensions 2009-11-12 15:43:09 -08:00
Eric Anholt
caf3038123 Make a convenient int for what chipset generation we're on.
gen2/3/4 are easier to say than "8xx, 915-945/g33/pineview, 965/g45/misc",
and compares on generation are often easier than stringing together a bunch
of chipset checks.
2009-11-06 11:37:31 -08:00
Eric Anholt
6eb6a0e9cb intel: Don't bother MI_FLUSHing on glFlush in the DRI2 case.
We only need it when drawing to the front buffer, which we never do for
DRI2.  No significant performance difference, but the flush is definitely
gone from the end of every batchbuffer.
2009-10-29 10:01:17 -07:00
Brian Paul
1f196b786d Merge branch 'texformat-rework'
Conflicts:
	src/mesa/drivers/dri/radeon/radeon_fbo.c
	src/mesa/drivers/dri/s3v/s3v_tex.c
	src/mesa/drivers/dri/s3v/s3v_xmesa.c
	src/mesa/drivers/dri/trident/trident_context.c
	src/mesa/main/debug.c
	src/mesa/main/mipmap.c
	src/mesa/main/texformat.c
	src/mesa/main/texgetimage.c
2009-10-28 21:24:11 -06:00
Brian Paul
ab9d1011f5 Merge branch 'mesa_7_6_branch' 2009-10-22 18:38:19 -06:00
Brian Paul
55058652b8 intel: flush old context before binding new context
Per the GLX spec, when changing rendering contexts, the old context
should first be flushed.
2009-10-22 18:33:26 -06:00