Commit Graph

40221 Commits

Author SHA1 Message Date
Dave Airlie 510c503762 r300g: clean up warning due to unknown cap. 2010-10-15 08:46:16 +10:00
Keith Whitwell 8260ab9346 r600g: handle absolute modifier in shader translator
This was being classed as unsupported in one place but used in others.
Enabling it seems to work fine.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-15 08:33:50 +10:00
Keith Whitwell c28f764572 r600g: emit hardware linewidth
Tested with demos/pixeltest - line rasterization doesn't seem to be
set up for GL conventions yet, but at least width is respected now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-15 08:33:25 +10:00
Keith Whitwell cbf2fb5543 r600/drm: fix segfaults in winsys create failure path
Would try to destroy radeon->cman, radeon->kman both which were still
NULL.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-15 08:33:00 +10:00
Hui Qi Tay 26ff7523b6 draw: sanitize llvm variant key
Fixes recompilation, but seems to be broken with llvm 2.8.
2010-10-14 22:34:10 +01:00
Kenneth Graunke 4bab22bca3 i965: Clean up a warning in the old fragment backend.
Hopefully this code can just go away soon.
2010-10-14 13:19:23 -07:00
Eric Anholt a81d423d93 i965: Enable the new FS backend on pre-gen6 as well.
It is now to the point where we have no regressing piglit tests.  It
also fixes Yo Frankie! and Humus DynamicBranching, probably due to the
piglit bias tests that work that didn't on the Mesa IR backend.

As a downside, performance takes about a 5-10% performance hit at the
moment (e.g. nexuiz 19.8fps -> 18.8fps), which I plan to resolve by
reintroducing 16-wide fragment shaders where possible.  It is a win,
though, for fragment shaders using flow control.
2010-10-14 12:40:50 -07:00
Kenneth Graunke 897f6d3c7d i965: Correctly emit the RNDZ instruction.
Simply using RNDU, RNDZ, or RNDE does not produce the desired result.
Rather, the RND* instructions place a value in the destination register
that may be 1 less than the correct answer.  They can also set per-channel
"increment bits" in a flag register, which, if set, mean dest needs to
be incremented by 1.  A second instruction - a predicated add -
completes the job.

Notably, RNDD always produces the correct answer in a single
instruction.

Fixes piglit test glsl-fs-trunc.
2010-10-14 12:40:16 -07:00
Kenneth Graunke f541b685aa i965: Use RNDZ for ir_unop_trunc in the new FS.
The existing code used RNDD, which rounds down, rather than toward zero.
2010-10-14 12:40:16 -07:00
Kenneth Graunke f9bd4c6c26 glsl: Refresh autogenerated file builtin_function.cpp. 2010-10-14 12:40:16 -07:00
Kenneth Graunke 090dd4fcc5 glsl: Add front-end support for the "trunc" built-in. 2010-10-14 12:40:16 -07:00
Kenneth Graunke c4226142f3 i965: Use logical-not when emitting ir_unop_ceil.
Fixes piglit test glsl-fs-ceil.
2010-10-14 12:40:16 -07:00
Eric Anholt 5dd07b442e i965: Add peepholing of conditional mod generation from expressions.
This cuts usually 2 out of 3 instructions for flag reg generation (if
statements, conditional assignment) by producing the conditional mod
in the expression representing the boolean value.

