Brian Paul [Fri, 2 Jan 2009 23:15:43 +0000 (16:15 -0700)]
gallium: clamp MaxVertexTextureImageUnits against Mesa limit
Brian Paul [Fri, 2 Jan 2009 23:15:16 +0000 (16:15 -0700)]
mesa: remove redudant lines for libglapi.a
José Fonseca [Wed, 31 Dec 2008 15:03:35 +0000 (15:03 +0000)]
python: Pass a zero offset to util_draw_vertex_buffer.
José Fonseca [Wed, 31 Dec 2008 13:29:09 +0000 (13:29 +0000)]
util: List new file in SConscript.
José Fonseca [Wed, 31 Dec 2008 13:05:39 +0000 (13:05 +0000)]
Merge commit 'origin/gallium-0.1' into gallium-0.2
José Fonseca [Tue, 30 Dec 2008 20:12:28 +0000 (20:12 +0000)]
i915: Avoid ptr->int conversion.
José Fonseca [Tue, 30 Dec 2008 20:10:24 +0000 (20:10 +0000)]
draw: Avoid integer overflow converting pointers on 64bit archs.
Not really an error, as we only care for the lower 4 bits.
Brian Paul [Wed, 31 Dec 2008 01:01:15 +0000 (18:01 -0700)]
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/main/config.h
Brian Paul [Wed, 31 Dec 2008 00:50:39 +0000 (17:50 -0700)]
mesa: fix bug in evaluation of structure fields
Fixes incorrect size information. See bug 19273.
Brian Paul [Wed, 31 Dec 2008 00:11:32 +0000 (17:11 -0700)]
mesa: allow variable indexing into the predefined uniform variable arrays
This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work.
When a built-in uniform array is indexed with a variable index we need to
"unroll" the whole array into the parameter list (aka constant buffer) because
we don't know which elements may be accessed at compile-time. In the case of
the gl_LightSource array of size [8], we emit 64 state references into the
parameter array (8 elements times 8 vec4s per gl_LightSourceParameters
struct).
Previously, we only allowed constant-indexed references to uniform arrays
(such as gl_LightSource[2].position) which resulted in a single state reference
being added to the parameter array, not 64. We still optimize this case.
Users should be aware that using "gl_LightSource[i].ambient" in their shaders
is a bit expensive since state validation will involve updating all 64
light source entries in the parameter list.
Brian Paul [Wed, 31 Dec 2008 00:03:09 +0000 (17:03 -0700)]
mesa: better error message when running out of GLSL samplers
Brian Paul [Wed, 31 Dec 2008 00:00:36 +0000 (17:00 -0700)]
mesa: comments for some state vars
Brian Paul [Wed, 31 Dec 2008 00:00:06 +0000 (17:00 -0700)]
mesa: increase max constants/uniforms to 256 (vec4 vectors)
José Fonseca [Tue, 30 Dec 2008 19:21:30 +0000 (19:21 +0000)]
gallium: Initialize var before use.
José Fonseca [Tue, 30 Dec 2008 17:22:24 +0000 (17:22 +0000)]
glut: List new source file in sconscript.
José Fonseca [Tue, 30 Dec 2008 17:21:25 +0000 (17:21 +0000)]
mesa: Do not specify types in bitfields.
As advised by gcc -pedantic.
José Fonseca [Tue, 30 Dec 2008 17:21:15 +0000 (17:21 +0000)]
draw: Do not specify types in bitfields.
As advised by gcc -pedantic.
José Fonseca [Tue, 30 Dec 2008 17:15:34 +0000 (17:15 +0000)]
gallium: Remove unused variables.
José Fonseca [Tue, 30 Dec 2008 17:14:48 +0000 (17:14 +0000)]
gallium: Don't redefine INLINE.
INLINE is commonly used in third-party headers.
José Fonseca [Tue, 30 Dec 2008 17:13:38 +0000 (17:13 +0000)]
scons: Specify C99 throughout all the tree.
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.
Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
José Fonseca [Tue, 30 Dec 2008 17:06:51 +0000 (17:06 +0000)]
rtasm: Remove spurious semi-colons after function bodies.
José Fonseca [Tue, 30 Dec 2008 16:35:46 +0000 (16:35 +0000)]
gdi: Remove accidental keypresses.
Brian Paul [Tue, 30 Dec 2008 14:57:16 +0000 (07:57 -0700)]
mesa: updated compilation documentation
Brian Paul [Thu, 18 Dec 2008 23:08:42 +0000 (16:08 -0700)]
demos: minor fixes to twoside.c glsl demo
Xiang, Haihao [Tue, 30 Dec 2008 03:25:45 +0000 (11:25 +0800)]
intel: disable ATI_texture_env_combine3 for i830( and related device).
Thanks to Eric for pointing it out.
Eric Anholt [Wed, 24 Dec 2008 00:08:40 +0000 (16:08 -0800)]
dri: Fix driWaitForMSC32 when divisor >= 2 and msc < 0.
We'd come up with a negative remainder, while we were looking for the positive
version of it in the loop conditional. And, since the "did we hit our target"
break was disabled for the target_msc == 0 ("Just make the divisor/remainder
work") path, we'd never exit.
Simplify the code by just using int64_t all over instead of trying to do it
in a u32 space.
Alex Deucher [Mon, 29 Dec 2008 17:28:12 +0000 (12:28 -0500)]
R300: missing semicolon
Xiang, Haihao [Mon, 29 Dec 2008 01:30:41 +0000 (09:30 +0800)]
intel: enable ATI_texture_env_combine3. Fixes #17707
Dave Airlie [Sun, 28 Dec 2008 06:48:36 +0000 (16:48 +1000)]
r300: remove the unknowns from the indx_buffer code
Xiang, Haihao [Wed, 24 Dec 2008 01:26:46 +0000 (09:26 +0800)]
i915: separate the fog term from the specular color term.
Previously fog parameter and specular color are packed into the
same dword. Note specular color should be packed in BGRA for device,
so if fog parameter and specular color all are present, fog parameter
will dirty the alpha term of specular color. This fixes rendering
issue when playing 'Yo Frankie' on 915/945.
Eric Anholt [Tue, 23 Dec 2008 22:45:37 +0000 (14:45 -0800)]
intel: Fix glBitmap clipping for DRI1.
Dave Airlie [Sat, 20 Dec 2008 01:38:23 +0000 (17:38 -0800)]
Remove third buffer support from Mesa.
This is part of the deprecated pageflipping infrastructure.
Alan Hourihane [Tue, 23 Dec 2008 15:33:46 +0000 (15:33 +0000)]
egl: fix egl closure
Alan Hourihane [Tue, 23 Dec 2008 14:18:36 +0000 (14:18 +0000)]
egl: fix startup query version
Alan Hourihane [Tue, 23 Dec 2008 13:20:18 +0000 (13:20 +0000)]
egl: support GLXFBConfigs, pbuffers and pixmaps.
José Fonseca [Mon, 22 Dec 2008 20:23:59 +0000 (20:23 +0000)]
softpipe: Don't fill surfaces's winsys fields.
This is sometimes checked to distinguish between texture views and
(deprecated) standalone surfaces.
José Fonseca [Mon, 22 Dec 2008 20:20:58 +0000 (20:20 +0000)]
softpipe: Call surface_alloc_storage to get the pipebuffer for display targets.
Otherwise blitting from display target surfaces to front screen fails in
several platforms.
José Fonseca [Mon, 22 Dec 2008 19:31:52 +0000 (19:31 +0000)]
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:
src/gallium/auxiliary/util/Makefile
José Fonseca [Thu, 11 Dec 2008 05:42:25 +0000 (14:42 +0900)]
gdi: Cleanup sconsfile.
Jerome Glisse [Thu, 18 Dec 2008 18:56:45 +0000 (19:56 +0100)]
softpipe: initialize refcount and winsys
Jerome Glisse [Thu, 18 Dec 2008 12:34:27 +0000 (13:34 +0100)]
softpipe: convert to use texture instead of surface
José Fonseca [Mon, 22 Dec 2008 16:55:27 +0000 (16:55 +0000)]
gallium: const correctness.
José Fonseca [Sun, 21 Dec 2008 13:48:43 +0000 (13:48 +0000)]
Ignore new tests executables.
José Fonseca [Sat, 20 Dec 2008 12:59:51 +0000 (12:59 +0000)]
gallium: Fix typo in define name.
Brian Paul [Fri, 19 Dec 2008 23:56:56 +0000 (16:56 -0700)]
Merge commit 'origin/master' into gallium-0.2
Brian Paul [Fri, 19 Dec 2008 23:37:06 +0000 (16:37 -0700)]
gallium: begin adapting Ian's 3D mipmap gen code to gallium utility lib
Unfinished, a big no-op for now.
Brian Paul [Fri, 19 Dec 2008 23:14:48 +0000 (16:14 -0700)]
gallium: Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
This is copied from Ian's commit
a330933bb75c38148668637cd22b90d75d39506f
Ian Romanick [Fri, 19 Dec 2008 21:03:51 +0000 (13:03 -0800)]
Add do_row_3d for mipmapping 3D textures
Previously 3D textures were mipmapped using multiple passed through
the 2D mipmap generation code. This had 3 disadvantages. First, the
extra passes were slow. Second, this required the allocation of a
temporary buffer to hold intermediate data. Third, and most
important, the extra passes caused loss of additional bits due to
integer division / bit-shifting.
With this change, our mipmapgen conformance test passes for
non-compressed texture formats.
Ian Romanick [Fri, 19 Dec 2008 20:58:01 +0000 (12:58 -0800)]
Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
Ian Romanick [Thu, 18 Dec 2008 22:13:26 +0000 (14:13 -0800)]
965 / GLSL: Use full precision for EXP instruction
The partial precision mode doesn't have quite enough bits of precision
to pass conformance tests.
Ian Romanick [Thu, 18 Dec 2008 22:11:06 +0000 (14:11 -0800)]
GLSL: The LOG2 macro doesn't have enough precision
It looks like the LOG2 macro only has 8 or 9 bits of precission, but
the ARB_vertex_program spec says "accurate to at least 10 bits".
Eric Anholt [Fri, 19 Dec 2008 00:00:09 +0000 (16:00 -0800)]
intel: Fix glBitmap top/bottom clipping.
Bug #19139.
Eric Anholt [Thu, 18 Dec 2008 06:10:57 +0000 (22:10 -0800)]
intel: Don't forget the source bitmap size when clipping the size we draw.
Eric Anholt [Thu, 18 Dec 2008 05:18:20 +0000 (21:18 -0800)]
intel: Update mesa state in blit operations that want post-scissor draw bounds.
Eric Anholt [Thu, 18 Dec 2008 05:18:00 +0000 (21:18 -0800)]
intel: don't clip to scissor-clipped read framebuffer bounds in copypixels.
José Fonseca [Fri, 19 Dec 2008 20:06:11 +0000 (20:06 +0000)]
gallium: Simple and efficient cache.
Fixed size hash table. Collisions are handled by simply destroying the
previous entry.
It hasn't received much testing yet.
Brian Paul [Fri, 19 Dec 2008 15:01:03 +0000 (08:01 -0700)]
cell: fix build breakage
Alan Hourihane [Fri, 19 Dec 2008 14:59:43 +0000 (14:59 +0000)]
gallium: set ST_NEW_FRAMEBUFFER when setting new surfaces
Brian Paul [Fri, 19 Dec 2008 14:57:09 +0000 (07:57 -0700)]
mesa: s/CC/APP_CC/ in progs/glsl/Makefile
Brian Paul [Fri, 19 Dec 2008 14:33:17 +0000 (07:33 -0700)]
gallium: replace #elif with #else
Brian Paul [Fri, 19 Dec 2008 14:32:52 +0000 (07:32 -0700)]
gallium: replace #elif with #else
Eric Anholt [Fri, 19 Dec 2008 02:42:06 +0000 (18:42 -0800)]
intel: Move copyteximage source clipping out of copytexsubimage.
glCopyTexSubImage already gets the (correct) clipping for us, so it doesn't
need the path. While moving the clipping out, replace the code with the mesa
path to do the same job.
Eric Anholt [Fri, 19 Dec 2008 02:31:25 +0000 (18:31 -0800)]
mesa: Clip copytexsubimage to read framebuffer bounds, not scissor region.
Eric Anholt [Fri, 19 Dec 2008 02:23:51 +0000 (18:23 -0800)]
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.
Brian Paul [Fri, 19 Dec 2008 01:06:38 +0000 (18:06 -0700)]
tgsi: scan for additional info: uses_fogcoord, uses_frontfacing
Brian Paul [Fri, 19 Dec 2008 01:06:38 +0000 (18:06 -0700)]
tgsi: scan for additional info: uses_fogcoord, uses_frontfacing
Brian Paul [Thu, 18 Dec 2008 23:00:20 +0000 (16:00 -0700)]
gallium: fix two-sided lighting test in state tracker
This fixes two-sided lighting for vertex shaders.
Brian Paul [Thu, 18 Dec 2008 23:00:20 +0000 (16:00 -0700)]
gallium: fix two-sided lighting test in state tracker
This fixes two-sided lighting for vertex shaders.
Michal Krol [Thu, 18 Dec 2008 17:45:32 +0000 (18:45 +0100)]
glsl: Fix handling of nested parens in macro actual arguments.
Brian Paul [Thu, 18 Dec 2008 16:48:20 +0000 (09:48 -0700)]
demos: all glutDestroyWindow() upon exit to test query object clean-up
Xiang, Haihao [Thu, 18 Dec 2008 04:57:41 +0000 (12:57 +0800)]
i915: check WRAP_T instead of WRAP_R for cube map texture.
Xiang, Haihao [Thu, 18 Dec 2008 02:07:45 +0000 (10:07 +0800)]
i915: fix abort issue. (bug #19147)
Brian Paul [Thu, 18 Dec 2008 01:05:03 +0000 (18:05 -0700)]
mesa: remove unneeded _mesa_reference_fragprog() call
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
Jon Turney [Thu, 18 Dec 2008 01:01:16 +0000 (18:01 -0700)]
dri: fix for Cygwin compilation, bug 19144
Brian Paul [Wed, 17 Dec 2008 21:54:46 +0000 (14:54 -0700)]
mesa: updated comments
Brian Paul [Wed, 17 Dec 2008 20:58:31 +0000 (13:58 -0700)]
demos: add test of vertex-only and fragment-only shader programs
Brian Paul [Wed, 17 Dec 2008 20:58:05 +0000 (13:58 -0700)]
util: check for frag/vertShader=0 before attaching
Jerome Glisse [Thu, 18 Dec 2008 18:56:45 +0000 (19:56 +0100)]
softpipe: initialize refcount and winsys
Robert Ellison [Thu, 18 Dec 2008 16:46:53 +0000 (09:46 -0700)]
Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda2c452cf7d6696d89cf4458ef986f98, 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
Michal Krol [Thu, 18 Dec 2008 17:45:32 +0000 (18:45 +0100)]
glsl: Fix handling of nested parens in macro actual arguments.
Michal Krol [Thu, 18 Dec 2008 17:45:32 +0000 (18:45 +0100)]
glsl: Fix handling of nested parens in macro actual arguments.
Brian Paul [Thu, 18 Dec 2008 16:48:20 +0000 (09:48 -0700)]
demos: all glutDestroyWindow() upon exit to test query object clean-up
Jerome Glisse [Thu, 18 Dec 2008 12:34:27 +0000 (13:34 +0100)]
softpipe: convert to use texture instead of surface
Robert Ellison [Thu, 18 Dec 2008 16:46:53 +0000 (09:46 -0700)]
Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda2c452cf7d6696d89cf4458ef986f98, 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
Eric Anholt [Wed, 8 Oct 2008 01:47:31 +0000 (18:47 -0700)]
mesa: Pass the context to query object delete cb to avoid null dereference.
José Fonseca [Thu, 18 Dec 2008 14:53:24 +0000 (14:53 +0000)]
gallium: Enable memory debugging on all windows platforms.
Xiang, Haihao [Thu, 18 Dec 2008 04:57:41 +0000 (12:57 +0800)]
i915: check WRAP_T instead of WRAP_R for cube map texture.
Xiang, Haihao [Thu, 18 Dec 2008 02:07:45 +0000 (10:07 +0800)]
i915: fix abort issue. (bug #19147)
Brian Paul [Thu, 18 Dec 2008 02:01:34 +0000 (19:01 -0700)]
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.
Brian Paul [Thu, 18 Dec 2008 01:52:10 +0000 (18:52 -0700)]
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.
Brian Paul [Thu, 18 Dec 2008 02:01:34 +0000 (19:01 -0700)]
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.
Brian Paul [Thu, 18 Dec 2008 01:59:58 +0000 (18:59 -0700)]
softpipe: fix vertex shader texture sampling
Need to disable/bypass lambda calculation since derivatives of texcoords
are meaningless for adjacent vertices.
Brian Paul [Thu, 18 Dec 2008 01:52:10 +0000 (18:52 -0700)]
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.
Brian Paul [Thu, 18 Dec 2008 01:05:03 +0000 (18:05 -0700)]
mesa: remove unneeded _mesa_reference_fragprog() call
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
Jon Turney [Thu, 18 Dec 2008 01:01:16 +0000 (18:01 -0700)]
dri: fix for Cygwin compilation, bug 19144
Brian Paul [Wed, 17 Dec 2008 21:54:46 +0000 (14:54 -0700)]
mesa: updated comments
Brian Paul [Wed, 17 Dec 2008 21:04:03 +0000 (14:04 -0700)]
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.
Brian Paul [Wed, 17 Dec 2008 20:17:15 +0000 (13:17 -0700)]
mesa: add missing cases for texture array targets
Brian Paul [Wed, 17 Dec 2008 21:04:03 +0000 (14:04 -0700)]
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.
Brian Paul [Wed, 17 Dec 2008 20:58:31 +0000 (13:58 -0700)]
demos: add test of vertex-only and fragment-only shader programs