mesa/nouveau-pmpeg.git
15 years agoAnother free->align_freetexmem_0_3_branch
Dave Airlie [Tue, 31 Oct 2006 09:39:42 +0000 (31 09:39 +0000)]
Another free->align_free

15 years agoreplace free with _mesa_align_free to fix glibc tripping up
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

15 years agoSupport last-minute drm buffer alignment interface changes.
Thomas Hellström [Fri, 27 Oct 2006 09:31:46 +0000 (27 09:31 +0000)]
Support last-minute drm buffer alignment interface changes.

15 years agoFlush pending batchbuffers before scheduling a buffer swap.
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.

15 years agoAdd a define for testing cached textures.
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.

15 years agoIncrease batchbuffer size to get some speed.
Thomas Hellström [Fri, 13 Oct 2006 13:44:19 +0000 (13 13:44 +0000)]
Increase batchbuffer size to get some speed.

15 years agoRasterize smooth-shaded quads like trifans, which avoids texture
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.

15 years agoAlso need to lock textures around _mesa_update_state() as values like
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.

15 years agoMore _mesa_select_tex_image() updates.
Keith Whitwell [Tue, 10 Oct 2006 13:14:05 +0000 (10 13:14 +0000)]
More _mesa_select_tex_image() updates.

15 years agoUpdates for new _mesa_select_tex_image prototype.
Keith Whitwell [Tue, 10 Oct 2006 13:12:36 +0000 (10 13:12 +0000)]
Updates for new _mesa_select_tex_image prototype.

15 years agoAdd hooks to lock/unlock textures while rendering, and deal with any
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.

15 years agoImplement a locking scheme to protect texture object data. This
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.

15 years agoCatch a case where we could be emitting primitives with outstanding
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.

15 years agoFix off-by-one in copypixels scissoring
Keith Whitwell [Fri, 6 Oct 2006 09:22:39 +0000 (6 09:22 +0000)]
Fix off-by-one in copypixels scissoring

15 years agomissing x86_and & x86_or (pulled from HEAD)
Alan Hourihane [Fri, 6 Oct 2006 08:40:57 +0000 (6 08:40 +0000)]
missing x86_and & x86_or (pulled from HEAD)

15 years agoFix a small memory leak.
Thomas Hellström [Thu, 5 Oct 2006 14:55:16 +0000 (5 14:55 +0000)]
Fix a small memory leak.

15 years agoRemove unused variable
Keith Whitwell [Tue, 3 Oct 2006 12:09:26 +0000 (3 12:09 +0000)]
Remove unused variable

15 years agoDon't invert scissor region for FBO's either.
Keith Whitwell [Tue, 3 Oct 2006 12:09:13 +0000 (3 12:09 +0000)]
Don't invert scissor region for FBO's either.

15 years agoNiggle: always release the old region before referencing a new one.
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.

15 years agoDeal with the fact that _mesa_make_current doesn't always assign
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.

15 years agoDon't invert scissor region for FBO's either.
Keith Whitwell [Tue, 3 Oct 2006 12:01:59 +0000 (3 12:01 +0000)]
Don't invert scissor region for FBO's either.

15 years agoNo need to y-flip cliprect for clearing FBO
Keith Whitwell [Tue, 3 Oct 2006 10:32:41 +0000 (3 10:32 +0000)]
No need to y-flip cliprect for clearing FBO

15 years agoRevert refcount change - starting at one is correct.
Keith Whitwell [Tue, 3 Oct 2006 10:31:54 +0000 (3 10:31 +0000)]
Revert refcount change - starting at one is correct.

15 years agoRemove ancient workaround
Keith Whitwell [Tue, 3 Oct 2006 10:28:36 +0000 (3 10:28 +0000)]
Remove ancient workaround

15 years agoremove unused screen param from intel_region_release
Keith Whitwell [Tue, 3 Oct 2006 09:19:14 +0000 (3 09:19 +0000)]
remove unused screen param from intel_region_release

15 years agoFix typo defining clear rectangle for FBO clears.
Keith Whitwell [Tue, 3 Oct 2006 09:17:17 +0000 (3 09:17 +0000)]
Fix typo defining clear rectangle for FBO clears.

15 years agoUse the BATCH_SZ macro where appropriate.texmem_0_3_20060929
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.

15 years agoMerge vsync changes from trunk.
Michel Dänzer [Fri, 29 Sep 2006 11:00:50 +0000 (29 11:00 +0000)]
Merge vsync changes from trunk.

15 years agoDo some extra checking to avoid segfaults when incorrect AGP is in use.
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.

15 years agoAdd 'GL_RGBA8' as a supported internalFormat for
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.

15 years agoUpdate drm expected version.texmem_0_3_20060923
Thomas Hellström [Thu, 28 Sep 2006 09:34:33 +0000 (28 09:34 +0000)]
Update drm expected version.

15 years agoDriver date.
Thomas Hellström [Thu, 28 Sep 2006 09:18:45 +0000 (28 09:18 +0000)]
Driver date.

