mesa.git
17 years agoexpose _mesa_condcode_string(), fix some printing
Brian [Wed, 28 Mar 2007 17:01:09 +0000 (11:01 -0600)]
expose _mesa_condcode_string(), fix some printing

17 years agocheck that if/while/do-while condition is boolean or scalar
Brian [Wed, 28 Mar 2007 16:44:38 +0000 (10:44 -0600)]
check that if/while/do-while condition is boolean or scalar

17 years agobump version to 6.5.3 to match version.h
Brian [Wed, 28 Mar 2007 15:07:41 +0000 (09:07 -0600)]
bump version to 6.5.3 to match version.h

17 years agoAdd missing OSMesaColorClamp function
Alan Hourihane [Wed, 28 Mar 2007 14:58:08 +0000 (15:58 +0100)]
Add missing OSMesaColorClamp function

17 years agodisable MakeTexture()
Brian [Tue, 27 Mar 2007 22:06:20 +0000 (16:06 -0600)]
disable MakeTexture()

17 years agoadded ftransform() comment
Brian [Tue, 27 Mar 2007 22:05:25 +0000 (16:05 -0600)]
added ftransform() comment

17 years agoImplement true CAL/RET subroutines. Some optimizations, clean-ups coming...
Brian [Tue, 27 Mar 2007 22:04:36 +0000 (16:04 -0600)]
Implement true CAL/RET subroutines. Some optimizations, clean-ups coming...

17 years agofix another pc off-by one
Brian [Tue, 27 Mar 2007 21:21:35 +0000 (15:21 -0600)]
fix another pc off-by one

17 years agoadded _slang_label_new_unique()
Brian [Tue, 27 Mar 2007 21:18:17 +0000 (15:18 -0600)]
added _slang_label_new_unique()

17 years agofix some printing issues related to subroutines
Brian [Tue, 27 Mar 2007 20:53:17 +0000 (14:53 -0600)]
fix some printing issues related to subroutines

17 years agofix a fragment fog regression
Brian [Tue, 27 Mar 2007 20:02:04 +0000 (14:02 -0600)]
fix a fragment fog regression

17 years agofix off by one error in OPCODE_RET
Brian [Tue, 27 Mar 2007 17:02:20 +0000 (11:02 -0600)]
fix off by one error in OPCODE_RET

17 years agoinit machine->StackDepth=0
Brian [Tue, 27 Mar 2007 16:59:28 +0000 (10:59 -0600)]
init machine->StackDepth=0

17 years agomore parenthesis
Brian [Tue, 27 Mar 2007 16:36:06 +0000 (10:36 -0600)]
more parenthesis

17 years agoi915tex compile fix (account for moved _UseTexEnvProgram var)
Roland Scheidegger [Tue, 27 Mar 2007 20:57:22 +0000 (22:57 +0200)]
i915tex compile fix (account for moved _UseTexEnvProgram var)

17 years agofix incorrect _MaxElement calculation
Roland Scheidegger [Tue, 27 Mar 2007 19:03:32 +0000 (21:03 +0200)]
fix incorrect _MaxElement calculation

The calculation of _MaxElement was wrong if the stride was larger than
elementSize, which lead to rejection of every DrawElements call which accessed
the maximum element if CheckArrayBounds was enabled.

17 years agorecommit e731d8aafa98bbf9d30f83e65f28b7718be55834.
Roland Scheidegger [Tue, 27 Mar 2007 17:32:32 +0000 (19:32 +0200)]
recommit e731d8aafa98bbf9d30f83e65f28b7718be55834.

This got lost with glsl-compiler-1 merge, it fixes segfaults when using
ATI_fragment_shader, which uses the ProgramStringNotify mechanism but doesn't
have a valid program pointer.

17 years agoadd parenthesis around a bit-wise AND term in _tnl_InvalidateState()
Brian [Tue, 27 Mar 2007 15:52:53 +0000 (09:52 -0600)]
add parenthesis around a bit-wise AND term in _tnl_InvalidateState()

