summaryrefslogtreecommitdiff
path: root/src/mesa
AgeCommit message (Collapse)Author
2010-07-26Merge remote branch 'origin/master' into glsl2Eric Anholt
This pulls in multiple i965 driver fixes which will help ensure better testing coverage during development, and also gets past the conflicts of the src/mesa/shader -> src/mesa/program move. Conflicts: src/mesa/Makefile src/mesa/main/shaderapi.c src/mesa/main/shaderobj.h
2010-07-26ir_to_mesa: Flag when we use the address reg.Eric Anholt
Hardware backends will get angry otherwise.
2010-07-26i965: Fix reversed naming of the operations in compute-to-mrf optimization.Eric Anholt
Also fix up comments, so that the difference between the two passes is clarified.
2010-07-26i965: Clean up a few magic numbers to use brw_defines.h defs.Eric Anholt
2010-07-26i965: Use MIN2, MAX2 instead of rolling our own.Eric Anholt
2010-07-26i965: Fold the "is arithmetic" bit of 965 opcodes into the opcode list.Eric Anholt
2010-07-26i965: Remove some duped register size/count definitionsEric Anholt
2010-07-26i965: Move the GRF-to-MRF optimizations to brw_optimize.c.Eric Anholt
2010-07-26i965: Improve (i.e. remove) some grf-to-mrf unnecessary movesBenjamin Segovia
Several routines directly analyze the grf-to-mrf moves from the Gen binary code. When it is possible, the mov is removed and the message register is directly written in the arithmetic instruction Also redundant mrf-to-grf moves are removed (frequently for example, when sampling many textures with the same uv) Code was tested with piglit, warsow and nexuiz on an Ironlake machine. No regression was found there Note that the optimizations are *deactivated* on Gen4 and Gen6 since I did test them properly yet. No reason there are bugs but who knows The optimizations are currently done in branch free programs *only*. Considering branches is more complicated and there are actually two paths: one for branch free programs and one for programs with branches Also some other optimizations should be done during the emission itself but considering that some code is shader between vertex shaders (AOS) and pixel shaders (SOA) and that we may have branches or not, it is pretty hard to both factorize the code and have one good set of strategies
2010-07-26i965: Allow VS MOVs to use immediate constants.Eric Anholt
Clarifies program assembly, and with a little tweak to always use constant_map, we could cut down on constant buffer payload.
2010-07-23mesa: Fix Cygwin build with llvm enabled.Vinson Lee
On Cygwin locale_t in not available but 'llvm-config --cppflags' adds the compiler flag -D_GNU_SOURCE to the build.
2010-07-23gallium: Fix build with llvm installed in non-standard locationChristopher James Halse Rogers
The es1, es2 and gl state trackers include draw_pipe.h, which includes the llvm headers if MESA_LLVM is true, so we also need to add the llvm seachpaths. Similarly, gallivm and other gallium drivers need LLVM_CFLAGS to build when enabled. Also fix xorg drivers, they didn't include LDFLAGS.
2010-07-23st/mesa: get rid of unneeded ureg_writemask()Brian Paul
2010-07-23st/mesa: fix bug in emit_adjusted_wpos()Brian Paul
If we bias x,y we still need to pass through z,w in case the shader reads gl_FragCoord.z or .w. Fixes fd.o bug 29183 (piglit glsl-bug-22603). NOTE: This is a candidate for the 7.8 branch.
2010-07-23i965: Cleanly fail programs with unsupported array access.Eric Anholt
This should be more useful for developers and for bug triaging than just generating wrong code.
2010-07-23i965: Add support for VS relative addressing of temporary arrays.Eric Anholt
Fixes glsl-vs-arrays. Bug #27388.
2010-07-22ir_to_mesa: Fix the swizzles on record and array dereferences.Eric Anholt
Fixes: glsl1-struct (1) glsl1-struct (2) glsl1-struct (3) glsl1-struct (4)
2010-07-22glsl: remove invalid _mesa_problem() callBrian Paul
Fixes fd.o bug 29206.
2010-07-22ir_to_mesa: Pretty up the printing of MESA_GLSL=dumpEric Anholt
2010-07-22mesa: Only complain about an infinite loop in a swrast program once.Eric Anholt
Chances are, if one fragment looped badly, others will too, and debugging output gets overwhelmed by the looping complaints.
2010-07-22ir_to_mesa: Add support for MESA_GLSL=dump environment var.Eric Anholt
2010-07-22i965: Respect VS/VP point size result when enabled.Eric Anholt
Fixes glsl-vs-point-size.
2010-07-22i965: Fix the disasm output for da16 src widths.Eric Anholt
This has confused me twice now. It's a fixed width of 4 (usually a region description of <4,4,1>), not 1. If it was 1, we'd have been skipping all over register space.
2010-07-22i965: Avoid extra MOV in VS indirect register reads.Eric Anholt
2010-07-22i965: Fix up VS temporary array access for fixed index offset != 0.Eric Anholt
2010-07-22r600: Flip point sprite coordinates when rendering to an FBO.Henri Verbeet
This supersedes http://lists.freedesktop.org/archives/mesa-dev/2010-July/001442.html.
2010-07-21glsl2: Use talloc on InfoLog handling in ValidateProgramEric Anholt
Fixes a segfault in Regnum Online.
2010-07-21i965: In the VS, multiply the address reg by the appropriate register size.Eric Anholt
The ARL value is increments of vec4 in the register file. But PROGRAM_TEMPORARY or PROGRAM_INPUT are stored as vec4s interleaved between the two verts being executed (thus a vec8 each), compared to PROGRAM_STATE_VAR being packed vec4s. Fixes: glsl-vs-arrays-2 glsl-vs-mov-after-deref (without regressing glsl-vs-arrays-3)
2010-07-21i965: Clean up brw_dp_READ_4_vs() now that it has fewer options to support.Eric Anholt
2010-07-21i965: Support relative addressed VS constant reads using the appropriate msg.Eric Anholt
The previous support was overly complicated by trying to use the same 1-OWORD message for both offsets.
2010-07-21i965: Fix the DP read msg_control definitions other than plain OWORD.Eric Anholt
2010-07-21i965: Clean up dead code from the VS get_constant/get_reladdr_constant split.Eric Anholt
2010-07-21i956: Set the execution size correctly for scratch space writes.Eric Anholt
Otherwise, the second half isn't written, and we end up reading back black. Fixes the remaining junk drawn in glsl-max-varyings, and will likely help with a number of large real-world shaders.
2010-07-21i965: Set the GEM domain flags for the scratch space.Eric Anholt
They go into the render cache, so while we don't care about their contents after execution, failing to note them could cause the writes to be flushed over important buffer contents later.
2010-07-21i965: Use the pretty define for 4-oword DP reads.Eric Anholt
2010-07-21i965: Set the send commit bit on register spills as required pre-gen6.Eric Anholt
Otherwise, the subsequent read may not get the written value.
2010-07-21i965: Add disasm for dataport reads (register unspilling).Eric Anholt
2010-07-21linker: Link built-in functions instead of including them in every shaderIan Romanick
This is an invasive set of changes. Each user shader tracks a set of other shaders that contain built-in functions. During compilation, function prototypes are imported from these shaders. During linking, the shaders are linked with these built-in-function shaders just like with any other shader.
2010-07-21st/mesa: implement depth clampMarek Olšák
2010-07-21ir_to_mesa: Add missing initializion of lod_info variable.Carl Worth
To quiet a compiler warning.
2010-07-21Add missing initialization of inOutFlags pointer.Carl Worth
This quiets a compiler warning, (and ensures a segmentation fault rather than memory corruption if this variable is written through before being initialized elsewhere).
2010-07-21i965: Remove an unused variable.Carl Worth
To quiet a compiler warning.
2010-07-21Regenerate program/lex.yy.cCarl Worth
Based on the two recent changes to program_lexer.l.
2010-07-21Avoid more warnings in flex-generated code.Carl Worth
This avoids two "function defined but not used" warnings. For the yyinput function we define YY_NO_INPUT which tells flex to simply not generate this function. For unput, we add a call to this function, but inside a while(0) so that it will quiet the warning without actually changing any functionality.
2010-07-21Avoid warnings in flex-generated code.Carl Worth
Add declarations for two functions generated in the flex ouput. It would be nicer if flex simply declared these generated functions as static, but for now we can at least avoid the warning this way.
2010-07-20glsl2: Implement utility routine to talloc reparent an IR treeIan Romanick
2010-07-20glsl2: Add a constructor for _mesa_glsl_parse_stateIan Romanick
Coming changes to the handling of built-in functions necessitate this.
2010-07-20glsl2: Add and use new variable mode ir_var_temporaryIan Romanick
This is quite a large patch because breaking it into smaller pieces would result in the tree being intermitently broken. The big changes are: * Add the ir_var_temporary variable mode * Change the ir_variable constructor to take the mode as a parameter and correctly specify the mode for all ir_varables. * Change the linker to not cross validate ir_var_temporary variables. * Change the linker to pull all ir_var_temporary variables from global scope into 'main'.
2010-07-20ir_to_mesa: Validate the linked shaders as well.Eric Anholt
This caught the failure in cloning of ir_dereference_record.
2010-07-20hash_table: Add new hash_table_remove function.Carl Worth
To allow for the removal of a single element from a hash table.