Commit graph

24739 commits

Author SHA1 Message Date
Eric Anholt
0828579a65 intel: Wait on the last swapbuffers to complete before queuing a new one.
This fixes jerkiness in doom3 and other apps since the kernel change to
throttle less absurdly, which led to a thundering herd of frames.

Because this is a rather minimal fix, there is at least one downside: If
the whole scene completes in one batchbuffer, we'll end up stalling the GPU.

Thanks to Michel Dänzer for suggesting using glFlush to signal frame end
instead of going to all the effort of adding a new DRI2 extension.
2009-08-03 13:34:07 -07:00
Alex Deucher
e0d61fd696 r600: add some new r7xx pci ids 2009-08-03 16:10:32 -04:00
Eric Anholt
a9ba1bfeb3 texenv: Use VP->Current, since _Current isn't updated at this point. 2009-08-03 12:54:41 -07:00
Eric Anholt
40990d9dfb texenv: Match state.c in deciding whether we'll be using a vertex shader. 2009-08-03 12:54:33 -07:00
Eric Anholt
03187571b6 texenv: Add missing dependency on VP changes.
Funny thing is I annotated this dependency in
e5f63c403b, but didn't actually use it.
2009-08-03 12:54:17 -07:00
Chia-I Wu
7420e33848 egl_softpipe: Add support for pbuffer surface.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:36:08 -06:00
Chia-I Wu
8a130a65aa egl: Correct the default values of surface attributes.
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:35:44 -06:00
Chia-I Wu
8cdc6c66f9 egl: Make eglMakeCurrent more robust.
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers.  This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:35:14 -06:00
Chia-I Wu
07ee01365a egl: Replace IsBound by a pointer to the binding.
IsBound tells if a context or surface is current.  What it does not tell
is, to which thread a context is current, or to which context a surface
is current.  This commit replaces IsBound by a pointer to the binding
thread or context.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:34:37 -06:00
Brian Paul
27148ccaba gl: upgrade wglext.h to version 15 2009-08-03 11:24:09 -06:00
Brian Paul
39bf48f281 gl: upgrade glxext.h to version 23 2009-08-03 11:24:09 -06:00
Brian Paul
2d725dac40 gl: upgrade glext.h to version 54 2009-08-03 11:24:09 -06:00
Brian Paul
4f61bc135a tgsi: report opcode name in addition to the number when translation fails 2009-08-03 11:24:09 -06:00
Brian Paul
c3c90c2dd9 tgsi: added tgsi_get_opcode_name() 2009-08-03 11:24:09 -06:00
Brian Paul
2e9bf10014 gallium: comments, reformatting 2009-08-03 11:24:09 -06:00
Alex Deucher
f538d02753 r600: add some missing pci ids 2009-08-03 11:21:10 -04:00
Alex Deucher
583ed4aae5 r600: fix the build when RADEON_DEBUG_BO is set 2009-08-03 03:12:56 -04:00
Alex Deucher
282c0c411c r600: fix r600SetTexOffset
We need to properly set up a fake bo for the texture override,
so add a new function to radeon_bo_legacy.c.  This could probably
be used on radeon/r200/r300 to unify the bo handling for
texture override.

compiz now works :)
2009-08-03 02:28:22 -04:00
Corbin Simpson
30bca7a4e6 Merge commit 'nha/r300-compiler-gallium' 2009-08-02 16:56:52 -07:00
Alex Deucher
d07bf2b35c r600: handle state emit better
- move shader-related state with the rest of the shader setup/emit
- start to track dirty state better
2009-08-02 18:26:12 -04:00
vehemens
562ca49611 r600: Logic Operations Fix
fixes bug 23087
2009-08-02 18:03:58 -04:00
Alex Deucher
5e51903606 r600: fix regression in texenv
Emit shader consts with the shader program itself
2009-08-02 13:29:18 -04:00
Nicolai Hähnle
b1700b03af r300: Fix a regression on non-KMS
The regression was introduced by 9a1c336253

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-02 16:24:52 +02:00
Alex Deucher
86ac0ae0b0 r600: fix rectangle textures
It might be better to add an instruction to normalize the
coordinates for rectanglular textures as there are some limitations
to wrap modes on unnormalized tex coords.

fixes texrect
2009-08-01 20:55:43 -04:00
Nicolai Hähnle
9a1c336253 r300: Fix corner-case of KIL on R300
R300 hardware (but _not_ R500) hardware requires an enabled texture unit
if KIL is used in fragment programs. We now work around the CS checker
correctly when enabling such a fake texture unit.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-01 19:00:55 +02:00
Nicolai Hähnle
3d21e3d3a2 r300: Fix Z buffer re-emit after window resize
We used to not always correctly re-emit the Z buffer size in all cases,
in particular the clear path, and invalidated state was not always picked
up correctly.

