Commit graph

35357 commits

Author SHA1 Message Date
Tom Stellard
1732751242 r300/compiler: In the peephole optimizer, ELSE should mark the end of a
block.
2010-07-03 04:27:09 +02:00
Tom Stellard
29a1d6aee7 r300/compiler: Correctly calculate the max number of iterations for loops. 2010-07-03 04:27:09 +02:00
Tom Stellard
697d666d78 r300/compiler: Handle loops in deadcode analysis.
This also allows us to split the loop emulation into two phases.  A
tranformation phase which either unrolls loops or prepares them to be
emulated, and the emulation phase which unrolls remaining loops until the
instruction limit is reached.  The second phase is completed after the
deadcode analysis in order to get a more accurate count of the number of
instructions in the body of loops.
2010-07-03 04:27:09 +02:00
Brian Paul
91c37599f6 osmesa: remove old renderbuffer before adding new
Fixes fd.o bug 10966 when OSMesaMakeCurrent() was called twice.

NOTE: This is a candidate for the 7.8 branch.
2010-07-02 18:22:53 -06:00
Brian Paul
7cc58c1992 mesa: updated instruction comments 2010-07-02 18:22:53 -06:00
Brian Paul
ae8164a67b mesa: add geometry shader fields to gl_shader_program
These 3 fields are per shader-program.  Copy them into the geometry
program at link time for convenient access later.

Also, add some missing glGetProgramiv() queries.
2010-07-02 15:36:14 -06:00
José Fonseca
d981bde384 gallivm: Do 4ubyte AoS texture filtering for any format that can be expressed.
Except if it has only one channel, as it would take the same number of
instructions.
2010-07-02 18:45:49 +01:00
José Fonseca
e70b20fa83 gallivm: Use util_format_description::fetch_rgba_8unorm() when available. 2010-07-02 18:45:49 +01:00
José Fonseca
a2d360b915 util: Add a fetch_rgba_8unorm.
Not always implemented, but useful in situations where we want 8unorms
and the samples comes as 8unorms as we needlessly convert to/from
floats.
2010-07-02 18:45:49 +01:00
José Fonseca
7071eefdb2 gallivm: Support multiple pixels in lp_build_fetch_rgba_aos().
This allows to do the unpacking of formats that fit in 4 x unorm8 in
parallel, 4 pixels at a time.
2010-07-02 18:45:49 +01:00
José Fonseca
eb20c57f03 gallivm: Move lp_build_rgba8_to_f32_soa() to lp_bld_format_soa.c
It will be more useful here.
2010-07-02 18:45:49 +01:00
José Fonseca
bb1546f55b gallivm: Move gather functions to its own module.
They need to grow, and they provide basic functionality which is not
specific to sampling.
2010-07-02 18:45:49 +01:00
José Fonseca
e29ef44cf1 gallivm: Check inputs/outputs in lp_build_conv() 2010-07-02 18:45:49 +01:00
José Fonseca
9b69545c42 util: Expose util_format_fits_8unorm(). 2010-07-02 18:45:48 +01:00
Brian Paul
6e83420ee0 mesa: fix texenv generation when num color bufs == 0
Before, if there were no color buffers enabled (with glDrawBuffers(GL_NONE))
when the texenv program was generated, we'd emit writes to OUTPUT[1] but
the OutputsWritten mask was 0.  This inconsistency caused an assertion to
fail later in the Mesa->TGSI translation.

Fixes fd.o bug 28169

NOTE: this is a candidate for the 7.8 branch (and depends on commit
b6b9b17d27).
2010-07-02 10:16:08 -06:00
Brian Paul
7a5a0b205e softpipe: fix incorrect blend func index passed to blend_quad()
Need to pass the index indicating which blend terms to use, not which
color buffer we're blending into.

Rename the parameter to blend_quad() and add comments to be more clear
about this.
2010-07-02 09:56:57 -06:00
Brian Paul
fbc6c316d2 softpipe: better assertions 2010-07-02 09:53:08 -06:00
Brian Paul
291bcfd831 mesa: add missing error checks in _mesa_program_parameteri() 2010-07-02 09:09:06 -06:00
Brian Paul
e3c961de36 main: change some GS field types, added comments 2010-07-02 09:07:36 -06:00
Brian Paul
b6b9b17d27 mesa: make the number of draw buffers part of the texenv program key state
All the state that effects the program should be in the key.
This didn't help with bug 28169 but is a good fix anyway.

NOTE: this is a low-priority candidate for the 7.8 branch.  In practice,
this issue might never be hit.
2010-07-02 08:14:54 -06:00
Brian Paul
e845765f0f gallium/cso: check for set_vertex_sampler_views != NULL before calling it
Not all drivers implement this method.
Fixes regression reported by Chris Rankin and bug 28889.
2010-07-02 08:08:22 -06:00
José Fonseca
53d3f0c788 mesa: Silence warning. 2010-07-02 11:50:01 +01:00
José Fonseca
3cc4301c14 gallivm: Code generate YUV format unpacking. 2010-07-02 11:50:01 +01:00
José Fonseca
37f4c2f906 gallivm: Fix 4 x unorm8 -> 4 x float conversion.
Also fix the test.
2010-07-02 11:50:00 +01:00
Dave Airlie
8556b77c56 r600: use gallium list macros instead of making our own.
before this change, r600 glxinfo segfaulted in the list code, and I wasn't
debugging another linked list implementation, its 2010 after all.

