OSDN Git Service
Brian Paul [Wed, 7 Jul 2010 14:58:31 +0000 (08:58 -0600)]
glsl: use Elements() in arrays instead of sentinal values
The _slang_*_output_name() functions had one too many loop iterations
because of the sentinal end-of-list values in the vertOutput array.
Just use Elements() everywhere.
Vinson Lee [Wed, 7 Jul 2010 00:25:39 +0000 (17:25 -0700)]
llvmpipe: Don't build lp_test_round when using MSVC.
lp_test_round uses the math functions round and trunc, which aren't
available with MSVC.
Fixes the MSVC build for now.
Vinson Lee [Tue, 6 Jul 2010 23:18:32 +0000 (16:18 -0700)]
llvmpipe: Add lp_test_round to SCons build.
Vinson Lee [Tue, 6 Jul 2010 23:02:49 +0000 (16:02 -0700)]
egl: Remove unnecessary headers.
Vinson Lee [Tue, 6 Jul 2010 22:49:40 +0000 (15:49 -0700)]
draw: Remove unnecessary header.
Vinson Lee [Tue, 6 Jul 2010 22:45:31 +0000 (15:45 -0700)]
gallivm: Remove unnecessary header.
Marek Olšák [Tue, 6 Jul 2010 22:01:27 +0000 (00:01 +0200)]
util: print help for debug options on non-debug builds
I'd like to see the help when I request it.
Brian Paul [Tue, 6 Jul 2010 19:22:54 +0000 (13:22 -0600)]
gallivm: use trunc, not round in lp_build_nearest_mip_level()
Fixes fd.o bug 28036 (piglit fbo-cubemap.c regression)
Brian Paul [Tue, 6 Jul 2010 17:36:01 +0000 (11:36 -0600)]
llvmpipe: add test program for round(), trunc(), floor(), ceil()
Brian Paul [Tue, 6 Jul 2010 17:33:56 +0000 (11:33 -0600)]
gallivm: finish implementation of lp_build_iceil()
Plus fix minor error in lp_build_iceil() by tweaking the offset value.
And add a bunch of comments for the round(), trunc(), floor(), ceil()
functions.
Zack Rusin [Tue, 6 Jul 2010 17:27:31 +0000 (13:27 -0400)]
llvmpipe: disconnect vertex texture sampling from the setup
it was wrong to put this in the fs paths, but it was easier to just
stuff it along the fragment texture sampling paths. the patch
disconnects vertex texture sampling and just maps the textures
before the draw itself and unmaps them after.
Zack Rusin [Tue, 6 Jul 2010 16:35:23 +0000 (12:35 -0400)]
draw: make sure softpipe doesn't crash with vertex tex sampling
softpipe doesn't implement the draw's llvm tex sampling interface
so make sure draw can handle the cases where the driver doesn't
implement the interface
Zack Rusin [Mon, 14 Jun 2010 14:18:09 +0000 (10:18 -0400)]
draw: implement vertex texture sampling using llvm
Tom Stellard [Mon, 5 Jul 2010 20:01:17 +0000 (13:01 -0700)]
r300/compiler: Implement KILP opcode.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
José Fonseca [Mon, 14 Jun 2010 15:23:13 +0000 (16:23 +0100)]
gallivm: Use SSE4.1's BLENDV instructions for lp_build_select().
José Fonseca [Tue, 15 Jun 2010 14:34:16 +0000 (15:34 +0100)]
gallivm: Fix 8bit comparisons.
Alan Hourihane [Tue, 6 Jul 2010 10:42:18 +0000 (11:42 +0100)]
llvmpipe: ensure all bins are reset avoids memory corruption.
Chia-I Wu [Tue, 6 Jul 2010 08:27:20 +0000 (16:27 +0800)]
mesa: Always initialize transform feedback state.
Assert ctx->Driver.NewTransformFeedback if the feature is enabled; Use
the default callbacks otherwise. The rest of core mesa expects the
state to be initialized.
Chia-I Wu [Sun, 4 Jul 2010 07:55:12 +0000 (15:55 +0800)]
egl: Rework driver loading.
Driver loading is now splitted into two stages. In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_". Modules are
not loaded at this stage.
In the second stage, each module is loaded to initialize a display. The
process stops at the first module that can initialize the display.
If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display,
drv->Probe is used instead in this case.
Chia-I Wu [Tue, 6 Jul 2010 06:34:43 +0000 (14:34 +0800)]
st/egl: Add support for !GLX_DIRECT_RENDERING.
st/egl uses GLX code for DRI2 support. It should honor
GLX_DIRECT_RENDERING.
Also updates configure.ac to define GLX_DIRECT_RENDERING for st/egl.
Brian Paul [Tue, 6 Jul 2010 02:07:07 +0000 (20:07 -0600)]
mesa: initial support for unnormalized integer texture formats
As defined by GL_EXT_texture_integer.
Corbin Simpson [Mon, 5 Jul 2010 21:59:12 +0000 (14:59 -0700)]
auxiliary/util: Add SM3 meta-cap list.
Roland Scheidegger [Mon, 5 Jul 2010 15:17:50 +0000 (17:17 +0200)]
llvmpipe: wait for queries being finished when asked for it or before deletion
This fixes bug #28757, though does not yet address the issue that fences aren't
always emitted.
Vinson Lee [Sun, 4 Jul 2010 18:34:15 +0000 (11:34 -0700)]
i915g: Remove unnecessary header.
Jakob Bornecrantz [Sat, 3 Jul 2010 12:04:10 +0000 (13:04 +0100)]
i915g: Add flag to not send commands to hw
Jakob Bornecrantz [Sat, 3 Jul 2010 12:00:50 +0000 (13:00 +0100)]
i915g: If the kernel reject the batchbuffer print it then assert
Jakob Bornecrantz [Sat, 3 Jul 2010 11:56:35 +0000 (12:56 +0100)]
i915g: Minor cleanups
Jakob Bornecrantz [Sat, 3 Jul 2010 14:25:17 +0000 (15:25 +0100)]
i915g: Make batchbuffer flush function not be inline
Jakob Bornecrantz [Sun, 4 Jul 2010 09:24:59 +0000 (10:24 +0100)]
i915g: Rename texture state to map state
Jakob Bornecrantz [Sat, 3 Jul 2010 11:46:42 +0000 (12:46 +0100)]
i915g: Move fragment state to its own file
Jakob Bornecrantz [Sun, 4 Jul 2010 09:19:44 +0000 (10:19 +0100)]
i915g: Move static state to its own file
Jakob Bornecrantz [Sat, 3 Jul 2010 11:47:49 +0000 (12:47 +0100)]
i915g: Don't dirty dynamic state if it hasn't changed
Jakob Bornecrantz [Sun, 4 Jul 2010 08:54:20 +0000 (09:54 +0100)]
i915g: Don't flush after blit
Jakob Bornecrantz [Sat, 3 Jul 2010 11:30:46 +0000 (12:30 +0100)]
i915g: Don't flush empty batchbuffers
Jakob Bornecrantz [Sun, 4 Jul 2010 00:35:05 +0000 (01:35 +0100)]
gallium: Make trivial examples use target helpers
Jakob Bornecrantz [Sun, 4 Jul 2010 00:34:39 +0000 (01:34 +0100)]
gallium: Fix compilation of trivial quad-tex
Vinson Lee [Sun, 4 Jul 2010 02:28:31 +0000 (19:28 -0700)]
st/egl: Remove unnecessary headers.
Chia-I Wu [Sat, 3 Jul 2010 09:18:40 +0000 (17:18 +0800)]
docs: Update EGL doc.
Updated for the reorganization of st/egl targets.
Chia-I Wu [Sat, 3 Jul 2010 08:41:55 +0000 (16:41 +0800)]
mesa: Fix OpenGL ES-only builds.
Check FEATURE_GL in _mesa_init_shader_dispatch and
_mesa_init_shader_uniform_dispatch. OpenGL ES can not and does not use
_mesa_init_<...>_dispatch. This is supposed to be temporary. Ideally,
a more flexible way for initializing dispatch tables should be
developed.
nobled [Fri, 2 Jul 2010 23:38:07 +0000 (19:38 -0400)]
egl: Always use EGLAPIENTRY in api function prototypes
Fixes the build on Windows.
Vinson Lee [Sat, 3 Jul 2010 08:04:50 +0000 (01:04 -0700)]
gallivm: Remove unnecessary headers.
Marek Olšák [Sat, 3 Jul 2010 02:15:06 +0000 (04:15 +0200)]
r300g: fix warnings
Tom Stellard [Fri, 25 Jun 2010 01:45:46 +0000 (18:45 -0700)]
r300/compiler: Fix loop unrolling
Tom Stellard [Sat, 19 Jun 2010 04:20:57 +0000 (21:20 -0700)]
r300/compiler: Use hardware flow control instructions for loops on r500.
Tom Stellard [Sat, 19 Jun 2010 03:48:42 +0000 (20:48 -0700)]
r300g: Fix typo in r300_reg.h
Tom Stellard [Sat, 19 Jun 2010 03:42:33 +0000 (20:42 -0700)]
r300/compiler: Don't continue copy propagation inside loops.
Tom Stellard [Tue, 15 Jun 2010 08:46:47 +0000 (01:46 -0700)]
r300/compiler: Print debug info for flow control instructions.
Tom Stellard [Tue, 15 Jun 2010 08:42:06 +0000 (01:42 -0700)]
r300/compiler: Enable hardware IF statements for r500 cards.
Tom Stellard [Tue, 15 Jun 2010 05:30:02 +0000 (22:30 -0700)]
r300/compiler: In the peephole optimizer, ELSE should mark the end of a
block.
Tom Stellard [Sun, 13 Jun 2010 05:12:32 +0000 (22:12 -0700)]
r300/compiler: Correctly calculate the max number of iterations for loops.
Tom Stellard [Sat, 12 Jun 2010 06:09:36 +0000 (23:09 -0700)]
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.
Brian Paul [Sat, 3 Jul 2010 00:18:15 +0000 (18:18 -0600)]
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.
Brian Paul [Fri, 2 Jul 2010 18:22:33 +0000 (12:22 -0600)]
mesa: updated instruction comments
Brian Paul [Fri, 2 Jul 2010 21:34:58 +0000 (15:34 -0600)]
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.
José Fonseca [Fri, 2 Jul 2010 17:42:49 +0000 (18:42 +0100)]
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.
José Fonseca [Fri, 2 Jul 2010 17:38:50 +0000 (18:38 +0100)]
gallivm: Use util_format_description::fetch_rgba_8unorm() when available.
José Fonseca [Fri, 2 Jul 2010 17:38:11 +0000 (18:38 +0100)]
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.
José Fonseca [Fri, 2 Jul 2010 17:36:43 +0000 (18:36 +0100)]
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.
José Fonseca [Fri, 2 Jul 2010 15:59:39 +0000 (16:59 +0100)]
gallivm: Move lp_build_rgba8_to_f32_soa() to lp_bld_format_soa.c
It will be more useful here.
José Fonseca [Fri, 2 Jul 2010 15:57:57 +0000 (16:57 +0100)]
gallivm: Move gather functions to its own module.
They need to grow, and they provide basic functionality which is not
specific to sampling.
José Fonseca [Fri, 2 Jul 2010 15:55:27 +0000 (16:55 +0100)]
gallivm: Check inputs/outputs in lp_build_conv()
José Fonseca [Fri, 2 Jul 2010 15:52:19 +0000 (16:52 +0100)]
util: Expose util_format_fits_8unorm().
Brian Paul [Fri, 2 Jul 2010 16:16:05 +0000 (10:16 -0600)]
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
b6b9b17d27c570cc99ae339e595cf2f63ca5e8d7).
Brian Paul [Fri, 2 Jul 2010 15:53:48 +0000 (09:53 -0600)]
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.
Brian Paul [Fri, 2 Jul 2010 15:53:08 +0000 (09:53 -0600)]
softpipe: better assertions
Brian Paul [Fri, 2 Jul 2010 15:09:06 +0000 (09:09 -0600)]
mesa: add missing error checks in _mesa_program_parameteri()
Brian Paul [Fri, 2 Jul 2010 15:07:36 +0000 (09:07 -0600)]
main: change some GS field types, added comments
Brian Paul [Fri, 2 Jul 2010 14:14:54 +0000 (08:14 -0600)]
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.
Brian Paul [Fri, 2 Jul 2010 14:07:34 +0000 (08:07 -0600)]
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.
José Fonseca [Fri, 2 Jul 2010 10:40:36 +0000 (11:40 +0100)]
mesa: Silence warning.
José Fonseca [Fri, 2 Jul 2010 10:40:22 +0000 (11:40 +0100)]
gallivm: Code generate YUV format unpacking.
José Fonseca [Thu, 1 Jul 2010 17:27:39 +0000 (18:27 +0100)]
gallivm: Fix 4 x unorm8 -> 4 x float conversion.
Also fix the test.
Dave Airlie [Fri, 2 Jul 2010 05:27:17 +0000 (15:27 +1000)]
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>
Brian Paul [Thu, 1 Jul 2010 22:30:00 +0000 (16:30 -0600)]
mesa: extension flags and version testing for GL 3.x features
Brian Paul [Thu, 1 Jul 2010 22:04:46 +0000 (16:04 -0600)]
mesa: entrypoints for GL 3.1 primitive restart
Dan Nicholson [Thu, 1 Jul 2010 19:58:57 +0000 (12:58 -0700)]
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.
John Hein [Thu, 1 Jul 2010 19:53:28 +0000 (12:53 -0700)]
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>
Fernando Carrijo [Thu, 1 Jul 2010 16:29:56 +0000 (09:29 -0700)]
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>
Brian Paul [Thu, 1 Jul 2010 17:43:18 +0000 (11:43 -0600)]
gallium/cso: unbind sampler views in cso_release_all()
Brian Paul [Thu, 1 Jul 2010 17:07:32 +0000 (11:07 -0600)]
mesa: free xform feedback hash table
Brian Paul [Thu, 1 Jul 2010 17:07:12 +0000 (11:07 -0600)]
st/mesa: fix comment
Brian Paul [Thu, 1 Jul 2010 15:15:31 +0000 (09:15 -0600)]
llvmpipe: silence pointer type warnings
José Fonseca [Thu, 1 Jul 2010 12:57:48 +0000 (13:57 +0100)]
gallivm: Support 4 x unorm8 in lp_build_fetch_rgba_aos().
Uses code and ideas from Brian Paul.
José Fonseca [Thu, 1 Jul 2010 11:33:34 +0000 (12:33 +0100)]
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.
José Fonseca [Thu, 1 Jul 2010 11:16:09 +0000 (12:16 +0100)]
gallivm: Support extended swizzles in lp_build_swizzle1_aos().
And rename to lp_build_swizzle_aos().
José Fonseca [Thu, 10 Jun 2010 15:25:39 +0000 (16:25 +0100)]
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.
José Fonseca [Thu, 1 Jul 2010 09:14:46 +0000 (10:14 +0100)]
llvmpipe: Remove lp_build_swizzle2_aos().
Unnecessary special case.
Brian Paul [Wed, 30 Jun 2010 17:56:56 +0000 (11:56 -0600)]
llvmpipe: another null pointer check
Brian Paul [Wed, 30 Jun 2010 17:57:14 +0000 (11:57 -0600)]
llvmpipe: use dummy tile when out of memory
Brian Paul [Wed, 30 Jun 2010 17:49:40 +0000 (11:49 -0600)]
llvmpipe: added new lp_memory.[ch] files
Functions for using dummy tiles when we detect OOM conditions.
Brian Paul [Wed, 30 Jun 2010 17:46:17 +0000 (11:46 -0600)]
draw: fix out of memory handling in polygon stipple stage
Neil Roberts [Wed, 30 Jun 2010 11:41:11 +0000 (12:41 +0100)]
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>
Chia-I Wu [Wed, 30 Jun 2010 10:49:36 +0000 (18:49 +0800)]
egl: Update MaxSize when a dynamic array is grown.
Chia-I Wu [Wed, 30 Jun 2010 10:27:22 +0000 (18:27 +0800)]
egl: Make _eglUnloadDrivers no-op on Windows.
Windows unloads DLLs before atexit. Make _eglUnloadDrivers no-op on
Windows for now.
Chia-I Wu [Wed, 30 Jun 2010 10:21:09 +0000 (18:21 +0800)]
st/egl: Manually free configs on terminate.
The configs should be FREE()ed, not free()ed. We cannot rely on
_eglCleanupDisplay here.
Chia-I Wu [Wed, 30 Jun 2010 10:02:23 +0000 (18:02 +0800)]
egl: Store screens in a dynamic array.
Chia-I Wu [Wed, 30 Jun 2010 09:10:10 +0000 (17:10 +0800)]
egl: Store configs in a dynamic array.
Chia-I Wu [Wed, 30 Jun 2010 08:08:52 +0000 (16:08 +0800)]
egl: Add dynamic array.
Dynamic arrays will be used to store configs and screens of a display.
Chia-I Wu [Wed, 30 Jun 2010 06:42:00 +0000 (14:42 +0800)]
st/vega: Match MALLOC/FREE for vg_shader.
A vg_shader is destroyed with FREE.
José Fonseca [Wed, 30 Jun 2010 10:10:33 +0000 (11:10 +0100)]
llvmpipe: Add a new scene state to describe scenes which only have state changes.
It's a rare condition, but it may happen if all primitives are
clipped/culled.
For now we just do a no-op rasterization, but we could bypass it.