This fixes a bug where the kernel CS checker correctly complains about
a Z buffer that is too small.

Note that this bug was probably only visible with ridiculously high
framerates, i.e. glxgears.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-01 17:16:50 +02:00
Patrice Mandin
fc3d564dae mesa st: Use POT texture for draw pixels operations if NPOT texture is not supported 2009-08-01 11:15:18 +02:00
Patrice Mandin
c1785c19ca mesa st: Move logbase2 function to util/u_math.h 2009-08-01 11:03:30 +02:00
Roland Scheidegger
801c3fcbca radeon: fix r100/r200 compressed texture stride
This almost fixes compressed mipmapped textures on r200, though some small
mip levels are still broken.
Leave r300 compressed texture stride as is though afaik it's different
to pre-radeon-rewrite too. Also do the fixup for rs600 uncompressed row stride
at same place.
2009-07-31 23:24:44 +02:00
Roland Scheidegger
2730ee75c7 radeon: s/r300/radeon in shared code error message 2009-07-31 23:20:22 +02:00
Pauli Nieminen
55bc8b1390 radeon: Cliprects has to be updated before doing anything with clip rectangles
Reported to fix corruption while dragging an active window by John Bridgman.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-31 21:44:31 +02:00
Pauli Nieminen
1fcb321e2f radeon: Remove unused variable from context.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-31 21:39:25 +02:00
Alex Deucher
95b64c0ed2 r600: make sure bos are valid before usign that 2009-07-31 15:11:41 -04:00
Alex Deucher
80d80d23b6 r600: fix reloc setup
re-use the same reloc index for bos that are referenced
multiple times.

Fixes rain demo.
2009-07-31 14:52:56 -04:00
Alex Deucher
177c33c481 r600: remove unused offset_mod stuff
this is a step in migrating to the common cs code
2009-07-31 14:52:56 -04:00
Alex Deucher
19ce428c8a r600: ensure we have enough room for full state emit
full state is roughly 4000 dwords, but will vary depending
on the rendering.
Also fix some warnings.
2009-07-31 14:52:56 -04:00
Alex Deucher
54a1641923 r600: unify state emit into one function 2009-07-31 14:52:55 -04:00
Alex Deucher
be1687a892 r600: re-arrange state setup and emit so they are not mixed 2009-07-31 14:52:55 -04:00
Michal Krol
cb90c43676 Rename TGSI LOOP instruction to better match theri usage.
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour
is similar to a C language for-loop.

The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now
there is no name collision.
2009-07-31 18:14:40 +02:00
Chia-Wu
dc516d6e2a egl: Silence warnings on x86-64.
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64.  Add wrappers to silence the warnings.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-31 07:30:13 -06:00
Alex Deucher
826f1f9c6f r600: get updated pending age from cs ioctl
REQUIRES AN UPDATED DRM
2009-07-31 02:13:43 -04:00
Alex Deucher
643d52a394 r600: warning fixes 2009-07-30 21:32:36 -04:00
Alex Deucher
e0e51ab1ea r600: split primitive draw into a separate function 2009-07-30 21:32:36 -04:00
Nicolai Hähnle
d0c398a8e2 r300g: Use radeon compiler for fragment programs
This is entirely untested on R500, and needs more testing on R300.
2009-07-30 23:55:12 +02:00
Nicolai Hähnle
fbc88a7334 r300g: Remove extraneous printf
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-30 23:45:18 +02:00
Nicolai Hähnle
188f8c6792 r300g: Use r300compiler for vertex shaders 2009-07-30 23:45:18 +02:00
Nicolai Hähnle
cab62aa28f r300/compiler: Remove inst_offset from r500_fragment_program_code
The field is not used, and in any case it would be more interesting to
manipulate from *outside* the compiler if we ever wanted to load several
fragment programs at the same time or something.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-30 23:42:59 +02:00
Ian Romanick
9f26f801dc progs/vp: Correct the PARAM array sizes in arl-*.txt 2009-07-30 14:08:53 -07:00
Chia-I Wu
27fb3ff858 softpipe: Mark texture dirty when unmapped.
When a texutre transfer is mapped for writing, mark the texture dirty
when unmapped.  This was done in surface creation, and this commit moves
it to happen in texture unmapping.

This fixes subtex test in progs/tests/.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-30 10:42:46 -06:00
Brian Paul
9c936403de mesa: re-enable _mesa_source_buffer_exists() call
Somehow this code wound up inside a comment a while back.
2009-07-30 10:04:42 -06:00