mesa.git
14 years agoir_to_mesa: Set up our instruction nodes with zeroed data.
Eric Anholt [Mon, 30 Aug 2010 21:42:27 +0000 (14:42 -0700)]
ir_to_mesa: Set up our instruction nodes with zeroed data.

cond_update wasn't being set by emit_op3, leading to valgrind
complaints, and failures in several piglit tests when built with
clang.

14 years agoast_to_hir: Add support for bit-wise operators (but not shifts).
Kenneth Graunke [Tue, 31 Aug 2010 17:56:24 +0000 (10:56 -0700)]
ast_to_hir: Add support for bit-wise operators (but not shifts).

Previously, using bit-wise operators in some larger expression would
crash on a NULL pointer dereference.  This code at least doesn't crash.

Fixes piglit test bitwise-01.frag.

14 years agost/egl: Enable EGL_MESA_drm_display.
Chia-I Wu [Tue, 31 Aug 2010 07:52:26 +0000 (15:52 +0800)]
st/egl: Enable EGL_MESA_drm_display.

14 years agoegl: Mark EGL_MESA_screen_surface as obsolete.
Chia-I Wu [Tue, 31 Aug 2010 07:25:09 +0000 (15:25 +0800)]
egl: Mark EGL_MESA_screen_surface as obsolete.

EGL_MESA_drm_{display,image} can achieve the same functionality.

14 years agor600g: fix up depth write swizzles.
Dave Airlie [Tue, 31 Aug 2010 06:13:03 +0000 (16:13 +1000)]
r600g: fix up depth write swizzles.

For some reason r600c, emits extra instructions in the FP to do the depth write output swizzle,
I'm not sure this is required, so here I'm doing it in the exports.

this fixes the mesa trivial demos tri-depthwrite and tri-depthwrite2, it doesn't fix
the glsl1 gl_FragDepth writing test however.

14 years agor600g: fix fp-fragment-position test.
Dave Airlie [Tue, 31 Aug 2010 05:12:24 +0000 (15:12 +1000)]
r600g: fix fp-fragment-position test.

14 years agor600g: fix typo in last commit
Dave Airlie [Tue, 31 Aug 2010 04:57:57 +0000 (14:57 +1000)]
r600g: fix typo in last commit

14 years agor600g: fix position input to fragment shader.
Dave Airlie [Tue, 31 Aug 2010 04:52:52 +0000 (14:52 +1000)]
r600g: fix position input to fragment shader.

this fixes a few if the fs shader tests, 10 more piglits

14 years agor600g: remove unneeded function call from scs
Dave Airlie [Tue, 31 Aug 2010 03:54:19 +0000 (13:54 +1000)]
r600g: remove unneeded function call from scs

14 years agoir_to_mesa: use RSQ+MUL instead of RSQ+RCP for SQRT
Marek Olšák [Tue, 31 Aug 2010 03:38:50 +0000 (05:38 +0200)]
ir_to_mesa: use RSQ+MUL instead of RSQ+RCP for SQRT

sqrt(x) = 1/rsq(x) = x*rsq(x)

This optimization already was in the old GLSL compiler.

Acked on irc by Eric Anholt.

14 years agolinker: Require an exact matching signature when looking for prototypes.
Kenneth Graunke [Tue, 31 Aug 2010 03:42:19 +0000 (20:42 -0700)]
linker: Require an exact matching signature when looking for prototypes.

Fixes piglit test glsl-override-builtin.  The linker incorrectly found
the prototype for the float signature, rather than adding a new
prototype with the int return type.  This caused ir_calls with type int
to have their callees set to the float signature, triggering an assert.

14 years agor600g: make LIT work properly
Dave Airlie [Tue, 31 Aug 2010 01:57:04 +0000 (11:57 +1000)]
r600g: make LIT work properly

this is a bit of a workaround, something is wrong with the literal emits here
so we just use the trig copy function to copy the immd to a temp at start of op.

fix VP/FP LIT tests

14 years agoi965: fix depth test on sandybridge
Zhenyu Wang [Tue, 31 Aug 2010 01:54:44 +0000 (09:54 +0800)]
i965: fix depth test on sandybridge

This includes several corrections for fixing depth test on sandybridge.
Fix wrong bits definition in depth stencil state. Fix wrong order of
state buffer offset in 3DSTATE_CC_STATE_POINTERS command. Correctly use
buffer width parameter in depth buffer setting.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
14 years agor600g: fixup trig functions when input is a literal
Dave Airlie [Tue, 31 Aug 2010 01:42:01 +0000 (11:42 +1000)]
r600g: fixup trig functions when input is a literal

