Commit graph

31338 commits

Author SHA1 Message Date
Keith Packard
edd85bcd6b bin/mklib: Clear CDPATH to avoid damaging expand_archive output
The bash 'cd' command tends to emit random stuff to stdout when the
CDPATH variable is set, so clear it to keep extra filenames from being
emitted from the expand_archive function, which would otherwise cause
mklib to fail.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-22 09:56:58 -08:00
Brian Paul
52cc3b03c3 glxinfo: Fix User error in glGetProgramivARB
glxinfo needed fixing after commit 4bccd69.

Move fragment program only parameters into their own list
so that they are not queried for a vertex program.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit b0e5dcb859)
2010-02-22 08:56:18 -07:00
Brian Paul
2467354842 i965g: added missing texture cap queries 2010-02-22 08:14:14 -07:00
Brian Paul
98e2f6c38b i915g: added missing texture cap queries 2010-02-22 08:14:05 -07:00
Brian Paul
cfdd1ca695 st/mesa: change viewport Z scale/bias for glBitmap/glDrawPixels
This fixes incorrect Z position of glBitmap, glDraw/CopyPixels for the
svga driver.  Now we use 0.5, 0.5 as is typical for ordinary 3D rendering.

(cherry picked from commit bcd561c667)
2010-02-22 08:04:53 -07:00
Brian Paul
504e297a2c st/mesa: Add checks for ST_SURFACE_x vs MESA_BUFFER_x
The ST_SURFACE_x values should match the Mesa BUFFER_x values.
Added some assertions to prevent future mix-ups.

(cherry picked from commit 13cbb5fff6)
2010-02-22 08:04:39 -07:00
Brian Paul
6ce5b5e115 mesa/st: Make ST_SURFACE_DEPTH index consistent with mesa's BUFFER_DEPTH.
Some st functions assume that they are identical.

(cherry picked from commit 9d17ad2891)
2010-02-22 08:04:16 -07:00
Chris Wilson
15904c057b intel: assert that we do not overflow the batch buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:41 +00:00
Chris Wilson
415b7c7775 i915: Fix logic !gen >= 3
The effect of this was that all objects were aligned to 128 bytes
on all generations, rather than just gen2.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:41 +00:00
Chris Wilson
ac6ce53af7 i915: Remove superfluous MI_NOOP from vertex emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:33 +00:00
Chris Wilson
5abee283d3 intel: Check that we have a bufmgr or bail out when initializing the context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:53:56 +00:00
Dave Airlie
b14548ea32 Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
This reverts commit fff5be8e7b.

Probably went too soon with this, dileX reported OA not working for him
it works here fine, but the optimisations I wanted aren't working properly
yet so I'll fix that now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 17:26:35 +10:00
Dave Airlie
fff5be8e7b r300g: rebuild winsys/pipe buffer handling and add buffer map
This creates a cleaner winsys and drop the simple screen stuff.

It makes r300g use pb_bufmgr structs and adds usage of the cached
bufmgr for vertex/index buffers.

It also avoids mapping too often.

I'm not 100% sure this is perfect but it won't find its own bugs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 16:23:44 +10:00
Marek Olšák
233290f203 r3OOg: support rendering of more than 65535 vertices per draw call (almost)
The path for VAP_ALT_NUM_VERTICES is also in place (and tested)
but not enabled by default due to the missing support of this reg
in the upstream kernel.

Also, a non-zero BUFFER_BASE in the INDX_BUFFER packet3 hangs the machine.
Am I missing something? Because of this, only draw_arrays can render
more than 65535 vertices without the use of VAP_ALT_NUM_VERTICES.
2010-02-22 03:12:13 +01:00
Vinson Lee
c786df2caf i965g: Fix memory leak. 2010-02-21 15:15:52 -08:00
Vinson Lee
b7eed19efe st/mesa: Fix memory leak on out-of-memory error path. 2010-02-21 15:10:50 -08:00
Vinson Lee
8ff6790afb r300g: Remove unnecessary header. 2010-02-21 14:26:53 -08:00
Ray Kohler
701ac58a0c Link egl progs to libm as necessary.
Signed-off-by: Ray Kohler <ataraxia937@gmail.com>
2010-02-22 01:26:12 +08:00
Marek Olšák
3c244dac47 r300g: precompute framebuffer register values 2010-02-21 14:24:13 +01:00
Marek Olšák
7a087e1d6f r300g: add all missing colorbuffer formats 2010-02-21 14:24:13 +01:00
Marek Olšák
5c14fd1743 r300g: make r300_translate_texformat private
Unlikely to increase performance from inlining.

And partially expose it through r300_is_sampler_format_supported.
2010-02-21 14:24:12 +01:00
Marek Olšák
2a30c268bd r300g: re-enable SRGB formats
Ouch.
2010-02-21 14:24:12 +01:00
Vinson Lee
7da9da190f mesa: Add assert to check for null pointer dereference. 2010-02-21 02:13:15 -08:00
Vinson Lee
d89de9c13f draw: Remove dead code. 2010-02-21 01:57:16 -08:00
Vinson Lee
3194197efd i965g: Remove dead code. 2010-02-21 01:30:35 -08:00
Vinson Lee
0b83f48e82 i965g: Fix assertions that were always true.
The surface_format field is 9 bits wide which has a maximum value
of 511. BRW_SURFACEFORMAT_INVALID has a value of 4095 which exceeds
the width of the surface_format field.

