Commit Graph

24906 Commits

Author SHA1 Message Date
Dan Nicholson 9185a61c8a mklib: Ensure target directory exists for library
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit 23671e5358)
2009-08-04 06:30:46 -07:00
Peter Hutterer 0ce73f84e9 Add missing X11_INCLUDES to egl/drivers/demo and egl/main.
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 5358e54d1a)
2009-08-04 06:30:30 -07:00
Dan Nicholson 23671e5358 mklib: Ensure target directory exists for library
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-08-04 06:25:26 -07:00
Michel Dänzer 048f988aeb r300g: Slightly saner initialization of some texture / transfer fields. 2009-08-04 10:57:47 +02:00
Eric Anholt d7430d942f i965: Assert that the offset in the VBO is below the VBO size.
This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec.  Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be.  This
gets us the 90% solution.

Bug #19911.
2009-08-03 17:56:49 -07:00
Eric Anholt e340d4f986 i965: Even if no VS inputs are set, still load some amount of URB as required.
See comment on Vertex URB Entry Read Length for VS_STATE.

This, combined with the previous three commits, fixes #22945.
2009-08-03 17:19:03 -07:00
Eric Anholt e93848e595 i965: Make sure the VS URB size is big enough to fit a VF VUE.
This fix is just from code and docs inspection, but it may fix hangs on
some applications.
2009-08-03 17:19:03 -07:00
Eric Anholt d1fbfd0f96 i965: Don't emit bad packets when no VBs are referenced.
It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled.  We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.

Bug #22945 (wine with an uncompiled VS)
2009-08-03 17:19:03 -07:00
Eric Anholt 9b9cb30d12 i965: Calculate enabled[] and nr_enabled once and re-use the values.
The code duplication bothered me.
2009-08-03 17:19:03 -07:00
Robert Ellison 1f1ead9947 typo fix
somehow, this change was missed on the last checkin
2009-08-03 17:09:14 -06:00
Robert Ellison 0d18e9259e mesa: fix up some GLAPI XML
- Added specifications for the extensions GL_APPLE_flush_buffer_range and
  GL_APPLE_texture_range

- EXT_framebuffer_object.xml strangely held specifications for both
  the GL_EXT_framebuffer_object extension and the GL_EXT_texture_array
  extension.  Split out the GL_EXT_texture_array data into its own
  file.
2009-08-03 17:04:50 -06:00
Roland Scheidegger 50c736589e radeon: more fixes for compressed textures
- fix not respecting required hardware stride with compressedTexImage -
  this fixes #22615.
- make sure correct stride is used in various places
- fix stored miptree never matching with a TexImage call with compressed
  texture
- don't always store data with compressedtexsubimage at offset 0,
  and actually use the supplied pixel data... (untested)
- make sure rows for compressed texture handling are rounded up not down

Note that trying to access stored compressed textures in hardware miptrees
from core mesa (get_compressed_teximage, swrast fallbacks) can't work correctly,
since RowStride isn't really set to anything useful, plus some places (at least
get_compressed_teximage) assume this data has native stride and no padding.
2009-08-04 00:21:07 +02:00
Eric Anholt 4221e81b24 radeon: Fix inverted test for disabling flushing of front buffer output.
(corresponding fix to the intel driver one)
2009-08-03 14:40:46 -07:00
Eric Anholt fd65418f60 intel: Fix inverted test for disabling flushing of front buffer output.
The comment disagreed with the code, and nicely drew my eyes to what was
going wrong.

Bug #21774 (blender)
Bug #21788 (readpix)
2009-08-03 14:33:40 -07:00
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
Pauli Nieminen fb7cf731f9 xdemo/glxswapcontrol: Move get_framge_usage after the swap.
This fixes the problem that first frame would report bogus usage values.
Problem was caused because get_frame_usage returned data from previous buffer
swap.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 13:42:05 -06:00
Pauli Nieminen b59eb3b8b1 xdemos/glxcontexts: Don't leak visual info when choosing visual again.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 11:55:29 -06: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
Brian Paul ed6125fe9b st/mesa: we don't support GL_NV_point_sprite (see comment) 2009-08-03 11:16:23 -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