mesa.git
13 years agogallivm: Fix a long standing bug with nested if-then-else emission.
José Fonseca [Sun, 10 Oct 2010 17:45:14 +0000 (18:45 +0100)]
gallivm: Fix a long standing bug with nested if-then-else emission.

We can't patch true-block at end-if time, as there is no guarantee that
the block at the beginning of the true stanza is the same at the end of
the true stanza -- other control flow elements may have been emitted half
way the true stanza.

Although this bug surfaced recently with the commit to skip mip filtering
when lod is an integer the bug was always there, although probably it
was avoided until now: e.g., cubemap selection nests if-then-else on the
else stanza, which does not suffer from the same problem.

13 years agodri/nv10: Fake fast Z clears for pre-nv17 cards.
Francisco Jerez [Sat, 9 Oct 2010 23:39:13 +0000 (01:39 +0200)]
dri/nv10: Fake fast Z clears for pre-nv17 cards.

13 years agodri/nouveau: Minor cleanup.
Francisco Jerez [Sat, 9 Oct 2010 23:45:23 +0000 (01:45 +0200)]
dri/nouveau: Minor cleanup.

13 years agogallivm: Cleanup the rest of the flow module.
José Fonseca [Sat, 9 Oct 2010 20:39:14 +0000 (21:39 +0100)]
gallivm: Cleanup the rest of the flow module.

13 years agogallivm: Simplify if/then/else implementation.
José Fonseca [Sat, 9 Oct 2010 20:14:05 +0000 (21:14 +0100)]
gallivm: Simplify if/then/else implementation.

No need for for a flow stack anymore.

13 years agogallivm: Factor out the SI->FP texture size conversion for SoA path too
José Fonseca [Sat, 9 Oct 2010 19:26:11 +0000 (20:26 +0100)]
gallivm: Factor out the SI->FP texture size conversion for SoA path too

13 years agogallivm: Remove support for Phi generation.
José Fonseca [Sat, 9 Oct 2010 19:14:03 +0000 (20:14 +0100)]
gallivm: Remove support for Phi generation.

Simply rely on mem2reg pass. It's easier and more reliable.

13 years agogallivm: Use varilables instead of Phis for cubemap selection.
José Fonseca [Sat, 9 Oct 2010 18:53:21 +0000 (19:53 +0100)]
gallivm: Use varilables instead of Phis for cubemap selection.

13 years agogallivm: Don't generate Phis for execution mask.
José Fonseca [Sat, 9 Oct 2010 11:55:31 +0000 (12:55 +0100)]
gallivm: Don't generate Phis for execution mask.

13 years agogallivm: Special bri-linear computation path for unmodified rho.
José Fonseca [Sat, 9 Oct 2010 11:12:03 +0000 (12:12 +0100)]
gallivm: Special bri-linear computation path for unmodified rho.

13 years agogallivm: Less code duplication in log computation.
José Fonseca [Sat, 9 Oct 2010 11:11:20 +0000 (12:11 +0100)]
gallivm: Less code duplication in log computation.

13 years agoutil: Defined M_SQRT2 when not available.
José Fonseca [Sat, 9 Oct 2010 11:10:07 +0000 (12:10 +0100)]
util: Defined M_SQRT2 when not available.

13 years agogallivm: Handle code have ret correctly.
José Fonseca [Sat, 9 Oct 2010 11:08:25 +0000 (12:08 +0100)]
gallivm: Handle code have ret correctly.

Stop disassembling on unconditional backwards jumps.

13 years agollvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.
José Fonseca [Wed, 6 Oct 2010 20:01:38 +0000 (21:01 +0100)]
llvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.

13 years agollvmpipe: simplified SSE2 swz/unswz routines
Keith Whitwell [Fri, 1 Oct 2010 14:13:51 +0000 (15:13 +0100)]
llvmpipe: simplified SSE2 swz/unswz routines

We've been using these in the linear path for a while now.  Based on
Chris's SSSE3 code, but using only sse2 opcodes.  Speed seems to be
identical, but code is simpler & removes dependency on SSE3.

Should be easier to extend to other rgba8 formats.