This patch asserts that the format is not BRW_SURFACEFORMAT_INVALID
before assignment to the surface_format field.
2010-02-21 01:19:47 -08:00
Vinson Lee
d1aafb33b5 glsl/cl: Prevent possible buffer overflow. 2010-02-21 00:36:50 -08:00
Vinson Lee
f56c9c2b19 i965g: Fix use of out-of-scope variable. 2010-02-21 00:24:05 -08:00
Chia-I Wu
1207482a03 st/egl: Disable SHM in ximage backend.
With pipe_screen::update_buffer being called in st_validate_state, it is
likely that softpipe will flush tile caches to a detached SHM segment.
Disable SHM for now until a better solution is found.
2010-02-21 15:50:33 +08:00
Vinson Lee
f96e8a033b radeon: Silence compiler format warning. 2010-02-20 23:43:33 -08:00
Vinson Lee
ae41339d4c glsl/cl: Prevent possible string overflow. 2010-02-20 23:27:07 -08:00
Chia-I Wu
dbaa845153 st/egl: Properly convert vrefresh to refresh rate.
Some kernels have vrefresh = (refresh rate * 1000) while others don't.
Use some heuristics here.
2010-02-21 10:22:08 +08:00
Chia-I Wu
5d4d54574f st/egl: Enable extensions before adding configs.
Configs are validated before added.  The validation depends on the
extensions available.  If configs are added before enabling extensions,
configs with EGL_SCREEN_SURFACE_MESA bit set will never pass the
validation for example.
2010-02-21 10:22:08 +08:00
Chia-I Wu
719c4b0fc2 st/egl: Do not force validate when update_buffer is called.
st/mesa was changed to call pipe_screen::update_buffer in
st_validate_state.  In most cases there is no need to validate.
2010-02-21 10:22:07 +08:00
Chia-I Wu
9d88006ca6 st/egl: Clean up DRI2 surface.
Mainly to move the call to DRI2GetBuffers from dri2_surface_validate to
the new dri2_surface_update_buffers.
2010-02-21 10:22:07 +08:00
Chia-I Wu
d6b348ddd1 st/egl: Clean up ximage surface.
Mainly to move buffer allocation code from ximage_surface_validate to
the new ximage_surface_update_buffers.
2010-02-21 10:22:07 +08:00
Vinson Lee
71e3abc014 st/xlib: Add assert to check for null pointer dereference. 2010-02-20 16:23:44 -08:00
Jon TURNEY
e3114d3f0f Cygwin build fix: Fix linkage
Fix the way we make static convenience libraries, such as libmesa.a,
to be the same as linux etc.

Putting archives inside archives doesn't make the objects inside
the archive linkable, so use expand_archives() to get all the objects
inside an archive out again before linking.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-20 09:24:15 -07:00
Vinson Lee
1613735d08 gamma: Silence uninitialized variable warnings. 2010-02-20 02:29:43 -08:00
Vinson Lee
fdcad8a583 gamma: Add missing headers. 2010-02-20 02:25:29 -08:00
Vinson Lee
fbf04cef71 gamma: Remove unnecessary header. 2010-02-20 02:02:17 -08:00
Vinson Lee
b76164dced intel: Silence compiler format warnings. 2010-02-20 01:58:27 -08:00
Vinson Lee
6cfdb61f73 progs/redbook: Silence warn_unused_result warnings. 2010-02-20 01:34:16 -08:00
Vinson Lee
5fd84e0246 tgsi: ifdef out unused function micro_sqrt. 2010-02-20 00:56:32 -08:00
Vinson Lee
a45f2ec7b7 mesa: Silence compiler format warning. 2010-02-19 23:53:27 -08:00
Brian Paul
150cce6aef mesa: fix snprintf() typo 2010-02-19 13:44:12 -07:00
Brian Paul
78a0c353d0 mesa: restore _mesa_snprintf() - it's needed for Windows
This reverts part of commit 298be2b028
2010-02-19 12:56:49 -07:00
Brian Paul
8de5a292f7 mesa: casts to silence new warnings from printf() 2010-02-19 12:45:49 -07:00
Brian Paul
984b72ad5f mesa: remove abs/negate from fetch_vector1ui()
This function is only used for the NV unpack instructions.
Negate/abs make no sense and removing the code fixes Windows
compiler warnings.  Found by Karl Schultz.
2010-02-19 12:43:47 -07:00
Kristian Høgsberg
da43aa84c8 intel: Set buffer stamp before getting new buffers
This way, if we get an invalidate as we update the buffers, we
don't clobber the drawable stamp and ignore the invalidate.

Pointed-out-by: Francisco Jerez
2010-02-19 14:12:27 -05:00