Commit Graph

34989 Commits

Author SHA1 Message Date
Vinson Lee 0a5666148b gallivm: Silence uninitialized variable warnings.
Fixes these GCC warnings.
gallivm/lp_bld_sample_aos.c: In function 'lp_build_sample_image_linear':
gallivm/lp_bld_sample_aos.c:439: warning: 'r_ipart' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:438: warning: 't_ipart' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:438: warning: 't_fpart' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:439: warning: 'r_fpart' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:438: warning: 't_fpart_hi' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:438: warning: 't_fpart_lo' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:439: warning: 'r_fpart_hi' may be used uninitialized in this function
gallivm/lp_bld_sample_aos.c:439: warning: 'r_fpart_lo' may be used uninitialized in this function
2010-10-21 11:10:15 -07:00
Chia-I Wu 16333e1fc4 mesa: Remove unused vtxfmt_tmp.h.
It was used by the "neutral" tnl module that was dropped in
81ccb3e2ce.
2010-10-21 22:03:34 +08:00
Dave Airlie f39e6c9c81 r600g: start splitting out common code from eg/r600.
no point duplicating code that doesn't touch hw, also make it easier
to spot mistakes
2010-10-21 19:58:09 +10:00
Dave Airlie e68c83a5a0 r600g: initial translate state support 2010-10-21 19:58:08 +10:00
Vinson Lee 3a54195679 draw: Remove unnecessary header. 2010-10-21 01:47:52 -07:00
Vinson Lee abc5435f22 llvmpipe: Remove unnecessary header. 2010-10-21 01:44:48 -07:00
Kenneth Graunke cc04347b8d glsl: Refresh autogenerated file builtin_function.cpp. 2010-10-21 00:14:38 -07:00
Kenneth Graunke 574c53f551 glsl: Add support for GLSL 1.30's modf built-in. 2010-10-21 00:14:37 -07:00
Kenneth Graunke 94a36faed7 glcpp: Refresh autogenerated lexer file. 2010-10-21 00:13:33 -07:00
Kenneth Graunke bd55ba568b glcpp: Return NEWLINE token for newlines inside multi-line comments.
This is necessary for the main compiler to get correct line numbers.
2010-10-21 00:13:33 -07:00
Dave Airlie 089aa0ba24 r600g: add texture tiling enable under a debug option.
At the moment you need kernel patches to have texture tiling work
with the kernel CS checker, so once they are upstream and the drm version
is bumped we can make this enable flip the other way most likely.
2010-10-21 13:40:45 +10:00
Dave Airlie cdd14668b6 r600g: add texture tiling alignment support.
this sets things up to align stride/height with tile sizes,
it also adds support for the 2D/1D array mode cross over point.
2010-10-21 13:37:54 +10:00
Dave Airlie 92ed84d115 r600g: introduce a per-driver resource flag for transfers.
this is to be used to decide not to tile a surface being used for transfers.
2010-10-21 13:36:01 +10:00
Dave Airlie 91e513044d r600g: add r600 surface to store the aligned height.
we need to know the aligned height when binding the surface to cb/zb,
not the gallium surface height.
2010-10-21 13:33:00 +10:00
Dave Airlie 388ce31baa r600g: start adding hooks for aligning width/height for tiles. 2010-10-21 13:32:08 +10:00
Dave Airlie ea5aab85fd r600g: move to per-miplevel array mode.
Since the hw transitions from 2D->1D sampling below the 2D macrotile
size we need to keep track of the array mode per level so we can
render to it using the CB.
2010-10-21 13:32:08 +10:00
Dave Airlie 206fbd9640 r600g: all non-0 mipmap levels need to be w/h aligned to POT.
this adds a new minify function to the driver to ensure this.
2010-10-21 13:20:14 +10:00
Vinson Lee 2e5764ccf4 swrast: Print out format on unexpected failure in _swrast_DrawPixels. 2010-10-20 15:27:48 -07:00
Kenneth Graunke b970da4d24 mesa: Remove FEATURE_ARB_shading_language_120 macro.
Everything should be able to support 1.20 at this point.
2010-10-20 15:07:47 -07:00
Kenneth Graunke a75da2c0e8 glsl: Remove useless ir_shader enumeration value. 2010-10-20 15:07:47 -07:00
Vinson Lee 460da0db4a glsl: Add assert for unhandled ir_shader case.
Silences this GCC warning.
ast_to_hir.cpp: In function 'void apply_type_qualifier_to_variable(const
ast_type_qualifier*, ir_variable*, _mesa_glsl_parse_state*, YYLTYPE*)'
ast_to_hir.cpp:1768: warning: enumeration value 'ir_shader' not handled
in switch
2010-10-20 14:10:26 -07:00
Brian Paul c492066071 draw: use float version of LLVM Mul/Add instructions
LLVM 2.8 is pickier about int vs float instructions and operands.
2010-10-20 14:56:42 -06:00
Brian Paul f36346c116 llvmpipe/draw: always enable LLVMAddInstructionCombiningPass()
We were working around an LLVM 2.5 bug but we're using LLVM 2.6 or later now.
This basically reverts commit baddcbc522.
This fixes the piglit bug/tri-tex-crash.c failure.
2010-10-20 14:49:07 -06:00
Orion Poplawski 5a3ac74ad5 osmesa: link against libtalloc
Otherwise consumers have to, and that's lame.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-20 15:54:57 -04:00
Vinson Lee 89c26866f0 r600g: Ensure r600_src is initialized in tgsi_exp function.
Silences these GCC warnings.
r600_shader.c: In function 'tgsi_exp':
r600_shader.c:2339: warning: 'r600_src[0].rel' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].abs' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].neg' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].chan' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].sel' is used uninitialized in this function
2010-10-20 12:44:08 -07:00
Vinson Lee 289900439f draw: Move loop variable declaration outside for loop.
Fixes MSVC build.
2010-10-19 23:48:59 -07:00
Keith Whitwell 05921fd4e5 draw: make sure viewport gets updated in draw llvm shader
The viewport state was being baked in at compile time (oops...)
2010-10-19 22:11:49 -07:00
Keith Whitwell cd6a31cd4a Merge branch 'llvm-cliptest-viewport' 2010-10-19 21:41:28 -07:00
Hui Qi Tay ab2e1edd1f draw: corrections to allow for different cliptest cases 2010-10-19 21:34:42 -07:00
Eric Anholt ae5698e604 i965: Use the new style of IF statement with embedded comparison on gen6.
"Everyone else" does it this way, so follow suit.  It's fewer
instructions, anyway.
2010-10-19 21:17:55 -07:00
Eric Anholt 6ea108e7db i965: Set the source operand types for gen6 if/else/endif to integer.
I don't think this should matter, but I'm not sure, and it's
recommended by a kernel checker in fulsim.
2010-10-19 21:17:55 -07:00
Eric Anholt d0c87b90a8 i965: Add EU emit support for gen6's new IF instruction with comparison. 2010-10-19 21:17:55 -07:00
Ian Romanick cc90e62d70 linker: Improve handling of unread/unwritten shader inputs/outputs
Previously some shader input or outputs that hadn't received location
assignments could slip through.  This could happen when a shader
contained user-defined varyings and was used with either
fixed-function or assembly shaders.