13 years agollvmpipe: clean up shader pre/postamble, try to catch more early-z
Keith Whitwell [Sat, 9 Oct 2010 10:28:00 +0000 (11:28 +0100)]
llvmpipe: clean up shader pre/postamble, try to catch more early-z

Specifically, can do early-depth-test even when alpahtest or
kill-pixel are active, providing we defer the actual z write until the
final mask is avaialable.

Improves demos/fire.c especially in the case where you get close to
the trees.

13 years agollvmpipe: try to be sensible about whether to branch after mask updates
Keith Whitwell [Thu, 7 Oct 2010 14:01:07 +0000 (15:01 +0100)]
llvmpipe: try to be sensible about whether to branch after mask updates

Don't branch more than once in quick succession.  Don't branch at the
end of the shader.

13 years agogallivm: simpler uint8->float conversions
Keith Whitwell [Wed, 6 Oct 2010 18:09:03 +0000 (19:09 +0100)]
gallivm: simpler uint8->float conversions

LLVM seems to finds it easier to reason about these than our
mantissa-manipulation code.

13 years agogallivm: prefer blendvb for integer arguments
Keith Whitwell [Wed, 6 Oct 2010 18:10:30 +0000 (19:10 +0100)]
gallivm: prefer blendvb for integer arguments

13 years agogallivm: specialized x8z24 depthtest path
Keith Whitwell [Wed, 6 Oct 2010 17:21:56 +0000 (18:21 +0100)]
gallivm: specialized x8z24 depthtest path

Avoid unnecessary masking of non-existant stencil component.

13 years agollvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs
Keith Whitwell [Thu, 7 Oct 2010 18:01:12 +0000 (19:01 +0100)]
llvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs

Better than GALLIVM_DEBUG if you're only interested in fragment shaders.

13 years agollvmpipe: store zero into all alloca'd values
Keith Whitwell [Thu, 7 Oct 2010 18:49:20 +0000 (19:49 +0100)]
llvmpipe: store zero into all alloca'd values

Fixes slowdown in isosurf with earlier versions of llvm.

13 years agollvmpipe: use alloca for fs color outputs
Keith Whitwell [Thu, 7 Oct 2010 17:59:54 +0000 (18:59 +0100)]
llvmpipe: use alloca for fs color outputs

Don't try to emit our own phi's, let llvm mem2reg do it for us.

13 years agollvmpipe: defer attribute interpolation until after mask and ztest
Keith Whitwell [Wed, 6 Oct 2010 21:25:48 +0000 (22:25 +0100)]
llvmpipe: defer attribute interpolation until after mask and ztest

Don't calculate 1/w for quads which aren't visible...

13 years agollvmpipe: Prevent z > 1.0
José Fonseca [Wed, 6 Oct 2010 19:42:30 +0000 (20:42 +0100)]
llvmpipe: Prevent z > 1.0

The current interpolation schemes causes precision loss.

Changing the operation order helps, but does not completely avoid the
problem.

The only short term solution is to clamp z to 1.0.

This is unfortunate, but probably unavoidable until interpolation is
improved.

13 years agogallivm: Do size computations simultanously for all dimensions (AoS).
José Fonseca [Sat, 9 Oct 2010 08:34:31 +0000 (09:34 +0100)]
gallivm: Do size computations simultanously for all dimensions (AoS).

Operate simultanouesly on <width, height, depth> vector as much as possible,
instead of doing the operations on vectors with broadcasted scalars.

Also do the 24.8 fixed point scalar with integer shift of the texture size,
for unnormalized coordinates.

AoS path only for now -- the same thing can be done for SoA.

13 years agollvmpipe: fix rasterization of vertical lines on pixel boundaries
Zack Rusin [Thu, 7 Oct 2010 20:26:17 +0000 (16:26 -0400)]
llvmpipe: fix rasterization of vertical lines on pixel boundaries

13 years agoi965: Initialize member variables.
Vinson Lee [Fri, 8 Oct 2010 23:40:29 +0000 (16:40 -0700)]
i965: Initialize member variables.

Fixes these GCC warnings.
brw_wm_fp.c: In function 'search_or_add_const4f':
brw_wm_fp.c:92: warning: 'reg.Index2' is used uninitialized in this function
brw_wm_fp.c:84: note: 'reg.Index2' was declared here
brw_wm_fp.c:92: warning: 'reg.RelAddr2' is used uninitialized in this function
brw_wm_fp.c:84: note: 'reg.RelAddr2' was declared here