So as the trig functions used up the literal spots for the PI work, if the arg0 was an immediate
we'd hit failure, so copy the literal before starting.

add some tracking of max temp used to avoid trashing temp regs.

5 more piglits, fp1 COS,SCS,SIN tests

14 years agor600g: make sure LIT splits constants
Dave Airlie [Tue, 31 Aug 2010 00:43:54 +0000 (10:43 +1000)]
r600g: make sure LIT splits constants

14 years agor600g: fix constant splitting
Dave Airlie [Tue, 31 Aug 2010 00:43:04 +0000 (10:43 +1000)]
r600g: fix constant splitting

constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.

14 years agor600g: fix LIT tests
Dave Airlie [Mon, 30 Aug 2010 23:56:35 +0000 (09:56 +1000)]
r600g: fix LIT tests

14 years agor600g: add missing literals
Dave Airlie [Mon, 30 Aug 2010 23:02:02 +0000 (09:02 +1000)]
r600g: add missing literals

Also add an error if we hit this problem again, we need to do this better
possibly tying the literal addition to the last flag.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agolinker: Handle varying arrays, matrices, and arrays of matrices
Ian Romanick [Mon, 30 Aug 2010 22:37:44 +0000 (15:37 -0700)]
linker: Handle varying arrays, matrices, and arrays of matrices

Fixes piglit test case glsl-array-varying-01.

14 years agoDon't pass -ffast-math to clang, since it ignores it and complains.
Eric Anholt [Mon, 30 Aug 2010 21:19:23 +0000 (14:19 -0700)]
Don't pass -ffast-math to clang, since it ignores it and complains.

14 years agoMake configure work with clang
nobled [Mon, 30 Aug 2010 00:03:37 +0000 (20:03 -0400)]
Make configure work with clang

It was mistaking clang for gcc and deciding its version
was too low.

14 years agoAdd talloc to osmesa library dependencies
Jon TURNEY [Mon, 30 Aug 2010 11:41:16 +0000 (12:41 +0100)]
Add talloc to osmesa library dependencies

also link osmesa with C++ standard libraries, as it now contains C++ code

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
14 years agoAdd talloc to dependencies for libGL built with xlib driver
Jon TURNEY [Mon, 30 Aug 2010 11:41:15 +0000 (12:41 +0100)]
Add talloc to dependencies for libGL built with xlib driver

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
14 years agoglsl: Clear the static values of builtin function profiles at release.
Eric Anholt [Mon, 30 Aug 2010 19:20:25 +0000 (12:20 -0700)]
glsl: Clear the static values of builtin function profiles at release.

When releasing the builtin functions, we were just freeing the memory,
not telling the builtin function loader that we had freed its memory.
I wish I had done ARB_ES2_compatibility so we had regression testing
of this path.  Fixes segfault on changing video options in nexuiz.

14 years agoglsl2: Commit generated files changed by previous commit
Ian Romanick [Mon, 30 Aug 2010 18:59:48 +0000 (11:59 -0700)]
glsl2: Commit generated files changed by previous commit

14 years agoglsl2: Parse #pragma lines
Ian Romanick [Mon, 30 Aug 2010 18:58:04 +0000 (11:58 -0700)]
glsl2: Parse #pragma lines

All pragmas are currently ignored.  Also, the error messages when a
pragma is used incorrectly (i.e., '#pragma debug(on)' inside a
function) are crap, but I think this is sufficient for now.

Fixes piglit test cases pragma-0[1-8].(vert|frag).

14 years agoFix inverted version checks in check_extra.
Kenneth Graunke [Mon, 30 Aug 2010 19:22:39 +0000 (12:22 -0700)]
Fix inverted version checks in check_extra.

Previously, if an attribute was enabled by either a specific GL version
or an extension, the check would require -both- to be enabled.  This bug
was not discovered earlier because version checks are currently only ever
used on their own.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
14 years agor600g: precompute some of the hw state
Jerome Glisse [Mon, 30 Aug 2010 01:01:51 +0000 (21:01 -0400)]
r600g: precompute some of the hw state