So add the two missing list macros to the gallium header from X.org list header file (after fixing them), then port all r600 lists to the new header.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-02 15:27:17 +10:00
Brian Paul
44732103b2 mesa: extension flags and version testing for GL 3.x features 2010-07-01 20:03:32 -06:00
Brian Paul
120a9f46cd mesa: entrypoints for GL 3.1 primitive restart 2010-07-01 20:03:31 -06:00
Dan Nicholson
442c37e2ef Use GLW_CFLAGS when building libGLw
We check for libX11 and libXt, so we might as well use the CFLAGS
pkg-config tells us about.
2010-07-01 13:00:02 -07:00
John Hein
9617254a1e Use GLUT_CFLAGS when building glut
Fix this build error (in MesaGLUT-7.6.1)...
glut_cmap.c:23:66: error: X11/Xmu/StdCmap.h: No such file or directory

...by not preventing the cflags that pkg-config finds for glut dependencies
(including 'xmu') from being used.

Defining GLUT_CFLAGS before running the pkg-config prevents the
cflags found by pkg-config from being used.

This patch lets GLUT_CFLAGS that configure & pkg-config work
so hard to set actually get used.

Also make sure the generated configs/autoconf defines GLUT_CFLAGS
used in (at least) src/glut/glx/Makefile.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-07-01 13:00:02 -07:00
Fernando Carrijo
d2fe97a209 mesa: Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-07-01 13:07:07 -06:00
Brian Paul
1d298a3764 gallium/cso: unbind sampler views in cso_release_all() 2010-07-01 13:07:07 -06:00
Brian Paul
5b90f83aee mesa: free xform feedback hash table 2010-07-01 13:07:07 -06:00
Brian Paul
30f46e7b4c st/mesa: fix comment 2010-07-01 13:07:07 -06:00
Brian Paul
17c176eb73 llvmpipe: silence pointer type warnings 2010-07-01 09:15:31 -06:00
José Fonseca
8d93f360c5 gallivm: Support 4 x unorm8 in lp_build_fetch_rgba_aos().
Uses code and ideas from Brian Paul.
2010-07-01 15:02:17 +01:00
José Fonseca
b919bb7f61 gallivm: Allow to conversions to/from registers of different sizes.
Allow for example to convert from 4 x float32 to 4 x unorm8 and vice versa.

Uses code and ideas from Brian Paul.
2010-07-01 15:02:15 +01:00
José Fonseca
a70ec096aa gallivm: Support extended swizzles in lp_build_swizzle1_aos().
And rename to lp_build_swizzle_aos().
2010-07-01 15:02:12 +01:00
José Fonseca
e277d5c1f6 gallivm: Setup a global optimization pass.
Modules are still free to setup their own optimization passes, but for the
normal case it should not be necessary.
2010-07-01 15:02:10 +01:00
José Fonseca
83ced5a918 llvmpipe: Remove lp_build_swizzle2_aos().
Unnecessary special case.
2010-07-01 15:02:04 +01:00
Brian Paul
fb06b543a5 llvmpipe: another null pointer check 2010-06-30 14:05:45 -06:00
Brian Paul
2b3e1ad731 llvmpipe: use dummy tile when out of memory 2010-06-30 14:05:45 -06:00
Brian Paul
effd33071e llvmpipe: added new lp_memory.[ch] files
Functions for using dummy tiles when we detect OOM conditions.
2010-06-30 12:00:22 -06:00
Brian Paul
87d2c77ed3 draw: fix out of memory handling in polygon stipple stage 2010-06-30 11:46:17 -06:00
Neil Roberts
75acb896c6 glu: Fix some compiler warnings in libtess
When compiled with the more aggressive compiler warnings such as
-Wshadow and -Wempty-body the libtess code gives a lot more
warnings. This fixes the following issues:

* The 'Swap' macro tries to combine multiple statements into one and
  then consume the trailing semicolon by using if(1){/*...*/}else.
  This gives warnings because the else part ends up with an empty
  statement. It also seems a bit dangerous because if the semicolon
  were missed then it would still be valid syntax but it would just
  ignore the following statement. This patch replaces it with the more
  common idiom do { /*...*/ } while(0).

* 'free' was being used as a local variable name but this shadows the
  global function. This has been renamed to 'free_handle'

* TRUE and FALSE were being unconditionally defined. Although this
  isn't currently a problem it seems better to guard them with #ifndef
  because it's quite common for them to be defined in other headers.

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

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-06-30 07:59:39 -06:00
Chia-I Wu
a8815b754d egl: Update MaxSize when a dynamic array is grown. 2010-06-30 18:52:00 +08:00
Chia-I Wu
98ebc8165c egl: Make _eglUnloadDrivers no-op on Windows.
Windows unloads DLLs before atexit.  Make _eglUnloadDrivers no-op on
Windows for now.
2010-06-30 18:32:48 +08:00
Chia-I Wu
c5bc0a8d66 st/egl: Manually free configs on terminate.
The configs should be FREE()ed, not free()ed.  We cannot rely on
_eglCleanupDisplay here.
2010-06-30 18:32:48 +08:00
Chia-I Wu
8b0c6c4a8d egl: Store screens in a dynamic array. 2010-06-30 18:32:48 +08:00
Chia-I Wu
6717a313f2 egl: Store configs in a dynamic array. 2010-06-30 18:32:48 +08:00
Chia-I Wu
106466783f egl: Add dynamic array.
Dynamic arrays will be used to store configs and screens of a display.
2010-06-30 18:32:48 +08:00