mesa.git
15 years agoradeon/r200/r300: cleanup some of the renderbuffer code
Dave Airlie [Thu, 19 Mar 2009 05:31:03 +0000 (15:31 +1000)]
radeon/r200/r300: cleanup some of the renderbuffer code

15 years agoradeon: fix up locking like the intel driver for pageflip/swaps
Dave Airlie [Thu, 19 Mar 2009 04:46:52 +0000 (14:46 +1000)]
radeon: fix up locking like the intel driver for pageflip/swaps

15 years agoFixup previous commit.
Michel Dänzer [Mon, 16 Mar 2009 11:51:50 +0000 (12:51 +0100)]
Fixup previous commit.

radeonScheduleSwap() already takes the lock in the SwapBuffers case, only
the CopySubBuffer case was missing it.

15 years agoradeon: Take the hardware lock for swaps and flips.
Michel Dänzer [Mon, 16 Mar 2009 10:33:14 +0000 (11:33 +0100)]
radeon: Take the hardware lock for swaps and flips.

Otherwise they fail with AIGLX at least.

15 years agoradeon: remove unused lines
Dave Airlie [Mon, 9 Mar 2009 03:48:47 +0000 (13:48 +1000)]
radeon: remove unused lines

15 years agor200: enable hw clears
Dave Airlie [Tue, 10 Mar 2009 09:03:07 +0000 (19:03 +1000)]
r200: enable hw clears

15 years agor300: emit texture in GTT or VRAM
Dave Airlie [Thu, 5 Mar 2009 06:45:21 +0000 (16:45 +1000)]
r300: emit texture in GTT or VRAM

15 years agor300: move firevertices out into the main place its needed.
Dave Airlie [Sun, 8 Mar 2009 23:34:41 +0000 (10:34 +1100)]
r300: move firevertices out into the main place its needed.

This fixes a hang on context destruction on rs690

15 years agoradeon: fix cut-n-paste typo
Dave Airlie [Sat, 7 Mar 2009 16:41:30 +0000 (02:41 +1000)]
radeon: fix cut-n-paste typo

15 years agors690: fix r300 swtcl bug in DMA code.
Dave Airlie [Sat, 7 Mar 2009 06:23:40 +0000 (17:23 +1100)]
rs690: fix r300 swtcl bug in DMA code.

When we finish emitting swtcl objects, we request space in the cmdbuf,
and flush if no space exists. However in this case we also flush
the DMA buffer we just put the vertices we wanted to send in.

This checks in advance if we have space in the buffer.

15 years agor300: fix uninit variable warning
Dave Airlie [Fri, 6 Mar 2009 12:42:35 +0000 (23:42 +1100)]
r300: fix uninit variable warning

15 years agor300: fix swtcl codepaths
Dave Airlie [Fri, 6 Mar 2009 12:42:17 +0000 (23:42 +1100)]
r300: fix swtcl codepaths

15 years agoradeon: implement userspace clears
Dave Airlie [Fri, 6 Mar 2009 06:05:22 +0000 (16:05 +1000)]
radeon: implement userspace clears

This is pretty much Eric Anholts implementation of clear using the GL state machine
from the Intel drivers.

It works quite well for now for us, probably could do with trying to use Z engine for
clears.

15 years agor200: cs emit state fixups
Dave Airlie [Thu, 5 Mar 2009 19:42:37 +0000 (05:42 +1000)]
r200: cs emit state fixups

15 years agor200: remove depth check for dri2
Dave Airlie [Thu, 5 Mar 2009 18:47:45 +0000 (04:47 +1000)]
r200: remove depth check for dri2

15 years agor200: temporary sw clear code
Dave Airlie [Thu, 5 Mar 2009 18:47:29 +0000 (04:47 +1000)]
r200: temporary sw clear code

