Dave Airlie [Tue, 17 Feb 2009 00:27:45 +0000 (10:27 +1000)]
radeon: fix not emitting texture state correctly
this is whole texture dirty bit is probably not needed with the current
codebase, need to revisit
Dave Airlie [Tue, 17 Feb 2009 00:26:58 +0000 (10:26 +1000)]
radeon: steal miptree optimisation from intel codebase
This replaces a miptree if it won't distrub anything else.
Dave Airlie [Tue, 17 Feb 2009 00:26:33 +0000 (10:26 +1000)]
radeon: move YUV on first texunit check after hw state is setup
Dave Airlie [Tue, 17 Feb 2009 00:25:34 +0000 (10:25 +1000)]
dri/radeon: export a function to cleanup a texture object.
The radeon legacy code want to cleanup not free the texture obj,
so export a function to do that and wrap it.
Dave Airlie [Sun, 15 Feb 2009 23:49:01 +0000 (09:49 +1000)]
radeon: fix texcompress2 test.
this makes compressed subimages work properly.
Dave Airlie [Mon, 16 Feb 2009 07:16:28 +0000 (17:16 +1000)]
radeon: fix compressed tex subimage unpack parameter
Dave Airlie [Sun, 15 Feb 2009 07:03:47 +0000 (17:03 +1000)]
radeon: add cflags to decide whether to link libdrm_radeon or not.
You don't need libdrm_radeon for the legacy driver to build,
only for the experimental mm/cs paths.
Nicolai Haehnle [Sat, 14 Feb 2009 20:43:30 +0000 (21:43 +0100)]
radeon-common: Fix crash in glGetTexImage
Since texture images are now stored in miptrees, we cannot usually
access them directly via the Data pointer.
So we wrap Mesa's implementation by map/unmap calls.
This crash was triggered by Sauerbraten, Piglit now contains a
regression test.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
Nicolai Haehnle [Sat, 14 Feb 2009 19:45:01 +0000 (20:45 +0100)]
r300: Fix crash in cubemap tree creation
The mip tree creation would crash if the first baselevel image to be uploaded
was not the positive-x image.
Found with Sauerbraten, also added a regression test to Piglit.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
Nicolai Haehnle [Sat, 14 Feb 2009 16:06:06 +0000 (17:06 +0100)]
r300: Redirect constant TEX coordinates
R3xx/R5xx fragment program texture constants must come from a hardware
register instead of the constant file, so we redirect if necessary during
the native rewrite phase.
The symptoms of this bug started appearing when the Mesa fixed function
texenvprogram code started using STATE_CURRENT_ATTRIB constants for
texture coordinates when the corresponding attributes were constant across
all vertices.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
Michel Dänzer [Sat, 14 Feb 2009 10:40:48 +0000 (20:40 +1000)]
r300: Fix R300_CMD_SCRATCH on big endian.
Dave Airlie [Sat, 14 Feb 2009 10:34:20 +0000 (20:34 +1000)]
radeon: remove unused radeon_compat.c
Dave Airlie [Sat, 14 Feb 2009 10:13:04 +0000 (20:13 +1000)]
r200: fixup cube emit debug
Dave Airlie [Sat, 14 Feb 2009 09:10:13 +0000 (19:10 +1000)]
r200: fix another cmdbuf sizing issue
Dave Airlie [Sat, 14 Feb 2009 02:01:54 +0000 (12:01 +1000)]
radeon: check for valid bo in release arrays
Dave Airlie [Fri, 13 Feb 2009 10:34:19 +0000 (20:34 +1000)]
radeon: remove old cube code
Dave Airlie [Fri, 13 Feb 2009 21:49:15 +0000 (07:49 +1000)]
radeon/r300: fix warnings
Dave Airlie [Fri, 13 Feb 2009 19:57:52 +0000 (05:57 +1000)]
radeon: add initial cubemap support appears to work
Dave Airlie [Fri, 13 Feb 2009 13:34:53 +0000 (23:34 +1000)]
radeon/r200: make setTexOffset work again
Dave Airlie [Fri, 13 Feb 2009 13:29:27 +0000 (23:29 +1000)]
radeon/r200: fix set tex offset functions
Dave Airlie [Fri, 13 Feb 2009 13:02:12 +0000 (23:02 +1000)]
radeon: revert unneeded change to texturing code
Dave Airlie [Fri, 13 Feb 2009 12:49:06 +0000 (22:49 +1000)]
radeon: fix compressed texture upload on all radeons
tested on r200, texcmp works. May need more verification
Dave Airlie [Fri, 13 Feb 2009 09:39:21 +0000 (19:39 +1000)]
r200: update with changes from r100 driver for texture state
Dave Airlie [Fri, 13 Feb 2009 08:50:57 +0000 (18:50 +1000)]
r200: port over state emit fix from r100
Dave Airlie [Thu, 12 Feb 2009 15:27:21 +0000 (01:27 +1000)]
r200: fixup some CS emission sizes
Dave Airlie [Thu, 12 Feb 2009 14:04:11 +0000 (00:04 +1000)]
r200: use correct finish interface
Dave Airlie [Thu, 12 Feb 2009 15:21:37 +0000 (01:21 +1000)]
radeon: fixup include ordering
Dave Airlie [Thu, 12 Feb 2009 15:11:25 +0000 (01:11 +1000)]
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c
Dave Airlie [Thu, 12 Feb 2009 15:04:18 +0000 (01:04 +1000)]
r300: fix warning about mesa_lock_context_texture
Dave Airlie [Thu, 12 Feb 2009 04:44:20 +0000 (14:44 +1000)]
radeon: add stdint include
Dave Airlie [Thu, 12 Feb 2009 04:43:25 +0000 (14:43 +1000)]
radeon: add mminfo struct to wrapper
Dave Airlie [Thu, 12 Feb 2009 04:41:16 +0000 (14:41 +1000)]
radeon: add defines for future bits
Dave Airlie [Thu, 12 Feb 2009 04:39:33 +0000 (14:39 +1000)]
r200: make build complete
Dave Airlie [Thu, 12 Feb 2009 04:36:12 +0000 (14:36 +1000)]
r300: make r300 work with latest changes
Dave Airlie [Thu, 12 Feb 2009 04:16:24 +0000 (14:16 +1000)]
radeon: make build without libdrm_radeon better
Dave Airlie [Thu, 12 Feb 2009 14:05:39 +0000 (00:05 +1000)]
radeon/r200/r300: make build again with tracker changes
Dave Airlie [Thu, 12 Feb 2009 13:53:41 +0000 (23:53 +1000)]
radeon: remove depends on libdrm_radeon for now.
will fixup makefiles later to detect and use libdrm_Radeon in proper
places
Dave Airlie [Thu, 12 Feb 2009 13:52:51 +0000 (23:52 +1000)]
radeon/r200/r300: make build with out libdrm_radeon installed for now
Dave Airlie [Thu, 12 Feb 2009 12:48:18 +0000 (22:48 +1000)]
r200/r300: get up to speed on renamed files
Dave Airlie [Thu, 12 Feb 2009 12:38:10 +0000 (22:38 +1000)]
radeon: renaming and headers cleanup
Dave Airlie [Thu, 12 Feb 2009 11:44:34 +0000 (21:44 +1000)]
r100/r200: fix front rendering issue.
Dave Airlie [Thu, 12 Feb 2009 11:16:39 +0000 (21:16 +1000)]
radeon/r200/r300: another big merge upheavel.
This merges lots of the hw state atom emission and firevertices code.
it also removes a lot of the extra radeon crap from r300
and merge scissor
Robert Ellison [Thu, 12 Feb 2009 01:01:34 +0000 (18:01 -0700)]
Fix an i965 assertion failure on glClear()
While running conform with render-to-texture:
conform -d 33 -v 2 -t -direct
the i965 driver failed this assertion:
intel_clear.c:77: intel_clear_tris: Assertion `(mask & ~((1 << BUFFER_BACK_LEFT) | (1 << BUFFER_FRONT_LEFT) | (1 << BUFFER_DEPTH) | (1 << BUFFER_STENCIL))) == 0' failed.
The problem is that intel_clear_tris() is called by intelClear() to
clear any and all of the available color buffers, but intel_clear_tris()
actually only handles the back left and front left color buffers; so
the assertion fails as soon as you try to clear a non-standard color
buffer.
The fix is to have intelClear() only call intel_clear_tris() with
buffers that intel_clear_tris() can support. intelClear() already backs
down to _swrast_Clear() for all buffers that aren't handled explicitly.
Dan Nicholson [Wed, 11 Feb 2009 23:16:00 +0000 (15:16 -0800)]
autoconf: Fix lib globbing for static builds
Reported-by: Siddhartha Chaudhuri <expiring_frog@yahoo.co.uk>
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Brian Paul [Wed, 11 Feb 2009 21:11:48 +0000 (14:11 -0700)]
gallium: const-correctness for u_linear.c functions
Brian Paul [Wed, 11 Feb 2009 21:09:22 +0000 (14:09 -0700)]
gallium: silence warnings about void ptr arithmetic
Brian Paul [Wed, 11 Feb 2009 20:59:54 +0000 (13:59 -0700)]
mesa: refactor MATH_SOURCES, remove Mesa x86 codegen from gallium build
Omit math/m_xform.c from gallium builds since it's not used and it's the
one place we were pulling in the Mesa x86 codegen which collides with
gallium's x86 codegen.
Can now omit ASM_C_SOURCES from gallium build too.
Brian Paul [Wed, 11 Feb 2009 20:52:17 +0000 (13:52 -0700)]
mesa: get rid of _math_init()
Only VBO uses the evaluator code so call _math_init_eval() there.
Only TNL uses the transform/translate code so call _math_init_transformation()
and _math_init_translate9) there.
This is a step toward resolving some symbol collisions between Mesa's and
gallium's x86 codegen.
Have VBO and TNL modules call _math_init_transformation()
Dan Nicholson [Wed, 11 Feb 2009 19:04:29 +0000 (11:04 -0800)]
autoconf: Adjust to new asm SOURCES variables
Commit
90b2beb661f630966788a6e909dc759c99e38973 changed the assembly
variables. Without this change, the glapi assembly wasn't being built
when it was supposed to, resulting in missing symbols in libGL.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Dan Nicholson [Wed, 11 Feb 2009 18:42:34 +0000 (10:42 -0800)]
autoconf: Restore commented ASM_FLAGS
This is not the proper approach to disabling assembly. If there are bugs,
they should be fixed or the assembly can default to off.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Dan Nicholson [Wed, 11 Feb 2009 17:55:20 +0000 (09:55 -0800)]
Add external pixman CFLAGS after all internal include paths
With the pixman CFLAGS at the beginning of the command line, my build
was picking up the glcore.h from glproto, which doesn't have any of the
TFP fields in __GLcontextmodes.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Younes Manton [Wed, 11 Feb 2009 16:52:32 +0000 (11:52 -0500)]
nouveau: 1xN, Nx1 levels of a swizzled mip tree shouldn't be aligned.
José Fonseca [Wed, 11 Feb 2009 16:35:12 +0000 (16:35 +0000)]
draw: Cap max vertices instead of failing assert.
Brian Paul [Wed, 11 Feb 2009 16:14:07 +0000 (09:14 -0700)]
demos: minor updates for shader_api.c test
Mesa's glGetUniformLocation() does support array indexes.
Minor code reformatting.
It would be great if this program were converted into a glean test...
Brian Paul [Wed, 11 Feb 2009 16:12:34 +0000 (09:12 -0700)]
glsl: allow setting arrays of samplers in set_program_uniform()
Arrays of sampler vars haven't been tested much and might actually be broken.
Will need to be revisited someday.
Another fix for bug 20056.
Brian Paul [Wed, 11 Feb 2009 16:05:08 +0000 (09:05 -0700)]
glsl: raise GL_INVALID_OPERATION for glUniform(location < -1)
location = -1 is silently ignored, but other negative values should raise
an error.
Another fix for bug 20056.
Brian Paul [Wed, 11 Feb 2009 16:03:16 +0000 (09:03 -0700)]
glsl: rework _mesa_get_uniform[fi]v() to avoid using a fixed size intermediate array
Brian Paul [Wed, 11 Feb 2009 15:46:21 +0000 (08:46 -0700)]
glsl: fix glUniform() array bounds error checking
If too many array elements are specified, they're to be silently ignored (don't
raise a GL error).
Fixes another issue in bug 20056.
Brian Paul [Wed, 11 Feb 2009 15:16:14 +0000 (08:16 -0700)]
glsl: fix incorrect size returned by glGetActiveUniform() for array elements.
Fixes one of the issues in bug 20056.
Dave Airlie [Wed, 11 Feb 2009 09:04:39 +0000 (19:04 +1000)]
r300: disable assert that fires
Dave Airlie [Wed, 11 Feb 2009 09:03:56 +0000 (19:03 +1000)]
radeon: unmap in case of two dma regions being used for one cmdbuf
Dave Airlie [Wed, 11 Feb 2009 06:52:56 +0000 (16:52 +1000)]
radeon: cleanup cmdbuffer
Dave Airlie [Wed, 11 Feb 2009 06:50:19 +0000 (16:50 +1000)]
r300: fix front buffer rendering properly fixes tests in glean
Dave Airlie [Wed, 11 Feb 2009 10:10:59 +0000 (20:10 +1000)]
r200: fix build
Johannes Engel [Wed, 11 Feb 2009 10:31:05 +0000 (11:31 +0100)]
Add install target for egl
Signed-off-by: Johannes Engel <jcnengel@googlemail.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Brian Paul [Wed, 11 Feb 2009 14:53:36 +0000 (07:53 -0700)]
demos: better error message for overlay.c, see bug 20055
José Fonseca [Wed, 11 Feb 2009 13:52:11 +0000 (13:52 +0000)]
mesa: Use the stdio wrappers.
snprint symbol does not exist in Windows.
José Fonseca [Wed, 11 Feb 2009 13:51:34 +0000 (13:51 +0000)]
wgl: Add a few more stubs.
I wonder why we need this... It is only necessary for the MSVC build.
MinGW does not require them.
José Fonseca [Wed, 11 Feb 2009 13:50:43 +0000 (13:50 +0000)]
mesa: Move statements after declarations.
Eric Anholt [Tue, 10 Feb 2009 22:30:38 +0000 (14:30 -0800)]
intel: Add x8r8g8b8 visuals to DRI1 fbconfigs alongside a8r8gb8.
This involved fixing driConcatConfigs to not return const (which had made a
mess of a previous patch too).
Eric Anholt [Tue, 10 Feb 2009 22:27:16 +0000 (14:27 -0800)]
sis: fix signedness warnings
Eric Anholt [Tue, 10 Feb 2009 22:24:06 +0000 (14:24 -0800)]
trident: Fix signedness warning.
Eric Anholt [Tue, 10 Feb 2009 22:22:26 +0000 (14:22 -0800)]
tdfx: Fix begin/endquery for current API.
Eric Anholt [Mon, 9 Feb 2009 23:55:15 +0000 (15:55 -0800)]
intel: Don't do the extra MI_FLUSH in flushing except when doing glFlush().
Everything other than "make sure the last rendering ends up visible on the
screen" doesn't need that behavior.
Eric Anholt [Mon, 9 Feb 2009 13:55:31 +0000 (14:55 +0100)]
intel: Speed up glDrawPixels(GL_ALPHA) by using an alpha texture format.
Eric Anholt [Mon, 9 Feb 2009 14:25:30 +0000 (15:25 +0100)]
intel: Fix some state leakage of {Client,}ActiveTexture in metaops.
Found while debugging cairo-gl.
Eric Anholt [Sun, 8 Feb 2009 14:39:51 +0000 (15:39 +0100)]
intel: don't crash when dri2 tells us about buffers we don't care about.
Eric Anholt [Sun, 8 Feb 2009 14:26:30 +0000 (15:26 +0100)]
dri2: Don't crash if the server returns more buffers than expected.
Eric Anholt [Sun, 8 Feb 2009 14:22:34 +0000 (15:22 +0100)]
dri2: Initialize variables for the getbuffers round-trip reduction.
Missed setting the initial values which usually didn't hurt at runtime.
Brian Paul [Wed, 11 Feb 2009 02:36:52 +0000 (19:36 -0700)]
docs: some Cell driver docs updates
Brian Paul [Wed, 11 Feb 2009 02:33:02 +0000 (19:33 -0700)]
cell: asst build fixes in linux-cell config
Add -D_SVID_SOURCE to silence warnings when building glx files.
Don't build the non-gallium drivers.
Jakob Bornecrantz [Wed, 11 Feb 2009 01:38:21 +0000 (02:38 +0100)]
gallium: Update autoconf to latest gallium build
Jakob Bornecrantz [Wed, 11 Feb 2009 01:25:10 +0000 (02:25 +0100)]
gallium: Disable nouveau by default
Most piep drivers should be able to build by default, but since
the nouveau ones depend drm they can't be enabled by default.
Brian Paul [Tue, 10 Feb 2009 23:56:58 +0000 (16:56 -0700)]
cell: update Cell driver info (code is on master now)
Brian Paul [Tue, 10 Feb 2009 23:44:02 +0000 (16:44 -0700)]
Merge commit 'origin/gallium-master-merge'
This is the big merge of the gallium-0.2 branch into master.
gallium-master-merge was just the staging area for it.
Both gallium-0.2 and gallium-master-merge are considered closed now.
Conflicts:
progs/demos/Makefile
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
Brian Paul [Tue, 10 Feb 2009 23:34:51 +0000 (16:34 -0700)]
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Brian Paul [Tue, 10 Feb 2009 23:30:24 +0000 (16:30 -0700)]
mesa: remove the unused _mesa_UpdateTexEnvProgram() function
Brian Paul [Tue, 10 Feb 2009 23:28:25 +0000 (16:28 -0700)]
mesa: another fix for program/texture state validation
This fixes a regression introduced in
46ae1abbac6837d051c10b2e8b57eab3d4958ff4
Break program validation into two steps, do part before texture state
validation and do the rest after:
1. Determine Vertex/Fragment _Enabled state.
2. Update texture state.
3. Determine pointers to current Vertex/Fragment programs (which may involve
generating new "fixed-function" programs).
See comments in the code for more details of the dependencies.
Brian Paul [Tue, 10 Feb 2009 17:12:44 +0000 (10:12 -0700)]
intel: minor reformatting, comments
Brian Paul [Tue, 10 Feb 2009 22:43:05 +0000 (15:43 -0700)]
mesa: s/_IMAGE_NEW_TRANSFER_STATE/_MESA_NEW_TRANSFER_STATE/ to be more consistant with other flags
Brian Paul [Tue, 10 Feb 2009 22:35:25 +0000 (15:35 -0700)]
mesa: fix/change state validation order for program/texture state
Program state needs to be updated before texture state since the later depends
on the former.
Fixes piglit texgen failure. The second time through the modes (press 't'
three times) we disable the fragment program and return to conventional texture
mode. State validation failed here because update_texture() saw stale fragment
program state.
Younes Manton [Tue, 10 Feb 2009 21:36:33 +0000 (16:36 -0500)]
nouveau: nv40 swizzled mipmap fixes.
Patrice Mandin [Tue, 10 Feb 2009 21:22:55 +0000 (22:22 +0100)]
nouveau: nv30: fix miptree organization to have swizzled texture+mipmap at the right places
Patrice Mandin [Tue, 10 Feb 2009 21:22:06 +0000 (22:22 +0100)]
nouveau: revert all my changes here, not the right way
Patrice Mandin [Tue, 10 Feb 2009 21:04:56 +0000 (22:04 +0100)]
nouveau: stop with 0 dimension
Dave Airlie [Tue, 10 Feb 2009 21:02:18 +0000 (07:02 +1000)]
radeon: fix span init needs more work
Patrice Mandin [Tue, 10 Feb 2009 20:57:40 +0000 (21:57 +0100)]
nouveau: we already have the right src offset
José Fonseca [Tue, 10 Feb 2009 20:27:49 +0000 (20:27 +0000)]
progs: Build samples dir with scons and glew.
Patrice Mandin [Tue, 10 Feb 2009 20:22:29 +0000 (21:22 +0100)]
nouveau: do not forget to half dimension.
Patrice Mandin [Tue, 10 Feb 2009 20:20:06 +0000 (21:20 +0100)]
nouveau: revert most parts of recent mipmap+swizzle stuff. We only need to find right src and dst offset for given mipmap level.