See the piglit tests glsl-[fv]s-user-varying-ff and
sso-user-varying-0[12].

NOTE: this is a candidate for the 7.9 branch.
2010-10-19 18:12:32 -07:00
Chad Versace 974fb466f2 glsl: Commit generated file glsl_lexer.cpp
Changes are due to commit "glsl: Fix lexer rule for ^=".
2010-10-19 13:17:33 -07:00
Chad Versace cba9062d58 glsl: Fix lexer rule for ^=
The caret is a special character, and needs to be quoted or escaped.
2010-10-19 13:17:33 -07:00
Chad Versace d03ac0f8d8 glsl: Implement ast-to-hir for bit-logic ops
Implement by adding to ast_expression::hir() the following cases:
    - ast_and_assign
    - ast_or_assign
    - ast_xor_assign
2010-10-19 13:17:33 -07:00
Chad Versace cfdbf8bc84 glsl: Define bit_logic_result_type() in ast_to_hir.cpp
This function type checks the operands of and returns the result type of
bit-logic operations.  It replaces the type checking performed in the
following cases of ast_expression::hir() :
    - ast_bit_and
    - ast_bit_or
    - ast_bit_xor
2010-10-19 13:17:33 -07:00
Chad Versace 338ed6ec29 glsl: Implement ast-to-hir for bit-shift-assignment
Implement by adding to ast_expression::hir() these cases:
    - ast_ls_assign
    - ast_rs_assign