15 years agoremove duplicate
Keith Whitwell [Wed, 27 Sep 2006 20:23:34 +0000 (27 20:23 +0000)]
remove duplicate

15 years agopull npot mipmap test from trunk
Keith Whitwell [Wed, 27 Sep 2006 20:18:36 +0000 (27 20:18 +0000)]
pull npot mipmap test from trunk

15 years agoFix mipmap posititioning for 2d ARB_npot textures.
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.

15 years agoFix another single-drawable-multiple-contexts error, that shows up now that the
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.

15 years agoValgrind error fix.
Thomas Hellström [Tue, 26 Sep 2006 14:15:08 +0000 (26 14:15 +0000)]
Valgrind error fix.

15 years agoMove get_dirty() call to after reserving space in the batchbuffer as
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.

15 years agoAdd asserts to catch primitives being emitted with state still dirty,
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.

15 years agoMove get_dirty() call to after reserving space in the batchbuffer as
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.

15 years agoEnsure that we don't wrap batchbuffers right at the beginning of a
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.

15 years agoSmall COW break on destruction optimization.
Thomas Hellström [Tue, 26 Sep 2006 09:25:47 +0000 (26 09:25 +0000)]
Small COW break on destruction optimization.
Fix a comment.

15 years agoFix up buffer object and region refcounting
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.

15 years agoMake regions screen-based instead of context based.
Thomas Hellström [Mon, 25 Sep 2006 18:22:21 +0000 (25 18:22 +0000)]
Make regions screen-based instead of context based.

15 years agoImport Brian's FBO bugfix from trunk.
Keith Whitwell [Mon, 25 Sep 2006 16:11:14 +0000 (25 16:11 +0000)]
Import Brian's FBO bugfix from trunk.

15 years agoAdd some more buffer usage refcounting.
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.

15 years agoRemove redundant 3d-state validation prior to blit copypixels. These
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.

15 years agoFix a longstanding memory leak - intelObj->mt refcount was not deleted
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.

15 years agoTurn some printfs into DBG's.
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.

15 years agorationalize debugging flags
Keith Whitwell [Fri, 22 Sep 2006 16:05:09 +0000 (22 16:05 +0000)]
rationalize debugging flags

15 years agoSilence warning
Keith Whitwell [Fri, 22 Sep 2006 16:03:36 +0000 (22 16:03 +0000)]
Silence warning

15 years agointel_batch_ioctl() lost its return type somehow
Keith Whitwell [Fri, 22 Sep 2006 16:03:06 +0000 (22 16:03 +0000)]
intel_batch_ioctl() lost its return type somehow

15 years agoFix initialization of pfPitch - measured in pixels, not bytes.
Keith Whitwell [Fri, 22 Sep 2006 15:22:32 +0000 (22 15:22 +0000)]
Fix initialization of pfPitch - measured in pixels, not bytes.

15 years agoAnother obscure bug causing an infinite loop when multiple contexts are
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.

15 years agobring in recent texture swizzle changes from trunk
Keith Whitwell [Fri, 22 Sep 2006 14:18:56 +0000 (22 14:18 +0000)]
bring in recent texture swizzle changes from trunk

15 years ago- Make point_smooth, polygon_smooth fallbacks per-primitive rather than total.
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

15 years agoFix bug detecting overlapping regions in texture copypixels.
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.

15 years agoCheck for FragmentProgram._Enabled rather than _Active. _Active is
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.

15 years agoFlush driver, not just tnl module.
Keith Whitwell [Fri, 22 Sep 2006 11:39:31 +0000 (22 11:39 +0000)]
Flush driver, not just tnl module.

15 years agoresize buffers in MakeCurrent
Keith Whitwell [Fri, 22 Sep 2006 11:37:39 +0000 (22 11:37 +0000)]
resize buffers in MakeCurrent

15 years agoFix intel texture image buffer leak.
Thomas Hellström [Fri, 22 Sep 2006 10:55:05 +0000 (22 10:55 +0000)]
Fix intel texture image buffer leak.

15 years agoFix INTEL_DEBUG=fall.
Michel Dänzer [Wed, 20 Sep 2006 16:07:39 +0000 (20 16:07 +0000)]
Fix INTEL_DEBUG=fall.

15 years agoRevert INTEL_FIREVERTICES to flush primitives instead of asserting none pending.
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.

15 years agoFix a fencing bug.
Thomas Hellström [Mon, 18 Sep 2006 18:55:29 +0000 (18 18:55 +0000)]
Fix a fencing bug.

15 years agofix bzflag crashes
Keith Whitwell [Mon, 18 Sep 2006 18:11:42 +0000 (18 18:11 +0000)]
fix bzflag crashes

15 years agoCheck for NULL in intelSwapBuffers()
Thomas Hellström [Mon, 18 Sep 2006 14:18:14 +0000 (18 14:18 +0000)]
Check for NULL in intelSwapBuffers()

15 years agoFix fencing when submitting empty batchbuffers.
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.

15 years agoRelax the requirement in pool_takedown in the intel batch buffer pool,
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.