15 years agoradeon: use t->bo to figure out of settexbuffer override is in action
Dave Airlie [Thu, 5 Mar 2009 09:00:17 +0000 (19:00 +1000)]
radeon: use t->bo to figure out of settexbuffer override is in action

15 years agor200: port over state emits for kms from radeon
Dave Airlie [Thu, 5 Mar 2009 08:58:48 +0000 (18:58 +1000)]
r200: port over state emits for kms from radeon

this needs testing on real hw

15 years agor200: add set tex buffer support
Dave Airlie [Thu, 5 Mar 2009 16:31:00 +0000 (02:31 +1000)]
r200: add set tex buffer support

15 years agoradeon: r100 clean up CS packet size calc
Dave Airlie [Wed, 4 Mar 2009 12:26:44 +0000 (22:26 +1000)]
radeon: r100 clean up CS packet size calc

15 years agoradeon: settexbuffer support
Dave Airlie [Wed, 4 Mar 2009 12:26:20 +0000 (22:26 +1000)]
radeon: settexbuffer support

This gets DRI2 compiz going

15 years agoradeon: fix texturing for r100
Dave Airlie [Wed, 4 Mar 2009 10:24:08 +0000 (20:24 +1000)]
radeon: fix texturing for r100

15 years agoradeon: use swrast clear - fail on depth
Dave Airlie [Wed, 4 Mar 2009 08:36:46 +0000 (18:36 +1000)]
radeon: use swrast clear - fail on depth

need to write real hw user clear

15 years agoradeon: fixup some segfaults/exit at startup
Dave Airlie [Wed, 4 Mar 2009 08:36:13 +0000 (18:36 +1000)]
radeon: fixup some segfaults/exit at startup

15 years agoradeon: remove debugging
Dave Airlie [Mon, 2 Mar 2009 17:37:23 +0000 (03:37 +1000)]
radeon: remove debugging

15 years agoradeon: refactor framebuffer code like intel
Dave Airlie [Mon, 2 Mar 2009 17:27:59 +0000 (03:27 +1000)]
radeon: refactor framebuffer code like intel

this is a step towards fbos and should fix pageflipping, but
I think the first flip seems broken.

15 years agoR300: add support for RS600 chips
Alex Deucher [Fri, 27 Feb 2009 19:48:24 +0000 (14:48 -0500)]
R300: add support for RS600 chips

15 years agoR300: set the number of GB pipes on all r3xx-r5xx chips
Alex Deucher [Fri, 27 Feb 2009 19:31:14 +0000 (14:31 -0500)]
R300: set the number of GB pipes on all r3xx-r5xx chips

15 years agor300: make ste text buffer work with > 2048 on r500
Dave Airlie [Fri, 27 Feb 2009 04:03:30 +0000 (14:03 +1000)]
r300: make ste text buffer work with > 2048 on r500

15 years agoradeon: add more fbconfigs
Dave Airlie [Fri, 27 Feb 2009 04:02:23 +0000 (14:02 +1000)]
radeon: add more fbconfigs

this makes glxgears get its background back when running under DRI2

15 years agor300: remove depth offset exits in favour of rrb depth changes
Dave Airlie [Thu, 26 Feb 2009 04:04:38 +0000 (14:04 +1000)]
r300: remove depth offset exits in favour of rrb depth changes

15 years agor200: fixup emit sizes for kms
Dave Airlie [Thu, 26 Feb 2009 17:37:30 +0000 (03:37 +1000)]
r200: fixup emit sizes for kms

15 years agor200: port over cs emit changes from radeon
Dave Airlie [Thu, 26 Feb 2009 17:05:42 +0000 (03:05 +1000)]
r200: port over cs emit changes from radeon

15 years agoradeon: fixup old packets emission for CS case
Dave Airlie [Thu, 26 Feb 2009 08:26:22 +0000 (18:26 +1000)]
radeon: fixup old packets emission for CS case

15 years agor100: fixup kms state emissions
Dave Airlie [Thu, 26 Feb 2009 01:45:24 +0000 (11:45 +1000)]
r100: fixup kms state emissions