2010-10-19 13:17:33 -07:00
Chad Versace c0197ab0af glsl: Define shift_result_type() in ast_to_hir.cpp
This function type checks the operands of and returns the result type of
bit-shift operations. It replaces the type checking performed in the following
cases of ast_expression::hir() :
    - ast_lshift
    - ast_rshift
2010-10-19 13:17:33 -07:00
Eric Anholt f30de69640 i965: Disable thread dispatch when the FS doesn't do any work.
This should reduce the cost of generating shadow maps, for example.
No performance difference measured in nexuiz, though it does trigger
this path.
2010-10-19 10:49:20 -07:00
Eric Anholt 2595589f1d i965: Remove the gen6 emit_mi_flushes I sprinkled around the driver.
These were for debugging in bringup.  Now that relatively complicated
apps are working, they haven't helped debug anything in quite a while.
2010-10-19 10:49:19 -07:00
Eric Anholt 32573792de i965: Tell the shader compiler when we expect depth writes for gen6.
This fixes hangs in some Z-writes-in-shaders tests, though other
pieces don't come out correctly.

Bug #30392: hang in fbo-fblit-d24s8. (still fails with bad color drawn
to some targets)
2010-10-19 10:48:56 -07:00
Vinson Lee 36dde032a4 llvmpipe: Initialize variable. 2010-10-19 10:14:11 -07:00
Vinson Lee 22725eb3e8 llvmpipe: Initialize state variable in debug_bin function. 2010-10-19 10:02:28 -07:00
Vinson Lee a143b6d5d8 st/xorg: Fix memory leak on error path. 2010-10-19 09:49:15 -07:00
Brian Paul ec2824cd86 gallivm: fix incorrect type for zero vector in emit_kilp()
http://bugs.freedesktop.org/show_bug.cgi?id=30974
2010-10-19 09:14:19 -06:00
Brian Paul 988b246c47 mesa: fix mesa version string construction
Now that MESA_MINOR=10, we no longer need the extra '0' in the
version string.
2010-10-19 08:59:27 -06:00
Thomas Hellstrom f82d984352 mesa: Make sure we have the talloc cflags when using the talloc headers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 14:18:20 +02:00
Thomas Hellstrom 9e96b695b0 st/xorg: Fix compilation for Xservers >= 1.10
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:08:06 +02:00
Thomas Hellstrom 543136d5bd xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 11:28:24 +02:00
Thomas Hellstrom 2ab7a8a3eb st/xorg: Don't use deprecated x*alloc / xfree functions
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 11:28:18 +02:00
Thomas Hellstrom 0301c9ac62 st/xorg: Fix compilation errors for Xservers compiled without Composite
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 11:28:08 +02:00
Thomas Hellstrom 0d0a6e9096 st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 11:27:54 +02:00
Vinson Lee f36a642030 r300/compiler: Remove unused variable. 2010-10-19 00:07:22 -07:00
Tom Stellard f822cc22f2 r300g: Add new debug option for logging vertex/fragment program stats 2010-10-18 20:51:05 -07:00
Tom Stellard 9d2ab6cb00 r300/compiler: Add a new function for more efficient dataflow analysis
rc_get_readers_normal() supplies a list of readers for a given
instruction.  This function is now being used by the copy propagate
optimization and will eventually be used by most other optimization
passes as well.
2010-10-18 20:51:05 -07:00
Tom Stellard 3cdff41d92 r300/compiler: Clear empty registers after constant folding 2010-10-18 20:51:05 -07:00
Tom Stellard 75734d0a37 r300/compiler: Fix incorrect assumption
It is possible for a single pair instruction arg to select from both an
RGB and an Alpha source.
2010-10-18 20:51:05 -07:00
Tom Stellard ad683577b2 r300/compiler: Create a helper function for merging presubtract sources 2010-10-18 20:51:05 -07:00
Kenneth Graunke 80c9f756b2 i965: Remove unused variable. 2010-10-18 18:44:19 -07:00
Kenneth Graunke 9c80fa824c glsl: Regenerate parser files. 2010-10-18 17:40:09 -07:00
Kenneth Graunke 0eb0b44647 glsl: Fix copy and paste error in ast_bit_and node creation.
All & operations were incorrectly being generated as ast_bit_or.
2010-10-18 17:40:09 -07:00
Eric Anholt 4af2937416 i965: Avoid blits in BufferCopySubdata on gen6.
Fixes glean/bufferObject.
2010-10-18 14:14:06 -07:00
Eric Anholt 641028debf i965: Fix scissor-offscreen on gen6 like we did pre-gen6. 2010-10-18 13:11:29 -07:00
Eric Anholt 022531209d i965: Assert out on gen6 VS constant buffer reads that hang the GPU for now. 2010-10-18 12:56:44 -07:00
Eric Anholt 66800a04e5 i965: Fix assertion failure on gen6 BufferSubData to busy BO.
Fixes fbo-blit and probably several other tests.
2010-10-18 12:56:44 -07:00
Eric Anholt 746e68c50b i965: Fix a weirdness in NOT handling.
XOR makes much more sense.  Note that the previous code would have
failed for not(not(x)), but that gets optimized out.
2010-10-18 12:56:44 -07:00
Eric Anholt ea213417f1 i965: Disable the debug printf I added for FS disasm. 2010-10-18 12:56:44 -07:00
Kenneth Graunke 65d4234c23 i965: Add missing "break" statement.
Otherwise, it would try to handle arrays as structures, use
uninitialized memory, and crash.
2010-10-18 12:21:20 -07:00
José Fonseca f37b114dc3 llvmpipe: Don't test rounding of x.5 numbers.
SSE4.1 has different rules, and so far this doesn't seem to cause any
problems with conformance test suites.
2010-10-18 09:35:21 -07:00
José Fonseca ac17c62ece gallivm: Add a note about SSE4.1's nearest mode rounding. 2010-10-18 09:32:35 -07:00
Brian Rogers 746b602fbd mesa: Add missing else in do_row_3D
This fixes erroneous "bad format in do_row()" messages

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-10-18 08:11:04 -06:00
Brian Paul 01e0aaefcc llvmpipe: remove lp_setup_coef*.c files from Makefile 2010-10-18 07:59:02 -06:00
Victor Tseng e19187e1be egl/i965: include inline_wrapper_sw_helper.h
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-10-18 07:55:52 -06:00
Kenneth Graunke b8276e46f5 glsl: Don't return NULL IR for erroneous bit-shift operators.
Existing code relies on IR being generated (possibly with error type)
rather than returning NULL.  So, don't break - go ahead and generate the
operation.  As long as an error is flagged, things will work out.