15 years agoWait for buffer idle unlocked before mapping in some cases.
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.

15 years agoAdapt to updated libdrm.
Thomas Hellström [Fri, 15 Sep 2006 09:22:08 +0000 (15 09:22 +0000)]
Adapt to updated libdrm.

15 years agoTurn back on zcopy uploads - my timings were incorrect.
Keith Whitwell [Thu, 14 Sep 2006 14:48:34 +0000 (14 14:48 +0000)]
Turn back on zcopy uploads - my timings were incorrect.

15 years agoSilence debug, cope with calling intel_region_cow() with lock already held.
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.

15 years agoDisable zero-copy texturing for now as it isn't such a win with the
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.

15 years agoFix a FBO render offset bug.
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.

15 years agoupdate driver date and branch debug
Keith Whitwell [Wed, 13 Sep 2006 12:45:42 +0000 (13 12:45 +0000)]
update driver date and branch debug

15 years agoBring in writemask + TEX fix from trunk
Keith Whitwell [Wed, 13 Sep 2006 12:45:21 +0000 (13 12:45 +0000)]
Bring in writemask + TEX fix from trunk

15 years agotexmem_0_3_branch with adaptations to the drm-ttm-0-2 branch.
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.

15 years agoAdd a demo illustrating various techniques for uploading dynamic (ietexmem_0_2_branch
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.

15 years agoMust lock hardware around call to intelEmitCopyBlit()
Keith Whitwell [Wed, 30 Aug 2006 20:18:33 +0000 (30 20:18 +0000)]
Must lock hardware around call to intelEmitCopyBlit()

15 years agoimplement zero-copy uploads for glTexImage from suitable pixel buffer objects
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

15 years agoBring in improved version of the texdown demo from the original texmem branch
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

15 years agoremove orphan file
Keith Whitwell [Tue, 29 Aug 2006 12:11:22 +0000 (29 12:11 +0000)]
remove orphan file

15 years agoremove i915_texprog.c as it is no longer needed
Keith Whitwell [Tue, 29 Aug 2006 11:58:23 +0000 (29 11:58 +0000)]
remove i915_texprog.c as it is no longer needed

15 years agoremove hashing for bm buffers, use an opaque pointer instead of an integer
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

15 years agorevert last commit
Keith Whitwell [Mon, 28 Aug 2006 15:14:55 +0000 (28 15:14 +0000)]
revert last commit

15 years agodependent texture read demo
Keith Whitwell [Mon, 28 Aug 2006 15:11:10 +0000 (28 15:11 +0000)]
dependent texture read demo

15 years agouse mesa's texenvprogram in preference to i915 version. Enable tex_env_crossbar
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

15 years agovarious texture tweaks
Keith Whitwell [Mon, 28 Aug 2006 11:49:30 +0000 (28 11:49 +0000)]
various texture tweaks

15 years agoAdd missing wait for busy buffers in bmMapBuffer()
Keith Whitwell [Mon, 28 Aug 2006 11:37:07 +0000 (28 11:37 +0000)]
Add missing wait for busy buffers in bmMapBuffer()

15 years agoFixes for i945 texture layouts
Keith Whitwell [Mon, 28 Aug 2006 11:35:20 +0000 (28 11:35 +0000)]
Fixes for i945 texture layouts

15 years agoadd dependent texture read test
Keith Whitwell [Thu, 17 Aug 2006 13:25:14 +0000 (17 13:25 +0000)]
add dependent texture read test

15 years agoMake bgra format more explicit
Keith Whitwell [Thu, 17 Aug 2006 13:24:57 +0000 (17 13:24 +0000)]
Make bgra format more explicit

15 years agofix from i965 driver for compressed textures on texman
Dave Airlie [Wed, 16 Aug 2006 03:33:00 +0000 (16 03:33 +0000)]
fix from i965 driver for compressed textures on texman

15 years agofirst pass at texture uploads from pbo's with the blitter
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

15 years agotrivial test for pbo-based texture uploads
Keith Whitwell [Thu, 3 Aug 2006 15:40:19 +0000 (3 15:40 +0000)]
trivial test for pbo-based texture uploads

15 years agoGet basic texturing working again on i945
Keith Whitwell [Thu, 3 Aug 2006 11:22:09 +0000 (3 11:22 +0000)]
Get basic texturing working again on i945

15 years agoCorrect pitch / cpp calculation
Keith Whitwell [Thu, 3 Aug 2006 10:31:47 +0000 (3 10:31 +0000)]
Correct pitch / cpp calculation

15 years agodrmOpen/Close once
Keith Whitwell [Wed, 2 Aug 2006 10:24:01 +0000 (2 10:24 +0000)]
drmOpen/Close once

15 years agonew files from merge of texmem driver
Keith Whitwell [Wed, 2 Aug 2006 10:08:58 +0000 (2 10:08 +0000)]
new files from merge of texmem driver

15 years agoPull the texmem i915 driver onto a new branch closer to the current trunk.
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.