Commit Graph

34179 Commits

Author SHA1 Message Date
Brian Paul
1fce9d58cc softpipe: fix dangling references to shaders in the TGSI executor
If a shader was bound to the fragment shader TGSI executor and it was
then deleted and a new shader was allocated at the same address as the
old shader, the new fragment shader would not get properly bound to
the TGSI machine and we'd wind up using the old one.

This would not have been a problem if shaders were refcounted.

Now the TGSI machine is owned by the context rather than the quad
pipeline's shader stage so that the softpipe_delete_fs_state()
function can access it.

Fixes sporadic failures of the piglit fp-long-alu test (fd.o bug 27989).
2010-05-06 15:19:02 -06:00
Brian Paul
4b274f311c tgsi: make SSE ADD instruction SOA-safe
To properly execute an instruction such as "ADD tmp, tmp.wzyx, foo;"
with SOA we (sometimes) need to put the results into temporaries before
writing the results to the destination register.

This patch fixes the ADD instruction but this needs to be done for
many more instructions.

Helps to fix piglit fp-long-alu test (fd.o bug 27989).
2010-05-06 15:19:02 -06:00
Brian Paul
895ee712ba tgsi: code refactoring 2010-05-06 15:19:02 -06:00
Brian Paul
92d88ccd9a tgsi: added tgsi_get_processor_name() 2010-05-06 15:19:02 -06:00
Brian Paul
c8f0e805a9 tgsi: fix tgsi_exec_machine_bind_shader() to handle NULL tokens, samplers
This lets us unbind a shader from the tgsi_exec_machine.  Since
shaders aren't ref counted we need this to properly clean up when
deleting shaders elsewhere.
2010-05-06 15:19:02 -06:00
Brian Paul
fbb1ad33a4 gallium/tgsi: remove unused tgsi_exec_labels code 2010-05-06 15:19:02 -06:00
José Fonseca
680071502f llvmpipe: Fix fence wait.
Avoids crashing when fence is NULL (LP_NUM_THREADS=0) and leaking when
it is not.
2010-05-06 21:38:06 +01:00
Brian Paul
c37d8259bb st/mesa: fix compressed mipmap generation for small image sizes
When the mipmap level is smaller than the compression block width, height
we need to fill in / replicate pixels so that we don't get garbage values.

Fixes piglit gen-compressed-teximage test.
2010-05-06 14:26:58 -06:00
Brian Paul
4b59d2ba22 st/mesa: fix bug in compute_num_levels()
Fix more fall-out from the "ignore BaseLevel" change.
This may help with fd.o bug 27991.
2010-05-06 14:26:58 -06:00
Brian Paul
9adebe172d st/mesa: when copying mipmap levels between textures, start at BaseLevel
Saves some work and avoids potential issue with inconsistant mipmap
level sizes.  As long as the mipmap levels from BaseLevel to MaxLevel
are consistant, we don't care about the other levels.
2010-05-06 14:26:58 -06:00
José Fonseca
095a6531a2 scons: Disable graw-null on msvc until linkage works. 2010-05-06 21:19:35 +01:00
José Fonseca
f63672c9ab graw-null: Try to fix MSVC linkage problems. 2010-05-06 21:06:53 +01:00
Jakob Bornecrantz
54f95d20e3 es: Ignores 2010-05-06 20:03:51 +01:00
Jakob Bornecrantz
4cad69a31b svga: Fix scons build 2010-05-06 20:03:51 +01:00
Qicheng Christopher Li
86afe8250e llvmpipe: implement occlusion query
OpenGL occlusion queries work now.  The Mesa demos, glean test and piglit
tests all pass.  A few enhancements are possible in the future. -Brian

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-05-06 11:45:45 -06:00
Jakob Bornecrantz
f587615e13 util: Recognize FALSE and F in debug_get_bool_option
Concidering that we actually print FALSE when displaying the
option we should also accept that value.
2010-05-06 15:45:20 +01:00
José Fonseca
7ed2f953c0 gallium: untrack u_indices_gen.c and u_indices_gen.c
These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-06 14:23:04 +01:00
José Fonseca
0f4e61d193 raw/clear: Make it portable. 2010-05-06 14:20:28 +01:00
José Fonseca
d5e741d6d8 graw-null: New target to ensure we always have a graw implementation available. 2010-05-06 14:20:13 +01:00
José Fonseca
2b322ad147 graw-xlib: Remove duplicate graw.h file. 2010-05-06 13:08:39 +01:00
José Fonseca
f58d780b08 Revert "gallium: untrack u_indices_gen.c and u_indices_gen.c"
This incomplete patch got commited by mistake.

This reverts commit 2142c769a4.
2010-05-06 12:47:23 +01:00
Xavier Chantry
b0524d3a8f gallium: untrack u_indices_gen.c and u_indices_gen.c
These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-06 12:31:39 +01:00
Xavier Chantry
2142c769a4 gallium: untrack u_indices_gen.c and u_indices_gen.c
These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-06 12:26:54 +01:00
Jeremy Huddleston
a18702f067 darwin: Fix build
This is a regression from e42d84eaba