13 years agoi965: Silence unused variable warning on non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 23:30:59 +0000 (16:30 -0700)]
i965: Silence unused variable warning on non-debug builds.

Fixes this GCC warning.
brw_vs.c: In function 'do_vs_prog':
brw_vs.c:46: warning: unused variable 'ctx'

13 years agoi965: Silence unused variable warning on non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 23:02:59 +0000 (16:02 -0700)]
i965: Silence unused variable warning on non-debug builds.

Fixes this GCC warning.
brw_eu_emit.c: In function 'brw_math2':
brw_eu_emit.c:1189: warning: unused variable 'intel'

13 years agoi915: Silence unused variable warning in non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 22:49:02 +0000 (15:49 -0700)]
i915: Silence unused variable warning in non-debug builds.

Fixes this GCC warning.
i915_vtbl.c: In function 'i915_assert_not_dirty':
i915_vtbl.c:670: warning: unused variable 'dirty'

13 years agogallivm: make use of new iround code in lp_bld_conv.
Roland Scheidegger [Fri, 8 Oct 2010 22:35:58 +0000 (00:35 +0200)]
gallivm: make use of new iround code in lp_bld_conv.

Only requires sse2 now.

13 years agogallivm: optimize soa linear clamp to edge wrap mode a bit
Roland Scheidegger [Fri, 8 Oct 2010 22:14:11 +0000 (00:14 +0200)]
gallivm: optimize soa linear clamp to edge wrap mode a bit

Clamp against 0 instead of -0.5, which simplifies things.
The former version would have resulted in both int coords being zero
(in case of coord being smaller than 0) and some "unused" weight value,
whereas now the int coords will be 0 and 1, but weight will be 0, hence the
lerp should produce the same value.
Still not happy about differences between normalized and non-normalized...

13 years agogallivm: avoid unnecessary URem in linear wrap repeat case
Roland Scheidegger [Fri, 8 Oct 2010 19:08:49 +0000 (21:08 +0200)]
gallivm: avoid unnecessary URem in linear wrap repeat case

Haven't looked at what code this exactly generates but URem can't be fast.
Instead of using two URem only use one and replace the second one with
select/add (this is what the corresponding aos code already does).

13 years agogallivm: more linear tex wrap mode calculation simplification
Roland Scheidegger [Fri, 8 Oct 2010 19:06:04 +0000 (21:06 +0200)]
gallivm: more linear tex wrap mode calculation simplification

Rearrange order of operations a bit to make some clamps easier.
All calculations should be equivalent.
Note there seems to be some inconsistency in the clamp to edge case
wrt normalized/non-normalized coords, could potentially simplify this too.

13 years agogallivm: optimize some tex wrap mode calculations a bit
Roland Scheidegger [Fri, 8 Oct 2010 18:57:50 +0000 (20:57 +0200)]
gallivm: optimize some tex wrap mode calculations a bit

Sometimes coords are clamped to positive numbers before doing conversion
to int, or clamped to 0 afterwards, in this case can use itrunc
instead of ifloor which is easier. This is only the case for nearest
calculations unfortunately, except linear MIRROR_CLAMP_TO_EDGE which
for the same reason can use a unsigned float build context so the
ifloor_fract helper can reduce this to itrunc in the ifloor helper itself.

13 years agogallivm: replace sub/floor/ifloor combo with ifloor_fract
Roland Scheidegger [Fri, 8 Oct 2010 16:43:49 +0000 (18:43 +0200)]
gallivm: replace sub/floor/ifloor combo with ifloor_fract

13 years agogallivm: faster iround implementation for sse2
Roland Scheidegger [Fri, 8 Oct 2010 16:38:25 +0000 (18:38 +0200)]
gallivm: faster iround implementation for sse2

sse2 supports round to nearest directly (or rather, assuming default nearest
rounding mode in MXCSR). Use intrinsic to use this rather than round (sse41)
or bit manipulation whenever possible.