Idea is to build hw state at pipe state creation and
reuse them while keeping a non PM4 packet interface
btw winsys & pipe driver. This commit also force rebuild
of pm4 packet on each call to radeon_state_pm4 which
in turn slow down everythings, this will be addressed.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agor600g: fix depth buffer decompression after states rework
Jerome Glisse [Sat, 28 Aug 2010 21:47:13 +0000 (17:47 -0400)]
r600g: fix depth buffer decompression after states rework

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agor600g: fixup states generation in winsys.
Dave Airlie [Thu, 26 Aug 2010 04:55:48 +0000 (14:55 +1000)]
r600g: fixup states generation in winsys.

The current states code had an unhealthy relationship between
that had to somehow magically align themselves, editing either
place meant renumbering all states after the one you were on,
and it was pretty unapproachable code.

This replaces the huge types structures with a simple type + sub
type struct, which is keyed on an stype enum in radeon.h. Each
stype can have a per-shader type subclassing (4 types supported,
PS/VS/GS/FS), and also has a number of states per-subtype. So you
have 256 constants per 4 shaders per one CONSTANT stype.

The interface from the driver is changed to pass in the tuple,
(stype, id, shader_type), and we look for this. If
radeon_state_shader ever shows up on profile, it could use a
hashtable based on stype/shader_type to speed things up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoglapi: fix generator which got out of sync with the codebase
Luca Barbieri [Mon, 30 Aug 2010 18:48:49 +0000 (20:48 +0200)]
glapi: fix generator which got out of sync with the codebase

The __GLapi typedef was removed in c356f5867f2c1fad7155df538b9affa8dbdcf869,
but the code generator hasn't been updated.

14 years agoi965: Clear the cached constant buffer entry in the VS at control flow.
Eric Anholt [Mon, 30 Aug 2010 18:19:30 +0000 (11:19 -0700)]
i965: Clear the cached constant buffer entry in the VS at control flow.

Fixes the 7 regressions with constant buffers forced on with piglit -t
glsl (glsl-vs-if-*).

14 years agoi965: Align the number of payload regs to 2 again in 16-wide mode.
Eric Anholt [Mon, 30 Aug 2010 17:47:05 +0000 (10:47 -0700)]
i965: Align the number of payload regs to 2 again in 16-wide mode.

Fixes a regression in point-line-no-cull and glean/paths tests since
501c9dc62774a73c080d500a1eab773b0da9577e.

14 years agoi965: Apply the rest of the old-libdrm guard patch.
Cedric Vivier [Mon, 30 Aug 2010 17:40:39 +0000 (10:40 -0700)]
i965: Apply the rest of the old-libdrm guard patch.

Bug #29855

14 years agoi965: Add support for loops to the new FS backend.
Eric Anholt [Sun, 29 Aug 2010 06:31:09 +0000 (23:31 -0700)]
i965: Add support for loops to the new FS backend.

This includes a handy little safety check to prevent the loop from
going "too long", as permitted by the spec.  I haven't gone out of my
way to test it, though…

Fixes 20 more piglit tests.

14 years agoi965: Make brw_CONT and brw_BREAK take the pop count.
Eric Anholt [Sun, 29 Aug 2010 06:18:18 +0000 (23:18 -0700)]
i965: Make brw_CONT and brw_BREAK take the pop count.

We always need to set it, so pass it in.

14 years agoi965: Add "discard" support to the new FS backend.
Eric Anholt [Sun, 29 Aug 2010 05:56:33 +0000 (22:56 -0700)]
i965: Add "discard" support to the new FS backend.

Fixes 3 testcases related to discard.

14 years agoi965: Fix the new implementation of ir_unop_sign to match brw_wm_emit.c
Eric Anholt [Sun, 29 Aug 2010 05:42:01 +0000 (22:42 -0700)]
i965: Fix the new implementation of ir_unop_sign to match brw_wm_emit.c

Like the comparison operations, this suffered from CMP only setting
the low bit.  Doing the AND instructions would be the same instruction
count as the more obvious conditional moves, so do cond moves.

Fixes glsl-fs-sign and 6 other cases, like trig functions that use
sign() internally.

14 years agoi965: Add support for texturing with bias to i965 FS backend.
Eric Anholt [Sun, 29 Aug 2010 05:34:30 +0000 (22:34 -0700)]
i965: Add support for texturing with bias to i965 FS backend.

Fixes 5 piglit tests for bias.  Note that LOD is a 1.30 feature and
not yet supported.

14 years agoglut: Silence missing initializer warning.
José Fonseca [Mon, 30 Aug 2010 13:12:01 +0000 (14:12 +0100)]
glut: Silence missing initializer warning.