https://bugs.freedesktop.org/show_bug.cgi?id=27929

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4d63be67f320839d115987211d0d9b4297f6d17d)
2010-05-05 18:17:45 -07:00
Brian Paul
fca24899cb gallium: still more provoking vertex fixes
This fixes edge flags for polygons and provoking vertex for
filled quads.
2010-05-05 18:46:11 -06:00
Brian Paul
eaad99d230 gallium: added edge flag print/debug code (disabled) 2010-05-05 18:25:19 -06:00
Brian Paul
740e50c60f gallium: rename draw() to draw_elements() in vbuf code
Now we have draw_elements() and draw_arrays() to be consistent with the
pipe_context drawing functions.
2010-05-05 18:19:37 -06:00
Brian Paul
246d39059e llvmpipe: update driver's provoking vertex code
Note that the lp_setup_vbuf.c code is very, very similar to the
corresponding code in softpipe.  It could probably be shared.
2010-05-05 18:19:30 -06:00
Brian Paul
cb136a93ab gallium: rework provoking vertex code
Builds on commit ddb0e18f6c and fixes
regressions in glean clipFlat test.

We assume that Gallium drivers observe flatshade_first for all triangles
and that all the assorted per-triangle calls in the 'draw' module also
follow flatshade_first.  Everything else builds on those rules.

Gallium does not use follow flatshade_first for GL quads, quad strips
and polygons; the "last" vertex is always the provoking vertex for those
prims.  So now there are separate QUAD_FIRST_PV and QUAD_LAST_PV macros
in the draw primitive decomposition code instead of one QUAD macro.
2010-05-05 18:19:06 -06:00
Marek Olšák
a8bb495629 tgsi: make dumping work on non-debug builds 2010-05-05 23:33:44 +02:00
Marek Olšák
0ad541a684 st/mesa: fix per-vertex point size
This fixes FDO bug #27343.
2010-05-05 23:04:44 +02:00
Brian Paul
5c2f6a3e9f llvmpipe: added a new assertion as a hint to Coverity
Looks like coverity found a false positive for an out of bounds array write.
2010-05-05 08:22:12 -06:00
Xavier Chantry
6ddd640365 nouveau: only advertise PIPE_FORMAT_DXT* if s3tc available 2010-05-05 14:39:59 +02:00
José Fonseca
8ddf93e84c graw-xlib: Revert the output dir lib change. 2010-05-05 09:40:59 +01:00
Vinson Lee
e3ce10f7ac st/mesa: Remove unnecessary headers. 2010-05-05 01:14:25 -07:00
Vinson Lee
8191e5ae65 mesa: fpclassify dummy definition not needed on Mac OS X. 2010-05-05 00:49:25 -07:00
Vinson Lee
bc751b5be0 svga: Remove unnecessary header. 2010-05-04 23:06:34 -07:00
Vinson Lee
e768d11ca0 draw: Remove unnecessary header. 2010-05-04 23:04:13 -07:00
Vinson Lee
57f0a25c27 util: Remove unnecessary headers. 2010-05-04 23:02:05 -07:00
Vinson Lee
dbcd5622d5 llvmpipe: Remove unnecessary headers. 2010-05-04 22:57:24 -07:00
Vinson Lee
3234066be2 r300g: Fix memory leak on error path. 2010-05-04 22:55:00 -07:00
Eric Anholt
ce914fff08 i965: When an RB gets a new region, clear the old from the state cache.
This prevents memory usage explosion in blender due to the state cache
hanging on to old fake frontbuffer regions.  Sigh at blender still
using frontbuffer rendering.

Bug #24119.
2010-05-04 22:06:12 -07:00
Eric Anholt
453f0b1f24 intel: Don't tile textures so small that size is blown up by over 2x.
Noted on the mailing list for an app that puts each glyph for its text
into a separate texture.
2010-05-04 22:06:12 -07:00
Chia-I Wu
781d56eac4 progs/egl: Fix eglut with OpenGL ES 2.0.
EGL_OPENGL_ES2_BIT is not set when choosing OpenGL ES 2.0 configs.
2010-05-05 12:29:19 +08:00
Brian Paul
53a53b2549 osmesa: remove unused var 2010-05-04 21:59:54 -06:00
Brian Paul
d148e25953 mesa: remove some color index code 2010-05-04 21:59:54 -06:00
Brian Paul
00b7dcd27a mesa: remove unused renderbuffer adaptor code 2010-05-04 21:59:54 -06:00
Brian Paul
7f07ac80eb mesa: remove renderbuffer adaptor calls
Was only used for OSMesa but no longer needed.
2010-05-04 21:59:54 -06:00
Brian Paul
36b3a8bd5a osmesa: fix OSMesa for CHAN_BITS=32
CHAN_BITS=16 still broken.

NOTE: this is a candidate for back-porting to the 7.8 stable branch.
2010-05-04 21:59:54 -06:00
Chia-I Wu
719f7049bb st/mesa: Fix texture-from-pixmap.
Remember the size of the level=0 mipmap image.  Do not call
util_format_get_component_bits when st_context_teximage is called to
release a texture image.
2010-05-05 11:58:04 +08:00