José Fonseca [Mon, 24 Nov 2008 14:17:49 +0000 (23:17 +0900)]
pipebuffer: Ondemand buffer manager.
A variation of malloc buffers which get transferred to real graphics memory
when there is an attempt to validate them.
José Fonseca [Mon, 24 Nov 2008 04:59:06 +0000 (13:59 +0900)]
pipebuffer: Implement proper buffer validation.
José Fonseca [Mon, 24 Nov 2008 04:45:19 +0000 (13:45 +0900)]
gallium: Define convenience shortcuts for CPU/GPU READ/WRITE flag combinations.
José Fonseca [Mon, 24 Nov 2008 04:44:30 +0000 (13:44 +0900)]
mesa: Don't call fence_finish with a null fence.
Michal Krol [Wed, 19 Nov 2008 19:31:38 +0000 (20:31 +0100)]
scons: Fix toolchain selection.
José Fonseca [Tue, 18 Nov 2008 10:13:32 +0000 (19:13 +0900)]
scons: Support MinGW32 cross compiler.
To build an alternative opengl32.dll with Gallium's software-rasterizer from a
debian-based distribution run:
sudo apt-get install mingw32
scons platform=windows toolchain=crossmingw machine=x86 winsys=gdi dri=no
José Fonseca [Wed, 19 Nov 2008 16:02:03 +0000 (01:02 +0900)]
python/retrace: Dump constants.
José Fonseca [Wed, 19 Nov 2008 16:01:48 +0000 (01:01 +0900)]
python: Allow to read from buffers.
José Fonseca [Wed, 19 Nov 2008 11:06:52 +0000 (20:06 +0900)]
python/retrace: Fix formatting of shaders.
José Fonseca [Wed, 19 Nov 2008 11:06:04 +0000 (20:06 +0900)]
python/retrace: Ignore irrelevant calls.
José Fonseca [Wed, 19 Nov 2008 08:17:06 +0000 (17:17 +0900)]
python/retrace: Highlight the trace dump to help to visualize.
José Fonseca [Wed, 19 Nov 2008 07:23:01 +0000 (16:23 +0900)]
python/retrace: Use the usual BSD-style license.
José Fonseca [Mon, 17 Nov 2008 07:40:21 +0000 (16:40 +0900)]
gallium: Use costum log2 for all windows builds.
José Fonseca [Thu, 13 Nov 2008 11:34:10 +0000 (20:34 +0900)]
gallium: State when there are no memory leaks detected.
José Fonseca [Tue, 11 Nov 2008 14:27:27 +0000 (23:27 +0900)]
gallium: Make handle_table reentrant.
Ensure that the object has consistent state also when calling the destroy
callback. Namely, ensure the object passed to the callback is removed from
the table prior to calling the destroy callback to avoid a infinite loop or
double free.
Brian Paul [Fri, 14 Nov 2008 19:55:05 +0000 (12:55 -0700)]
gallium: increase table size for fast log/pow functions
The various conformance tests pass now.
Brian Paul [Thu, 13 Nov 2008 15:58:47 +0000 (08:58 -0700)]
util: Use OpenGL rasterization rules in blits and mipmap generation.
Keith Whitwell [Fri, 14 Nov 2008 17:59:29 +0000 (17:59 +0000)]
translate: pull in prefetch and other optimizations from draw_vs_aos.c
Keith Whitwell [Wed, 5 Nov 2008 11:31:57 +0000 (11:31 +0000)]
trivial: more tests
Michal Krol [Wed, 12 Nov 2008 18:02:41 +0000 (19:02 +0100)]
util: Optimise log2().
Michal Krol [Wed, 12 Nov 2008 16:14:07 +0000 (17:14 +0100)]
util: Add log2() definition for MSC.
Michal Krol [Wed, 12 Nov 2008 16:03:58 +0000 (17:03 +0100)]
draw: Add missing include.
Xiang, Haihao [Tue, 11 Nov 2008 05:36:32 +0000 (13:36 +0800)]
mesa: restore the negate flag of dots in build_lighting.
Dots is re-used if more than one light is enabled. Previously
the negate flag of dots may affect next light.
Brian [Tue, 11 Nov 2008 03:22:36 +0000 (20:22 -0700)]
gallium: fix comment again. A half-closed interval was intended.
Never saw the [a,b[ notation before.
Brian Paul [Mon, 10 Nov 2008 19:37:08 +0000 (12:37 -0700)]
dri: alloc __DRIscreen object with calloc()
Conflicts:
src/mesa/drivers/dri/common/dri_util.c
Brian Paul [Mon, 10 Nov 2008 17:45:50 +0000 (10:45 -0700)]
mesa: fix logic error in GLSL linker when looking for main() shaders
Pekka Paalanen [Sat, 8 Nov 2008 23:02:10 +0000 (01:02 +0200)]
Mesa: fix number of buffers in st_draw_vbo().
The clean-up call to pipe->set_vertex_buffers() should use the same
number of buffers as the first call.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Brian Paul [Mon, 10 Nov 2008 15:24:45 +0000 (08:24 -0700)]
gallium: fix typos in comments
Zack Rusin [Thu, 6 Nov 2008 21:07:28 +0000 (16:07 -0500)]
gallium: actually flip the coordinates
Brian [Sun, 9 Nov 2008 17:15:32 +0000 (10:15 -0700)]
util: Fix util_fast_pow/exp2/log2.
- Use a lookup table for log2.
- Compute (float) (1 << ipart) by tweaking with the exponent directly to
avoid integer overflow and float conversion.
- Also table negative exponents to avoid float division and branching.
- Implement util_fast_exp as function of util_fast_exp2.
--------
Cherry-picked from gallium-0.2:
8415d06d90a197e16554dab98d160334fd9f9f93
This fixes some pow() glitches seen in fslight.c, spectex.c, etc.
Conflicts:
src/gallium/auxiliary/util/u_math.h
Brian [Sun, 9 Nov 2008 03:43:38 +0000 (20:43 -0700)]
gallium: _debug_vprintf() should be silent if DEBUG is not defined
Brian Paul [Fri, 7 Nov 2008 17:23:22 +0000 (10:23 -0700)]
mesa: use _bfc0 instead of _col0 when building back face lighting.
cherry-picked from master:
4550b0562d5b59890fccb0e7eb0dbef967d1ccf9
Brian [Fri, 7 Nov 2008 02:24:47 +0000 (19:24 -0700)]
gallium: implement TGSI_OPCODE_NRM/NRM4 in tgsi_exec.c
Brian Paul [Thu, 6 Nov 2008 22:04:11 +0000 (15:04 -0700)]
mesa: update the shader programs->TexturesUsed array at link time
If an application never calls glUniform() to set sampler variable values
they'll remain 0 (the default value/unit).
Now call _mesa_update_shader_textures_used() at link time in case glUniform()
is never called. program->TextureUsed[] will then be correct for state
validation.
Brian Paul [Thu, 6 Nov 2008 22:00:01 +0000 (15:00 -0700)]
gallium: added st_print_shaders() function to help w/ debugging
Brian Paul [Thu, 6 Nov 2008 21:57:20 +0000 (14:57 -0700)]
gallium: debug code to print vertex array data (disabled)
Brian Paul [Thu, 6 Nov 2008 21:56:59 +0000 (14:56 -0700)]
softpipe: debug code (disabled)
Brian [Thu, 6 Nov 2008 03:04:49 +0000 (20:04 -0700)]
gallium: check execution mask in indirect register loads
Zero-out the index for disabled execution channels to avoid using potential
garbage values (thus avoiding bad array indexing).
Brian [Thu, 6 Nov 2008 02:26:20 +0000 (19:26 -0700)]
gallium: don't range check tgsi register index for indirect accesses
Fixes progs/vp/arl.txt test.
Brian Paul [Wed, 5 Nov 2008 21:05:42 +0000 (14:05 -0700)]
gallium: added check for degenerate drawing calls
Brian Paul [Wed, 5 Nov 2008 21:05:04 +0000 (14:05 -0700)]
gallium: if VERBOSE_GLSL flag is set, check for non-initialized uniforms at draw time
This will warn the user that the shader being run may be using uninitialized
uniform variables.
Brian Paul [Wed, 5 Nov 2008 21:03:15 +0000 (14:03 -0700)]
mesa: fix a GLSL array indexing codegen bug
Expressions like array[i] + array[j] didn't work properly before.
Brian Paul [Wed, 5 Nov 2008 21:02:07 +0000 (14:02 -0700)]
gallium: call tgsi_set_exec_mask() and use exec mask in SSE ARL code
This prevents vertex shaders from referencing invalid memory locations when
the shader is operating on less than four vertices or fragments.
Brian Paul [Wed, 5 Nov 2008 20:56:20 +0000 (13:56 -0700)]
gallium: added tgsi_set_exec_mask()
Brian Paul [Wed, 5 Nov 2008 20:55:56 +0000 (13:55 -0700)]
gallium: added some sanity check assertions for constant buffer indexing
Brian Paul [Wed, 5 Nov 2008 16:33:48 +0000 (09:33 -0700)]
mesa: remove extra \n from printf string
Brian Paul [Wed, 5 Nov 2008 16:14:19 +0000 (09:14 -0700)]
mesa: add Initialized field to gl_uniform struct, for debugging purposes only
Brian Paul [Wed, 5 Nov 2008 15:58:40 +0000 (08:58 -0700)]
gallium: added some debug code (disabled)
Brian Paul [Wed, 5 Nov 2008 15:57:11 +0000 (08:57 -0700)]
gallium: disable some debug output
Jakob Bornecrantz [Wed, 5 Nov 2008 15:49:48 +0000 (16:49 +0100)]
i915: Remove faulty assert
michal [Wed, 5 Nov 2008 10:58:11 +0000 (11:58 +0100)]
draw: Implement TGSI_OPCODE_TRUNC.
michal [Wed, 5 Nov 2008 10:48:56 +0000 (11:48 +0100)]
tgsi: Implement OPCODE_TRUNC.
Brian Paul [Tue, 4 Nov 2008 23:52:53 +0000 (16:52 -0700)]
mesa: fix float-valued GLSL vertex attribute variables
The swizzle mask for such variables wasn't set up properly.
Brian Paul [Sat, 1 Nov 2008 22:04:45 +0000 (16:04 -0600)]
mesa: silence warnings
Brian Paul [Sat, 1 Nov 2008 21:55:39 +0000 (15:55 -0600)]
mesa: do scope replacement for while/for loops too
This fixes a function inlining bug involving vars declared inside loop bodies.
Brian Paul [Sat, 1 Nov 2008 21:55:14 +0000 (15:55 -0600)]
mesa: glsl tree print improvements
Brian Paul [Sat, 1 Nov 2008 22:02:32 +0000 (16:02 -0600)]
mesa: fix assignment / parameter passing of sampler types
Brian Paul [Sat, 1 Nov 2008 16:57:25 +0000 (10:57 -0600)]
mesa: additional debug flags for glsl debug/disassembly
Brian Paul [Fri, 31 Oct 2008 23:29:54 +0000 (17:29 -0600)]
mesa: fix some bugs with precision qualifier parsing
Brian Paul [Fri, 31 Oct 2008 23:27:41 +0000 (17:27 -0600)]
mesa: do scope replacement for variable initializers too
Brian Paul [Fri, 31 Oct 2008 23:22:13 +0000 (17:22 -0600)]
mesa: fix copy/paste error in GLSL error msg
Brian Paul [Wed, 29 Oct 2008 23:02:56 +0000 (17:02 -0600)]
gallium: new sanity assertions in mmAllocMem()
Brian Paul [Wed, 29 Oct 2008 23:02:30 +0000 (17:02 -0600)]
gallium: fix copy&paste bug
Brian Paul [Wed, 29 Oct 2008 20:55:02 +0000 (14:55 -0600)]
gallium: fix alignment parameter passed to u_mmAllocMem()
Was 32, now 5. The param is expressed as a power of two exponent.
The net effect is that the alignment was a no-op on X86 but on PPC we
always got the same memory address everytime rtasm_exec_malloc() was called.
Keith Whitwell [Tue, 28 Oct 2008 16:28:56 +0000 (16:28 +0000)]
gallium: recognize DEBUG as well as DBG for debugging
Keith Whitwell [Mon, 20 Oct 2008 12:03:45 +0000 (13:03 +0100)]
mesa: note that texcoords are generated by setup routines when pointsprite enabled
Brian Paul [Sat, 18 Oct 2008 15:55:54 +0000 (09:55 -0600)]
gallium: add some checks for null surface pointers in state tracker
Fixes some segfaults in low memory situations.
Brian Paul [Fri, 17 Oct 2008 19:37:11 +0000 (13:37 -0600)]
mesa: redraw upon keypress in trivial/tri.c
Brian Paul [Fri, 17 Oct 2008 19:35:42 +0000 (13:35 -0600)]
gallium: fix mis-matched malloc/free vs. aligned malloc/free
Use aligned malloc/free for teximage data everywhere to be consistant.
The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
Keith Whitwell [Tue, 14 Oct 2008 12:56:12 +0000 (13:56 +0100)]
trivial: more vp tests
Keith Whitwell [Tue, 14 Oct 2008 12:52:38 +0000 (13:52 +0100)]
vp: add simple vertex transform test
Keith Whitwell [Tue, 14 Oct 2008 13:15:26 +0000 (14:15 +0100)]
mesa: modify fixed function vertex programs not to reference constant attributes
Brian Paul [Fri, 10 Oct 2008 19:39:14 +0000 (13:39 -0600)]
mesa: new _mesa_set_vp_override() function for driver-override of vertex program
Patch provide by Keith.
Used in state tracker by DrawPixels to indicate that the state tracker (driver)
is using its own vertex program. This prevents the texenvprogram code from
replacing conventional shader inputs with state vars.
Fixes glDraw/CopyPixels regressions.
Brian Paul [Thu, 9 Oct 2008 22:39:59 +0000 (16:39 -0600)]
mesa: rasterizer state depends on ST_NEW_VERTEX_PROGRAM
Check for per-vertex point size must be done when vertex program changes.
Brian Paul [Wed, 8 Oct 2008 20:02:24 +0000 (14:02 -0600)]
mesa: in _mesa_combine_programs() take new STATE_CURRENT_ATTRIB color into account
Commit
1680ef869625dc1fe9cf481b180382a34e0738e7 changed the texenv program
to get color from a state register instead of a constant-valued vertex
attribute. This broke program concatenation (so glDraw/CopyPixels broke).
Now check if the second program get's color from a constant register and
handle that case appropriately.
Stephane Marchesin [Tue, 7 Oct 2008 19:28:38 +0000 (21:28 +0200)]
Mesa: fix the case where there are no vertex attributes.
This is a backport of
8e8208d6db8b764568539784a6473d545dec2265 to gallium-0.1
Keith Whitwell [Tue, 7 Oct 2008 18:12:26 +0000 (19:12 +0100)]
trivial: add more vp tests
Brian Paul [Tue, 7 Oct 2008 17:22:47 +0000 (11:22 -0600)]
mesa: replace GLuint with GLbitfield to be clearer about usage
Also, fix up some comments to be doxygen style.
Keith Whitwell [Tue, 7 Oct 2008 15:44:24 +0000 (16:44 +0100)]
draw: don't assume output buffer pointer is aligned
Keith Whitwell [Tue, 7 Oct 2008 15:33:17 +0000 (16:33 +0100)]
mesa: update state after binding vertex list in dlist path
Keith Whitwell [Tue, 7 Oct 2008 12:09:05 +0000 (13:09 +0100)]
trivial: exercise vertprog sligtly
Keith Whitwell [Tue, 7 Oct 2008 11:31:31 +0000 (12:31 +0100)]
mesa: protect against segfault in get_fp_input_mask()
Keith Whitwell [Mon, 6 Oct 2008 11:22:55 +0000 (12:22 +0100)]
draw: add switch for drivers to force vertex data passthrough
Brian Paul [Tue, 7 Oct 2008 14:30:29 +0000 (08:30 -0600)]
mesa: remove old assertion
Brian [Tue, 7 Oct 2008 00:31:56 +0000 (18:31 -0600)]
gallium: replace assertion with conditional/recovery code
The assertion failed when we ran out of exec memory.
Found with conform texcombine test.
Brian [Mon, 6 Oct 2008 23:10:45 +0000 (17:10 -0600)]
mesa: fix convolve/convolution mix-ups
Brian Paul [Mon, 6 Oct 2008 15:27:31 +0000 (09:27 -0600)]
mesa: add missing GLcontext param to _mesa_delete_query().
Fixes vtk crash and others.
Michal Krol [Mon, 6 Oct 2008 11:23:56 +0000 (13:23 +0200)]
draw: Fix compiler errors on Windows.
Keith Whitwell [Mon, 6 Oct 2008 10:54:22 +0000 (11:54 +0100)]
rtasm: fix debug build
Keith Whitwell [Wed, 10 Sep 2008 10:39:43 +0000 (11:39 +0100)]
make draw's vertex_info struct smaller/quicker to compare with memcmp()
Keith Whitwell [Sat, 4 Oct 2008 11:41:56 +0000 (12:41 +0100)]
mesa: handle vertex program enabled case also in texenvprogram.c
Keith Whitwell [Fri, 3 Oct 2008 16:30:59 +0000 (17:30 +0100)]
mesa: avoid generating constant vertex attributes in fixedfunc programs
Keep track of enabled/active vertex attributes.
Keep track of potential vertex program outputs.
When generating fragment program, replace references to fragment attributes
which are effectively non-varying and non-computed passthrough attributes with
references to the new CURRENT_ATTRIB tracked state value.
Only downside is slight ugliness in VBO code where we need to validate state
twice in succession.
Keith Whitwell [Fri, 3 Oct 2008 15:46:48 +0000 (16:46 +0100)]
Mesa: short-circuit case when looking up the same program twice in cache
Keith Whitwell [Fri, 3 Oct 2008 12:55:40 +0000 (13:55 +0100)]
mesa: add new internal state for tracking current vertex attribs
Keith Whitwell [Fri, 3 Oct 2008 12:53:07 +0000 (13:53 +0100)]
mesa: add missing state dependencies for various tracked constants
Keith Whitwell [Fri, 3 Oct 2008 12:51:56 +0000 (13:51 +0100)]
mesa: shrink texenvprogram state key struct
Keith Whitwell [Fri, 3 Oct 2008 12:50:34 +0000 (13:50 +0100)]
rtasm: add sse_movntps
Keith Whitwell [Thu, 2 Oct 2008 11:53:11 +0000 (12:53 +0100)]
draw: modify prefetching slightly
Keith Whitwell [Wed, 1 Oct 2008 17:40:01 +0000 (18:40 +0100)]
draw: don't keep refetching constant inputs
Keith Whitwell [Thu, 2 Oct 2008 11:46:01 +0000 (12:46 +0100)]
rtasm: add prefetch instructions