14 years agomesa: Return after assertion failure.
José Fonseca [Mon, 30 Aug 2010 12:59:24 +0000 (13:59 +0100)]
mesa: Return after assertion failure.

Addresses the warnings:
warning: ‘target’ may be used uninitialized in this function
warning: ‘target_string’ may be used uninitialized in this function

14 years agogallivm: Compute the 4 texel offsets for linear filtering en ensemble.
José Fonseca [Mon, 7 Jun 2010 11:05:18 +0000 (12:05 +0100)]
gallivm: Compute the 4 texel offsets for linear filtering en ensemble.

14 years agoglsl: Silence unused variable warning.
José Fonseca [Mon, 30 Aug 2010 12:53:15 +0000 (13:53 +0100)]
glsl: Silence unused variable warning.

14 years agomesa: Fix _mesa_lookup_parameter_constant's return value.
José Fonseca [Mon, 30 Aug 2010 12:48:21 +0000 (13:48 +0100)]
mesa: Fix _mesa_lookup_parameter_constant's return value.

Fixes gcc warning

  In function ‘_mesa_add_unnamed_constant’:
  warning: ‘pos’ may be used uninitialized in this function

but also what appears to be a bug.

14 years agogallivm: Disable LLVM's pretty stack trace dumper.
José Fonseca [Sun, 29 Aug 2010 11:05:36 +0000 (12:05 +0100)]
gallivm: Disable LLVM's pretty stack trace dumper.

By default LLVM adds a signal handler to output a pretty stack trace.
This signal handler is never removed, causing problems when unloading
the shared object where the gallium driver resides.

Thanks to Chris Li for finding this.

14 years agogallivm: Correct copy'n'pasted comments.
José Fonseca [Sat, 21 Aug 2010 10:29:41 +0000 (11:29 +0100)]
gallivm: Correct copy'n'pasted comments.

14 years agogallivm: Fix lp_build_sum_vector.
José Fonseca [Sat, 21 Aug 2010 10:31:22 +0000 (11:31 +0100)]
gallivm: Fix lp_build_sum_vector.

The result is scalar, so when argument is zero/undef we can pass vector
zero/undef.

Also, support the scalar case.

14 years agosvga: Fix CMP translation for vertex shader targets.
Michal Krol [Fri, 27 Aug 2010 11:24:47 +0000 (13:24 +0200)]
svga: Fix CMP translation for vertex shader targets.

SVGA3DOP_CMP is not supported for vertex shaders;
use SLT + LRP instead.

14 years agosvga: Re-emit bound rendertargets and texture samplers at the beginning of every...
José Fonseca [Sun, 15 Aug 2010 12:36:02 +0000 (13:36 +0100)]
svga: Re-emit bound rendertargets and texture samplers at the beginning of every command buffer.

Only non null resources.

To ensure that relocations are emitted for every resource currently
referred.

14 years agost/mesa: set the MaxVarying GLSL constant
Marek Olšák [Wed, 25 Aug 2010 03:25:41 +0000 (05:25 +0200)]
st/mesa: set the MaxVarying GLSL constant

14 years agor300g: fix warning in winsys
Marek Olšák [Mon, 30 Aug 2010 11:25:07 +0000 (13:25 +0200)]
r300g: fix warning in winsys

14 years agor600g: add DST opcode support.
Dave Airlie [Mon, 30 Aug 2010 06:22:54 +0000 (16:22 +1000)]
r600g: add DST opcode support.

14 years agor600g: add SCS support.
Dave Airlie [Mon, 30 Aug 2010 06:09:39 +0000 (16:09 +1000)]
r600g: add SCS support.

14 years agor600g: fix warning introduced by last commit.
Dave Airlie [Mon, 30 Aug 2010 05:50:33 +0000 (15:50 +1000)]
r600g: fix warning introduced by last commit.

14 years agor600g: add initial relative support to assembler
Dave Airlie [Mon, 30 Aug 2010 05:19:20 +0000 (15:19 +1000)]
r600g: add initial relative support to assembler

passes another ~20 piglits.

/me starts to run out low hanging fruit around now.

14 years agolinker: Treat sized and unsized array types as the same
Ian Romanick [Mon, 30 Aug 2010 05:07:49 +0000 (22:07 -0700)]
linker: Treat sized and unsized array types as the same