13 years agogallivm: fix trunc/itrunc comment
Roland Scheidegger [Fri, 8 Oct 2010 16:31:38 +0000 (18:31 +0200)]
gallivm: fix trunc/itrunc comment

trunc of -1.5 is -1.0 not 1.0...

13 years agoi915: Silence unused variable warning in non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 22:33:44 +0000 (15:33 -0700)]
i915: Silence unused variable warning in non-debug builds.

Fixes this GCC warning.
i830_vtbl.c: In function 'i830_assert_not_dirty':
i830_vtbl.c:704: warning: unused variable 'i830'

13 years agodocs: Update status of GL 3.x related extensions
Ian Romanick [Fri, 8 Oct 2010 21:55:27 +0000 (14:55 -0700)]
docs: Update status of GL 3.x related extensions

13 years agodocs: skeleton for 7.10 release notes
Ian Romanick [Fri, 8 Oct 2010 21:50:34 +0000 (14:50 -0700)]
docs: skeleton for 7.10 release notes

13 years agoglsl: Remove const decoration from inlined function parameters
Ian Romanick [Fri, 8 Oct 2010 21:29:11 +0000 (14:29 -0700)]
glsl: Remove const decoration from inlined function parameters

The constness of the function parameter gets inlined with the rest of
the function.  However, there is also an assignment to the parameter.
If this occurs inside a loop the loop analysis code will get confused
by the assignment to a read-only variable.

Fixes bugzilla #30552.

NOTE: this is a candidate for the 7.9 branch.

13 years agointel: Enable GL_ARB_explicit_attrib_location
Ian Romanick [Thu, 7 Oct 2010 22:15:44 +0000 (15:15 -0700)]
intel: Enable GL_ARB_explicit_attrib_location

13 years agomain: Enable GL_ARB_explicit_attrib_location for swrast
Ian Romanick [Tue, 5 Oct 2010 23:01:17 +0000 (16:01 -0700)]
main: Enable GL_ARB_explicit_attrib_location for swrast

13 years agoglsl: Add linker support for explicit attribute locations
Ian Romanick [Fri, 8 Oct 2010 00:21:22 +0000 (17:21 -0700)]
glsl: Add linker support for explicit attribute locations

13 years agoglsl: Track explicit location in AST to IR translation
Ian Romanick [Thu, 7 Oct 2010 22:13:38 +0000 (15:13 -0700)]
glsl: Track explicit location in AST to IR translation

13 years agoglsl: Regenerate files changes by previous commit
Ian Romanick [Wed, 6 Oct 2010 00:03:25 +0000 (17:03 -0700)]
glsl: Regenerate files changes by previous commit

13 years agoglsl: Add parser support for GL_ARB_explicit_attrib_location layouts
Ian Romanick [Wed, 6 Oct 2010 00:00:31 +0000 (17:00 -0700)]
glsl: Add parser support for GL_ARB_explicit_attrib_location layouts

