Commit graph

115447 commits

Author SHA1 Message Date
Eric Anholt
d01c44aaca mesa: Clip copytexsubimage to read framebuffer bounds, not scissor region. 2008-12-18 18:32:07 -08:00
Eric Anholt
aa09e0a1d5 mesa: Correct _mesa_clip_to_region() off-by-one.
Note how if:
x + width == xmax + 0: width -= 0
x + width == xmax + 1: width -= 0
x + width == xmax + 2: width -= 1

So, the function was clipping to [xmin, xmax+1), not [xmin, xmax) like it was
supposed to.  Same for ymax.
2008-12-18 18:32:07 -08:00
Brian Paul
59a168d5c9 tgsi: scan for additional info: uses_fogcoord, uses_frontfacing 2008-12-18 18:08:32 -07:00
Brian Paul
db99ca3bc9 tgsi: scan for additional info: uses_fogcoord, uses_frontfacing 2008-12-18 18:06:38 -07:00
Brian Paul
78a204f507 gallium: fix two-sided lighting test in state tracker
This fixes two-sided lighting for vertex shaders.
2008-12-18 16:12:08 -07:00
Brian Paul
52406c80d6 gallium: fix two-sided lighting test in state tracker
This fixes two-sided lighting for vertex shaders.
2008-12-18 16:00:20 -07:00
Michal Krol
a795e79f87 glsl: Fix handling of nested parens in macro actual arguments. 2008-12-18 14:17:06 -07:00
Brian Paul
6c14bdc72f demos: all glutDestroyWindow() upon exit to test query object clean-up 2008-12-18 14:17:06 -07:00
Xiang, Haihao
8b0b881438 i915: check WRAP_T instead of WRAP_R for cube map texture. 2008-12-18 14:17:06 -07:00
Xiang, Haihao
36920a24d6 i915: fix abort issue. (bug #19147) 2008-12-18 14:17:06 -07:00
Brian Paul
60410fc858 mesa: remove unneeded _mesa_reference_fragprog() call
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
2008-12-18 14:17:06 -07:00
Jon Turney
867705b8c5 dri: fix for Cygwin compilation, bug 19144 2008-12-18 14:17:06 -07:00
Brian Paul
9585f8daef mesa: updated comments 2008-12-18 14:17:06 -07:00
Brian Paul
bde3b3a164 demos: add test of vertex-only and fragment-only shader programs 2008-12-18 14:17:06 -07:00
Brian Paul
7d41f10605 util: check for frag/vertShader=0 before attaching 2008-12-18 14:17:06 -07:00
Jerome Glisse
26b5e92c30 softpipe: initialize refcount and winsys 2008-12-18 19:56:45 +01:00
Robert Ellison
36c7bb697d Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda, incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().

      /* If do_flip, invert src_y position and pass negative src stride
*/
      pipe_copy_rect(dst_map,
                     &dst->block,
                     dst->stride,
                     dst_x, dst_y,
                     w, h,
                     src_map,
                     do_flip ? -(int) src->stride : src->stride,
                     src_x,
                     do_flip ? w - src_y : src_y);

The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".

This fixes a Gallium assertion failure in the conformance tests:

      u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
      debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
      Trace/breakpoint trap
2008-12-18 11:25:27 -07:00
Michal Krol
97d08366aa glsl: Fix handling of nested parens in macro actual arguments. 2008-12-18 11:14:11 -07:00
Michal Krol
d9b92b112f glsl: Fix handling of nested parens in macro actual arguments. 2008-12-18 11:11:59 -07:00
Brian Paul
f43019b226 demos: all glutDestroyWindow() upon exit to test query object clean-up 2008-12-18 11:11:59 -07:00
Jerome Glisse
b7c05044ed softpipe: convert to use texture instead of surface 2008-12-18 18:30:53 +01:00
Robert Ellison
5ccef84c01 Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda, incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().

      /* If do_flip, invert src_y position and pass negative src stride
*/
      pipe_copy_rect(dst_map,
                     &dst->block,
                     dst->stride,
                     dst_x, dst_y,
                     w, h,
                     src_map,
                     do_flip ? -(int) src->stride : src->stride,
                     src_x,
                     do_flip ? w - src_y : src_y);

The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".

This fixes a Gallium assertion failure in the conformance tests:

      u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
      debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
      Trace/breakpoint trap
2008-12-18 10:22:33 -07:00
Eric Anholt
a402d48f84 mesa: Pass the context to query object delete cb to avoid null dereference. 2008-12-18 09:47:49 -07:00
José Fonseca
92dc8ffa71 gallium: Enable memory debugging on all windows platforms. 2008-12-18 14:59:42 +00:00
Xiang, Haihao
cb453244ca i915: check WRAP_T instead of WRAP_R for cube map texture. 2008-12-18 12:59:43 +08:00
Xiang, Haihao
df73363ed1 i915: fix abort issue. (bug #19147) 2008-12-18 10:07:45 +08:00
Brian Paul
f9c76750a7 mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
This is a work-around the for the fact that we do fragment shader state
validation before vertex shader validation (see comments in state.c) so in
get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to
date yet.

This fixes a glean glsl1 test failure.
2008-12-17 19:05:26 -07:00
Brian Paul
b890fffbf4 gallium: fix memory corruption in u_gen_mipmap.c
Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected.  So all but the first set_vertex_data()
was writing out of bounds.

Also added some comments.
2008-12-17 19:05:14 -07:00
Brian Paul
2389c055ed mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
This is a work-around the for the fact that we do fragment shader state
validation before vertex shader validation (see comments in state.c) so in
get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to
date yet.

This fixes a glean glsl1 test failure.
2008-12-17 19:01:34 -07:00
Brian Paul
3ffd529ff1 softpipe: fix vertex shader texture sampling
Need to disable/bypass lambda calculation since derivatives of texcoords
are meaningless for adjacent vertices.
2008-12-17 18:59:58 -07:00
Brian Paul
d1c8af7c0a gallium: fix memory corruption in u_gen_mipmap.c
Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected.  So all but the first set_vertex_data()
was writing out of bounds.

Also added some comments.
2008-12-17 18:52:10 -07:00
Brian Paul
35aebf4667 mesa: remove unneeded _mesa_reference_fragprog() call
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
2008-12-17 18:05:03 -07:00
Jon Turney
8e7599892f dri: fix for Cygwin compilation, bug 19144 2008-12-17 18:01:16 -07:00
Brian Paul
20555835b6 mesa: updated comments 2008-12-17 14:54:46 -07:00
Brian Paul
947d04d08b mesa: fix fixed-function test in get_fp_input_mask() - again.
The problem we're solving only occured when there was a user-defined
vertex shader but no fragment shader.  Check for that case now.
Fixes glean api2 vertex array failure.
2008-12-17 14:06:56 -07:00
Brian Paul
35bb2aa96a mesa: add missing cases for texture array targets 2008-12-17 14:06:34 -07:00
Brian Paul
f0b0794b38 mesa: fix fixed-function test in get_fp_input_mask() - again.
The problem we're solving only occured when there was a user-defined
vertex shader but no fragment shader.  Check for that case now.
Fixes glean api2 vertex array failure.
2008-12-17 14:04:03 -07:00
Brian Paul
1cb680d06b demos: add test of vertex-only and fragment-only shader programs 2008-12-17 13:58:31 -07:00
Brian Paul
637f06dcdc util: check for frag/vertShader=0 before attaching 2008-12-17 13:58:05 -07:00
Brian Paul
1519b93b7b mesa: add missing cases for texture array targets 2008-12-17 13:17:15 -07:00
Brian Paul
a8751f4916 Revert "mesa: fix vertex program test in get_fp_input_mask()"
This reverts commit cdaaf8e107.
2008-12-17 11:29:42 -07:00
Brian Paul
d7296a1a8e Revert "mesa: fix vertex program test in get_fp_input_mask()"
This reverts commit 8dc88cb643.

This change broke other things...
2008-12-17 11:29:06 -07:00
Brian Paul
8dc88cb643 mesa: fix vertex program test in get_fp_input_mask()
We were accidentally using the fixed-function logic when a vertex shader was
being used.
2008-12-17 10:58:33 -07:00
Brian Paul
6b88d9606f winsys: fix depth buffer size when using stencil 2008-12-17 10:58:23 -07:00
Brian Paul
cdaaf8e107 mesa: fix vertex program test in get_fp_input_mask()
We were accidentally using the fixed-function logic when a vertex shader was
being used.
2008-12-17 10:55:40 -07:00
Brian Paul
2a299851b9 winsys: fix depth buffer size when using stencil 2008-12-17 10:55:29 -07:00
Brian Paul
ca284fde53 mesa: remove redundant Makefile lines 2008-12-16 16:38:11 -07:00
Brian Paul
ca8e42652c mesa: updated list of src files 2008-12-16 16:01:30 -07:00
Brian Paul
89565b22f5 mesa: update SConscript with new source files 2008-12-16 15:53:35 -07:00
Brian Paul
b0caa10a85 Merge commit 'origin/master' into gallium-0.2 2008-12-16 15:50:14 -07:00