If two shaders contain variables declared with array types that have
the same base type but one is sized and the other is not, linking
should succeed.  I'm not super pleased with the way this is
implemented, and I am more convinced than ever that we need more
linker tests.  We especially need "negative" tests.

Fixes bugzilla #29697 and piglit test glsl-link-array-01.

14 years agor600g: add KILP support
Dave Airlie [Mon, 30 Aug 2010 04:41:09 +0000 (14:41 +1000)]
r600g: add KILP support

passes glsl1-discard tests

14 years agor600g: fix SSG and op3 neg writing
Dave Airlie [Mon, 30 Aug 2010 04:13:01 +0000 (14:13 +1000)]
r600g: fix SSG and op3 neg writing

8 more piglits, mainly the two SSG tests.

14 years agor600g : add basic loop support.
Dave Airlie [Fri, 27 Aug 2010 06:08:55 +0000 (16:08 +1000)]
r600g : add basic loop support.

Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c.

17 piglits more on r300g.tests.

14 years agor600g: use the values from the correct literals
Bas Nieuwenhuizen [Sun, 29 Aug 2010 09:19:23 +0000 (11:19 +0200)]
r600g: use the values from the correct literals

Created an array for literals as we should not always use the last declared literal.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agor600g: added literals where needed for POW instruction
Bas Nieuwenhuizen [Sun, 29 Aug 2010 09:19:22 +0000 (11:19 +0200)]
r600g: added literals where needed for POW instruction

Fixes size calculation for the bytecode buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoevergreen : fix shader const allocation and instruction bugs.
Richard Li [Sun, 29 Aug 2010 23:27:46 +0000 (19:27 -0400)]
evergreen : fix shader const allocation and instruction bugs.

14 years agoglsl: Initialize data in ast_function_expression::hir.
Vinson Lee [Sun, 29 Aug 2010 21:05:07 +0000 (14:05 -0700)]
glsl: Initialize data in ast_function_expression::hir.

Completely initialize data that is passed to ir_constant constructor.

Fixes piglit glsl-orangebook-ch06-bump valgrind uninitialized variable
error on softpipe and llvmpipe.

14 years agoglsl: Completely initialize value member in ir_constant constructor.
Vinson Lee [Sun, 29 Aug 2010 20:15:56 +0000 (13:15 -0700)]
glsl: Completely initialize value member in ir_constant constructor.

The
ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
did not completely initialize the entire value member.

Fixes piglit glsl-fs-sampler-numbering-2 valgrind uninitialized value
error in softpipe and llvmpipe.

14 years agoglsl: Initialize variable in ir_swizzle::constant_expression_value.
Vinson Lee [Sun, 29 Aug 2010 19:19:57 +0000 (12:19 -0700)]
glsl: Initialize variable in ir_swizzle::constant_expression_value.

Complete initialize data passed to ir_constant constructor.

Fixes piglit glsl-mat-from-int-ctor-02 valgrind unintialized variable
error with softpipe and llvmpipe.

14 years agoglsl: Initialize data in read_constant.
Vinson Lee [Sun, 29 Aug 2010 18:48:02 +0000 (11:48 -0700)]
glsl: Initialize data in read_constant.

Completely initialize data that is passed into a ir_constant constructor.

Fixes piglit glsl-fs-mix valgrind uninitialized variable error on
softpipe and llvmpipe.

14 years agoir_to_mesa: Initialize variable in ir_to_mesa_visitor::visit.
Vinson Lee [Sun, 29 Aug 2010 18:31:33 +0000 (11:31 -0700)]
ir_to_mesa: Initialize variable in ir_to_mesa_visitor::visit.

Fixes piglit glsl-fs-loop valgrind uninitialized value error on softpipe
and llvmpipe.

14 years agor600g: drop file I added by mistake in a previous commit
Dave Airlie [Sat, 28 Aug 2010 09:01:49 +0000 (19:01 +1000)]
r600g: drop file I added by mistake in a previous commit

14 years agoglsl: Initialize the rest of values of ir_constant::value.
Vinson Lee [Sun, 29 Aug 2010 06:55:51 +0000 (23:55 -0700)]
glsl: Initialize the rest of values of ir_constant::value.

Fixes valgrind uninitialized value errors in the piglit shader tests for
softpipe and llvmpipe.

14 years agogallium: Remove unnecessary header from p_state.h.
Vinson Lee [Sun, 29 Aug 2010 05:15:37 +0000 (22:15 -0700)]
gallium: Remove unnecessary header from p_state.h.