Only layout(location=#) is supported.  Setting the index requires GLSL
1.30 and GL_ARB_blend_func_extended.

13 years agoglcpp: Regenerate files changes by previous commit
Ian Romanick [Tue, 5 Oct 2010 23:03:12 +0000 (16:03 -0700)]
glcpp: Regenerate files changes by previous commit

13 years agoglcpp: Add the define for ARB_explicit_attrib_location when present
Ian Romanick [Tue, 5 Oct 2010 23:02:38 +0000 (16:02 -0700)]
glcpp: Add the define for ARB_explicit_attrib_location when present

13 years agoglsl: Regenerate files modified by previous commits
Ian Romanick [Tue, 5 Oct 2010 23:40:00 +0000 (16:40 -0700)]
glsl: Regenerate files modified by previous commits

13 years agoglsl: Wrap ast_type_qualifier contents in a struct in a union
Ian Romanick [Tue, 5 Oct 2010 23:38:47 +0000 (16:38 -0700)]
glsl: Wrap ast_type_qualifier contents in a struct in a union

This will ease adding non-bit fields in the near future.

13 years agoglsl: Clear type_qualifier using memset
Ian Romanick [Tue, 5 Oct 2010 23:23:32 +0000 (16:23 -0700)]
glsl: Clear type_qualifier using memset

13 years agoglsl: Slight refactor of error / warning checking for ARB_fcc layout
Ian Romanick [Tue, 5 Oct 2010 23:18:56 +0000 (16:18 -0700)]
glsl: Slight refactor of error / warning checking for ARB_fcc layout

13 years agoglsl: Refactor 'layout' grammar to match GLSL 1.60 spec grammar
Ian Romanick [Tue, 5 Oct 2010 23:14:18 +0000 (16:14 -0700)]
glsl: Refactor 'layout' grammar to match GLSL 1.60 spec grammar

13 years agoglsl: Fail linking if assign_attribute_locations fails
Ian Romanick [Fri, 8 Oct 2010 00:20:15 +0000 (17:20 -0700)]
glsl: Fail linking if assign_attribute_locations fails

13 years agor600g: Silence uninitialized variable warning.
Vinson Lee [Fri, 8 Oct 2010 21:17:14 +0000 (14:17 -0700)]
r600g: Silence uninitialized variable warning.

13 years agor600g: Silence uninitialized variable warning.
Vinson Lee [Fri, 8 Oct 2010 21:14:16 +0000 (14:14 -0700)]
r600g: Silence uninitialized variable warning.

13 years agor600g: Silence uninitialized variable warning.
Vinson Lee [Fri, 8 Oct 2010 21:08:50 +0000 (14:08 -0700)]
r600g: Silence uninitialized variable warning.

13 years agogallivm: Remove unnecessary header.
Vinson Lee [Fri, 8 Oct 2010 21:03:10 +0000 (14:03 -0700)]
gallivm: Remove unnecessary header.

13 years agoi965: Add register coalescing to the new FS backend.
Eric Anholt [Tue, 5 Oct 2010 17:29:42 +0000 (10:29 -0700)]
i965: Add register coalescing to the new FS backend.

Improves performance of my GLSL demo 14.3% (+/- 4%, n=4) by
eliminating the moves used in ir_assignment and ir_swizzle handling.
Still 16.5% to go to catch up to the Mesa IR backend, presumably
because instructions are almost perfectly mis-scheduled now.

13 years agoi965: Enable attribute swizzling (repositioning) in the gen6 SF.
Eric Anholt [Fri, 8 Oct 2010 18:16:16 +0000 (11:16 -0700)]
i965: Enable attribute swizzling (repositioning) in the gen6 SF.

We were trying to remap a fully-filled array down to only handing the
WM the components it uses.  This is called attribute swizzling, and if
you don't enable it you just get 1:1 mappings of inputs to outputs.

This almost fixes glsl-routing, except for the highest gl_TexCoord[]
indices.

13 years agoi965: Fix new FS gen6 interpolation for sparsely-populated arrays.
Eric Anholt [Fri, 8 Oct 2010 18:14:48 +0000 (11:14 -0700)]
i965: Fix new FS gen6 interpolation for sparsely-populated arrays.

We'd overwrite the same element twice.

13 years agoi965: Fix gen6 WM push constants updates.
Eric Anholt [Fri, 8 Oct 2010 18:33:40 +0000 (11:33 -0700)]
i965: Fix gen6 WM push constants updates.

We would compute a new buffer, but never point the hardware at the new
buffer.  This partially fixes glsl-routing, as now it get the updated
uniform for which attribute to draw.

13 years agogallivm: Help for combined extraction and broadcasting.
José Fonseca [Fri, 8 Oct 2010 18:48:16 +0000 (19:48 +0100)]
gallivm: Help for combined extraction and broadcasting.

Doesn't change generated code quality, but saves some typing.

13 years agollvmpipe: First minify the texture size, then broadcast.
José Fonseca [Fri, 8 Oct 2010 18:11:32 +0000 (19:11 +0100)]
llvmpipe: First minify the texture size, then broadcast.

13 years agogallivm: Move into the as much of the second level code as possible.
José Fonseca [Fri, 8 Oct 2010 17:24:54 +0000 (18:24 +0100)]
gallivm: Move into the as much of the second level code as possible.

Also, pass more stuff trhough the sample build context, instead of
arguments.

13 years agoi965: Handle swizzles in the addition of YUV texture constants.
Eric Anholt [Fri, 8 Oct 2010 05:37:36 +0000 (22:37 -0700)]
i965: Handle swizzles in the addition of YUV texture constants.

If someone happened to land a set in a different swizzle order, we
would have assertion failed.

13 years agoi965: Drop the check for YUV constants in the param list.
Eric Anholt [Fri, 8 Oct 2010 05:39:41 +0000 (22:39 -0700)]
i965: Drop the check for YUV constants in the param list.

_mesa_add_unnamed_constant() already does that.

13 years agoi965: Drop the check for duplicate _mesa_add_state_reference.
Eric Anholt [Fri, 8 Oct 2010 05:25:35 +0000 (22:25 -0700)]
i965: Drop the check for duplicate _mesa_add_state_reference.

_mesa_add_state_reference does that check for us anyway.

13 years agomesa: Simplify a bit of _mesa_add_state_reference using memcmp.
Eric Anholt [Fri, 8 Oct 2010 05:24:38 +0000 (22:24 -0700)]
mesa: Simplify a bit of _mesa_add_state_reference using memcmp.

13 years agogallivm: Warn when doing inefficient integer comparisons.
José Fonseca [Fri, 8 Oct 2010 16:37:18 +0000 (17:37 +0100)]
gallivm: Warn when doing inefficient integer comparisons.

13 years agogallivm: Avoid control flow for two-sided stencil test.
José Fonseca [Fri, 8 Oct 2010 15:56:45 +0000 (16:56 +0100)]
gallivm: Avoid control flow for two-sided stencil test.

13 years agollvmpipe: fix off-by-one in tri_16
Keith Whitwell [Tue, 5 Oct 2010 15:50:22 +0000 (16:50 +0100)]
llvmpipe: fix off-by-one in tri_16

13 years agollvmpipe: add rast_tri_4_16 for small lines and points
Keith Whitwell [Fri, 8 Oct 2010 16:21:03 +0000 (17:21 +0100)]
llvmpipe: add rast_tri_4_16 for small lines and points

13 years agollvmpipe: clean up setup_tri a little
Keith Whitwell [Thu, 23 Sep 2010 18:56:48 +0000 (19:56 +0100)]
llvmpipe: clean up setup_tri a little

13 years agogallivm: round rather than truncate in new 4x4f->1x16ub conversion path
Keith Whitwell [Wed, 6 Oct 2010 10:48:10 +0000 (11:48 +0100)]
gallivm: round rather than truncate in new 4x4f->1x16ub conversion path

13 years agogallivm: Use the wrappers for SSE pack intrinsics.
José Fonseca [Mon, 4 Oct 2010 16:42:18 +0000 (17:42 +0100)]
gallivm: Use the wrappers for SSE pack intrinsics.

Fixes assertion failures on LLVM 2.6.

13 years agogallivm: special case conversion 4x4f to 1x16ub
Keith Whitwell [Mon, 4 Oct 2010 14:00:34 +0000 (15:00 +0100)]
gallivm: special case conversion 4x4f to 1x16ub

Nice reduction in the number of operations required for final color
output in many shaders.

13 years agollvmpipe: avoid overflow in triangle culling
Keith Whitwell [Fri, 8 Oct 2010 16:06:05 +0000 (17:06 +0100)]
llvmpipe: avoid overflow in triangle culling

Avoid multiplying fixed-point values.  Calculate triangle area in
floating point use that for culling.

Lift area calculations up a level as we are already doing this in the
triangle_both() case.

Would like to share the calculated area with attribute interpolation,
but the way the code is structured makes this difficult.

13 years agollvmpipe: fail gracefully on oom in scene creation
Keith Whitwell [Fri, 8 Oct 2010 16:01:16 +0000 (17:01 +0100)]
llvmpipe: fail gracefully on oom in scene creation

13 years agogallivm: Implement brilinear filtering.
José Fonseca [Fri, 8 Oct 2010 14:50:28 +0000 (15:50 +0100)]
gallivm: Implement brilinear filtering.

13 years agogallivm: Fix copy'n'paste typo in previous commit.
José Fonseca [Fri, 8 Oct 2010 13:09:22 +0000 (14:09 +0100)]
gallivm: Fix copy'n'paste typo in previous commit.

13 years agogallivm: Clamp mipmap level and zero mip weight simultaneously.
José Fonseca [Fri, 8 Oct 2010 13:05:50 +0000 (14:05 +0100)]
gallivm: Clamp mipmap level and zero mip weight simultaneously.

13 years agogallivm: Use lp_build_ifloor_fract for lod computation.
José Fonseca [Fri, 8 Oct 2010 12:36:18 +0000 (13:36 +0100)]
gallivm: Use lp_build_ifloor_fract for lod computation.

Forgot this one before.

13 years agogallivm: Don't compute the second mipmap level when frac(lod) == 0
José Fonseca [Fri, 8 Oct 2010 12:26:37 +0000 (13:26 +0100)]
gallivm: Don't compute the second mipmap level when frac(lod) == 0

13 years agogallivm: Simplify lp_build_mipmap_level_sizes' interface.
José Fonseca [Fri, 8 Oct 2010 12:24:39 +0000 (13:24 +0100)]
gallivm: Simplify lp_build_mipmap_level_sizes' interface.

13 years agogallivm: Do not do mipfiltering when magnifying.
José Fonseca [Fri, 8 Oct 2010 09:54:23 +0000 (10:54 +0100)]
gallivm: Do not do mipfiltering when magnifying.

If lod < 0, then invariably follows that ilevel0 == ilevel1 == 0.

13 years agor600g: Remove unnecessary header.
Vinson Lee [Fri, 8 Oct 2010 11:56:49 +0000 (04:56 -0700)]
r600g: Remove unnecessary header.

13 years agor600g: drop width/height per level storage.
Dave Airlie [Fri, 8 Oct 2010 09:55:05 +0000 (19:55 +1000)]
r600g: drop width/height per level storage.

these aren't used anywhere, so just waste memory.

13 years agoi965: Normalize cubemap coordinates like is done in the Mesa IR path.
Eric Anholt [Wed, 6 Oct 2010 05:30:42 +0000 (22:30 -0700)]
i965: Normalize cubemap coordinates like is done in the Mesa IR path.

Fixes glsl-fs-texturecube-2-*

13 years agoi965: Disable emitting if () statements on gen6 until we really fix them.
Eric Anholt [Thu, 7 Oct 2010 16:13:09 +0000 (09:13 -0700)]
i965: Disable emitting if () statements on gen6 until we really fix them.

13 years agor600g: add some RG texture format support.
Dave Airlie [Thu, 7 Oct 2010 23:35:17 +0000 (09:35 +1000)]
r600g: add some RG texture format support.

13 years agogles2: Add GL_EXT_texture_format_BGRA8888 support
Kristian Høgsberg [Thu, 7 Oct 2010 21:03:53 +0000 (17:03 -0400)]
gles2: Add GL_EXT_texture_format_BGRA8888 support

13 years agogallivm: Vectorize the rho computation.
José Fonseca [Thu, 7 Oct 2010 21:03:59 +0000 (22:03 +0100)]
gallivm: Vectorize the rho computation.

13 years agor600g: fix Z export enable bits.
Dave Airlie [Thu, 7 Oct 2010 05:32:05 +0000 (15:32 +1000)]
r600g: fix Z export enable bits.

we should be checking output array not input to decide.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: use format from the sampler view not from the texture.
Dave Airlie [Thu, 7 Oct 2010 05:13:09 +0000 (15:13 +1000)]
r600g: use format from the sampler view not from the texture.

we want to use the format from the sampler view which isn't always the
same as the texture format when creating sampler views.

13 years agor600g: fix evergreen interpolation setup
Andre Maasikas [Wed, 6 Oct 2010 18:14:15 +0000 (21:14 +0300)]
r600g: fix evergreen interpolation setup

interp data is stored in gpr0 so first interp overwrote it
and subsequent ones got wrong values

reserve register 0 so it's not used for attribs.
alternative is to interpolate attrib0 last (reverse, as r600c does)

13 years agost/vega: Fix version check in context creation.
Chia-I Wu [Thu, 7 Oct 2010 04:14:38 +0000 (12:14 +0800)]
st/vega: Fix version check in context creation.

This fixes a regression since 4531356817ec8383ac35932903773de67af92e37.