mesa.git
14 years agointel: Fix crash in intel_flush().
Michel Dänzer [Mon, 21 Sep 2009 08:08:11 +0000 (10:08 +0200)]
intel: Fix crash in intel_flush().

Since commit 2921a2555d0a76fa649b23c31e3264bbc78b2ff5 ('intel: Deassociated
drawables from private context struct in intelUnbindContext'),
intel->driDrawable may be NULL in intel_flush().

14 years agomesa/st: Initialize format bits of framebuffer renderbuffers
Nicolai Hähnle [Sat, 12 Sep 2009 10:13:35 +0000 (12:13 +0200)]
mesa/st: Initialize format bits of framebuffer renderbuffers

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
14 years agoglx: Use initstate_r / random_r instead of corrupting global random number state
Ian Romanick [Wed, 16 Sep 2009 23:43:50 +0000 (16:43 -0700)]
glx: Use initstate_r / random_r instead of corrupting global random number state

Previously srandom and random were used.  This cause the global random
number generator state to be modified.  This caused problems for
applications that called srandom before calling into GLX.  By using
local state the global state is left unmodified.

This should fix bug #23774.

14 years agost/mesa: fix some incorrect branching/clean-up code in TexImage functions
Brian Paul [Wed, 16 Sep 2009 19:07:12 +0000 (13:07 -0600)]
st/mesa: fix some incorrect branching/clean-up code in TexImage functions

We need to be sure to call the _mesa_unmap_teximage_pbo() function if we
called _mesa_validate_pbo_teximage().

14 years agost/mesa: fix texture memory allocation bug
Brian Paul [Wed, 16 Sep 2009 18:57:26 +0000 (12:57 -0600)]
st/mesa: fix texture memory allocation bug

The following example caused an incorrect GL_OUT_OF_MEMORY error to be
raised in glTexSubImage2D:

   glTexImage2D(level=0, width=32, height=32, pixels=NULL);
   glTexImage2D(level=0, width=64, height=64, pixels=NULL);
   glTexSubImage2D(level=0, pixels!=NULL);

The second glTexImage2D() call needs to cause the first image to be
deallocated then reallocated at the new size.  This was not happening
because we were testing for pixels==NULL too early.

14 years agointel: Deassociated drawables from private context struct in intelUnbindContext
Ian Romanick [Wed, 16 Sep 2009 14:39:58 +0000 (07:39 -0700)]
intel: Deassociated drawables from private context struct in intelUnbindContext

The generic DRI infrastructure makes sure that __DRIcontextRec::driDrawablePriv
and __DRIcontextRec::driReadablePriv are set to NULL after unbinding a
context.  However, the intel_context structure keeps cached copies of
these pointers.  If these cached pointers are not NULLed and the
drawable is actually destroyed after unbinding the context (typically
by way of glXDestroyWindow), freed memory will be dereferenced in
intelDestroyContext.

This should fix bug #23418.

14 years agodocs: glUniform functions are now compiled into display lists
Brian Paul [Tue, 15 Sep 2009 21:12:29 +0000 (15:12 -0600)]
docs: glUniform functions are now compiled into display lists

14 years agomesa: compile glUniformMatrix() functions into display lists
Brian Paul [Tue, 15 Sep 2009 21:10:29 +0000 (15:10 -0600)]
mesa: compile glUniformMatrix() functions into display lists

I believe this is the last of the shader-related functions that needed
display list treatment.

14 years agomesa: implement more glUniform display list functions
Brian Paul [Tue, 15 Sep 2009 20:56:55 +0000 (14:56 -0600)]
mesa: implement more glUniform display list functions

14 years agodocs: document glUseProgram display list fix
Brian Paul [Tue, 15 Sep 2009 20:38:52 +0000 (14:38 -0600)]
docs: document glUseProgram display list fix

14 years agomesa: compile glUniform4f() into display lists
Brian Paul [Tue, 15 Sep 2009 20:31:10 +0000 (14:31 -0600)]
mesa: compile glUniform4f() into display lists

Note: there are more glUniform functions to compile...

14 years agomesa: compile glUseProgram/glUseProgramObjectARB into display lists
Brian Paul [Tue, 15 Sep 2009 20:25:44 +0000 (14:25 -0600)]
mesa: compile glUseProgram/glUseProgramObjectARB into display lists

Fixes bug 23746

14 years agoGLX: Complain when buggy applications call GLX 1.3 functions.
Ian Romanick [Tue, 15 Sep 2009 20:12:22 +0000 (13:12 -0700)]
GLX: Complain when buggy applications call GLX 1.3 functions.

14 years agoprogs/vp: print program and error info when program does not compile
Brian Paul [Mon, 14 Sep 2009 23:48:17 +0000 (17:48 -0600)]
progs/vp: print program and error info when program does not compile

14 years agoglsl: added some link debug code (disabled)
Brian Paul [Mon, 14 Sep 2009 23:32:03 +0000 (17:32 -0600)]
glsl: added some link debug code (disabled)

14 years agodocs: document linker/preprocessor bug fix
Brian Paul [Mon, 14 Sep 2009 23:27:47 +0000 (17:27 -0600)]
docs: document linker/preprocessor bug fix

14 years agoglsl: remove extra #version directives from concatenated shader sources
Brian Paul [Mon, 14 Sep 2009 23:24:25 +0000 (17:24 -0600)]
glsl: remove extra #version directives from concatenated shader sources

When we concatenate shaders to do our form of poor-man linking, if there's
multiple #version directives, preprocessing fails.  This change disables
the extra #version directives by changing the first two chars to //.

This should help with some Wine issues such as bug 23946.

14 years agoconfigure: fix comment
Thierry Vignaud [Mon, 14 Sep 2009 17:48:51 +0000 (11:48 -0600)]
configure: fix comment

14 years agoUse CFLAGS as HOST_CFLAGS by default
Dan Nicholson [Sat, 12 Sep 2009 16:27:01 +0000 (09:27 -0700)]
Use CFLAGS as HOST_CFLAGS by default

Unless we're cross compiling, the HOST_CFLAGS should be the same as the
normal CFLAGS. This allows the x86 and x86_64 asm to be built correctly
with a native compiler using -m32/-m64.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
14 years agomesa: raise GL_INVALID_ENUM not GL_INVALID_VALUE for glTexParamter errors
Vinson Lee [Fri, 11 Sep 2009 14:04:37 +0000 (08:04 -0600)]
mesa: raise GL_INVALID_ENUM not GL_INVALID_VALUE for glTexParamter errors

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agodocs: document Gallium glDrawPixels(GL_STENCIL_INDEX) fix
Brian Paul [Thu, 10 Sep 2009 20:15:07 +0000 (14:15 -0600)]
docs: document Gallium glDrawPixels(GL_STENCIL_INDEX) fix

14 years agosoftpipe: minor indentation fix
Brian Paul [Thu, 10 Sep 2009 20:14:18 +0000 (14:14 -0600)]
softpipe: minor indentation fix

14 years agosoftpipe: set dirty_render_cache in softpipe_clear()
Brian Paul [Thu, 10 Sep 2009 20:11:36 +0000 (14:11 -0600)]
softpipe: set dirty_render_cache in softpipe_clear()

This fixes a bug seen when doing a glDrawPixels(GL_STENCIL_INDEX) right
after a glClear().  The check-for-flush test was failing because we
didn't set the dirty_render_cache flag in softpipe_clear().  So we saw
stale data when we mapped the stencil buffer.

14 years agodocs: initial 7.5.2 release notes page
Brian Paul [Thu, 10 Sep 2009 18:50:08 +0000 (12:50 -0600)]
docs: initial 7.5.2 release notes page

14 years agointel: add B43 chipset support
Zhenyu Wang [Mon, 7 Sep 2009 08:18:57 +0000 (16:18 +0800)]
intel: add B43 chipset support

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Hopefully this will be one of the last cherry-picks.

(cherry picked from commit ca246dd186f9590f6d67038832faceb522138c20)

14 years agoscons: Set default_dri to no for Mac OS.
Vinson Lee [Wed, 9 Sep 2009 14:21:05 +0000 (08:21 -0600)]
scons: Set default_dri to no for Mac OS.

Mac OS does not have libdrm.

14 years agomesa: bump version to 7.5.2
Brian Paul [Tue, 8 Sep 2009 20:45:24 +0000 (14:45 -0600)]
mesa: bump version to 7.5.2

I'm not 100% sure there'll be a 7.5.2 release, but just in case.

14 years agoi965: fix incorrect test for vertex position attribute
Brian Paul [Tue, 8 Sep 2009 18:21:42 +0000 (12:21 -0600)]
i965: fix incorrect test for vertex position attribute

14 years agoegl: also use X types for building on Apple/MacOS X
Brian Paul [Tue, 8 Sep 2009 15:20:39 +0000 (09:20 -0600)]
egl: also use X types for building on Apple/MacOS X

See bug 20413.

14 years agoprog/glsl: fix Makefile for samplers_array.
Peter Hutterer [Mon, 7 Sep 2009 00:49:31 +0000 (10:49 +1000)]
prog/glsl: fix Makefile for samplers_array.

The rule added in 488b3c4d1bc3d830477180759a42dbaf8f5801b0 does not use the
right INCDIR, breaking the build when GL isn't installed in the default include
paths.

7.5 branch only fix, already fixed in master by rewriting the Makefile
(ceb9459ed5e63207defa5d715958c2757933272f)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoi965: Fix warnings in intel_pixel_read.c.
Eric Anholt [Mon, 22 Jun 2009 15:52:52 +0000 (08:52 -0700)]
i965: Fix warnings in intel_pixel_read.c.
(cherry picked from commit c80ce5ac90b1e0ac7a72cd41c314aa2000bfecf5)

14 years agointel: Also get the DRI2 front buffer when doing front buffer reading.
Eric Anholt [Sat, 20 Jun 2009 05:12:52 +0000 (22:12 -0700)]
intel: Also get the DRI2 front buffer when doing front buffer reading.
(cherry picked from commit df70d3049a396af3601d2a1747770635a74120bb)

14 years agointel: Update Mesa state before span setup in glReadPixels.
Eric Anholt [Sat, 20 Jun 2009 05:03:37 +0000 (22:03 -0700)]
intel: Update Mesa state before span setup in glReadPixels.

We could have mapped the wrong set of draw buffers.  Noticed while looking
into a DRI2 glean ReadPixels issue.
(cherry picked from commit afc981ee46791838f3cb83e11eb33938aa3efc83)

14 years agointel: Move intel_pixel_read.c to shared for use with i965.
Eric Anholt [Sat, 20 Jun 2009 04:43:22 +0000 (21:43 -0700)]
intel: Move intel_pixel_read.c to shared for use with i965.
(cherry picked from commit dcfe0d66bfff9a55741aee298b7ffb051a48f0d3)

14 years agoi965: Add missing state dependency of sf_unit on _NEW_BUFFERS.
Eric Anholt [Thu, 16 Jul 2009 22:57:22 +0000 (15:57 -0700)]
i965: Add missing state dependency of sf_unit on _NEW_BUFFERS.
(cherry picked from commit 99174e7630676307f618c252755a20ba61ad9158)

14 years agointel: Align cubemap texture height to its padding requirements.
Eric Anholt [Wed, 19 Aug 2009 01:48:54 +0000 (18:48 -0700)]
intel: Align cubemap texture height to its padding requirements.
(cherry picked from commit a70e1315846cd5e8d6f2b622821ff8262fe7179d)
(cherry picked from commit 29e51c3872531366570d032147abad50f8a3c1af)

14 years agointel: Align untiled region height to 2 according to 965 docs.
Eric Anholt [Sat, 8 Aug 2009 01:09:31 +0000 (18:09 -0700)]
intel: Align untiled region height to 2 according to 965 docs.

This may or may not be required pre-965, but it doesn't seem unlikely, and
I'd rather be safe.
(cherry picked from commit b053474378633249be0e9f24010650ffb816229a)

14 years agoi965: Fix source depth reg setting for FSes reading and writing to depth.
Eric Anholt [Thu, 6 Aug 2009 03:12:15 +0000 (20:12 -0700)]
i965: Fix source depth reg setting for FSes reading and writing to depth.

For some IZ setups, we'd forget to account for the source depth register
being present, so we'd both read the wrong reg, and write output depth to
the wrong reg.

Bug #22603.
(cherry picked from commit f44916414ecd2b888c8a680d56b7467ccdff6886)

14 years agoi965: Respect CondSwizzle in OPCODE_IF.
Eric Anholt [Wed, 5 Aug 2009 01:02:31 +0000 (18:02 -0700)]
i965: Respect CondSwizzle in OPCODE_IF.

Fixes piglit glsl-vs-if-bool and progs/glsl/twoside, and will likely be
useful for the looping code.

Bug #18992
(cherry picked from commit 78c022acd0b37bf8b32f04313d76255255e769c1)
(cherry picked from commit 63d7a2f53fb38e170f4e55f2b599e918edf2c512)

14 years agoi965: asst clean-ups, etc in brw_vs_emit()
Brian Paul [Thu, 18 Jun 2009 15:23:58 +0000 (09:23 -0600)]
i965: asst clean-ups, etc in brw_vs_emit()
(cherry picked from commit fd7d764514c540987549c3ea88a2d669b0f0ea58)

14 years agoi965: Emit conditional code updates as required for GLSL VS if statements.
Eric Anholt [Tue, 4 Aug 2009 21:13:27 +0000 (14:13 -0700)]
i965: Emit conditional code updates as required for GLSL VS if statements.

Previously, we'd be branching based on whatever condition code happened to be
laying around.
(cherry picked from commit 7007f8b352763af89805f287153cb7972bff0523)

14 years agoi965: Spell "conditional" correctly.
Eric Anholt [Tue, 4 Aug 2009 20:42:30 +0000 (13:42 -0700)]
i965: Spell "conditional" correctly.

14 years agoi965: Fix RECT shadow sampling by not losing the other texcoords.
Eric Anholt [Tue, 4 Aug 2009 19:39:22 +0000 (12:39 -0700)]
i965: Fix RECT shadow sampling by not losing the other texcoords.

Bug #20821
(cherry picked from commit 191e028de20b2f954621b652aa77b06d0e93652a)

14 years agoi965: Assert that the offset in the VBO is below the VBO size.
Eric Anholt [Tue, 4 Aug 2009 00:55:14 +0000 (17:55 -0700)]
i965: Assert that the offset in the VBO is below the VBO size.

This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec.  Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be.  This
gets us the 90% solution.

Bug #19911.
(cherry picked from commit d7430d942f6c7950a92367aeb13b80cf76ccad78)

14 years agoi965: Even if no VS inputs are set, still load some amount of URB as required.
Eric Anholt [Tue, 4 Aug 2009 00:12:43 +0000 (17:12 -0700)]
i965: Even if no VS inputs are set, still load some amount of URB as required.

See comment on Vertex URB Entry Read Length for VS_STATE.

This, combined with the previous three commits, fixes #22945.
(cherry picked from commit e340d4f9866db4bae391288e83a630a310b0dd2b)

14 years agoi965: Make sure the VS URB size is big enough to fit a VF VUE.
Eric Anholt [Mon, 3 Aug 2009 22:24:02 +0000 (15:24 -0700)]
i965: Make sure the VS URB size is big enough to fit a VF VUE.

This fix is just from code and docs inspection, but it may fix hangs on
some applications.

(cherry picked from commit e93848e595176ae0bad3bfe64e0ca63fd089bb72)

14 years agoi965: Don't emit bad packets when no VBs are referenced.
Eric Anholt [Thu, 30 Jul 2009 20:40:29 +0000 (13:40 -0700)]
i965: Don't emit bad packets when no VBs are referenced.

It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled.  We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.

Bug #22945 (wine with an uncompiled VS)
(cherry picked from commit d1fbfd0f962347e4153db3852292d44de5aea863)

14 years agoi965: Calculate enabled[] and nr_enabled once and re-use the values.
Eric Anholt [Mon, 3 Aug 2009 21:46:18 +0000 (14:46 -0700)]
i965: Calculate enabled[] and nr_enabled once and re-use the values.

The code duplication bothered me.
(cherry picked from commit 9b9cb30d128fc5f1ba77287696ecd508e640efde)

14 years agoi965: Set the max index buffer address correctly according to the docs.
Eric Anholt [Wed, 24 Jun 2009 02:30:25 +0000 (19:30 -0700)]
i965: Set the max index buffer address correctly according to the docs.

It's the last addressable byte, not the byte after the end of the buffer.
(cherry picked from commit b72dea5441e8e9226dabf1826fa3bc129c7bc281)

14 years agoi965: rename var: s/tmp/vs_inputs/
Brian Paul [Fri, 15 May 2009 15:14:24 +0000 (09:14 -0600)]
i965: rename var: s/tmp/vs_inputs/
(cherry picked from commit 840c09fc71542fdfc71edd2a2802925d467567bb)

14 years agodocs: 7.5.1 md5 sums
Brian Paul [Thu, 3 Sep 2009 21:49:10 +0000 (15:49 -0600)]
docs: 7.5.1 md5 sums

14 years agodocs: point to fd.o for downloads instead of SourceForge
Brian Paul [Thu, 3 Sep 2009 21:44:49 +0000 (15:44 -0600)]
docs: point to fd.o for downloads instead of SourceForge

14 years agogallium/xlib: silence unitialized var warning
Brian Paul [Thu, 3 Sep 2009 21:44:22 +0000 (15:44 -0600)]
gallium/xlib: silence unitialized var warning

14 years agogallium/xlib: silence uninitialized var warning
Brian Paul [Thu, 3 Sep 2009 21:23:15 +0000 (15:23 -0600)]
gallium/xlib: silence uninitialized var warning

14 years agost/mesa: silence uninitialized var warnings
Brian Paul [Thu, 3 Sep 2009 21:04:49 +0000 (15:04 -0600)]
st/mesa: silence uninitialized var warnings

14 years agodocs: prep for 7.5.1 release
Brian Paul [Thu, 3 Sep 2009 20:57:30 +0000 (14:57 -0600)]
docs: prep for 7.5.1 release

14 years agodocs: added news entry for 7.5.1
Brian Paul [Thu, 3 Sep 2009 20:57:16 +0000 (14:57 -0600)]
docs: added news entry for 7.5.1

14 years agodocs: update precompiled libs info
Brian Paul [Thu, 3 Sep 2009 20:57:04 +0000 (14:57 -0600)]
docs: update precompiled libs info

14 years agodocs: move SGI GLU link
Brian Paul [Thu, 3 Sep 2009 20:56:50 +0000 (14:56 -0600)]
docs: move SGI GLU link

14 years agost/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position
Brian Paul [Thu, 3 Sep 2009 20:39:53 +0000 (14:39 -0600)]
st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position

If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
position.

14 years agost/mesa: Do GL_RGBA->GL_RGB texsubimage on hardware
Keith Whitwell [Wed, 2 Sep 2009 17:30:11 +0000 (18:30 +0100)]
st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardware

State tracker currently backs GL_RGB textures with RGBA almost always.
This means we need to maintain A==1 in these textures to give correct GL_RGB
sampling results.

This change offloads the RGBA->RGB copy to hardware using the new writemask
version of u_blit_pixels.

More src/dstLogical/dstActual triples could be shifted to hardware by
this technique in future patches.

14 years agoutil: add version of u_blit_pixels which takes a writemask
Keith Whitwell [Wed, 2 Sep 2009 16:58:52 +0000 (17:58 +0100)]
util: add version of u_blit_pixels which takes a writemask

Values outside the writemask are set in the destination to {0,0,0,1}

14 years agodraw: remove unused variable
Keith Whitwell [Tue, 1 Sep 2009 10:11:28 +0000 (11:11 +0100)]
draw: remove unused variable

14 years agoprogs/tests: re-enable exit() call
Brian Paul [Tue, 1 Sep 2009 14:53:31 +0000 (08:53 -0600)]
progs/tests: re-enable exit() call

See bug 21267.

14 years agoswrast: fix selection/feedback regression
Brian Paul [Mon, 31 Aug 2009 23:54:46 +0000 (17:54 -0600)]
swrast: fix selection/feedback regression

This fixes a conform selection/feedback regression introduced by commit
8f4d66c5f893b49eb3973aa3b31a856314c045c7

14 years agoswrast: can't use deferred texture/shading if using KIL instruction
Brian Paul [Mon, 31 Aug 2009 19:28:31 +0000 (13:28 -0600)]
swrast: can't use deferred texture/shading if using KIL instruction

If the fragment program uses KIL, we have to execute it before z/stencil
testing.  Otherwise, deferred texture/shading lets us skip shading for
pixels that fail z/stencil testing.

14 years agomesa: added const qualifiers, move local var
Brian Paul [Mon, 31 Aug 2009 17:17:59 +0000 (11:17 -0600)]
mesa: added const qualifiers, move local var

14 years agomesa: fix saturation logic in emit_texenv()
Brian Paul [Mon, 31 Aug 2009 17:14:16 +0000 (11:14 -0600)]
mesa: fix saturation logic in emit_texenv()

We need to clamp/saturate after each texenv stage, not just the last one.
Fixes glean texEnv failure for softpipe (and probably other fragment program-
based drivers).

14 years agodocs: fixed glXCreateGLXPixmap() for direct rendering
Brian Paul [Mon, 31 Aug 2009 16:32:56 +0000 (10:32 -0600)]
docs: fixed glXCreateGLXPixmap() for direct rendering

14 years agodocs/: document cross-compile fix
Brian Paul [Mon, 31 Aug 2009 16:31:45 +0000 (10:31 -0600)]
docs/: document cross-compile fix

14 years agomesa: fix 32bit cross compilation on a 64bit machine
Marc Dietrich [Mon, 31 Aug 2009 15:56:33 +0000 (08:56 -0700)]
mesa: fix 32bit cross compilation on a 64bit machine

When cross compiling on a 64bit machine, gen_matypes.c is build
for the host machine (64bit) but must generates code for the target
machine (32bit). This causes wrong offsets all over the place and
crashes googleearth on my machine. Solution is to add -m32 when
cross compiling.

Attached patch is compatible with linux-x86-32 and autoconf based
builds.

14 years agoglx/x11: Fix glXCreateGLXPixmap for direct rendering.
Michel Dänzer [Sun, 30 Aug 2009 10:43:37 +0000 (12:43 +0200)]
glx/x11: Fix glXCreateGLXPixmap for direct rendering.

Fixes progs/xdemos/glxpixmap modified to use direct rendering.

14 years agoutil: Reset size to zero when failed to allocate buffer.
José Fonseca [Fri, 28 Aug 2009 11:52:16 +0000 (12:52 +0100)]
util: Reset size to zero when failed to allocate buffer.

14 years agodocs: fix selection/feedback culling bug
Brian Paul [Thu, 27 Aug 2009 22:50:44 +0000 (16:50 -0600)]
docs: fix selection/feedback culling bug

14 years agoswrast: fix incorrect tri culling in selection/feedback mode.
Brian Paul [Thu, 27 Aug 2009 22:50:03 +0000 (16:50 -0600)]
swrast: fix incorrect tri culling in selection/feedback mode.

See bug 16866.

14 years agomesa: direct program debug output to stderr instead of stdout
marvin24 [Thu, 27 Aug 2009 15:22:51 +0000 (09:22 -0600)]
mesa: direct program debug output to stderr instead of stdout

14 years agogallium/util: added support for SRGB formats
Brian Paul [Thu, 27 Aug 2009 15:10:34 +0000 (09:10 -0600)]
gallium/util: added support for SRGB formats

Fixes glean/texture_srgb failure, bug #23449.

14 years agogallium/util: added cases for SRGB formats
Brian Paul [Thu, 27 Aug 2009 15:09:56 +0000 (09:09 -0600)]
gallium/util: added cases for SRGB formats

14 years agoglsl: signal that the program needs to be re-translated when samplers change
Brian Paul [Wed, 26 Aug 2009 20:29:50 +0000 (14:29 -0600)]
glsl: signal that the program needs to be re-translated when samplers change

14 years agodocs: document sampler array bug fix
Brian Paul [Wed, 26 Aug 2009 18:04:35 +0000 (12:04 -0600)]
docs: document sampler array bug fix

14 years agoprogs/glsl: add special Makefile rule for samplers_array
Brian Paul [Wed, 26 Aug 2009 17:55:15 +0000 (11:55 -0600)]
progs/glsl: add special Makefile rule for samplers_array

14 years agoprogs/glsl: change samplers.c to better test sampler/texture indexing
Brian Paul [Wed, 26 Aug 2009 17:53:25 +0000 (11:53 -0600)]
progs/glsl: change samplers.c to better test sampler/texture indexing

Now the left half is yellow and the right half is red, with the gradients
going in opposite directions.

14 years agoglsl: fix bug in sampler array indexing
Brian Paul [Wed, 26 Aug 2009 17:39:24 +0000 (11:39 -0600)]
glsl: fix bug in sampler array indexing

Need to add the 'offset' parameter when indexing the parameter array.
Before, if we were setting arrays of samplers, we were actually only
setting the 0th sampler's value.

Because of how progs/glsl/samplers.c is constructed, this wasn't showing
up as a failure in the samplers_array output.

14 years agoARB prog: Set error instead of falling through with incorrect value
Brian Paul [Mon, 24 Aug 2009 19:56:01 +0000 (13:56 -0600)]
ARB prog: Set error instead of falling through with incorrect value

If a fragment program only parameter was queried of a vertex program
(e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and
a random value would be returned.  This caused 'glxinfo -l' to show
the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB.  This is confusing and incorrect.

(cherry picked from master, commit 4bccd693a72a0b42dffc849034263a68e779ca91)

14 years agodocs: recent 7.5.1 bug fixes
Brian Paul [Mon, 24 Aug 2009 19:02:33 +0000 (13:02 -0600)]
docs: recent 7.5.1 bug fixes

14 years agoxlib: fix single buffer window resize bug
Brian Paul [Mon, 24 Aug 2009 18:58:47 +0000 (12:58 -0600)]
xlib: fix single buffer window resize bug

When a single-buffered window was resized the new window size was never
detected.  This fix that, but there's still a bug which causes window
contents corruption for certain window sizes...

14 years agovbo: fix divide by zero exception
Brian Paul [Mon, 24 Aug 2009 18:43:57 +0000 (12:43 -0600)]
vbo: fix divide by zero exception

Fixes bug 23489.

14 years agoglsl: Silence gcc uninitialized variable warning.
Vinson Lee [Mon, 24 Aug 2009 17:43:02 +0000 (11:43 -0600)]
glsl: Silence gcc uninitialized variable warning.

14 years agost/mesa: flush bitmap cache if Z value changes
Brian Paul [Fri, 21 Aug 2009 16:24:50 +0000 (10:24 -0600)]
st/mesa: flush bitmap cache if Z value changes

When adding a new bitmap to the cache we have to check if the Z value is
changing and flush first if it is.

This is a modified version of a patch from Justin Dou <justin.dou@intel.com>

14 years agotgsi: check for SOA dependencies in SSE and PPC code generators
Brian Paul [Thu, 20 Aug 2009 16:34:45 +0000 (10:34 -0600)]
tgsi: check for SOA dependencies in SSE and PPC code generators

Fall back to interpreter for now.  This doesn't happen very often.

14 years agotgsi: handle SOA dependencies for MOV/SWZ
Brian Paul [Thu, 20 Aug 2009 16:28:22 +0000 (10:28 -0600)]
tgsi: handle SOA dependencies for MOV/SWZ

SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled.  For example:

MOV T, T.yxwz; would expand into:

  MOV t0, t1;
  MOV t1, t0;
  MOV t2, t3;
  MOV t3, t2;

The second instruction will produce the wrong result since we wrote to t0
in the first instruction.  We need to use an intermediate temporary to fix
this.

This will take more work to fix for all TGSI instructions.  This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.

Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.

14 years agotgsi: added tgsi_full_instruction::Flags field
Brian Paul [Thu, 20 Aug 2009 16:25:42 +0000 (10:25 -0600)]
tgsi: added tgsi_full_instruction::Flags field

Users of the parser can make use of this.

14 years agotgsi/ppc: we don't implement saturation modes yet
Brian Paul [Tue, 18 Aug 2009 23:50:43 +0000 (17:50 -0600)]
tgsi/ppc: we don't implement saturation modes yet

14 years agotgsi/sse: we don't implement saturation modes yet
Brian Paul [Tue, 18 Aug 2009 23:49:57 +0000 (17:49 -0600)]
tgsi/sse: we don't implement saturation modes yet

Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.

14 years agomesa: when emitting vertex program fog, set yzw=0,0,1
Brian Paul [Tue, 18 Aug 2009 23:39:55 +0000 (17:39 -0600)]
mesa: when emitting vertex program fog, set yzw=0,0,1

Fixes piglit fp-fog failure with gallium.

14 years agoprogs/demos: print more info in fbotexture.c
Brian Paul [Fri, 14 Aug 2009 20:15:18 +0000 (14:15 -0600)]
progs/demos: print more info in fbotexture.c

14 years agogallium: Always map for READ flag when DISCARD is not set.
José Fonseca [Fri, 14 Aug 2009 19:05:33 +0000 (20:05 +0100)]
gallium: Always map for READ flag when DISCARD is not set.

This prevents the driver from discarding a buffer when the whole buffer
is mapped for writing, but only a portion is effectively written.

This is a temporary fix, because WRITE shouldn't imply DISCARD.

The full fix implies using PIPE_BUFFER_USAGE_DISCARD, throughout
the code, and will go only into master.

14 years agotrace: Remove space next to the class attribute of the trace.
José Fonseca [Fri, 14 Aug 2009 17:47:56 +0000 (18:47 +0100)]
trace: Remove space next to the class attribute of the trace.

14 years agopython/retrace: Open bz2 files correctly.
José Fonseca [Sun, 31 May 2009 19:53:22 +0000 (12:53 -0700)]
python/retrace: Open bz2 files correctly.

14 years agodocs: docs: document new --with-max-width/height config options
Brian Paul [Fri, 14 Aug 2009 17:24:20 +0000 (11:24 -0600)]
docs: docs: document new --with-max-width/height config options