Dave Airlie [Tue, 31 Oct 2006 09:39:42 +0000 (31 09:39 +0000)]
Another free->align_free
Dave Airlie [Tue, 31 Oct 2006 08:36:59 +0000 (31 08:36 +0000)]
replace free with _mesa_align_free to fix glibc tripping up
Thomas Hellström [Fri, 27 Oct 2006 09:31:46 +0000 (27 09:31 +0000)]
Support last-minute drm buffer alignment interface changes.
Michel Dänzer [Tue, 24 Oct 2006 12:09:21 +0000 (24 12:09 +0000)]
Flush pending batchbuffers before scheduling a buffer swap.
This makes sure the scheduled buffer swap actually contains the complete
rendering.
Thomas Hellström [Wed, 18 Oct 2006 16:18:51 +0000 (18 16:18 +0000)]
Add a define for testing cached textures.
replace DRM_BO_FLAG_NO_EVICT with DRM_BO_FLAG_NO_MOVE, since the
previous one is now reserved for root.
Thomas Hellström [Fri, 13 Oct 2006 13:44:19 +0000 (13 13:44 +0000)]
Increase batchbuffer size to get some speed.
Keith Whitwell [Tue, 10 Oct 2006 15:00:53 +0000 (10 15:00 +0000)]
Rasterize smooth-shaded quads like trifans, which avoids texture
discontinuity along the diagonal.
Keith Whitwell [Tue, 10 Oct 2006 14:46:38 +0000 (10 14:46 +0000)]
Also need to lock textures around _mesa_update_state() as values like
texObj->Complete are modified in that routine. Unfortunately we
sometimes need to update state within a region where textures are
locked. Get around this with a new _mesa_update_state_locked() call.
Keith Whitwell [Tue, 10 Oct 2006 13:14:05 +0000 (10 13:14 +0000)]
More _mesa_select_tex_image() updates.
Keith Whitwell [Tue, 10 Oct 2006 13:12:36 +0000 (10 13:12 +0000)]
Updates for new _mesa_select_tex_image prototype.
Keith Whitwell [Tue, 10 Oct 2006 13:05:43 +0000 (10 13:05 +0000)]
Add hooks to lock/unlock textures while rendering, and deal with any
statechanges noticed while locking textures.
Keith Whitwell [Tue, 10 Oct 2006 13:03:13 +0000 (10 13:03 +0000)]
Implement a locking scheme to protect texture object data. This
serves two purposes:
1) Prevent bound texture objects from statechanges by one context
while another context is referencing the data for rendering purposes.
2) Ensure that texture object state changed by one context provokes a
statechange notification (ie a bit set in ctx->NewState) in all other
sharing contexts.
This is a first pass which uses a single mutex for all texture objects
in a share group. A future step would be to use a mutex per texobj.
Keith Whitwell [Fri, 6 Oct 2006 15:45:13 +0000 (6 15:45 +0000)]
Catch a case where we could be emitting primitives with outstanding
dirty state.
Keith Whitwell [Fri, 6 Oct 2006 09:22:39 +0000 (6 09:22 +0000)]
Fix off-by-one in copypixels scissoring
Alan Hourihane [Fri, 6 Oct 2006 08:40:57 +0000 (6 08:40 +0000)]
missing x86_and & x86_or (pulled from HEAD)
Thomas Hellström [Thu, 5 Oct 2006 14:55:16 +0000 (5 14:55 +0000)]
Fix a small memory leak.
Keith Whitwell [Tue, 3 Oct 2006 12:09:26 +0000 (3 12:09 +0000)]
Remove unused variable
Keith Whitwell [Tue, 3 Oct 2006 12:09:13 +0000 (3 12:09 +0000)]
Don't invert scissor region for FBO's either.
Keith Whitwell [Tue, 3 Oct 2006 12:04:22 +0000 (3 12:04 +0000)]
Niggle: always release the old region before referencing a new one.
This hasn't been a problem so far, perhaps the old one is always NULL
for a reason I don't understand.
Keith Whitwell [Tue, 3 Oct 2006 12:03:13 +0000 (3 12:03 +0000)]
Deal with the fact that _mesa_make_current doesn't always assign
ctx->DrawBuffer to the passed buffer. Don't update driver internal
state unless ctx->DrawBuffer actually changes.
Keith Whitwell [Tue, 3 Oct 2006 12:01:59 +0000 (3 12:01 +0000)]
Don't invert scissor region for FBO's either.
Keith Whitwell [Tue, 3 Oct 2006 10:32:41 +0000 (3 10:32 +0000)]
No need to y-flip cliprect for clearing FBO
Keith Whitwell [Tue, 3 Oct 2006 10:31:54 +0000 (3 10:31 +0000)]
Revert refcount change - starting at one is correct.
Keith Whitwell [Tue, 3 Oct 2006 10:28:36 +0000 (3 10:28 +0000)]
Remove ancient workaround
Keith Whitwell [Tue, 3 Oct 2006 09:19:14 +0000 (3 09:19 +0000)]
remove unused screen param from intel_region_release
Keith Whitwell [Tue, 3 Oct 2006 09:17:17 +0000 (3 09:17 +0000)]
Fix typo defining clear rectangle for FBO clears.
Thomas Hellström [Fri, 29 Sep 2006 13:15:43 +0000 (29 13:15 +0000)]
Use the BATCH_SZ macro where appropriate.
Bump driver date.
Michel Dänzer [Fri, 29 Sep 2006 11:00:50 +0000 (29 11:00 +0000)]
Merge vsync changes from trunk.
Alan Hourihane [Thu, 28 Sep 2006 15:56:00 +0000 (28 15:56 +0000)]
Do some extra checking to avoid segfaults when incorrect AGP is in use.
Keith Whitwell [Thu, 28 Sep 2006 14:33:04 +0000 (28 14:33 +0000)]
Add 'GL_RGBA8' as a supported internalFormat for
get_teximage_source(). Fixes subtexrate demo.
Thomas Hellström [Thu, 28 Sep 2006 09:34:33 +0000 (28 09:34 +0000)]
Update drm expected version.
Thomas Hellström [Thu, 28 Sep 2006 09:18:45 +0000 (28 09:18 +0000)]
Driver date.
Keith Whitwell [Wed, 27 Sep 2006 20:23:34 +0000 (27 20:23 +0000)]
remove duplicate
Keith Whitwell [Wed, 27 Sep 2006 20:18:36 +0000 (27 20:18 +0000)]
pull npot mipmap test from trunk
Keith Whitwell [Wed, 27 Sep 2006 19:01:12 +0000 (27 19:01 +0000)]
Fix mipmap posititioning for 2d ARB_npot textures.
Fix typo in 3D image layout for i915.
Thomas Hellström [Wed, 27 Sep 2006 17:17:35 +0000 (27 17:17 +0000)]
Fix another single-drawable-multiple-contexts error, that shows up now that the
drm_lock_tranfer() function has been removed from drm.
The error can cause the wrong context number to be used in the lock, but
otherwise should've done no serious harm.
We can probably throw away the i915 lock_mutex now.
Thomas Hellström [Tue, 26 Sep 2006 14:15:08 +0000 (26 14:15 +0000)]
Valgrind error fix.
Keith Whitwell [Tue, 26 Sep 2006 11:36:32 +0000 (26 11:36 +0000)]
Move get_dirty() call to after reserving space in the batchbuffer as
this may trigger a batchbuffer flush and raise new dirty state.
Add assert_not_dirty() callback required by recent changes.
Keith Whitwell [Tue, 26 Sep 2006 10:44:52 +0000 (26 10:44 +0000)]
Add asserts to catch primitives being emitted with state still dirty,
or extended when there is no primitive to extend.
Turn lock/unlock macros into proper functions and add a debug flag to
print out their activity.
Keith Whitwell [Tue, 26 Sep 2006 10:39:42 +0000 (26 10:39 +0000)]
Move get_dirty() call to after reserving space in the batchbuffer as
this may trigger a batchbuffer flush and raise new dirty state.
Keith Whitwell [Tue, 26 Sep 2006 09:27:54 +0000 (26 09:27 +0000)]
Ensure that we don't wrap batchbuffers right at the beginning of a
primitive, otherwise vertices can be emitted without the full-state
preamble. Fixes gears + texobj lockup.
Thomas Hellström [Tue, 26 Sep 2006 09:25:47 +0000 (26 09:25 +0000)]
Small COW break on destruction optimization.
Fix a comment.
Thomas Hellström [Tue, 26 Sep 2006 09:00:03 +0000 (26 09:00 +0000)]
Fix up buffer object and region refcounting
Sinlence some compilation warnings.
Thomas Hellström [Mon, 25 Sep 2006 18:22:21 +0000 (25 18:22 +0000)]
Make regions screen-based instead of context based.
Keith Whitwell [Mon, 25 Sep 2006 16:11:14 +0000 (25 16:11 +0000)]
Import Brian's FBO bugfix from trunk.
Thomas Hellström [Fri, 22 Sep 2006 18:09:46 +0000 (22 18:09 +0000)]
Add some more buffer usage refcounting.
Otherwise these texture buffers will disappear under us.
Keith Whitwell [Fri, 22 Sep 2006 16:45:52 +0000 (22 16:45 +0000)]
Remove redundant 3d-state validation prior to blit copypixels. These
were causing some issues.
Keith Whitwell [Fri, 22 Sep 2006 16:33:10 +0000 (22 16:33 +0000)]
Fix a longstanding memory leak - intelObj->mt refcount was not deleted
when the texture was deleted.
Keith Whitwell [Fri, 22 Sep 2006 16:32:24 +0000 (22 16:32 +0000)]
Turn some printfs into DBG's.
Fix a little mess left by indent.
Keith Whitwell [Fri, 22 Sep 2006 16:05:09 +0000 (22 16:05 +0000)]
rationalize debugging flags
Keith Whitwell [Fri, 22 Sep 2006 16:03:36 +0000 (22 16:03 +0000)]
Silence warning
Keith Whitwell [Fri, 22 Sep 2006 16:03:06 +0000 (22 16:03 +0000)]
intel_batch_ioctl() lost its return type somehow
Keith Whitwell [Fri, 22 Sep 2006 15:22:32 +0000 (22 15:22 +0000)]
Fix initialization of pfPitch - measured in pixels, not bytes.
Thomas Hellström [Fri, 22 Sep 2006 14:52:31 +0000 (22 14:52 +0000)]
Another obscure bug causing an infinite loop when multiple contexts are
bound to a drawable.
Keith Whitwell [Fri, 22 Sep 2006 14:18:56 +0000 (22 14:18 +0000)]
bring in recent texture swizzle changes from trunk
Keith Whitwell [Fri, 22 Sep 2006 14:16:33 +0000 (22 14:16 +0000)]
- Make point_smooth, polygon_smooth fallbacks per-primitive rather than total.
- Also - disable those fallbacks unless INTEL_STRICT_CONFORMANCE is set.
- Gate some FBO debugging on INTEL_DEBUG=fbo
Keith Whitwell [Fri, 22 Sep 2006 14:10:39 +0000 (22 14:10 +0000)]
Fix bug detecting overlapping regions in texture copypixels.
Import code from trunk to allow blit copypixels when scissor is active.
Keith Whitwell [Fri, 22 Sep 2006 11:43:19 +0000 (22 11:43 +0000)]
Check for FragmentProgram._Enabled rather than _Active. _Active is
set when a driver is using an internally generated fragment program to
emulate fixed function behaviour. For the software rasterizer, we're
better off using the fixed function code directly.
Keith Whitwell [Fri, 22 Sep 2006 11:39:31 +0000 (22 11:39 +0000)]
Flush driver, not just tnl module.
Keith Whitwell [Fri, 22 Sep 2006 11:37:39 +0000 (22 11:37 +0000)]
resize buffers in MakeCurrent
Thomas Hellström [Fri, 22 Sep 2006 10:55:05 +0000 (22 10:55 +0000)]
Fix intel texture image buffer leak.
Michel Dänzer [Wed, 20 Sep 2006 16:07:39 +0000 (20 16:07 +0000)]
Fix INTEL_DEBUG=fall.
Michel Dänzer [Wed, 20 Sep 2006 15:29:36 +0000 (20 15:29 +0000)]
Revert INTEL_FIREVERTICES to flush primitives instead of asserting none pending.
The assertion was triggered in some cases, e.g. by the xscreensaver hack
stonerview.
Thomas Hellström [Mon, 18 Sep 2006 18:55:29 +0000 (18 18:55 +0000)]
Fix a fencing bug.
Keith Whitwell [Mon, 18 Sep 2006 18:11:42 +0000 (18 18:11 +0000)]
fix bzflag crashes
Thomas Hellström [Mon, 18 Sep 2006 14:18:14 +0000 (18 14:18 +0000)]
Check for NULL in intelSwapBuffers()
Thomas Hellström [Mon, 18 Sep 2006 14:11:00 +0000 (18 14:11 +0000)]
Fix fencing when submitting empty batchbuffers.
Add a proper buffer waitidle method.
Thomas Hellström [Mon, 18 Sep 2006 08:41:22 +0000 (18 08:41 +0000)]
Relax the requirement in pool_takedown in the intel batch buffer pool,
that all allocated buffes should've been handed back before releasing the
pool.
This is to account for the case where whe app calls DestroyScreen() without
first destroying all contexts.
Thomas Hellström [Fri, 15 Sep 2006 14:52:31 +0000 (15 14:52 +0000)]
Wait for buffer idle unlocked before mapping in some cases.
Greatly improves responsiveness.
Add an MI_FLUSH after each batchbuffer and tell the kernel we're doing so with
the new DRM_I915_FENCE_FLAG_FLUSHED (Requires drm update).
This can be done on a per-batchbuffer basis.
The DRM handles all fence accounting and signals earlier fences that also needs
a flush.
Thomas Hellström [Fri, 15 Sep 2006 09:22:08 +0000 (15 09:22 +0000)]
Adapt to updated libdrm.
Keith Whitwell [Thu, 14 Sep 2006 14:48:34 +0000 (14 14:48 +0000)]
Turn back on zcopy uploads - my timings were incorrect.
Keith Whitwell [Thu, 14 Sep 2006 14:48:09 +0000 (14 14:48 +0000)]
Silence debug, cope with calling intel_region_cow() with lock already held.
Keith Whitwell [Thu, 14 Sep 2006 12:11:46 +0000 (14 12:11 +0000)]
Disable zero-copy texturing for now as it isn't such a win with the
newest memory manager code.
Thomas Hellström [Wed, 13 Sep 2006 15:10:09 +0000 (13 15:10 +0000)]
Fix a FBO render offset bug.
The current code failed if the dri drawable was updated before the call to
intelFlush(), and typically rendered into an FBO using the back buffer
cliprects.
Keith Whitwell [Wed, 13 Sep 2006 12:45:42 +0000 (13 12:45 +0000)]
update driver date and branch debug
Keith Whitwell [Wed, 13 Sep 2006 12:45:21 +0000 (13 12:45 +0000)]
Bring in writemask + TEX fix from trunk
Thomas Hellström [Tue, 12 Sep 2006 14:13:36 +0000 (12 14:13 +0000)]
texmem_0_3_branch with adaptations to the drm-ttm-0-2 branch.
Indent the i915 driver directory.
Keith Whitwell [Wed, 30 Aug 2006 20:41:18 +0000 (30 20:41 +0000)]
Add a demo illustrating various techniques for uploading dynamic (ie
streaming) texture images via PBO's. Two of these currently seem to
trigger a memory leak in the i915 driver, but at least one
(PBO_PINGPONG) illustrates the good speedups available with PBO's on
the i915 driver, particularly zero-copy uploads.
Keith Whitwell [Wed, 30 Aug 2006 20:18:33 +0000 (30 20:18 +0000)]
Must lock hardware around call to intelEmitCopyBlit()
Keith Whitwell [Wed, 30 Aug 2006 19:55:32 +0000 (30 19:55 +0000)]
implement zero-copy uploads for glTexImage from suitable pixel buffer objects
Keith Whitwell [Wed, 30 Aug 2006 09:15:40 +0000 (30 09:15 +0000)]
Bring in improved version of the texdown demo from the original texmem branch
Keith Whitwell [Tue, 29 Aug 2006 12:11:22 +0000 (29 12:11 +0000)]
remove orphan file
Keith Whitwell [Tue, 29 Aug 2006 11:58:23 +0000 (29 11:58 +0000)]
remove i915_texprog.c as it is no longer needed
Keith Whitwell [Tue, 29 Aug 2006 11:45:13 +0000 (29 11:45 +0000)]
remove hashing for bm buffers, use an opaque pointer instead of an integer
Keith Whitwell [Mon, 28 Aug 2006 15:14:55 +0000 (28 15:14 +0000)]
revert last commit
Keith Whitwell [Mon, 28 Aug 2006 15:11:10 +0000 (28 15:11 +0000)]
dependent texture read demo
Keith Whitwell [Mon, 28 Aug 2006 11:50:10 +0000 (28 11:50 +0000)]
use mesa's texenvprogram in preference to i915 version. Enable tex_env_crossbar
Keith Whitwell [Mon, 28 Aug 2006 11:49:30 +0000 (28 11:49 +0000)]
various texture tweaks
Keith Whitwell [Mon, 28 Aug 2006 11:37:07 +0000 (28 11:37 +0000)]
Add missing wait for busy buffers in bmMapBuffer()
Keith Whitwell [Mon, 28 Aug 2006 11:35:20 +0000 (28 11:35 +0000)]
Fixes for i945 texture layouts
Keith Whitwell [Thu, 17 Aug 2006 13:25:14 +0000 (17 13:25 +0000)]
add dependent texture read test
Keith Whitwell [Thu, 17 Aug 2006 13:24:57 +0000 (17 13:24 +0000)]
Make bgra format more explicit
Dave Airlie [Wed, 16 Aug 2006 03:33:00 +0000 (16 03:33 +0000)]
fix from i965 driver for compressed textures on texman
Keith Whitwell [Thu, 3 Aug 2006 15:41:10 +0000 (3 15:41 +0000)]
first pass at texture uploads from pbo's with the blitter
Keith Whitwell [Thu, 3 Aug 2006 15:40:19 +0000 (3 15:40 +0000)]
trivial test for pbo-based texture uploads
Keith Whitwell [Thu, 3 Aug 2006 11:22:09 +0000 (3 11:22 +0000)]
Get basic texturing working again on i945
Keith Whitwell [Thu, 3 Aug 2006 10:31:47 +0000 (3 10:31 +0000)]
Correct pitch / cpp calculation
Keith Whitwell [Wed, 2 Aug 2006 10:24:01 +0000 (2 10:24 +0000)]
drmOpen/Close once
Keith Whitwell [Wed, 2 Aug 2006 10:08:58 +0000 (2 10:08 +0000)]
new files from merge of texmem driver
Keith Whitwell [Wed, 2 Aug 2006 10:01:03 +0000 (2 10:01 +0000)]
Pull the texmem i915 driver onto a new branch closer to the current trunk.
Compiles but otherwise untested.