15 years agoradeon: avoid page flip code in DRI2
Dave Airlie [Wed, 25 Feb 2009 09:22:42 +0000 (19:22 +1000)]
radeon: avoid page flip code in DRI2

15 years agoradeon: enable DRI2 for r100
Dave Airlie [Wed, 25 Feb 2009 09:22:25 +0000 (19:22 +1000)]
radeon: enable DRI2 for r100

15 years agoradeon: move CB/ZB state init into emit code
Dave Airlie [Wed, 25 Feb 2009 09:21:22 +0000 (19:21 +1000)]
radeon: move CB/ZB state init into emit code

This removes the use of the sarea for this stuff so makes DRI2 easier
and emits the CB/ZB info in the correct place

15 years agor300: fixup texture state emission for kms path
Dave Airlie [Thu, 26 Feb 2009 01:09:32 +0000 (11:09 +1000)]
r300: fixup texture state emission for kms path

15 years agor300: don't call page flip on DRI2
Dave Airlie [Thu, 26 Feb 2009 01:09:16 +0000 (11:09 +1000)]
r300: don't call page flip on DRI2

15 years agor300: don't flush VAP too often.
Dave Airlie [Thu, 26 Feb 2009 01:08:14 +0000 (11:08 +1000)]
r300: don't flush VAP too often.

Flush the VAP the first time for each state atom we upload new
VAP data

15 years agor300: drop r300Flush for the generic one
Dave Airlie [Wed, 25 Feb 2009 08:06:44 +0000 (18:06 +1000)]
r300: drop r300Flush for the generic one

15 years agor300: fix bo ref/unref, plugs DRI handle leaks
Dave Airlie [Tue, 24 Feb 2009 02:04:49 +0000 (12:04 +1000)]
r300: fix bo ref/unref, plugs DRI handle leaks

15 years agor300: fixup old setTexOffset DRI1 extension
Dave Airlie [Mon, 23 Feb 2009 05:41:30 +0000 (15:41 +1000)]
r300: fixup old setTexOffset DRI1 extension

15 years agoradeon: add more debug info to the flush debug
Dave Airlie [Mon, 23 Feb 2009 03:49:29 +0000 (13:49 +1000)]
radeon: add more debug info to the flush debug

15 years agor300: revert back autostate change on cacheflush emit
Dave Airlie [Mon, 23 Feb 2009 03:48:52 +0000 (13:48 +1000)]
r300: revert back autostate change on cacheflush emit

15 years agor300: use OUT_BATCH_REGVAL in a few more places
Dave Airlie [Mon, 23 Feb 2009 03:37:23 +0000 (13:37 +1000)]
r300: use OUT_BATCH_REGVAL in a few more places

15 years agor300: set u to 0 so debug logs are easier to read
Dave Airlie [Mon, 23 Feb 2009 03:35:10 +0000 (13:35 +1000)]
r300: set u to 0 so debug logs are easier to read

15 years agoradeon: stabilise r300 driver like the F10 mesa bufmgr
Dave Airlie [Mon, 23 Feb 2009 03:33:51 +0000 (13:33 +1000)]
radeon: stabilise r300 driver like the F10 mesa bufmgr

For some reason flushs caused by this CS needs flush hook,
caused the chip to lockup on r300 under compiz, whereas
the F10 driver was rock solid.

15 years agoradeon: add some debugging for flush ioctls
Dave Airlie [Mon, 23 Feb 2009 03:33:35 +0000 (13:33 +1000)]
radeon: add some debugging for flush ioctls

15 years agoradeon: make state atom print like old r300 code
Dave Airlie [Mon, 23 Feb 2009 03:33:05 +0000 (13:33 +1000)]
radeon: make state atom print like old r300 code