Remove p_screen.h.

14 years agonvfx: Remove util_is_pot in favor of util_is_power_of_two.
Vinson Lee [Sun, 29 Aug 2010 05:12:55 +0000 (22:12 -0700)]
nvfx: Remove util_is_pot in favor of util_is_power_of_two.

This is a follow up to commit 89b2897220acfacdc431f138377fbcec9f0ea812.

14 years agoutil: Include missing header in u_draw.h.
Vinson Lee [Sun, 29 Aug 2010 04:46:41 +0000 (21:46 -0700)]
util: Include missing header in u_draw.h.

Include p_state.h for complete type to pipe_draw_info.

14 years agoutil: Add forward declaration in u_transfer.h.
Vinson Lee [Sun, 29 Aug 2010 04:42:28 +0000 (21:42 -0700)]
util: Add forward declaration in u_transfer.h.

14 years agor300g,u_blitter: use u_framebuffer
Marek Olšák [Sun, 29 Aug 2010 04:08:24 +0000 (06:08 +0200)]
r300g,u_blitter: use u_framebuffer

Removing another function duplication in u_blitter.

14 years agoutil: remove util_is_pot in favor of util_is_power_of_two
Marek Olšák [Sun, 29 Aug 2010 04:03:39 +0000 (06:03 +0200)]
util: remove util_is_pot in favor of util_is_power_of_two

The function was duplicated.

14 years agoi965: Add initial support for texturing to the new FS backend.
Eric Anholt [Sat, 28 Aug 2010 21:43:50 +0000 (14:43 -0700)]
i965: Add initial support for texturing to the new FS backend.

Fixes 11 piglit tests.

14 years agoi965: Add disasm for gen5 sampler messages.
Eric Anholt [Sun, 29 Aug 2010 02:55:53 +0000 (19:55 -0700)]
i965: Add disasm for gen5 sampler messages.

14 years agoi965: Move libdrm/C++ hack introduced in fa2deb3d to intel_context.h
Cedric Vivier [Sun, 29 Aug 2010 03:01:46 +0000 (20:01 -0700)]
i965: Move libdrm/C++ hack introduced in fa2deb3d to intel_context.h

Fixes build on Linux/GCC 4.4 as libdrm includes are also used by other
brw_fs_*.cpp files.

Bug #29855

14 years agost/mesa: Include missing header in st_mesa_to_tgsi.c.
Vinson Lee [Sat, 28 Aug 2010 21:24:42 +0000 (14:24 -0700)]
st/mesa: Include missing header in st_mesa_to_tgsi.c.

Include p_screen.h for complete type to pipe_screen.

14 years agosoftpipe: Include missing header in sp_flush.c.
Vinson Lee [Sat, 28 Aug 2010 21:21:28 +0000 (14:21 -0700)]
softpipe: Include missing header in sp_flush.c.

Include p_screen.h for complete type to pipe_screen.

14 years agodraw: Include missing header in draw_vs_llvm.c.
Vinson Lee [Sat, 28 Aug 2010 21:18:57 +0000 (14:18 -0700)]
draw: Include missing header in draw_vs_llvm.c.

Include p_screen.h for completely type to pipe_screen.

14 years agollvmpipe: Include missing header in lp_flush.c.
Vinson Lee [Sat, 28 Aug 2010 21:14:33 +0000 (14:14 -0700)]
llvmpipe: Include missing header in lp_flush.c.

Include p_screen.h for complete type to pipe_screen.

14 years agor300g: fix blitting between 2D NPOT mipmaps
Marek Olšák [Sat, 28 Aug 2010 05:54:36 +0000 (07:54 +0200)]
r300g: fix blitting between 2D NPOT mipmaps

Even though MIP filtering is not supported, we can bind an arbitrary mipmap
as the zero mipmap level.

NPOT textures now follow GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MIN_LOD.

This fixes piglit/fbo-copyteximage.

14 years agor300g: fix min/max lod computation
Mathias Fröhlich [Sat, 28 Aug 2010 16:16:41 +0000 (18:16 +0200)]
r300g: fix min/max lod computation

14 years agor300g: set the correct value in PVS_NUM_CNTLRS
Marek Olšák [Sat, 28 Aug 2010 05:51:55 +0000 (07:51 +0200)]
r300g: set the correct value in PVS_NUM_CNTLRS

As per docs.

