Commit Graph

23278 Commits

Author SHA1 Message Date
Brian Paul fcf0804c05 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.
2009-08-31 13:28:31 -06:00
Brian Paul 9f36473a8e mesa: added const qualifiers, move local var 2009-08-31 11:17:59 -06:00
Brian Paul 2241665dc6 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).
2009-08-31 11:14:16 -06:00
Brian Paul 6bf86681f5 docs: fixed glXCreateGLXPixmap() for direct rendering 2009-08-31 10:32:56 -06:00
Brian Paul f7654faf16 docs/: document cross-compile fix 2009-08-31 10:32:14 -06:00
Marc Dietrich a48ee529a2 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.
2009-08-31 10:32:14 -06:00
Michel Dänzer edb1178798 glx/x11: Fix glXCreateGLXPixmap for direct rendering.
Fixes progs/xdemos/glxpixmap modified to use direct rendering.
2009-08-30 12:53:00 +02:00
José Fonseca 9399b9a0e2 util: Reset size to zero when failed to allocate buffer. 2009-08-28 12:52:31 +01:00
Brian Paul 0d7bed9f89 docs: fix selection/feedback culling bug 2009-08-27 16:50:44 -06:00
Brian Paul 8f4d66c5f8 swrast: fix incorrect tri culling in selection/feedback mode.
See bug 16866.
2009-08-27 16:50:03 -06:00
marvin24 43a064e06d mesa: direct program debug output to stderr instead of stdout 2009-08-27 09:22:51 -06:00
Brian Paul 32f95f8c17 gallium/util: added support for SRGB formats
Fixes glean/texture_srgb failure, bug #23449.
2009-08-27 09:10:38 -06:00
Brian Paul f8ae968d28 gallium/util: added cases for SRGB formats 2009-08-27 09:09:56 -06:00
Brian Paul babb5ba9a9 glsl: signal that the program needs to be re-translated when samplers change 2009-08-26 14:29:50 -06:00
Brian Paul d09d03aa42 docs: document sampler array bug fix 2009-08-26 12:04:35 -06:00
Brian Paul 488b3c4d1b progs/glsl: add special Makefile rule for samplers_array 2009-08-26 11:55:15 -06:00
Brian Paul f6d34c2058 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.
2009-08-26 11:53:25 -06:00
Brian Paul 04d170794a 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.
2009-08-26 11:39:31 -06:00
Brian Paul bf7e4b10cb 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 4bccd693a7)
2009-08-24 13:56:01 -06:00
Brian Paul 96f7b42242 docs: recent 7.5.1 bug fixes 2009-08-24 13:02:33 -06:00
Brian Paul b5ecbbe636 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...
2009-08-24 12:58:49 -06:00
Brian Paul b9b04872d5 vbo: fix divide by zero exception
Fixes bug 23489.
2009-08-24 12:44:00 -06:00
Vinson Lee f785b35b47 glsl: Silence gcc uninitialized variable warning. 2009-08-24 11:43:02 -06:00
Brian Paul 1aba1baa62 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>
2009-08-21 10:24:50 -06:00
Brian Paul ce723d8d8b tgsi: check for SOA dependencies in SSE and PPC code generators
Fall back to interpreter for now.  This doesn't happen very often.
2009-08-20 10:34:45 -06:00
Brian Paul 4c7c294fff 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.
2009-08-20 10:28:22 -06:00
Brian Paul 5e6d21afa4 tgsi: added tgsi_full_instruction::Flags field
Users of the parser can make use of this.
2009-08-20 10:25:55 -06:00
Brian Paul 3097d7dbf8 tgsi/ppc: we don't implement saturation modes yet 2009-08-18 17:50:52 -06:00
Brian Paul fab17c1216 tgsi/sse: we don't implement saturation modes yet
Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.
2009-08-18 17:50:00 -06:00
Brian Paul ee0984e299 mesa: when emitting vertex program fog, set yzw=0,0,1
Fixes piglit fp-fog failure with gallium.
2009-08-18 17:39:55 -06:00
Brian Paul e8957f4800 progs/demos: print more info in fbotexture.c 2009-08-14 17:30:32 -06:00
José Fonseca e3bc1fb6bc 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.
2009-08-14 20:05:51 +01:00
José Fonseca 10430f47a4 trace: Remove space next to the class attribute of the trace. 2009-08-14 20:05:51 +01:00
José Fonseca cdf56eb68d python/retrace: Open bz2 files correctly. 2009-08-14 20:05:51 +01:00
Brian Paul 1574b05189 docs: docs: document new --with-max-width/height config options 2009-08-14 11:24:20 -06:00
Brian Paul a7ca80ff6a Add a FAQ about internal buffer sizes.
(cherry picked from master, commit 9a8781bd24)
2009-08-14 11:23:18 -06:00
Brian Paul 467b3d9a6f Add configure options for MAX_WIDTH/HEIGHT.
This adds two --with configure options for setting defines for
MAX_WIDTH and MAX_HEIGHT.  It's conceivably just as easy to define
these in CFLAGS manually, but this way users don't need to know
about internal Mesa details.

Patch updated by BrianP to set DEFINES, not CFLAGS.

(cherry picked from master, commit 7085dce750)
2009-08-14 11:23:00 -06:00
Brian Paul e691b0e533 Allow external settings of MAX_WIDTH/HEIGHT.
Conditionalize MAX_WIDTH / MAX_HEIGHT defines so that users can
set them via CFLAGS.

(cherry picked from master, commit 66bc17e80e)
2009-08-14 11:22:37 -06:00
Brian Paul 3ffaa11f88 mesa: move assertions in test_attachment_completeness()
Put the assertions after the error checks.
2009-08-14 10:30:10 -06:00
Brian Paul 1e0f621b50 mesa: fix some invalid memory reads
We were passing the address of a float to functions that would deref the
pointer as an array.
2009-08-13 14:38:27 -06:00
Brian Paul 6d55fd705d progs/tests: hack a PBO/dlist test 2009-08-13 14:07:25 -06:00
Brian Paul ecb177eaea mesa: fix warnings about locals hiding function params 2009-08-13 14:05:52 -06:00
Brian Paul 36df6a6e91 mesa: add missing PBO mapping code in unpack_image() 2009-08-13 14:00:21 -06:00
Brian Paul ad8a6937ae main: fix some potential memory leaks
Allocate dlist images after error checking.
Record GL_OUT_OF_MEMORY when we can't make a copy of an image.
2009-08-13 13:48:36 -06:00
Brian Paul f418d18ea6 mesa: fix some potential uninitialized memory references 2009-08-13 13:44:31 -06:00
Brian Paul a531a5cf94 glsl: fix some uninitialized pointers 2009-08-13 13:44:01 -06:00
Keith Whitwell 1ce3f5a806 draw: cope with more primitives in draw_pipeline_run
This previously was used only for decomposed (POINT/LINE/TRI) primitives,
but for some time a full range of primitives could end up in here.

Fixes trivial/lineloop-clip on softpipe, among others.
(cherry picked from commit 87cd8a3b8a2407b30916be418ff2f95dfea5d2ad)
2009-08-13 15:56:17 +01:00
Pauli Nieminen d80b36f64f dri: Fix problems with unitialized values in dri screen object.
This fixes crash in r200 KMS driver when pSAREA was set to 1 randomly because of memory wasn't cleared.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-07 11:24:47 -06:00
Brian Paul 9676ed27fe util: fix incorrect assertion
Check that the dest surface/format is renderable.
2009-08-06 14:58:06 -06:00
Brian Paul 98f00e8eb9 util: include u_surface.h, added comment 2009-08-06 14:54:25 -06:00