15 years agoradeon: fixup legacy bo/cs out of VRAM waiting.
Dave Airlie [Mon, 23 Feb 2009 03:32:24 +0000 (13:32 +1000)]
radeon: fixup legacy bo/cs out of VRAM waiting.

This is similiar to the code from the F10 r300 bufmgr

15 years agor300: make DRI2 not crash on compiz start
Dave Airlie [Wed, 18 Feb 2009 00:46:11 +0000 (10:46 +1000)]
r300: make DRI2 not crash on compiz start

15 years agoradeon: move device param id check ifndef
Dave Airlie [Wed, 18 Feb 2009 00:45:42 +0000 (10:45 +1000)]
radeon: move device param id check ifndef

15 years agoradeon: initialise swapped objects pointer
Dave Airlie [Tue, 17 Feb 2009 06:01:16 +0000 (16:01 +1000)]
radeon: initialise swapped objects pointer

15 years agoradeon: legacy texMem interface fixups.
Dave Airlie [Tue, 17 Feb 2009 04:48:49 +0000 (14:48 +1000)]
radeon: legacy texMem interface fixups.

The texmem.c interface is wildly messed up it really wants to own the objects
so let it, pain in the ass but this code should work a lot better now

15 years agoRevert "dri/radeon: export a function to cleanup a texture object."
Dave Airlie [Tue, 17 Feb 2009 04:46:12 +0000 (14:46 +1000)]
Revert "dri/radeon: export a function to cleanup a texture object."

This reverts commit 5325f8624093bb1ec30d581b4ff64218ceab99f9.

15 years agoradeon/r200: drop legacy texture heap code
Dave Airlie [Tue, 17 Feb 2009 04:00:24 +0000 (14:00 +1000)]
radeon/r200: drop legacy texture heap code

15 years agoradeon/r200: fixup texturing aging calls
Dave Airlie [Tue, 17 Feb 2009 03:39:38 +0000 (13:39 +1000)]
radeon/r200: fixup texturing aging calls

15 years agoradeon: fixup destroy texture object exit path and update LRU
Dave Airlie [Tue, 17 Feb 2009 01:17:22 +0000 (11:17 +1000)]
radeon: fixup destroy texture object exit path and update LRU

the destroy path was doing bad things with structure names, make it do less
bad things, use container_of instead

15 years agoradeon: remove leftover debug
Dave Airlie [Tue, 17 Feb 2009 00:42:51 +0000 (10:42 +1000)]
radeon: remove leftover debug

15 years agoradeon/r200: drop dirty state from texture object + pp_txoffset
Dave Airlie [Tue, 17 Feb 2009 00:34:01 +0000 (10:34 +1000)]
radeon/r200: drop dirty state from texture object + pp_txoffset

this is just more code cleanup for old dead code

15 years agor200: align with r100 code
Dave Airlie [Tue, 17 Feb 2009 00:28:43 +0000 (10:28 +1000)]
r200: align with r100 code

15 years agoradeon: fix not emitting texture state correctly
Dave Airlie [Tue, 17 Feb 2009 00:27:45 +0000 (10:27 +1000)]
radeon: fix not emitting texture state correctly

this is whole texture dirty bit is probably not needed with the current
codebase, need to revisit

15 years agoradeon: steal miptree optimisation from intel codebase
Dave Airlie [Tue, 17 Feb 2009 00:26:58 +0000 (10:26 +1000)]
radeon: steal miptree optimisation from intel codebase

This replaces a miptree if it won't distrub anything else.

15 years agoradeon: move YUV on first texunit check after hw state is setup
Dave Airlie [Tue, 17 Feb 2009 00:26:33 +0000 (10:26 +1000)]
radeon: move YUV on first texunit check after hw state is setup

15 years agodri/radeon: export a function to cleanup a texture object.
Dave Airlie [Tue, 17 Feb 2009 00:25:34 +0000 (10:25 +1000)]
dri/radeon: export a function to cleanup a texture object.

