Vinson Lee [Tue, 23 Feb 2010 07:23:57 +0000 (23:23 -0800)]
draw: Remove dead code.
Marek Olšák [Mon, 22 Feb 2010 12:51:38 +0000 (13:51 +0100)]
r300g: fix draw_elements for "start" != 0
Reported-by: Andre Maasikas <amaasikas@gmail.com>
José Fonseca [Mon, 22 Feb 2010 19:24:18 +0000 (19:24 +0000)]
svga: Upload user buffers only once.
José Fonseca [Mon, 22 Feb 2010 19:20:25 +0000 (19:20 +0000)]
svga: Fix the guest offset of piecewise buffer DMAs.
It was being erroneously set equal to the host offset, but it should be
zero.
José Fonseca [Mon, 22 Feb 2010 18:57:09 +0000 (18:57 +0000)]
svga: Emit a scalar rcp in shadow maps.
Small improvement in Lightsmark 2008.
José Fonseca [Mon, 22 Feb 2010 18:01:32 +0000 (18:01 +0000)]
svga: Don't emit zero writemasks.
This fixes a regression with Lightsmark, where more compact TGSI from Mesa
was causing a zero mask MOV to be emitted for shadow map compare, causing
problems in some backends.
Add a few more assertions to catch cases like this.
José Fonseca [Mon, 22 Feb 2010 21:47:07 +0000 (21:47 +0000)]
tgsi: Report an error when a destination has an empty writemask.
José Fonseca [Thu, 18 Feb 2010 17:21:53 +0000 (17:21 +0000)]
svga: Upload the dirty ranges instead of the whole buffer.
José Fonseca [Thu, 18 Feb 2010 16:40:14 +0000 (16:40 +0000)]
svga: Break uploads of big buffers into smaller pieces.
Fixes crash in Homeworld2 which tries to create a 14MB buffer, because we
now avoid creating GMR buffers larger than 8MB to ensure progress given
we have only a 16MB pool.
José Fonseca [Thu, 18 Feb 2010 14:12:31 +0000 (14:12 +0000)]
svga: Note ranges even when there is no hardware buffer around.
Not having a hardware buffer around doesn't change the fact that the
range is dirty and needs to be uploaded eventually.
José Fonseca [Thu, 18 Feb 2010 14:05:57 +0000 (14:05 +0000)]
svga: Further cleanup/comment svga buffer code.
Just cosmetic changes -- no behavior change.
José Fonseca [Thu, 18 Feb 2010 18:11:50 +0000 (18:11 +0000)]
svga: Temporarily create a sw vertex buf when failed to create a hw buf.
Many apps don't check the return of map buffer so it is better not to
fail.
José Fonseca [Tue, 16 Feb 2010 16:43:53 +0000 (16:43 +0000)]
svga: Remove unused buffer download code.
Unnecessary now that we never destroy buffer storage.
José Fonseca [Tue, 16 Feb 2010 15:51:34 +0000 (15:51 +0000)]
pipebuffer: Don't synchronize when checking for buffer overflows.
To avoid masking synchronization issues in debug builds.
José Fonseca [Thu, 28 Jan 2010 17:11:02 +0000 (17:11 +0000)]
python/retrace: Dump all vertices for verbosity level 3.
José Fonseca [Wed, 27 Jan 2010 15:41:25 +0000 (15:41 +0000)]
svga: Prevent buffer overflow in buffer ranges.
Do this by extending the nearest range to cover the new range.
This fixes an access fault in Call of Duty which was doing many disjoint
glBufferSubData calls.
José Fonseca [Wed, 27 Jan 2010 14:45:56 +0000 (14:45 +0000)]
svga: Fix PIPE_LOGICOP_INVERT.
Actually the current XOR implementation is an INVERT.
This fixes rectangle selection in Maya.
Keith Packard [Sun, 21 Feb 2010 22:30:00 +0000 (14:30 -0800)]
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>
Brian Paul [Mon, 22 Feb 2010 15:56:18 +0000 (08:56 -0700)]
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
b0e5dcb859692707fec8752dd21fc61fc4c3dbcc)
Brian Paul [Mon, 22 Feb 2010 15:14:14 +0000 (08:14 -0700)]
i965g: added missing texture cap queries
Brian Paul [Mon, 22 Feb 2010 15:14:05 +0000 (08:14 -0700)]
i915g: added missing texture cap queries
Brian Paul [Mon, 22 Feb 2010 15:04:53 +0000 (08:04 -0700)]
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
bcd561c66777e58dbb29a573c4d2279772bac6c5)
Brian Paul [Mon, 22 Feb 2010 15:04:39 +0000 (08:04 -0700)]
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
13cbb5fff68ef8831230638e9f0b29a217750e9d)
Brian Paul [Mon, 22 Feb 2010 15:04:16 +0000 (08:04 -0700)]
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
9d17ad2891b58de9e33e943ff918a678c6a3c2bd)
Chris Wilson [Mon, 22 Feb 2010 09:53:36 +0000 (09:53 +0000)]
intel: assert that we do not overflow the batch buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 22 Feb 2010 09:51:33 +0000 (09:51 +0000)]
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>
Chris Wilson [Mon, 22 Feb 2010 09:50:15 +0000 (09:50 +0000)]
i915: Remove superfluous MI_NOOP from vertex emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Thu, 21 Jan 2010 17:39:01 +0000 (17:39 +0000)]
intel: Check that we have a bufmgr or bail out when initializing the context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Dave Airlie [Mon, 22 Feb 2010 07:26:30 +0000 (17:26 +1000)]
Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
This reverts commit
fff5be8e7b4557c221f2425dcafc2e7cbbba76ba.
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>
Dave Airlie [Fri, 12 Feb 2010 05:39:51 +0000 (15:39 +1000)]
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>
Marek Olšák [Sun, 21 Feb 2010 19:49:29 +0000 (20:49 +0100)]
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.
Vinson Lee [Sun, 21 Feb 2010 23:15:52 +0000 (15:15 -0800)]
i965g: Fix memory leak.
Vinson Lee [Sun, 21 Feb 2010 23:10:50 +0000 (15:10 -0800)]
st/mesa: Fix memory leak on out-of-memory error path.
Vinson Lee [Sun, 21 Feb 2010 22:26:53 +0000 (14:26 -0800)]
r300g: Remove unnecessary header.
Ray Kohler [Sun, 21 Feb 2010 03:26:43 +0000 (22:26 -0500)]
Link egl progs to libm as necessary.
Signed-off-by: Ray Kohler <ataraxia937@gmail.com>
Marek Olšák [Sat, 20 Feb 2010 20:12:45 +0000 (21:12 +0100)]
r300g: precompute framebuffer register values
Marek Olšák [Sat, 20 Feb 2010 23:17:04 +0000 (00:17 +0100)]
r300g: add all missing colorbuffer formats
Marek Olšák [Sat, 20 Feb 2010 20:33:53 +0000 (21:33 +0100)]
r300g: make r300_translate_texformat private
Unlikely to increase performance from inlining.
And partially expose it through r300_is_sampler_format_supported.
Marek Olšák [Sat, 20 Feb 2010 17:52:20 +0000 (18:52 +0100)]
r300g: re-enable SRGB formats
Ouch.
Vinson Lee [Sun, 21 Feb 2010 10:13:15 +0000 (02:13 -0800)]
mesa: Add assert to check for null pointer dereference.
Vinson Lee [Sun, 21 Feb 2010 09:57:16 +0000 (01:57 -0800)]
draw: Remove dead code.
Vinson Lee [Sun, 21 Feb 2010 09:30:35 +0000 (01:30 -0800)]
i965g: Remove dead code.
Vinson Lee [Sun, 21 Feb 2010 09:19:47 +0000 (01:19 -0800)]
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.
Vinson Lee [Sun, 21 Feb 2010 08:36:50 +0000 (00:36 -0800)]
glsl/cl: Prevent possible buffer overflow.
Vinson Lee [Sun, 21 Feb 2010 08:24:05 +0000 (00:24 -0800)]
i965g: Fix use of out-of-scope variable.
Chia-I Wu [Sun, 21 Feb 2010 07:47:45 +0000 (15:47 +0800)]
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.
Vinson Lee [Sun, 21 Feb 2010 07:43:33 +0000 (23:43 -0800)]
radeon: Silence compiler format warning.
Vinson Lee [Sun, 21 Feb 2010 07:27:07 +0000 (23:27 -0800)]
glsl/cl: Prevent possible string overflow.
Chia-I Wu [Sun, 21 Feb 2010 02:11:54 +0000 (10:11 +0800)]
st/egl: Properly convert vrefresh to refresh rate.
Some kernels have vrefresh = (refresh rate * 1000) while others don't.
Use some heuristics here.
Chia-I Wu [Sun, 21 Feb 2010 02:02:13 +0000 (10:02 +0800)]
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.
Chia-I Wu [Sat, 20 Feb 2010 04:41:30 +0000 (12:41 +0800)]
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.
Chia-I Wu [Fri, 19 Feb 2010 14:12:04 +0000 (22:12 +0800)]
st/egl: Clean up DRI2 surface.
Mainly to move the call to DRI2GetBuffers from dri2_surface_validate to
the new dri2_surface_update_buffers.
Chia-I Wu [Fri, 19 Feb 2010 14:36:16 +0000 (22:36 +0800)]
st/egl: Clean up ximage surface.
Mainly to move buffer allocation code from ximage_surface_validate to
the new ximage_surface_update_buffers.
Vinson Lee [Sun, 21 Feb 2010 00:23:44 +0000 (16:23 -0800)]
st/xlib: Add assert to check for null pointer dereference.
Jon TURNEY [Fri, 19 Feb 2010 22:38:00 +0000 (22:38 +0000)]
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>
Vinson Lee [Sat, 20 Feb 2010 10:29:43 +0000 (02:29 -0800)]
gamma: Silence uninitialized variable warnings.
Vinson Lee [Sat, 20 Feb 2010 10:25:29 +0000 (02:25 -0800)]
gamma: Add missing headers.
Vinson Lee [Sat, 20 Feb 2010 10:02:17 +0000 (02:02 -0800)]
gamma: Remove unnecessary header.
Vinson Lee [Sat, 20 Feb 2010 09:58:27 +0000 (01:58 -0800)]
intel: Silence compiler format warnings.
Vinson Lee [Sat, 20 Feb 2010 09:34:16 +0000 (01:34 -0800)]
progs/redbook: Silence warn_unused_result warnings.
Vinson Lee [Sat, 20 Feb 2010 08:56:32 +0000 (00:56 -0800)]
tgsi: ifdef out unused function micro_sqrt.
Vinson Lee [Sat, 20 Feb 2010 07:53:27 +0000 (23:53 -0800)]
mesa: Silence compiler format warning.
Brian Paul [Fri, 19 Feb 2010 20:44:12 +0000 (13:44 -0700)]
mesa: fix snprintf() typo
Brian Paul [Fri, 19 Feb 2010 19:56:49 +0000 (12:56 -0700)]
mesa: restore _mesa_snprintf() - it's needed for Windows
This reverts part of commit
298be2b028263b2c343a707662c6fbfa18293cb2
Brian Paul [Fri, 19 Feb 2010 19:45:49 +0000 (12:45 -0700)]
mesa: casts to silence new warnings from printf()
Brian Paul [Fri, 19 Feb 2010 19:41:21 +0000 (12:41 -0700)]
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.
Kristian Høgsberg [Fri, 19 Feb 2010 19:08:35 +0000 (14:08 -0500)]
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
Marek Olšák [Fri, 19 Feb 2010 19:01:11 +0000 (20:01 +0100)]
r300g: fix rendering into the L8 and A8 texture formats
RB3D_COLORPITCH.COLORFORMAT.I8 stores the C2 component.
Kristian Høgsberg [Fri, 19 Feb 2010 18:16:57 +0000 (13:16 -0500)]
Drop macro wrappers for the aligned memory functions
Brian Paul [Fri, 19 Feb 2010 18:12:20 +0000 (11:12 -0700)]
progs/tests: new zbitmap.c test to exercize Z testing of glBitmap
Brian Paul [Fri, 19 Feb 2010 18:09:05 +0000 (11:09 -0700)]
progs/demos: sort filenames
Michal Krol [Thu, 18 Feb 2010 11:05:08 +0000 (12:05 +0100)]
tgsi: Make more exec opcodes look pretty.
Michal Krol [Thu, 18 Feb 2010 10:56:14 +0000 (11:56 +0100)]
tgsi: Change prototypes of micro opcodes to explicitly indicates number of args.
Michal Krol [Thu, 18 Feb 2010 10:26:18 +0000 (11:26 +0100)]
tgsi: Rewrite exec implementations of NRM and NRM4.
Kristian Høgsberg [Fri, 19 Feb 2010 17:32:24 +0000 (12:32 -0500)]
Replace the _mesa_*printf() wrappers with the plain libc versions
Kristian Høgsberg [Fri, 19 Feb 2010 16:58:49 +0000 (11:58 -0500)]
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Brian Paul [Fri, 19 Feb 2010 15:32:36 +0000 (08:32 -0700)]
mesa: replace _mesa_bzero() with memset()
Brian Paul [Fri, 19 Feb 2010 15:12:31 +0000 (08:12 -0700)]
mesa: replace old MEMSET macro with memset
Brian Paul [Fri, 19 Feb 2010 15:09:01 +0000 (08:09 -0700)]
mesa: replace old MEMCPY macro with memcpy
Kenneth Graunke [Fri, 19 Feb 2010 07:51:01 +0000 (23:51 -0800)]
Remove _mesa_memcmp in favor of plain memcmp.
This may break the SUNOS4 build, but it's no longer relevant.
Kenneth Graunke [Fri, 19 Feb 2010 07:51:00 +0000 (23:51 -0800)]
Remove _mesa_memset in favor of plain memset.
This may break the SUNOS4 build, but it's no longer relevant.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:59 +0000 (23:50 -0800)]
Remove _mesa_memcpy in favor of plain memcpy.
This may break the SUNOS4 build, but it's no longer relevant.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:58 +0000 (23:50 -0800)]
Remove _mesa_atoi in favor of plain atoi.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:57 +0000 (23:50 -0800)]
Remove _mesa_strncmp in favor of plain strncmp.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:56 +0000 (23:50 -0800)]
Remove _mesa_strcmp in favor of plain strcmp.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:55 +0000 (23:50 -0800)]
Remove _mesa_strlen in favor of plain strlen.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:54 +0000 (23:50 -0800)]
Remove _mesa_strncpy in favor of plain strncpy.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:53 +0000 (23:50 -0800)]
Remove _mesa_strcpy in favor of plain strcpy.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:52 +0000 (23:50 -0800)]
Remove _mesa_strncat in favor of plain strncat.
Kenneth Graunke [Fri, 19 Feb 2010 07:50:51 +0000 (23:50 -0800)]
Remove _mesa_strstr in favor of plain strstr.
Corbin Simpson [Fri, 19 Feb 2010 11:12:14 +0000 (03:12 -0800)]
Revert "r300g: remove L8_UNORM from colorbuffer formats"
This reverts commit
fc427d23439a2702068209957f08990ea29fe21b.
At least xorg uses this, and just because something is not used in
OpenGL is *never* a valid reason to remove functionality from Gallium.
If something lacks a test, go add a test, don't remove features.
Vinson Lee [Fri, 19 Feb 2010 08:51:21 +0000 (00:51 -0800)]
gamma: s#colormac.h#main/colormac.h#
Vinson Lee [Fri, 19 Feb 2010 08:44:17 +0000 (00:44 -0800)]
gamma: s/gammacontext.h/gamma_context.h/
Chia-I Wu [Fri, 19 Feb 2010 03:47:54 +0000 (11:47 +0800)]
egl: Silence warnings when compiled with -pedantic.
Just follow gcc's advices here.
Chia-I Wu [Fri, 19 Feb 2010 04:08:50 +0000 (12:08 +0800)]
egl: Silence warnings in check/return macros.
The macros give warnings when compiled with -pedantic. This commit is
based on a patch by Brian Paul, with minor changes to add do {} while(0)
and rename the check macros.
Marek Olšák [Fri, 19 Feb 2010 03:23:06 +0000 (04:23 +0100)]
r300g: remove L8_UNORM from colorbuffer formats
Not renderable in OpenGL anyway.
Brian Paul [Fri, 19 Feb 2010 00:00:10 +0000 (17:00 -0700)]
softpipe: fix depth testing problems
The optimized Z-test functions assumed that the array of incoming quads
are adjacent, but that's not always true. The fragment shader can cull
intermediate quads, for example.
Now these Z-test functions can cope with non-adjacent quads. A little bit
of performance is probably lost, but it's probably not worth worring about.
This fixes broken glBitmap() Z testing, among other things.
(cherry picked from commit
d437d905e6924ebc05ec9efe87e1e2c48d75bc13)
Brian Paul [Thu, 18 Feb 2010 23:56:38 +0000 (16:56 -0700)]
st/mesa: added some bitmap debug code (disabled)
Brian Paul [Thu, 18 Feb 2010 23:54:14 +0000 (16:54 -0700)]
progs/demos: update arbocclude.c to do multiple queries at once
Issue a whole bunch of queries then get the results and render.
Draw the test object in red instead of orange if the result was not
ready when we first queried it.
Brian Paul [Thu, 18 Feb 2010 23:33:26 +0000 (16:33 -0700)]
softpipe: comments and whitespace fixes