17 years agoRestore the UseTexEnvProgram logic.
Brian [Tue, 27 Mar 2007 15:51:52 +0000 (09:51 -0600)]
Restore the UseTexEnvProgram logic.

Was removed during glsl-compiler work.  Still need to go back and revisit this
because of the interaction with fragment shaders...

17 years agor300: Fix radeonUpdatePageFlipping() function.
Roland Scheidegger [Tue, 27 Mar 2007 14:27:34 +0000 (16:27 +0200)]
r300: Fix radeonUpdatePageFlipping() function.

Always call driFlipRenderbuffers() with pfCurrentPage value, in case it's
initially 1 instead of 0. May fix some issues with pageflip, the same fix was
applied to r128, radeon and r200 (6e0e6eff05727ac8833c2b2dffc51c6619427e77).

17 years agor128, radeon, r200: Check ctx->WinSysDrawBuffer before calling function that derefere...
Roland Scheidegger [Tue, 27 Mar 2007 14:22:00 +0000 (16:22 +0200)]
r128, radeon, r200: Check ctx->WinSysDrawBuffer before calling function that dereferences it.

Same fix as for r300 (which fixed https://bugs.freedesktop.org/show_bug.cgi?id=10417),
since it's likely an issue with those drivers too.

17 years agoalways print error messages, unless LIBGL_DEBUG=quiet
Bernardo Innocenti [Tue, 27 Mar 2007 14:05:33 +0000 (08:05 -0600)]
always print error messages, unless LIBGL_DEBUG=quiet

17 years agosimplify .a suffixing
Brian [Tue, 27 Mar 2007 13:58:47 +0000 (07:58 -0600)]
simplify .a suffixing

17 years agoremove static lib before building to make more bulletproof
Bernardo Innocenti [Tue, 27 Mar 2007 13:56:34 +0000 (07:56 -0600)]
remove static lib before building to make more bulletproof

17 years agor300: Check ctx->WinSysDrawBuffer before calling function that dereferences it.
Michel Dänzer [Tue, 27 Mar 2007 07:19:51 +0000 (09:19 +0200)]
r300: Check ctx->WinSysDrawBuffer before calling function that dereferences it.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10417 .

17 years agofix r128 rendering, lockups
Miroslav Šustek [Tue, 27 Mar 2007 03:34:33 +0000 (23:34 -0400)]
fix r128 rendering, lockups

mis-count in offset led to mis-rendering and lockups;
units are 4 bytes rather than 1.  Noticed by Chris Salch.
fixes bug 7994, possibly others.

17 years agoMerge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa
Zou Nan hai [Tue, 27 Mar 2007 01:41:31 +0000 (09:41 +0800)]
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa

17 years ago Fix compile error
Zou Nan hai [Tue, 27 Mar 2007 01:41:01 +0000 (09:41 +0800)]
  Fix compile error

17 years agos/SUB/BGNSUB/
Brian [Tue, 27 Mar 2007 00:47:19 +0000 (18:47 -0600)]
s/SUB/BGNSUB/

17 years agoCheckpoint: implementing true CAL/RET instructions for subroutine calls.
Brian [Tue, 27 Mar 2007 00:46:07 +0000 (18:46 -0600)]
Checkpoint: implementing true CAL/RET instructions for subroutine calls.

Also, found/fixed a code generation regression:  the emit_swizzle() function
was always returning NULL.  This caused emit_move() to miss its chance at peephole
optimization.

17 years agoGet rid of IR_JUMP and related code.
Brian [Mon, 26 Mar 2007 23:16:26 +0000 (17:16 -0600)]
Get rid of IR_JUMP and related code.

17 years agospecial case RET
Brian [Mon, 26 Mar 2007 22:58:50 +0000 (16:58 -0600)]
special case RET

17 years agoGet rid of SLANG_OPER_GOTO, start rewrite of 'return' handling.
Brian [Mon, 26 Mar 2007 22:56:45 +0000 (16:56 -0600)]
Get rid of SLANG_OPER_GOTO, start rewrite of 'return' handling.

17 years agoremove debug abort() calls
Brian [Mon, 26 Mar 2007 22:01:58 +0000 (16:01 -0600)]
remove debug abort() calls

17 years agoAdditional error checking for 'return' statements.
Brian [Mon, 26 Mar 2007 21:46:35 +0000 (15:46 -0600)]
Additional error checking for 'return' statements.

17 years agoundo some debugging hacks
Brian [Mon, 26 Mar 2007 21:09:59 +0000 (15:09 -0600)]
undo some debugging hacks

17 years agodead code elimination for constant-valued if/then/else
Brian [Mon, 26 Mar 2007 21:02:21 +0000 (15:02 -0600)]
dead code elimination for constant-valued if/then/else

17 years agor300: Remove a warning when vertex programs produce an unused output
Nicolai Haehnle [Mon, 26 Mar 2007 20:20:46 +0000 (22:20 +0200)]
r300: Remove a warning when vertex programs produce an unused output

As far as we know, the hardware prefers outputs packed tightly together
with no holes caused by outputs that are not even read by the fragment
program. Therefore, we slightly rewrite vertex programs in this case.

It would be interesting to test this interaction between vertex programs
and fragment programs further, because some of that rewrite may be
unnecessary. However, play it safe for now and don't change the current
behaviour.

17 years agor300: Whitespace cleanup (remove trailing spaces)
Nicolai Haehnle [Mon, 26 Mar 2007 20:16:22 +0000 (22:16 +0200)]
r300: Whitespace cleanup (remove trailing spaces)

17 years agoFix a few issues with computing storage sizes with respect to swizzles.
Brian [Mon, 26 Mar 2007 19:06:33 +0000 (13:06 -0600)]
Fix a few issues with computing storage sizes with respect to swizzles.

17 years agoIn _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle.
Brian [Mon, 26 Mar 2007 19:04:57 +0000 (13:04 -0600)]
In _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle.

17 years agor300: Fix warnings that were introduced by the glsl merge
Nicolai Haehnle [Mon, 26 Mar 2007 19:41:17 +0000 (21:41 +0200)]
r300: Fix warnings that were introduced by the glsl merge

17 years agoAdd _swrast_span_default_secondary_color() for use with glBitmap, glDrawPixels, etc.
Brian [Mon, 26 Mar 2007 17:30:05 +0000 (11:30 -0600)]
Add _swrast_span_default_secondary_color() for use with glBitmap, glDrawPixels, etc.

Secondary color wasn't getting added to post-texture color when drawing
bitmaps, images.  See bug 10409.

17 years agoremove incorrect assertions
Brian [Mon, 26 Mar 2007 16:39:56 +0000 (10:39 -0600)]
remove incorrect assertions

17 years agominor status updates
Brian [Mon, 26 Mar 2007 16:23:50 +0000 (10:23 -0600)]
minor status updates

17 years agodisable printing shader program debug info
Brian [Mon, 26 Mar 2007 16:15:02 +0000 (10:15 -0600)]
disable printing shader program debug info

17 years agomerge of glsl-compiler-1 branch
Brian [Mon, 26 Mar 2007 16:13:02 +0000 (10:13 -0600)]
merge of glsl-compiler-1 branch

17 years agoi915tex: Make sure renderbuffers don't get deleted when flipping them.
Michel Dänzer [Mon, 26 Mar 2007 15:38:58 +0000 (17:38 +0200)]
i915tex: Make sure renderbuffers don't get deleted when flipping them.

Since the recent renderbuffer refcounting fixes it's no longer sufficient to
just remove the old renderbuffer from the framebuffer and then add the new one
because the former may decrease the reference count to 0 and delete the old
renderbuffer.

17 years agodisable free() until other issues can be fixed...
Brian [Mon, 26 Mar 2007 15:24:30 +0000 (09:24 -0600)]
disable free() until other issues can be fixed...

17 years agofix mem leak, add comments
Brian [Mon, 26 Mar 2007 15:23:44 +0000 (09:23 -0600)]
fix mem leak, add comments

17 years agonouveau: match drm version bump
Ben Skeggs [Mon, 26 Mar 2007 11:31:43 +0000 (21:31 +1000)]
nouveau: match drm version bump

17 years agoFix some renderbuffer reference counting issues. Also fixes a mem leak.
Brian [Sun, 25 Mar 2007 16:39:36 +0000 (10:39 -0600)]
Fix some renderbuffer reference counting issues.  Also fixes a mem leak.

17 years agodestroy window on exit
Brian [Sun, 25 Mar 2007 16:25:29 +0000 (10:25 -0600)]
destroy window on exit

17 years agoi965: The given urb layout(maximal size of urb entries and the
Xiang, Haihao [Sun, 25 Mar 2007 13:40:58 +0000 (21:40 +0800)]
i965: The given urb layout(maximal size of urb entries and the
values for nr of entries) should meet the requirement.

17 years agoColor3iv: set the alpha value to 1.0
Xiang, Haihao [Sun, 25 Mar 2007 13:31:36 +0000 (21:31 +0800)]
Color3iv: set the alpha value to 1.0

17 years agor300: Whitespace cleanup in r300_texmem.c
Nicolai Haehnle [Sun, 25 Mar 2007 12:34:13 +0000 (14:34 +0200)]
r300: Whitespace cleanup in r300_texmem.c

17 years agor300: Whitespace cleanup in r300_texstate.c
Nicolai Haehnle [Sun, 25 Mar 2007 12:17:09 +0000 (14:17 +0200)]
r300: Whitespace cleanup in r300_texstate.c

17 years agor300: Fix regression: unnecessary node indirection
Nicolai Haehnle [Sun, 25 Mar 2007 11:02:26 +0000 (13:02 +0200)]
r300: Fix regression: unnecessary node indirection

The texture_rectangle fix introduced a bug where every texture instruction
caused a new indirection.

17 years agofix mem leak
Brian [Sat, 24 Mar 2007 22:44:20 +0000 (16:44 -0600)]
fix mem leak

17 years agodisable free(var->aux) -- can lead to segfault
Brian [Sat, 24 Mar 2007 22:43:44 +0000 (16:43 -0600)]
disable free(var->aux) -- can lead to segfault

17 years agofix mem leak
Brian [Sat, 24 Mar 2007 22:26:51 +0000 (16:26 -0600)]
fix mem leak

17 years agofix some mem leaks
Brian [Sat, 24 Mar 2007 22:22:35 +0000 (16:22 -0600)]
fix some mem leaks

17 years agoFree shader-related context state: _mesa_free_shader_state()
Brian [Sat, 24 Mar 2007 22:20:02 +0000 (16:20 -0600)]
Free shader-related context state: _mesa_free_shader_state()

17 years agofree prog->Attributes in _mesa_delete_program()
Brian [Sat, 24 Mar 2007 22:18:13 +0000 (16:18 -0600)]
free prog->Attributes in _mesa_delete_program()

17 years agofix mistake in _slang_free_ir()
Brian [Sat, 24 Mar 2007 21:29:10 +0000 (15:29 -0600)]
fix mistake in _slang_free_ir()

17 years agonouveau: implement nv20Clear and nv20Scissor
Dave Airlie [Sat, 24 Mar 2007 21:09:02 +0000 (07:09 +1000)]
nouveau: implement nv20Clear and nv20Scissor

Still crashes out on scissor regs

17 years agor300: Fix texture coordinate calculation for rectangle textures
Nicolai Haehnle [Sat, 24 Mar 2007 18:08:26 +0000 (19:08 +0100)]
r300: Fix texture coordinate calculation for rectangle textures

R300 hardware takes texcoords in the range 0..1 even for rectangle
textures. Previously, the necessary texcoord conversion was applied
to the texture coordinate during vertex processing in a render stage.

This is obviously wrong when fragment programs are used, which can
calculate arbitrary coordinates for TEX instructions. Therefore,
we now inject an appropriate MUL instruction before a TEX that
reference a rectangle texture.

17 years agor300: No assertion when accessing incomplete texture images.
Nicolai Haehnle [Sat, 24 Mar 2007 15:42:08 +0000 (16:42 +0100)]
r300: No assertion when accessing incomplete texture images.

There used to be an assertion when a fragment program accesses an incomplete
texture image. Work around this assertion.
Note: I am unsure whether this workaround produces the desired result
(0,0,0,1) on all hardware.

17 years agoProperly free the slang_ir_node->Store data (use ref counting).
Brian [Sat, 24 Mar 2007 16:18:14 +0000 (10:18 -0600)]
Properly free the slang_ir_node->Store data (use ref counting).

17 years agoWhen computing render_inputs_bitset, omit primary color if we have a fragment program...
Brian [Sat, 24 Mar 2007 16:16:49 +0000 (10:16 -0600)]
When computing render_inputs_bitset, omit primary color if we have a fragment program and it doesn't need FRAG_ATTRIB_COL0.  Silences valgrind warnings.

17 years agomove some code into new slang_ir.c file
Brian [Sat, 24 Mar 2007 15:40:20 +0000 (09:40 -0600)]
move some code into new slang_ir.c file

17 years agoIR utility functions
Brian [Sat, 24 Mar 2007 15:39:24 +0000 (09:39 -0600)]
IR utility functions

17 years agor300: Fix: KIL instruction don't require textures
Nicolai Haehnle [Sat, 24 Mar 2007 12:01:57 +0000 (13:01 +0100)]
r300: Fix: KIL instruction don't require textures

When no textures were enabled, a KIL instruction triggered an assertion
in r300_setup_rs_unit.

17 years agoswrast: Fix crash when sampling from a non-existing texture object
Nicolai Haehnle [Sat, 24 Mar 2007 13:41:59 +0000 (14:41 +0100)]
swrast: Fix crash when sampling from a non-existing texture object

17 years agonouveau: some swtcl fixes
Ben Skeggs [Sat, 24 Mar 2007 11:22:27 +0000 (22:22 +1100)]
nouveau: some swtcl fixes

17 years agoImplement alpha buffer copy for SwapBuffers().
Brian [Sat, 24 Mar 2007 00:01:31 +0000 (18:01 -0600)]
Implement alpha buffer copy for SwapBuffers().

Nicolai writes:
When the pixmap pixel format has no alpha channel, the x11 driver
(software rendering) adds a wrapped alpha channel on request.

During SwapBuffers, this alpha channel is not copied from back to
front, which means that the front buffer doesn't really contain the
contents that the back buffer previously contained.

A subsequent glReadPixels from the front buffer will return an
incorrect result. The following patch attempts to fix this.

17 years agodocument internal compiler options
Brian [Fri, 23 Mar 2007 23:49:19 +0000 (17:49 -0600)]
document internal compiler options

17 years agoFix issues related to the 'continue' statement.
Brian [Fri, 23 Mar 2007 23:48:42 +0000 (17:48 -0600)]
Fix issues related to the 'continue' statement.

IR_LOOP now has two children: the body code, and the tail code.
Tail code is the "i++" part of a for-loop, or the expression at the end
of a "do {} while(expr);" loop.
"continue" translates into: "execute tail code; CONT;"
Also, the test for infinite do/while loops was incorrect.

17 years agoconsolidate some code
Brian [Fri, 23 Mar 2007 23:45:53 +0000 (17:45 -0600)]
consolidate some code

17 years agoAdd the ability to generate programs that doesn't use condition codes.
Brian [Fri, 23 Mar 2007 20:47:46 +0000 (14:47 -0600)]
Add the ability to generate programs that doesn't use condition codes.

ctx->Shader.EmitCondCodes determines if we use condition codes.
If not, IF statement uses first operand's X component as the condition.
Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle
the common cases of conditional break/continue.

17 years agominor tweaks
Brian [Fri, 23 Mar 2007 20:44:34 +0000 (14:44 -0600)]
minor tweaks

17 years agoupdated comment
Brian [Fri, 23 Mar 2007 16:46:08 +0000 (10:46 -0600)]
updated comment

17 years agor300: Whitespace cleanup (remove trailing spaces)
Nicolai Haehnle [Fri, 23 Mar 2007 16:07:58 +0000 (17:07 +0100)]
r300: Whitespace cleanup (remove trailing spaces)

17 years agoupdated comment
Brian [Thu, 22 Mar 2007 22:07:43 +0000 (16:07 -0600)]
updated comment

17 years agoOverhaul emit_compare() function.
Brian [Thu, 22 Mar 2007 22:07:14 +0000 (16:07 -0600)]
Overhaul emit_compare() function.

Previously, comparing vec2, vec3, vec4 was broken.
Added IR_EQUAL, IR_NOTEQUAL nodes/operators to compute boolean
equality/inequality vs. IR_SEQUAL/IR_SNEQUAL which work component-wise.
Use IR_EQUAL/IR_NOTEQUAL for the == and != operators.
To compute vec4 equality, use SNE, DP4, SEQ instruction sequence.

17 years agoFirst pass at implementing structure compares.
Brian [Thu, 22 Mar 2007 15:15:39 +0000 (09:15 -0600)]
First pass at implementing structure compares.

Need to improve this.  There may be holes in a structure so we can't
just blindly compare the full 4-float registers.

17 years agouse _mesa_copy_instructions()
Brian [Thu, 22 Mar 2007 15:11:26 +0000 (09:11 -0600)]
use _mesa_copy_instructions()

17 years agoIn _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOu...
Brian [Thu, 22 Mar 2007 15:07:27 +0000 (09:07 -0600)]
In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOut==NULL.

There are times when we don't want to allow swizzling when searching for or
adding vector constants.  Passing NULL for swizzleOut disables swizzling.
This fixes a constant/swizzle bug in link_uniform_vars().

17 years agoprint conditional writemask, if enabled
Brian [Thu, 22 Mar 2007 15:04:18 +0000 (09:04 -0600)]
print conditional writemask, if enabled

17 years agouse _mesa_alloc_instructions()
Brian [Thu, 22 Mar 2007 14:51:34 +0000 (08:51 -0600)]
use _mesa_alloc_instructions()

17 years agouse _mesa_copy_instructions()
Brian [Thu, 22 Mar 2007 14:50:20 +0000 (08:50 -0600)]
use _mesa_copy_instructions()

17 years agoEnsure we have a valid ReadBuffer for CopyTexSubImage, and
Alan Hourihane [Thu, 22 Mar 2007 14:26:49 +0000 (14:26 +0000)]
Ensure we have a valid ReadBuffer for CopyTexSubImage, and

if not bail accordingly.

Previously we'd only do this test on compressed textures.

17 years agofix for bug#10339
Xiang, Haihao [Thu, 22 Mar 2007 03:01:51 +0000 (11:01 +0800)]
fix for bug#10339

StateFlags has been updated in _mesa_add_state_reference

17 years agoadded SWIZZLE_XYZW
Brian [Wed, 21 Mar 2007 21:40:54 +0000 (15:40 -0600)]
added SWIZZLE_XYZW

17 years agoSupport for user-defined structures.
Brian [Wed, 21 Mar 2007 21:40:39 +0000 (15:40 -0600)]
Support for user-defined structures.

struct == and != operators not finished yet.  Struct assignment works though.

17 years agodisable apparently unused code
Brian [Wed, 21 Mar 2007 21:38:46 +0000 (15:38 -0600)]
disable apparently unused code

17 years agoindent
Brian [Wed, 21 Mar 2007 20:45:34 +0000 (14:45 -0600)]
indent

17 years agomerge from master
Brian [Wed, 21 Mar 2007 17:57:30 +0000 (11:57 -0600)]
merge from master

17 years agodisable assertion
Brian [Wed, 21 Mar 2007 17:41:41 +0000 (11:41 -0600)]
disable assertion

17 years agodocument 1D convolution fix
Brian [Wed, 21 Mar 2007 15:45:58 +0000 (09:45 -0600)]
document 1D convolution fix