The radeon legacy code want to cleanup not free the texture obj,
so export a function to do that and wrap it.

15 years agoradeon: fix texcompress2 test.
Dave Airlie [Sun, 15 Feb 2009 23:49:01 +0000 (09:49 +1000)]
radeon: fix texcompress2 test.

this makes compressed subimages work properly.

15 years agoradeon: fix compressed tex subimage unpack parameter
Dave Airlie [Mon, 16 Feb 2009 07:16:28 +0000 (17:16 +1000)]
radeon: fix compressed tex subimage unpack parameter

15 years agoradeon: add cflags to decide whether to link libdrm_radeon or not.
Dave Airlie [Sun, 15 Feb 2009 07:03:47 +0000 (17:03 +1000)]
radeon: add cflags to decide whether to link libdrm_radeon or not.

You don't need libdrm_radeon for the legacy driver to build,
only for the experimental mm/cs paths.

15 years agoradeon-common: Fix crash in glGetTexImage
Nicolai Haehnle [Sat, 14 Feb 2009 20:43:30 +0000 (21:43 +0100)]
radeon-common: Fix crash in glGetTexImage

Since texture images are now stored in miptrees, we cannot usually
access them directly via the Data pointer.

So we wrap Mesa's implementation by map/unmap calls.

This crash was triggered by Sauerbraten, Piglit now contains a
regression test.

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
15 years agor300: Fix crash in cubemap tree creation
Nicolai Haehnle [Sat, 14 Feb 2009 19:45:01 +0000 (20:45 +0100)]
r300: Fix crash in cubemap tree creation

The mip tree creation would crash if the first baselevel image to be uploaded
was not the positive-x image.

Found with Sauerbraten, also added a regression test to Piglit.

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
15 years agor300: Redirect constant TEX coordinates
Nicolai Haehnle [Sat, 14 Feb 2009 16:06:06 +0000 (17:06 +0100)]
r300: Redirect constant TEX coordinates

R3xx/R5xx fragment program texture constants must come from a hardware
register instead of the constant file, so we redirect if necessary during
the native rewrite phase.

The symptoms of this bug started appearing when the Mesa fixed function
texenvprogram code started using STATE_CURRENT_ATTRIB constants for
texture coordinates when the corresponding attributes were constant across
all vertices.

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
15 years agor300: Fix R300_CMD_SCRATCH on big endian.
Michel Dänzer [Sat, 14 Feb 2009 10:40:48 +0000 (20:40 +1000)]
r300: Fix R300_CMD_SCRATCH on big endian.

15 years agoradeon: remove unused radeon_compat.c
Dave Airlie [Sat, 14 Feb 2009 10:34:20 +0000 (20:34 +1000)]
radeon: remove unused radeon_compat.c

15 years agor200: fixup cube emit debug
Dave Airlie [Sat, 14 Feb 2009 10:13:04 +0000 (20:13 +1000)]
r200: fixup cube emit debug

15 years agor200: fix another cmdbuf sizing issue
Dave Airlie [Sat, 14 Feb 2009 09:10:13 +0000 (19:10 +1000)]
r200: fix another cmdbuf sizing issue

15 years agoradeon: check for valid bo in release arrays
Dave Airlie [Sat, 14 Feb 2009 02:01:54 +0000 (12:01 +1000)]
radeon: check for valid bo in release arrays

15 years agoradeon: remove old cube code
Dave Airlie [Fri, 13 Feb 2009 10:34:19 +0000 (20:34 +1000)]
radeon: remove old cube code

15 years agoradeon/r300: fix warnings
Dave Airlie [Fri, 13 Feb 2009 21:49:15 +0000 (07:49 +1000)]
radeon/r300: fix warnings

15 years agoradeon: add initial cubemap support appears to work
Dave Airlie [Fri, 13 Feb 2009 19:57:52 +0000 (05:57 +1000)]
radeon: add initial cubemap support appears to work