Fixes fd.o bug #30914.
2010-10-18 00:26:14 -07:00
Dave Airlie 8a74f7422b r600g: retrieve tiling info from kernel for shared buffers.
we need to know if the back is tiled so we can blit from it properly.
2010-10-18 13:46:42 +10:00
Dave Airlie 375613afe3 r600g: fix transfer function for tiling.
this makes readback with tiled back work better.
2010-10-18 13:46:42 +10:00
Dave Airlie c61b97d504 r600g: attempt to cleanup depth blit
cleanup what I'm nearly sure is unnecessary work in the depth blit code.
2010-10-18 13:46:25 +10:00
Dave Airlie 21c6459dfb r600g: depth needs to bound to ds 2010-10-18 13:39:55 +10:00
Dave Airlie 69f8eebe72 r600g: fix typo in tiling setup cb code. 2010-10-18 13:39:55 +10:00
Dave Airlie a1b7333c07 r600g: do proper tracking of views/samplers.
we need to do pretty much what r300g does in for this, this fixes some
issues seen while working on tiling.
2010-10-18 13:39:54 +10:00
Keith Whitwell 9da17fed2e llvmpipe: remove unused arg from jit_setup_tri function 2010-10-17 19:23:40 -07:00
Keith Whitwell 75799b8d02 llvmpipe: remove unused file 2010-10-17 19:11:47 -07:00
Keith Whitwell 0072acd447 Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts:
	src/gallium/drivers/llvmpipe/lp_setup_coef.c
	src/gallium/drivers/llvmpipe/lp_setup_coef.h
	src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c
	src/gallium/drivers/llvmpipe/lp_setup_point.c
	src/gallium/drivers/llvmpipe/lp_setup_tri.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.h
