José Fonseca [Tue, 30 Sep 2008 16:13:40 +0000 (01:13 +0900)]
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.
José Fonseca [Mon, 29 Sep 2008 16:12:52 +0000 (01:12 +0900)]
tgsi: SSE2 optimized exp2, log2 and pow implementations.
Special care must be taken when calling compiler generated SSE2 functions
from the runtime generated SSE2: saving the xmm registers, and notify gcc
the stack is not 16byte aligned.
It would be more efficient to keep the stack pointer 16byte aligned, but
too hairy, and not consistent in all x86 architectures.
This has been tested in linux x86 and windows x86 userspace. Not tested on
x86-64 because it is broken for other reasons (even without this change).
José Fonseca [Mon, 29 Sep 2008 16:07:09 +0000 (01:07 +0900)]
util: Header for SSE2 intrinsics portability.
José Fonseca [Mon, 29 Sep 2008 10:09:39 +0000 (19:09 +0900)]
rtasm: Implement immediate group 1 instructions. Fix SIB emition.
Brian Paul [Fri, 26 Sep 2008 23:59:19 +0000 (17:59 -0600)]
cell: checkpoint: more work in emit_function_call()
Simple function call works now, but we don't save/restore the caller's registers yet.
Brian Paul [Fri, 26 Sep 2008 23:57:01 +0000 (17:57 -0600)]
cell: stub-out sin/cos function bodies to avoid trashing caller's stack for now
Brian Paul [Fri, 26 Sep 2008 23:06:22 +0000 (17:06 -0600)]
gallium: SPU register comments
Brian Paul [Fri, 26 Sep 2008 16:15:11 +0000 (10:15 -0600)]
cell: move command processing code into new spu_command.c file
Brian Paul [Fri, 26 Sep 2008 16:10:08 +0000 (10:10 -0600)]
cell: move debug-related declarations
Brian Paul [Fri, 26 Sep 2008 16:02:58 +0000 (10:02 -0600)]
cell: move debug macros into new spu_debug.h
Brian Paul [Fri, 26 Sep 2008 16:00:14 +0000 (10:00 -0600)]
cell: move really_clear_tiles()
Brian Paul [Fri, 26 Sep 2008 15:58:17 +0000 (09:58 -0600)]
cell: align instruction buffers to 8-byte, not 32-byte boundary
Brian Paul [Fri, 26 Sep 2008 15:53:03 +0000 (09:53 -0600)]
cell: asst clean-up, var renaming
Brian Paul [Fri, 26 Sep 2008 15:48:17 +0000 (09:48 -0600)]
cell: remove unneeded blend/depth_stencil subclasses
Brian Paul [Fri, 26 Sep 2008 15:38:40 +0000 (09:38 -0600)]
cell: checkpoint: support for function calls in SPU shaders
Will be used for instructions like SIN/COS/POW/TEX/etc. The PPU needs to
know the address of some functions in the SPU address space. Send that
info to the PPU/main memory rather than patch up shaders on the SPU side.
Not finished/tested yet...
Brian Paul [Fri, 26 Sep 2008 15:32:09 +0000 (09:32 -0600)]
cell: inst reorder to save a cycle
Alan Hourihane [Fri, 26 Sep 2008 14:08:57 +0000 (15:08 +0100)]
st: add prototype for st_get_framebuffer_dimensions()
Alan Hourihane [Fri, 26 Sep 2008 14:04:09 +0000 (15:04 +0100)]
st: export st_get_framebuffer_dimensions() to retrieve
the width & height of the fb
Brian Paul [Fri, 26 Sep 2008 13:37:32 +0000 (07:37 -0600)]
mesa: fix incorrect parameter order
Brian Paul [Fri, 26 Sep 2008 13:37:15 +0000 (07:37 -0600)]
mesa: remove const qualifiers to match device driver interface function
Brian Paul [Fri, 19 Sep 2008 15:25:32 +0000 (09:25 -0600)]
gallium: rename tgsi_translate_mesa_program() to st_translate_mesa_program()
Brian Paul [Fri, 19 Sep 2008 00:31:47 +0000 (18:31 -0600)]
mesa: add some braces
Brian Paul [Fri, 26 Sep 2008 01:22:29 +0000 (19:22 -0600)]
mesa: fix/simplify initialization of vertex/fragment program limits
Defaults for program length, num ALU instructions, num indirections, etc.
basically indicate no limit for software rendering. Driver should override
as needed.
Brian Paul [Fri, 26 Sep 2008 00:40:16 +0000 (18:40 -0600)]
mesa: increase MAX_INSTRUCTIONS
Brian Paul [Fri, 26 Sep 2008 00:27:22 +0000 (18:27 -0600)]
mesa: fix swizzle failure, fix typo
Brian Paul [Thu, 25 Sep 2008 17:46:27 +0000 (11:46 -0600)]
mesa: fix default buffer object access value
Alan Hourihane [Fri, 26 Sep 2008 13:19:18 +0000 (14:19 +0100)]
st: change from ** to * for st_unreference_framebuffer()
Keith Whitwell [Wed, 24 Sep 2008 23:56:44 +0000 (18:56 -0500)]
mesa: fix indenting
Keith Whitwell [Wed, 24 Sep 2008 16:59:17 +0000 (09:59 -0700)]
dri: remove unused files present only on gallium-0.2 branch
Keith Whitwell [Fri, 26 Sep 2008 13:09:04 +0000 (14:09 +0100)]
Merge commit 'origin/master' into HEAD
Conflicts:
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
Alan Hourihane [Fri, 26 Sep 2008 11:27:29 +0000 (12:27 +0100)]
egl: cleanup doublebuffer check
Alan Hourihane [Fri, 26 Sep 2008 11:18:59 +0000 (12:18 +0100)]
egl: switch to egl_glx.so as the default EGL driver for X.
Alan Hourihane [Fri, 26 Sep 2008 11:18:16 +0000 (12:18 +0100)]
egl: fudge with LIBGL_DRIVERS_PATH to pick up EGL specific DRI driver.
Alan Hourihane [Fri, 26 Sep 2008 10:18:58 +0000 (11:18 +0100)]
egl: Add new EGL driver that wraps GLX.
Alan Hourihane [Fri, 26 Sep 2008 10:16:39 +0000 (11:16 +0100)]
link EGL demos with -lGL
Brian [Fri, 26 Sep 2008 01:57:34 +0000 (19:57 -0600)]
mesa: fix cast/conversion for optional code
José Fonseca [Tue, 23 Sep 2008 07:40:49 +0000 (16:40 +0900)]
util: Update fast_log2 article url.
Brian Paul [Fri, 26 Sep 2008 00:55:52 +0000 (18:55 -0600)]
mesa: fix typo (s/feadback/feedback/). Fixes broken selection/feedback.
Brian Paul [Thu, 25 Sep 2008 17:54:00 +0000 (11:54 -0600)]
mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE)
Brian Paul [Thu, 25 Sep 2008 17:03:46 +0000 (11:03 -0600)]
mesa: fix some VBO buffer object issues
The VBO module may use a real VBO or a malloc'd buffer for vertex storage.
Be careful not to accidentally replace the later with the former when drawing.
Check if using a real VBO at destroy time to prevent a double-free.
Sam Hocevar [Thu, 25 Sep 2008 15:58:27 +0000 (09:58 -0600)]
mesa: fix function params to match prototypes
Sam Hocevar [Thu, 25 Sep 2008 12:56:41 +0000 (14:56 +0200)]
mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration.
Sam Hocevar [Thu, 25 Sep 2008 08:49:05 +0000 (10:49 +0200)]
i965: support for sin() and cos() in vertex shaders.
Sam Hocevar [Tue, 23 Sep 2008 15:56:19 +0000 (17:56 +0200)]
i965: more meaningful message for unsupported opcodes.
Eric Anholt [Wed, 24 Sep 2008 22:10:45 +0000 (15:10 -0700)]
intel: Fix clears to depth_stencil texture attachments.
Broken by
0adfd1021035e90995a25ec5f20b736e55075d92, showed up as an assertion
failure in a software fallback in the shadowtex demo when we failed to
recognize the texture format.
Alan Hourihane [Wed, 24 Sep 2008 19:42:57 +0000 (20:42 +0100)]
add cso_hash_contains() function
Brian [Fri, 14 Dec 2007 18:42:28 +0000 (11:42 -0700)]
set SamplerUnit[] entry in load_texture() just to be safe
(cherry picked from commit
fce4612f8a29ee1798c9326a431a139d856c7a04)
Brian [Fri, 18 Jan 2008 19:45:27 +0000 (12:45 -0700)]
use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals
(cherry picked from commit
fdc8636bdc65deb0d95a62a51c8d9bca05bc6bb8)
Brian [Fri, 14 Dec 2007 18:16:49 +0000 (11:16 -0700)]
set program->SamplersUsed bit when using a texture instruction
Brian [Mon, 29 Oct 2007 18:25:46 +0000 (12:25 -0600)]
Remove ctx field from texenvprog_cache
Brian [Tue, 25 Sep 2007 21:20:04 +0000 (15:20 -0600)]
include programopt.h
(cherry picked from commit
83fad68ec1989c719646a76f4cc5e0b3d23537ed)
Brian [Tue, 25 Sep 2007 21:18:51 +0000 (15:18 -0600)]
Disable vertex shader fog, compute fog in fragment shader.
Brian [Wed, 19 Sep 2007 01:29:26 +0000 (19:29 -0600)]
temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabled
(cherry picked from commit
63be96bdc7e9f388a5c49295bd7e150462fd003a)
Keith Whitwell [Wed, 24 Sep 2008 04:08:50 +0000 (21:08 -0700)]
mesa: fix main/ prefix in include
Keith Whitwell [Tue, 18 Dec 2007 16:56:22 +0000 (16:56 +0000)]
vbo: unmap and remap immediate vbo before/after each draw.
Also use BufferData(NULL) to get fresh storage and avoid synchronous
operation where we would have to flush and wait for the fence after each
draw because of the map.
This will chew through a whole load of buffer space on small draws, so
it isn't a proper solution. Need to support a no-fence or append mapping
mode to do this right, or use user buffers.
Brian [Fri, 17 Aug 2007 14:26:33 +0000 (15:26 +0100)]
added vbo_use_buffer_objects() to specify that immediate mode data should be put into bufferobjects
Keith Whitwell [Mon, 25 Aug 2008 09:59:45 +0000 (10:59 +0100)]
vbo: seed initial max_element value with a more likely candidate
(cherry picked from commit
026e7731e549e0777c010348460fd48b3d75a843)
Keith Whitwell [Wed, 24 Sep 2008 00:40:49 +0000 (17:40 -0700)]
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/shader/shader_api.c
Brian Paul [Tue, 17 Jun 2008 17:31:45 +0000 (11:31 -0600)]
mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/
(cherry picked from commit
8a369b909a6648ae7a5a0c2dcb972a2f96f99a80)
Brian Paul [Wed, 6 Aug 2008 19:07:09 +0000 (13:07 -0600)]
mesa: glsl: fix glGetUniform for matrix queries
(cherry picked from commit
7a6eba54d064cadf15f93df2c1748cf5e474ef03)
Brian Paul [Wed, 6 Aug 2008 22:26:47 +0000 (16:26 -0600)]
mesa: glsl: fix a number of glUniform issues
Additional error checking.
Allow setting elements of uniform arrays. This involves encoding both
a uniform location and a parameter offset in the value returned by
glGetUniformLocation().
Limit glUniform[if]v()'s count to the size of the uniform array.
When setting bool-valued uniforms, convert all float/int values to 0 or 1.
Brian Paul [Wed, 6 Aug 2008 18:45:14 +0000 (12:45 -0600)]
mesa: glsl: fix error check in get_uniformfv()
(cherry picked from commit
18cd9c229a1fc8da8b7669b8d1d100f6bbeca183)
Keith Whitwell [Wed, 24 Sep 2008 00:24:39 +0000 (17:24 -0700)]
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/main/drawpix.c
src/mesa/shader/prog_uniform.c
src/mesa/shader/slang/slang_link.c
Keith Whitwell [Wed, 24 Sep 2008 00:08:24 +0000 (17:08 -0700)]
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/glapi/glapi_getproc.c
src/mesa/main/image.c
src/mesa/shader/slang/slang_link.c
José Fonseca [Sat, 31 May 2008 09:14:09 +0000 (18:14 +0900)]
mesa: Apply MSVC portability fixes from Alan Hourihane.
Brian Paul [Wed, 17 Sep 2008 19:13:02 +0000 (13:13 -0600)]
mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()
Brian Paul [Wed, 18 Jun 2008 17:00:43 +0000 (11:00 -0600)]
mesa: add fwd decl of fill_in_entrypoint_offset()
(cherry picked from commit
b1eff0228b7199920c02e62446ebf5496c298814)
Brian Paul [Wed, 17 Sep 2008 22:48:13 +0000 (16:48 -0600)]
mesa: new gl_fragment_program fields indicating use of fog, front-facing, point coord
(cherry picked from commit
d7a7b0a10dd355fbeb7a404091a42d4ab558c820)
Brian [Wed, 26 Sep 2007 23:03:11 +0000 (17:03 -0600)]
Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.
This should probably be pulled into main-line Mesa...
(cherry picked from commit
324ecadbfdf9b944e059832f146451e4151dcb21)
Brian Paul [Tue, 17 Jun 2008 19:23:32 +0000 (13:23 -0600)]
mesa: refactor: move GetProcAddress code from glapi.c into new glapi_getproc.c file
Keith Whitwell [Tue, 23 Sep 2008 22:53:29 +0000 (15:53 -0700)]
Merge commit 'origin/master' into gallium-0.2
Eric Anholt [Tue, 23 Sep 2008 22:53:29 +0000 (15:53 -0700)]
i965: Cope with batch getting flushed in the middle of batchbuffer emits.
This isn't required for GEM (at least, yet), but the check_aperture code
for non-GEM results in batch getting flushed during emit. brw_state_upload
restarts state emits, but a bunch of the state emit functions were assuming
that they would be called exactly once, after prepare and before new_batch.
Bug #17179.
Keith Whitwell [Tue, 23 Sep 2008 22:53:19 +0000 (15:53 -0700)]
remove leftover merge conflict markers
Eric Anholt [Tue, 23 Sep 2008 22:32:41 +0000 (15:32 -0700)]
intel: Add missing include files for meta drawpixels since mesa shuffling.
Eric Anholt [Sat, 20 Sep 2008 23:13:38 +0000 (16:13 -0700)]
intel: Replace pbo-only drawpixels function with a generic Mesa metaops.
Improves performance of some oglconform regression tests 9x.
Eric Anholt [Mon, 22 Sep 2008 01:26:45 +0000 (18:26 -0700)]
i915: Fix overlapping CopyPixels with negative pixel zoom.
Fixes a failure in pixel-pos.c oglconform test.
Eric Anholt [Sun, 21 Sep 2008 01:07:17 +0000 (18:07 -0700)]
i915: fix crash in flush_prim -> wait_flips -> flush_batch -> flush_prim.
Robert Ellison [Tue, 23 Sep 2008 16:11:59 +0000 (10:11 -0600)]
CELL: fix colormask code generation
The colormask code generation had assumed that its input packed pixels were
in RGBA format. In fact, the format they're in is dependent on the
pipe color format.
Now the color format is passed in to gen_colormask(), and proper
color format-dependent SPU code is generated.
Robert Ellison [Tue, 23 Sep 2008 16:09:36 +0000 (10:09 -0600)]
CELL: improve legibility of CELL_DEBUG environment variable output
Ian Romanick [Tue, 23 Sep 2008 00:23:40 +0000 (17:23 -0700)]
i965: Adapt to new TNL program tracking semantics
This fixes bugzilla #17718.
Jonathan White [Mon, 22 Sep 2008 20:33:53 +0000 (14:33 -0600)]
cell: Fixed bug with absolute, negate, set-negative logic in source fetch for TGSI instructions. The logic should operate on the origin channel not the swizzled channel.
Please enter the commit message for your changes.
Jonathan White [Mon, 22 Sep 2008 19:13:50 +0000 (13:13 -0600)]
cell: Added TRUNC, SWZ (extended) and XPD instructions, verified against softpipe. Optimized FLR and FRC. Fixed writeback logic for DP3, DP4 and DPH.
Jonathan White [Mon, 22 Sep 2008 16:54:50 +0000 (10:54 -0600)]
cell: Added DPH instruction and verified against softpipe.
Michel Dänzer [Mon, 22 Sep 2008 09:49:34 +0000 (11:49 +0200)]
r300: Adapt to the removal of _tnl_ProgramCacheInit() and friends.
Michel Dänzer [Mon, 22 Sep 2008 09:48:26 +0000 (11:48 +0200)]
Remove incorrect test from mmAllocMem.
0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.
Jakob Bornecrantz [Mon, 22 Sep 2008 10:47:57 +0000 (12:47 +0200)]
mesa: Remove left over merge conflicts
Michel Dänzer [Mon, 22 Sep 2008 09:49:34 +0000 (11:49 +0200)]
r300: Adapt to the removal of _tnl_ProgramCacheInit() and friends.
Michel Dänzer [Mon, 22 Sep 2008 09:48:26 +0000 (11:48 +0200)]
Remove incorrect test from mmAllocMem.
0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.
Keith Whitwell [Mon, 22 Sep 2008 05:30:55 +0000 (22:30 -0700)]
Merge branch 'master' into gallium-0.2
Conflicts:
src/mesa/glapi/glapi.h
src/mesa/main/api_exec.c
src/mesa/main/attrib.c
src/mesa/main/clear.c
src/mesa/main/context.c
src/mesa/main/mfeatures.h
src/mesa/main/mipmap.c
src/mesa/main/mipmap.h
src/mesa/main/readpix.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texformat.c
src/mesa/main/texparam.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_context.c
src/mesa/x86/common_x86_asm.S
Brian Paul [Wed, 20 Aug 2008 00:14:15 +0000 (18:14 -0600)]
mesa: allow for extra per-context init
(cherry picked from commit
815cdcfbc0740c66b901361620c88d99541bdad2)
Brian Paul [Tue, 12 Aug 2008 23:41:57 +0000 (17:41 -0600)]
mesa: texture crop rect state
(cherry picked from commit
c01fbc7866d7cd5cf4263dffec6d9591470b4c23)
Brian Paul [Tue, 12 Aug 2008 16:00:36 +0000 (10:00 -0600)]
mesa: set point state
(cherry picked from commit
af3d9dba562813ffed71691bffd7faf6665c4487)
Brian Paul [Fri, 8 Aug 2008 19:06:54 +0000 (13:06 -0600)]
mesa: fix some feature tests
(cherry picked from commit
74b14fe6ddbece8bc662aac4d3b2b18d8d853486)
Brian Paul [Fri, 8 Aug 2008 18:29:48 +0000 (12:29 -0600)]
mesa: fix some pixel transfer state tests for depth formats
(cherry picked from commit
966e199e409a1b52eef88e48997442250997f45e)
Brian Paul [Fri, 25 Jul 2008 14:34:54 +0000 (08:34 -0600)]
mesa: fix issues causing warnings on Windows
Michal Krol [Tue, 15 Jul 2008 09:15:27 +0000 (11:15 +0200)]
mesa: Silence compiler warnings on Windows.
Brian Paul [Mon, 14 Jul 2008 17:20:58 +0000 (11:20 -0600)]
mesa: comments about vectors vs components
Brian Paul [Tue, 8 Jul 2008 22:58:50 +0000 (16:58 -0600)]
mesa: remove debug code
Brian Paul [Tue, 8 Jul 2008 22:12:01 +0000 (16:12 -0600)]
mesa: implement glGetUniformiv() with new ctx->Driver function
The old implementation could overwrite the caller's param buffer.
Brian Paul [Thu, 3 Jul 2008 20:12:27 +0000 (14:12 -0600)]
mesa: added case for fixed pt