Fixes glsl-fs-vec4-indexing-temp-dst-in-nested-loop-combined (register
allocation no longer fails for the conditional generation
proliferation)
2010-10-14 12:02:54 -07:00
Eric Anholt d5599c0b6a i965: Add a function for handling the move of boolean values to flag regs.
This will be a place to peephole comparisions directly to the flag
regs, and for now avoids using MOV with conditional mod on gen6, which
is now illegal.
2010-10-14 12:02:54 -07:00
Kristian Høgsberg 1d33e940d2 Only install vtxfmt tables for OpenGL
GLES1 and GLES2 install their own exec pointers and don't need the
Save table.  Also, the SET_* macros use different indices for the different
APIs so the offsets used in vtxfmt.c are actually wrong for the ES APIs.
2010-10-14 15:00:22 -04:00
Eric Anholt 4f88550ba0 i965: Add a pass to the FS to split virtual GRFs to float channels.
Improves nexuiz performance 0.91% (+/- 0.54%, n=8)
2010-10-14 10:42:55 -07:00
Eric Anholt b8613d70da i965: Update the live interval when coalescing regs. 2010-10-14 10:42:55 -07:00
Eric Anholt 0c6752026c i965: Set class_sizes[] for the aligned reg pair class.
So far, I've only seen this be a valgrind warning and not a real failure.
2010-10-14 10:42:55 -07:00
Keith Whitwell f0bd76f28d llvmpipe: don't try to emit non-existent color outputs 2010-10-14 14:08:20 +01:00
Kristian Høgsberg 81ccb3e2ce Drop the "neutral" tnl module
Just always check for FLUSH_UPDATE_CURRENT and call Driver.BeginVertices
when necessary.  By using the unlikely() macros, this ends up as
a 10% performance improvement (for isosurf, anyway) over the old,
complicated function pointer swapping.
2010-10-14 08:53:59 -04:00
Chia-I Wu d6de1f44a0 st/egl: Do not finish a fence that is NULL.
i915g would dereference the NULL pointer.
2010-10-14 17:16:14 +08:00
Chia-I Wu c97c77d869 st/egl: Access _EGLConfig directly.
Drop the use of SET_CONFIG_ATTRIB.  Fix the value of EGL_SAMPLE_BUFFERS
along the way.
2010-10-14 17:16:14 +08:00
Chia-I Wu 3fa21881b1 egl: Access config attributes directly.
Replace SET_CONFIG_ATTRIB/GET_CONFIG_ATTRIB by direct dereferences.
2010-10-14 17:16:14 +08:00
Chia-I Wu 282e514240 egl: Use attribute names as the _EGLConfig member names.
This makes _EGLConfig more accessible and scales better when new
attributes are added.
2010-10-14 17:14:44 +08:00
Dave Airlie 68014c8d19 r600g: select linear interpolate if tgsi input requests it 2010-10-14 14:27:34 +10:00
Dave Airlie 0637044add r600g: fixup typo in macro name 2010-10-14 14:19:37 +10:00
Dave Airlie 1e82c28fcf r600g: fixup pos/face ena/address properly 2010-10-14 14:15:15 +10:00
Dave Airlie 8a9f02c5d5 r600g: only pick centroid coordinate when asked.
TGSI tells us when to use this, its not hooked up from GLSL to MESA to TGSI yet though.
2010-10-14 14:15:15 +10:00
Zhenyu Wang 338b3f0b90 Revert "i965: fallback lineloop on sandybridge for now"
This reverts commit 73dab75b41.
2010-10-14 11:24:49 +08:00
Zhenyu Wang e8e79c1d7e i965: Fix GS hang on Sandybridge
Don't use r0 for FF_SYNC dest reg on Sandybridge, which would
smash FFID field in GS payload, that cause later URB write fail.
Also not use r0 in any URB write requiring allocate.
2010-10-14 11:24:42 +08:00
Eric Anholt a57ef244fc i965: Add support for rescaling GL_TEXTURE_RECTANGLE coords to new FS. 2010-10-13 17:07:43 -07:00
Fredrik Höglund a21a2748be r600g: Fix texture sampling with swizzled coords
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-14 09:25:29 +10:00
Dave Airlie 26dacce2c0 r600g: drop unused context members 2010-10-14 09:10:16 +10:00
Ian Romanick 7d8ba5f78f mesa: Clean up various 'unused parameter' warnings in shaderapi 2010-10-13 15:35:23 -07:00
Ian Romanick ccc1c4c6d9 mesa: Clean up two 'comparison between signed and unsigned' warnings 2010-10-13 15:35:23 -07:00
Ian Romanick 5cb24c4a75 mesa: Refactor validation of shader targets
Actually validate that the implementation supports the particular
shader target as well.  Previously if a driver only supported vertex
shaders, for example, glCreateShaderObjectARB would gladly create a
fragment shader.

NOTE: this is a candidate for the 7.9 branch.
2010-10-13 15:35:18 -07:00
Ian Romanick babe20b9d1 mesa: Silence unused variable warning 2010-10-13 15:30:20 -07:00
Ian Romanick 4a45595cf3 linker: Reject shaders that have unresolved function calls
This really amounts to just using the return value from
link_function_calls.  All the work was being done, but the result was
being ignored.

Fixes piglit test link-unresolved-funciton.

NOTE: this is a candidate for the 7.9 branch.
2010-10-13 15:30:19 -07:00
Vinson Lee 720bdfbceb glsl: Initialize variable in ir_derefence_array::constant_expression_value
Completely initialize data passed to ir_constant constructor.

Fixes piglit glsl-mat-from-int-ctor-03 valgrind uninitialized value
error on softpipe.
2010-10-13 14:21:08 -07:00
José Fonseca ae00e34e4b llvmpipe: Generalize the x8z24 fast path to all depth formats.
Together with the previous commit, this generalize the benefits of
d2cf757f44 to all depth formats, in
particular:
- simpler float -> 24unorm conversion
- avoid unsigned comparisons (not directly supported on SSE) by aligning
to the least significant bit
- avoid unecessary/repeated mask ANDing

Verified with trivial/tri-z that the exact same assembly is produced for
X8Z24.
2010-10-13 20:25:57 +01:00
José Fonseca 60c5d4735d gallivm: More accurate float -> 24bit & 32bit unorm conversion. 2010-10-13 20:25:57 +01:00
Brian Paul e487b665aa gallivm: work-around trilinear mipmap filtering regression with LLVM 2.8
The bug only happens on the AOS / fixed-pt path.
2010-10-13 12:37:42 -06:00
Vinson Lee bee22ed6b9 gallivm: Remove unnecessary header. 2010-10-13 11:18:40 -07:00
Brian Paul c3ed27ec76 x11: fix breakage from gl_config::visualType removal 2010-10-13 08:32:08 -06:00
José Fonseca 95c18abb03 llvmpipe: Unbreak Z32_FLOAT.
Z32_FLOAT uses <4 x float> as intermediate/destination type,
instead of <4 x i32>.

The necessary bitcasts got removed with commit
5b7eb868fd

Also use depth/stencil type and build contexts consistently, and
make the depth pointer argument a ordinary <i8 *>, to catch this
sort of issues in the future (and also to pave way for Z16 and
Z32_FLOAT_S8_X24 support).
2010-10-13 15:25:15 +01:00
Kristian Høgsberg f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Kristian Høgsberg 31aca27c08 Drop GLframebuffer typedef and just use struct gl_framebuffer 2010-10-13 09:43:24 -04:00
Kristian Høgsberg d3491e775f Rename GLvisual and __GLcontextModes to struct gl_config 2010-10-13 09:43:24 -04:00
Kristian Høgsberg 705e142dda gl: Remove unused GLcontextModes fields 2010-10-13 09:43:24 -04:00
Kristian Høgsberg e3c1c5377c Get rid of GL/internal/glcore.h
__GLcontextModes is always only used as an implementation internal struct
at this point and we shouldn't install glcore.h anymore.  Anything that
needs __GLcontextModes should just include the struct in its headers files
directly.
2010-10-13 09:43:24 -04:00