2010-10-17 19:09:42 -07:00
Keith Whitwell ca2b2ac131 llvmpipe: fail cleanly on malloc failure in lp_setup_alloc_triangle 2010-10-17 18:48:11 -07:00
Keith Whitwell 543fb77dde llvmpipe: remove setup fallback path 2010-10-17 18:29:28 -07:00
José Fonseca 4dfb43c6a6 gallivm: Comment lp_build_insert_new_block(). 2010-10-17 18:23:18 -07:00
Keith Whitwell b5236f3da4 llvmpipe: clean up fields in draw_llvm_variant_key 2010-10-17 17:53:29 -07:00
Dave Airlie 5b966f58e3 r600g: set tiling bits in hw state 2010-10-18 09:25:22 +10:00
Dave Airlie 7b3fa03883 r600g: get tiling info from kernel 2010-10-18 09:25:22 +10:00
Dave Airlie e8e20313af r600g: add defines for tiling 2010-10-18 09:25:22 +10:00
Dave Airlie 82114ac02a r600g: switch to a common formats.h file since they are in different regs 2010-10-18 09:13:46 +10:00
Vinson Lee c9d297162a llvmpipe: Return non-zero exit code for lp_test_round failures. 2010-10-17 14:09:53 -07:00
Hui Qi Tay c1d6b31866 draw: corrections for w coordinate 2010-10-17 10:57:43 -07:00
José Fonseca 4afad7d3ed llvmpipe: Initialize bld ctx via lp_build_context_init instead of ad-hoc and broken code. 2010-10-17 10:15:15 -07:00
José Fonseca a0add0446c llvmpipe: Fix bad refactoring.
'i' and 'chan' have random values here, which could cause a buffer
overflow in debug builds, if chan > 4.
2010-10-17 09:58:04 -07:00
José Fonseca dc5bdbe0f9 gallivm: Fix SoA cubemap derivative computation.
Derivatives are now scalar.

Broken since 17dbd41cf2.
2010-10-17 09:43:18 -07:00
José Fonseca 709699d2e2 llvmpipe: Ensure z_shift and z_width is initialized. 2010-10-17 07:45:08 -07:00
José Fonseca 914b0d34e8 llvmpipe: Fix depth-stencil regression.
If stencil is enabled then we need to load the z_dst, even if depth
testing is disabled.

This fixes reflect mesa demo.
2010-10-17 07:22:34 -07:00
Dave Airlie 98b3f27439 r600g: add evergreen ARL support.
Thanks to Alex Deucher for pointing out the FLT to int conversion is necessary
and writing an initial patch, this brings about 20 piglits, and I think this
is the last piece to make evergreen and r600 equal in terms of features.
2010-10-17 16:48:30 +10:00