mesa.git
15 years agoMerge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa...
Stephane Marchesin [Thu, 13 Nov 2008 17:06:06 +0000 (18:06 +0100)]
Merge branch 'gallium-0.2' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa into gallium-0.2

15 years agogallium: add st_set_teximage_surface for EXT_texture_from_pixmap
Ben Skeggs [Thu, 13 Nov 2008 16:47:47 +0000 (16:47 +0000)]
gallium: add st_set_teximage_surface for EXT_texture_from_pixmap
support.

15 years agomesa: fix generation of fixed function state when no vp exists
Alan Hourihane [Thu, 13 Nov 2008 13:16:03 +0000 (13:16 +0000)]
mesa: fix generation of fixed function state when no vp exists

15 years agotgsi: More comments on source register indirect and 2D indexing.
Michal Krol [Wed, 12 Nov 2008 22:23:49 +0000 (23:23 +0100)]
tgsi: More comments on source register indirect and 2D indexing.

15 years agonv04..nv30: fix pipe_surface init
Pekka Paalanen [Wed, 12 Nov 2008 20:37:01 +0000 (22:37 +0200)]
nv04..nv30: fix pipe_surface init

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Pekka Paalanen [Wed, 12 Nov 2008 21:13:22 +0000 (23:13 +0200)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

* commit 'origin/gallium-0.1':
  Mesa: fix number of buffers in st_draw_vbo().
  Nouveau: fix nv20_vertex_layout()
  Nouveau: update nv20 miptree according to nv40.
  Nouveau: build, link and use nv20.
  Nouveau: name replace for nv20.
  Nouveau: Rename nv20/ files as nv20.
  Nouveau: copy nv30_vertprog.c to nv20.
  Nouveau: start nv20 by copying the nv10 tree.

15 years agoCELL: fix stencil test bugs
Robert Ellison [Wed, 12 Nov 2008 19:23:52 +0000 (12:23 -0700)]
CELL: fix stencil test bugs

Fixed a boneheaded error in the generation of SPU code that calculates
the results of the stencil test.  Basically, all the greater than/less than
calculations were exactly inverted: they were coded as though the
given comparison took the stencil value as a left-hand operand and the
reference value as a right-hand operand, but the actual semantics always
put the reference as the left-hand operand and the stencil as the right-hand
operand.

With this fix, tests/dinoshade runs, as do all the other Mesa tests
and samples that use stencil (and that don't use texture formats
unsupported by Cell).

15 years agogallium: add missing prototypes
Brian Paul [Wed, 12 Nov 2008 18:09:12 +0000 (11:09 -0700)]
gallium: add missing prototypes

15 years agocell: move semicolons to silence warnings w/ other compilers
Brian Paul [Wed, 12 Nov 2008 18:05:34 +0000 (11:05 -0700)]
cell: move semicolons to silence warnings w/ other compilers

15 years agocell: include cell_surface.h
Brian Paul [Wed, 12 Nov 2008 18:04:17 +0000 (11:04 -0700)]
cell: include cell_surface.h

15 years agocell: fix typo in EMIT_ macro
Brian Paul [Wed, 12 Nov 2008 18:01:40 +0000 (11:01 -0700)]
cell: fix typo in EMIT_ macro

15 years agocell: added -Wmissing-prototypes
Brian Paul [Wed, 12 Nov 2008 18:01:05 +0000 (11:01 -0700)]
cell: added -Wmissing-prototypes

15 years agocell: include cell_pipe_state.h
Brian Paul [Wed, 12 Nov 2008 18:00:41 +0000 (11:00 -0700)]
cell: include cell_pipe_state.h

15 years agoutil: Optimise log2().
Michal Krol [Wed, 12 Nov 2008 18:01:46 +0000 (19:01 +0100)]
util: Optimise log2().

15 years agortasm: Use INLINE keyword. Compile for all platforms, not only GALLIUM_CELL.
Michal Krol [Wed, 12 Nov 2008 17:44:20 +0000 (18:44 +0100)]
rtasm: Use INLINE keyword. Compile for all platforms, not only GALLIUM_CELL.

15 years agoutil: Add log2() definition for MSC.
Michal Krol [Wed, 12 Nov 2008 16:14:07 +0000 (17:14 +0100)]
util: Add log2() definition for MSC.

15 years agotgsi: Fix a bug with saving/restoring xmm registers upon func call.
Michal Krol [Wed, 12 Nov 2008 17:19:20 +0000 (18:19 +0100)]
tgsi: Fix a bug with saving/restoring xmm registers upon func call.

15 years agortasm: Compile only for GALLIUM_CELL.
Michal Krol [Wed, 12 Nov 2008 17:13:58 +0000 (18:13 +0100)]
rtasm: Compile only for GALLIUM_CELL.

15 years agodraw: Add missing include.
Michal Krol [Wed, 12 Nov 2008 16:03:58 +0000 (17:03 +0100)]
draw: Add missing include.

15 years agoMerge commit 'origin/master' into gallium-0.2
Brian Paul [Tue, 11 Nov 2008 21:42:41 +0000 (14:42 -0700)]
Merge commit 'origin/master' into gallium-0.2

Conflicts:

src/mesa/shader/prog_execute.c
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h

15 years agomesa: fix version check in dinoshade.c
Brian Paul [Tue, 11 Nov 2008 21:33:11 +0000 (14:33 -0700)]
mesa: fix version check in dinoshade.c

15 years agomesa: allow relative indexing into all register files and indirect dst register indexing
Brian Paul [Tue, 11 Nov 2008 17:47:10 +0000 (10:47 -0700)]
mesa: allow relative indexing into all register files and indirect dst register indexing

15 years agocell: implement NRM3 opcode
Brian Paul [Tue, 11 Nov 2008 16:19:18 +0000 (09:19 -0700)]
cell: implement NRM3 opcode

15 years agoCELL: two-sided stencil fixes
Robert Ellison [Tue, 11 Nov 2008 20:57:10 +0000 (13:57 -0700)]
CELL: two-sided stencil fixes

With these changes, the tests/stencil_twoside test now works.

- Eliminate blending from the stencil_twoside test, as it produces an
  unneeded dependency on having blending working

- The spe_splat() function will now work if the register being splatted
  and the destination register are the same

- Separate fragment code generated for front-facing and back-facing
  fragments.  Often these are the same; if two-sided stenciling is on,
  they can be different.  This is easier and faster than generating
  code that does both tests and merges the results.

- Fixed a cut/paste bug where if the back Z-pass stencil operation
  were different from all the other operations, the back Z-fail
  results were incorrect.

15 years agoDon't mess with emacs tab width.
Kristian Høgsberg [Tue, 11 Nov 2008 18:39:52 +0000 (13:39 -0500)]
Don't mess with emacs tab width.

15 years agointel: reset cliprect_mode to IGNORE_CLIPRECTS.
Xiang, Haihao [Tue, 11 Nov 2008 05:42:13 +0000 (13:42 +0800)]
intel: reset cliprect_mode to IGNORE_CLIPRECTS.

This ensures all batchbuffers have a same cliprect mode after calling
_intel_batchbuffer_flush even if there aren't invalid commands in the
current batch buffer. (fix bug#18362).

15 years agomesa: restore the negate flag of dots in build_lighting.
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.

15 years agomesa: update new state for RasterPos like other operations.
Xiang, Haihao [Tue, 11 Nov 2008 05:16:20 +0000 (13:16 +0800)]
mesa: update new state for RasterPos like other operations.

This fixes a lighting issue when drawing a bitmap.

15 years agomesa: new _mesa_is_pow_two() function
Brian [Tue, 11 Nov 2008 03:15:28 +0000 (20:15 -0700)]
mesa: new _mesa_is_pow_two() function

15 years agomesa: restore glapi/ prefix on #include
Brian Paul [Mon, 10 Nov 2008 23:38:47 +0000 (16:38 -0700)]
mesa: restore glapi/ prefix on #include

15 years agomesa: fix some misc breakage caused by editing auto-generated files rather than the...
Brian Paul [Mon, 10 Nov 2008 21:42:02 +0000 (14:42 -0700)]
mesa: fix some misc breakage caused by editing auto-generated files rather than the python generators

Specifically:
  #include "glapitable.h" in src/mesa/main/glapi/dispatch.h
  Call _mesa_bsearch() in src/mesa/main/enums.c.

15 years agoGLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()
Brian Paul [Mon, 10 Nov 2008 21:27:42 +0000 (14:27 -0700)]
GLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()

See bug 18445.
When getting array results, __glXReadReply() always reads a multiple of
four bytes.  This can cause writing to invalid memory when 'n' is not a
multiple of four.

Special-case the glAreTexturesResident() functions now.
To fix the bug, we use a temporary buffer that's a multiple of four bytes
in length.

NOTE: this commit also reverts part of commit 919ec22ecf72aa163e1b97d8c7381002131ed32c
(glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protection) which
directly edited the indirect.c file rather than the python generator!
I'm not repairing that issue at this time.

15 years agodri: alloc __DRIscreen object with calloc()
Brian Paul [Mon, 10 Nov 2008 19:37:08 +0000 (12:37 -0700)]
dri: alloc __DRIscreen object with calloc()

15 years agomesa: track initialization status of uniform variables. Plus, asst clean-ups.
Brian Paul [Mon, 10 Nov 2008 19:33:17 +0000 (12:33 -0700)]
mesa: track initialization status of uniform variables.  Plus, asst clean-ups.

15 years agomesa: initial support for uniform variable initializers.
Brian Paul [Mon, 10 Nov 2008 18:42:42 +0000 (11:42 -0700)]
mesa: initial support for uniform variable initializers.

This lets one specify initial values for uniforms in the code, avoiding
the need to call glUniform() in some cases.

15 years agomesa: fix logic error in GLSL linker when looking for main() shaders
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

15 years agomesa: allows 'f' suffix on GLSL float literals
Brian Paul [Mon, 10 Nov 2008 17:25:01 +0000 (10:25 -0700)]
mesa: allows 'f' suffix on GLSL float literals

15 years agoundo accidental changes to multitex.frag shader
Brian Paul [Mon, 10 Nov 2008 17:21:13 +0000 (10:21 -0700)]
undo accidental changes to multitex.frag shader

15 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Brian Paul [Mon, 10 Nov 2008 18:19:30 +0000 (11:19 -0700)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

Conflicts:

src/gallium/auxiliary/util/u_math.c

15 years agoMesa: fix number of buffers in st_draw_vbo().
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>
15 years agogallium: fix typos in comments
Brian Paul [Mon, 10 Nov 2008 15:24:45 +0000 (08:24 -0700)]
gallium: fix typos in comments

15 years agogallium: actually flip the coordinates
Zack Rusin [Thu, 6 Nov 2008 21:07:28 +0000 (16:07 -0500)]
gallium: actually flip the coordinates

15 years agonouveau: remove previous hack around x86_64 breakage
Ben Skeggs [Mon, 10 Nov 2008 05:33:31 +0000 (16:33 +1100)]
nouveau: remove previous hack around x86_64 breakage

This hack now causes breakage *doh*. :)

15 years agonv40: init pipe_surface correctly
Ben Skeggs [Mon, 10 Nov 2008 05:12:28 +0000 (16:12 +1100)]
nv40: init pipe_surface correctly

15 years agonouveau: pass object handle not pointer to GPU...
Ben Skeggs [Mon, 10 Nov 2008 04:58:03 +0000 (15:58 +1100)]
nouveau: pass object handle not pointer to GPU...

15 years agoMerge remote branch 'origin/gallium-0.2' into gallium-0.2
Ben Skeggs [Mon, 10 Nov 2008 04:53:51 +0000 (15:53 +1100)]
Merge remote branch 'origin/gallium-0.2' into gallium-0.2

15 years agoutil: Fix util_fast_pow/exp2/log2.
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

15 years agogallium: _debug_vprintf() should be silent if DEBUG is not defined
Brian [Sun, 9 Nov 2008 03:43:38 +0000 (20:43 -0700)]
gallium: _debug_vprintf() should be silent if DEBUG is not defined

15 years agogallium: use PIPE_ARCH_SSE to protect use of SSE instrinsics only
Brian [Sun, 9 Nov 2008 16:36:22 +0000 (09:36 -0700)]
gallium: use PIPE_ARCH_SSE to protect use of SSE instrinsics only

This allows us to use SSE codegen with debug builds again.
When PIPE_ARCH_SSE is set (w/ gcc -msse -msse2) we will also use the
gcc SSE intrinsic functions.

15 years agoMesa: fix number of buffers in st_draw_vbo().
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>
15 years agoNouveau: fix nv20_vertex_layout()
Pekka Paalanen [Sat, 8 Nov 2008 22:58:19 +0000 (00:58 +0200)]
Nouveau: fix nv20_vertex_layout()

The function should update nv20->vertex_info, and not just a
local struct that's thrown away immediately.

Fixes a SIGFPE due to vbuf->vertex_size = 0 in vbuf_alloc_vertices().

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agomesa: remove OPCODE_INT #define
Brian [Sat, 8 Nov 2008 17:33:30 +0000 (10:33 -0700)]
mesa: remove OPCODE_INT #define

15 years agogallium: implement SSE codegen for TGSI_OPCODE_NRM/NRM4
Brian [Sat, 8 Nov 2008 17:29:23 +0000 (10:29 -0700)]
gallium: implement SSE codegen for TGSI_OPCODE_NRM/NRM4

15 years agomesa: use NRM3 in emit_normalize_vec3() when drivers are ready
Brian [Sat, 8 Nov 2008 17:29:03 +0000 (10:29 -0700)]
mesa: use NRM3 in emit_normalize_vec3() when drivers are ready

15 years agoNouveau: update nv20 miptree according to nv40.
Pekka Paalanen [Sat, 8 Nov 2008 17:07:04 +0000 (19:07 +0200)]
Nouveau: update nv20 miptree according to nv40.

glxinfo doesn't degfault anymore.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoNouveau: build, link and use nv20.
Pekka Paalanen [Sat, 8 Nov 2008 16:32:33 +0000 (18:32 +0200)]
Nouveau: build, link and use nv20.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoNouveau: name replace for nv20.
Pekka Paalanen [Sat, 8 Nov 2008 16:04:33 +0000 (18:04 +0200)]
Nouveau: name replace for nv20.

No functional changes, only changed function, struct, macro etc. names.
nv10 -> nv20
nv30 -> nv20
celsius -> kelvin
Did not touch fifo command macros.

Don't try to build nv20_vertprog.c for now.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoNouveau: Rename nv20/ files as nv20.
Pekka Paalanen [Sat, 8 Nov 2008 15:20:19 +0000 (17:20 +0200)]
Nouveau: Rename nv20/ files as nv20.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoNouveau: copy nv30_vertprog.c to nv20.
Pekka Paalanen [Sat, 8 Nov 2008 15:09:16 +0000 (17:09 +0200)]
Nouveau: copy nv30_vertprog.c to nv20.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoNouveau: start nv20 by copying the nv10 tree.
Pekka Paalanen [Sat, 8 Nov 2008 15:04:45 +0000 (17:04 +0200)]
Nouveau: start nv20 by copying the nv10 tree.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agomesa: add support for 'centroid' qualifier in GLSL 1.20
Brian Paul [Fri, 7 Nov 2008 23:08:21 +0000 (16:08 -0700)]
mesa: add support for 'centroid' qualifier in GLSL 1.20

15 years agomesa: add support for 'invariant' keyword for GLSL 1.20
Brian Paul [Fri, 7 Nov 2008 22:51:10 +0000 (15:51 -0700)]
mesa: add support for 'invariant' keyword for GLSL 1.20

15 years agomesa: reformat comments, rewrap lines, etc for a little better readability
Brian Paul [Fri, 7 Nov 2008 21:28:00 +0000 (14:28 -0700)]
mesa: reformat comments, rewrap lines, etc for a little better readability

15 years agogallium: added SSE for DP2, DP2A
Brian Paul [Fri, 7 Nov 2008 20:03:07 +0000 (13:03 -0700)]
gallium: added SSE for DP2, DP2A

15 years agogallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4
Brian Paul [Fri, 7 Nov 2008 20:02:43 +0000 (13:02 -0700)]
gallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4

15 years agoMerge commit 'origin/master' into gallium-0.2
Brian Paul [Fri, 7 Nov 2008 20:02:07 +0000 (13:02 -0700)]
Merge commit 'origin/master' into gallium-0.2

15 years agomesa: forgot sqrt in NRM3/4 instructions
Brian Paul [Fri, 7 Nov 2008 19:59:36 +0000 (12:59 -0700)]
mesa: forgot sqrt in NRM3/4 instructions

15 years agomesa: fix opcode table order bug
Brian Paul [Fri, 7 Nov 2008 19:59:08 +0000 (12:59 -0700)]
mesa: fix opcode table order bug

15 years agoCELL: fix several stencil problems
Robert Ellison [Fri, 7 Nov 2008 18:29:07 +0000 (11:29 -0700)]
CELL: fix several stencil problems

This small set of changes repairs several different stenciling problems;
now redbook/stencil also runs correctly (and maybe others - I haven't
checked everything yet).

- The number of instructions that had been allocated for fragment ops
  used to be 64 (in cell/common.h).  With complicated stencil use, we
  managed to get up to 93, which caused a segfault before we noticed
  we'd overran our memory buffer.  It's now been bumped to 128,
  which should be enough for even complicated stencil and fragment op
  usage.

- The status of cell surfaces never changed beyond the initial
  PIPE_SURFACE_STATUS_UNDEFINED.  When a user called glClear()
  to clear just the Z buffer (but not the stencil buffer), this caused
  the check_clear_depth_with_quad() function to return false (because
  the surface status was believed to be undefined), and so the device
  was instructed to clear the whole buffer (including the stencil buffer),
  instead of correctly using a quad to clear just the depth, leaving the
  stencil alone.

  This has been fixed similarly to the way the i915 driver handles
  the surface status: during cell_clear_surface(), the status is
  set to PIPE_SURFACE_STATUS_DEFINED.  Then a partial buffer clear is
  handled with a quad, as expected.  Note that we are *not* using
  PIPE_SURFACE_STATUS_CLEAR (also similar to the i915); technically,
  we should be setting the surface status to CLEAR on a clear, and
  to DEFINED when we actually draw something (say on cell_vbuf_draw()),
  but it's difficult to figure out exactly which surfaces are affected
  by a cell_vbuf_draw(), so for now we're doing the easy thing.

- The fragment ops handling was very clever about only pulling out the
  parts of the Z/stencil buffer that it needed for calculations;
  but this failed when only part of the buffer was written, because
  the part that was never pulled out was inadvertently cleared.

  Now all the data from the combined Z/stencil buffer is pulled out,
  just so the proper values can be recombined later and written back
  to the buffer correctly.  As a bonus, the fragment op code generation
  is simplified.

15 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Brian Paul [Fri, 7 Nov 2008 17:24:22 +0000 (10:24 -0700)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

15 years agomesa: use _bfc0 instead of _col0 when building back face lighting.
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

15 years agogallium: translate DP2, DP2A, NRM3, NRM4, SSG opcodes
Brian Paul [Fri, 7 Nov 2008 17:20:05 +0000 (10:20 -0700)]
gallium: translate DP2, DP2A, NRM3, NRM4, SSG opcodes

15 years agoMerge commit 'origin/master' into gallium-0.2
Brian Paul [Fri, 7 Nov 2008 17:17:31 +0000 (10:17 -0700)]
Merge commit 'origin/master' into gallium-0.2

15 years agomesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually emitted yet...
Brian Paul [Fri, 7 Nov 2008 16:49:26 +0000 (09:49 -0700)]
mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually emitted yet though)

15 years agomesa: added DP2, DP2A instructions
Brian Paul [Fri, 7 Nov 2008 16:41:00 +0000 (09:41 -0700)]
mesa: added DP2, DP2A instructions

15 years agomesa: added AND/OR/NOT/XOR instructions
Brian Paul [Fri, 7 Nov 2008 16:33:55 +0000 (09:33 -0700)]
mesa: added AND/OR/NOT/XOR instructions

15 years agomesa: include shader/prog_instruction.h
Brian Paul [Fri, 7 Nov 2008 16:06:09 +0000 (09:06 -0700)]
mesa: include shader/prog_instruction.h

Seems to fix a mysteriously missing build dependency.

15 years agomesa: added OPCODE_NRM3/NRM4 instructions for vector normalization.
Brian Paul [Fri, 7 Nov 2008 15:51:31 +0000 (08:51 -0700)]
mesa: added OPCODE_NRM3/NRM4 instructions for vector normalization.

We may emit these instructions from GLSL instead of DP3/RCP/MUL.

Also, implement SSG (set sign) instruction in the interpreter.

15 years agomesa: use _bfc0 instead of _col0 when building back face lighting.
Xiang, Haihao [Fri, 7 Nov 2008 06:58:04 +0000 (14:58 +0800)]
mesa: use _bfc0 instead of _col0 when building back face lighting.

15 years agogallium: implement TGSI_OPCODE_NRM/NRM4 in tgsi_exec.c
Brian [Fri, 7 Nov 2008 02:24:47 +0000 (19:24 -0700)]
gallium: implement TGSI_OPCODE_NRM/NRM4 in tgsi_exec.c

15 years agogallium: s/OPCODE_INT/OPCODE_TRUNC/
Brian Paul [Fri, 7 Nov 2008 00:19:54 +0000 (17:19 -0700)]
gallium: s/OPCODE_INT/OPCODE_TRUNC/

15 years agoMerge commit 'origin/master' into gallium-0.2
Brian Paul [Fri, 7 Nov 2008 00:17:13 +0000 (17:17 -0700)]
Merge commit 'origin/master' into gallium-0.2

15 years agomesa: rename OPCODE_INT -> OPCODE_TRUNC
Brian Paul [Fri, 7 Nov 2008 00:14:33 +0000 (17:14 -0700)]
mesa: rename OPCODE_INT -> OPCODE_TRUNC

Trunc is a more accurate description; there's no type conversion involved.

15 years agomesa: update the shader programs->TexturesUsed array at link time
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.

15 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Brian Paul [Thu, 6 Nov 2008 22:07:11 +0000 (15:07 -0700)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

15 years agomesa: update the shader programs->TexturesUsed array at link time
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.

15 years agogallium: added st_print_shaders() function to help w/ debugging
Brian Paul [Thu, 6 Nov 2008 22:00:01 +0000 (15:00 -0700)]
gallium: added st_print_shaders() function to help w/ debugging

15 years agogallium: debug code to print vertex array data (disabled)
Brian Paul [Thu, 6 Nov 2008 21:57:20 +0000 (14:57 -0700)]
gallium: debug code to print vertex array data (disabled)

15 years agosoftpipe: debug code (disabled)
Brian Paul [Thu, 6 Nov 2008 21:56:59 +0000 (14:56 -0700)]
softpipe: debug code (disabled)

15 years agogallium: actually flip the coordinates
Zack Rusin [Thu, 6 Nov 2008 21:07:28 +0000 (16:07 -0500)]
gallium: actually flip the coordinates

15 years agoi965: Always check vertex program.
Xiang, Haihao [Thu, 6 Nov 2008 07:25:55 +0000 (15:25 +0800)]
i965: Always check vertex program.

Now i965 also uses the vertex program created by Mesa Core, but this vertex program
is not only depend on mesa state _NEW_PROGRAM, so always check the current vertex
program is updated or not. This fixes broken demo cubemap.

15 years agogallium: check execution mask in indirect register loads
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).

15 years agogallium: don't range check tgsi register index for indirect accesses
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.

15 years agoi965: Implement missing OPCODE_NOISE3 instruction in fragment shaders.
Gary Wong [Thu, 6 Nov 2008 01:35:19 +0000 (20:35 -0500)]
i965: Implement missing OPCODE_NOISE3 instruction in fragment shaders.

OPCODE_NOISE4 coming later.

15 years agocell: minor reformatting, var renaming
Brian Paul [Thu, 6 Nov 2008 00:20:35 +0000 (17:20 -0700)]
cell: minor reformatting, var renaming

15 years agouse APP_CC, not CC for skinning demo
Brian Paul [Thu, 6 Nov 2008 00:14:23 +0000 (17:14 -0700)]
use APP_CC, not CC for skinning demo

15 years agogallium: s/mmDestroy/u_mmDestroy/
Brian Paul [Thu, 6 Nov 2008 00:14:00 +0000 (17:14 -0700)]
gallium: s/mmDestroy/u_mmDestroy/

15 years agomesa: Fix compiler warnings on Windows.
Brian Paul [Wed, 5 Nov 2008 23:04:40 +0000 (16:04 -0700)]
mesa: Fix compiler warnings on Windows.

cherry-picked subset of a77976d2ee578d0483c64f2aa41719bbae9c1c97

15 years agomesa: fix a GLSL array indexing codegen bug
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.

15 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Brian Paul [Wed, 5 Nov 2008 22:58:09 +0000 (15:58 -0700)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

Conflicts:

src/gallium/auxiliary/rtasm/rtasm_execmem.c
src/mesa/shader/slang/slang_emit.c
src/mesa/shader/slang/slang_log.c
src/mesa/state_tracker/st_atom_framebuffer.c