15 years agoradeon/r200: make setTexOffset work again
Dave Airlie [Fri, 13 Feb 2009 13:34:53 +0000 (23:34 +1000)]
radeon/r200: make setTexOffset work again

15 years agoradeon/r200: fix set tex offset functions
Dave Airlie [Fri, 13 Feb 2009 13:29:27 +0000 (23:29 +1000)]
radeon/r200: fix set tex offset functions

15 years agoradeon: revert unneeded change to texturing code
Dave Airlie [Fri, 13 Feb 2009 13:02:12 +0000 (23:02 +1000)]
radeon: revert unneeded change to texturing code

15 years agoradeon: fix compressed texture upload on all radeons
Dave Airlie [Fri, 13 Feb 2009 12:49:06 +0000 (22:49 +1000)]
radeon: fix compressed texture upload on all radeons

tested on r200, texcmp works. May need more verification

15 years agor200: update with changes from r100 driver for texture state
Dave Airlie [Fri, 13 Feb 2009 09:39:21 +0000 (19:39 +1000)]
r200: update with changes from r100 driver for texture state

15 years agor200: port over state emit fix from r100
Dave Airlie [Fri, 13 Feb 2009 08:50:57 +0000 (18:50 +1000)]
r200: port over state emit fix from r100

15 years agor200: fixup some CS emission sizes
Dave Airlie [Thu, 12 Feb 2009 15:27:21 +0000 (01:27 +1000)]
r200: fixup some CS emission sizes

15 years agor200: use correct finish interface
Dave Airlie [Thu, 12 Feb 2009 14:04:11 +0000 (00:04 +1000)]
r200: use correct finish interface

15 years agoradeon: fixup include ordering
Dave Airlie [Thu, 12 Feb 2009 15:21:37 +0000 (01:21 +1000)]
radeon: fixup include ordering

15 years agoMerge remote branch 'origin/master' into radeon-rewrite
Dave Airlie [Thu, 12 Feb 2009 15:11:25 +0000 (01:11 +1000)]
Merge remote branch 'origin/master' into radeon-rewrite

Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c

15 years agor300: fix warning about mesa_lock_context_texture
Dave Airlie [Thu, 12 Feb 2009 15:04:18 +0000 (01:04 +1000)]
r300: fix warning about mesa_lock_context_texture

15 years agoradeon: add stdint include
Dave Airlie [Thu, 12 Feb 2009 04:44:20 +0000 (14:44 +1000)]
radeon: add stdint include

15 years agoradeon: add mminfo struct to wrapper
Dave Airlie [Thu, 12 Feb 2009 04:43:25 +0000 (14:43 +1000)]
radeon: add mminfo struct to wrapper

15 years agoradeon: add defines for future bits
Dave Airlie [Thu, 12 Feb 2009 04:41:16 +0000 (14:41 +1000)]
radeon: add defines for future bits

15 years agor200: make build complete
Dave Airlie [Thu, 12 Feb 2009 04:39:33 +0000 (14:39 +1000)]
r200: make build complete

15 years agor300: make r300 work with latest changes
Dave Airlie [Thu, 12 Feb 2009 04:36:12 +0000 (14:36 +1000)]
r300: make r300 work with latest changes

15 years agoradeon: make build without libdrm_radeon better
Dave Airlie [Thu, 12 Feb 2009 04:16:24 +0000 (14:16 +1000)]
radeon: make build without libdrm_radeon better

15 years agoradeon/r200/r300: make build again with tracker changes
Dave Airlie [Thu, 12 Feb 2009 14:05:39 +0000 (00:05 +1000)]
radeon/r200/r300: make build again with tracker changes

15 years agoradeon: remove depends on libdrm_radeon for now.
Dave Airlie [Thu, 12 Feb 2009 13:53:41 +0000 (23:53 +1000)]
radeon: remove depends on libdrm_radeon for now.

will fixup makefiles later to detect and use libdrm_Radeon in proper
places