14 years agollvmpipe: Remove unnecessary header.
Vinson Lee [Sat, 28 Aug 2010 07:29:02 +0000 (00:29 -0700)]
llvmpipe: Remove unnecessary header.

14 years agoglsl2: Decompose matrix comparison into vector operations
Ian Romanick [Thu, 19 Aug 2010 00:53:47 +0000 (17:53 -0700)]
glsl2: Decompose matrix comparison into vector operations

14 years agotrace: Don't try to dump the rgba array if null
Jakob Bornecrantz [Fri, 27 Aug 2010 23:30:00 +0000 (00:30 +0100)]
trace: Don't try to dump the rgba array if null

14 years agoglsl: Rename a couple of common variable names in mat_op_to_vec.
Eric Anholt [Fri, 27 Aug 2010 22:34:42 +0000 (15:34 -0700)]
glsl: Rename a couple of common variable names in mat_op_to_vec.

It was easy while typing implementations to accidentally overwrite the
original expression or assignment variables.

14 years agoglsl: Make mat_op_to_vec allocate out of the IR's parent.
Eric Anholt [Fri, 27 Aug 2010 22:32:59 +0000 (15:32 -0700)]
glsl: Make mat_op_to_vec allocate out of the IR's parent.

This will reduce memory consumption of compiled shaders by not
dragging optimized-out children around.

14 years agoi965: Set the pop count on BRK/CONT inside of an if statement in the FS.
Eric Anholt [Fri, 27 Aug 2010 23:04:16 +0000 (16:04 -0700)]
i965: Set the pop count on BRK/CONT inside of an if statement in the FS.

This is the same as 8de8c97275e9555183a7e8f2238143657bbe60b2 for the
VS, and fixes glsl-fs-if-nested-loop and the mandelbrot demo.

Bug #29498

14 years agoglsl: Regenerate for double destroy fix.
Eric Anholt [Fri, 27 Aug 2010 22:24:23 +0000 (15:24 -0700)]
glsl: Regenerate for double destroy fix.

14 years agoglsl: Protect against double compiler-destroy.
Eric Anholt [Fri, 27 Aug 2010 22:23:29 +0000 (15:23 -0700)]
glsl: Protect against double compiler-destroy.

DRI was doing teardown when we close the last screen, then an atexit()
was added to call it as well.

14 years agodri: Get prototype for _mesa_destroy_compiler().
Eric Anholt [Fri, 27 Aug 2010 21:43:39 +0000 (14:43 -0700)]
dri: Get prototype for _mesa_destroy_compiler().

Bug #29665.

14 years agoi965: Don't strip negate/abs flags when assigning uniform locations.
Eric Anholt [Fri, 27 Aug 2010 21:15:42 +0000 (14:15 -0700)]
i965: Don't strip negate/abs flags when assigning uniform locations.

Fixes glsl-algebraic-sub-zero-4.

14 years agoi965: Add missing handling for BRW_OPCODE_SEL.
Eric Anholt [Fri, 27 Aug 2010 21:09:05 +0000 (14:09 -0700)]
i965: Add missing handling for BRW_OPCODE_SEL.

Fixes 4 piglit tests about min, max, and clamp.

14 years agoi965: Mask out higher bits of the result of BRW_CMP producing a boolean.
Eric Anholt [Fri, 27 Aug 2010 20:49:09 +0000 (13:49 -0700)]
i965: Mask out higher bits of the result of BRW_CMP producing a boolean.

When it says it sets the LSB, that's not just a hint as to where the
result goes.  Only the LSB is modified.  Fixes 20 piglit cases.

14 years agoi965: Fix the types of immediate integer values.
Eric Anholt [Fri, 27 Aug 2010 20:47:37 +0000 (13:47 -0700)]
i965: Fix the types of immediate integer values.

When we're trying to do integer ops, handing a float in doesn't help.

14 years agoi965: Add translation for RNDD and RNDZ.
Eric Anholt [Fri, 27 Aug 2010 20:29:45 +0000 (13:29 -0700)]
i965: Add translation for RNDD and RNDZ.

Fixes:
glsl-fs-any.
glsl1-integer division with uniform var

14 years agoi965: Add support for ir_binop_mod using do_mod_to_fract.
Eric Anholt [Fri, 27 Aug 2010 20:24:41 +0000 (13:24 -0700)]
i965: Add support for ir_binop_mod using do_mod_to_fract.

Fixes glsl-fs-mod.