summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
AgeCommit message (Collapse)Author
2010-10-18i965: Remove unused variable.Kenneth Graunke
2010-10-18i965: Fix a weirdness in NOT handling.Eric Anholt
XOR makes much more sense. Note that the previous code would have failed for not(not(x)), but that gets optimized out.
2010-10-18i965: Disable the debug printf I added for FS disasm.Eric Anholt
2010-10-18i965: Add missing "break" statement.Kenneth Graunke
Otherwise, it would try to handle arrays as structures, use uninitialized memory, and crash.
2010-10-15i965: Set the type of the null register to fix gen6 FS comparisons.Eric Anholt
We often use reg_null as the destination when setting up the flag regs. However, on gen6 there aren't general implicit conversions to destination types from src types, so the comparison to produce the flag regs would be done on the integer result interpreted as a float. Hilarity ensued. Fixes 20 piglit cases.
2010-10-15i965: Fix indentation after commit 3322fbafIan Romanick
2010-10-14glsl: Slightly change the semantic of _LinkedShadersIan Romanick
Previously _LinkedShaders was a compact array of the linked shaders for each shader stage. Now it is arranged such that each slot, indexed by the MESA_SHADER_* defines, refers to a specific shader stage. As a result, some slots will be NULL. This makes things a little more complex in the linker, but it simplifies things in other places. As a side effect _NumLinkedShaders is removed. NOTE: This may be a candidate for the 7.9 branch. If there are other patches that get backported to 7.9 that use _LinkedShader, this patch should be cherry picked also.
2010-10-14i965: Fix texturing on pre-gen5.Eric Anholt
I broke it in 06fd639c519214b6ebcbf29127b6d9ed429f8641 by only testing 2 generations of hardware :(
2010-10-14i965: Add support for ir_unop_round_even via the RNDE instruction.Kenneth Graunke
2010-10-14i965: Enable the new FS backend on pre-gen6 as well.Eric Anholt
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-14i965: Use RNDZ for ir_unop_trunc in the new FS.Kenneth Graunke
The existing code used RNDD, which rounds down, rather than toward zero.
2010-10-14i965: Use logical-not when emitting ir_unop_ceil.Kenneth Graunke
Fixes piglit test glsl-fs-ceil.
2010-10-14i965: Add peepholing of conditional mod generation from expressions.Eric Anholt
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-14i965: Add a function for handling the move of boolean values to flag regs.Eric Anholt
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-14i965: Add a pass to the FS to split virtual GRFs to float channels.Eric Anholt
Improves nexuiz performance 0.91% (+/- 0.54%, n=8)
2010-10-14i965: Update the live interval when coalescing regs.Eric Anholt
2010-10-14i965: Set class_sizes[] for the aligned reg pair class.Eric Anholt
So far, I've only seen this be a valgrind warning and not a real failure.
2010-10-13i965: Add support for rescaling GL_TEXTURE_RECTANGLE coords to new FS.Eric Anholt
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-10-12i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.Eric Anholt
Fixes glsl-fs-i2b.
2010-10-11i965: Always use the new FS backend on gen6.Eric Anholt
It's now much more correct for gen6 than the old backend, with just 2 regressions I've found (one of which is common with pre-gen6 and will be fixed by an array splitting IR pass). This does leave the old Mesa IR backend getting used still when we don't have GLSL IR, but the plan is to get GLSL IR input to the driver for the ARB programs and fixed function by the next release.
2010-10-11i965: Fix gen6 pixel_[xy] setup to avoid mixing int and float src operands.Eric Anholt
Pre-gen6, you could mix int and float just fine. Now, you get goofy results. Fixes: glsl-arb-fragment-coord-conventions glsl-fs-fragcoord glsl-fs-if-greater glsl-fs-if-greater-equal glsl-fs-if-less glsl-fs-if-less-equal
2010-10-11i965: Expand uniform args to gen6 math to full registers to get hstride == 1.Eric Anholt
This is a hw requirement in math args. This also is inefficient, as we're calculating the same result 8 times, but then we've been doing that on pre-gen6 as well. If we're doing math on uniforms, though, we'd probably be better served by having some sort of mechanism for precalculating those results into another uniform value to use. Fixes 7 piglit math tests.
2010-10-11i965: Don't compute-to-MRF in gen6 math instructions.Eric Anholt
2010-10-11i965: Don't consider gen6 math instructions to write to MRFs.Eric Anholt
This was leftover from the pre-gen6 cleanups. One tests regresses where compute-to-MRF now occurs.
2010-10-11i965: Compute to MRF in the new FS backend.Eric Anholt
This didn't produce a statistically significant performance difference in my demo (n=4) or nexuiz (n=3), but it still seems like a good idea and is recommended by the HW team.
2010-10-11i965: Give the FB write and texture opcodes the info on base MRF, like math.Eric Anholt
2010-10-11i965: Give the math opcodes information on base mrf/mrf len.Eric Anholt
This is progress towards enabling a compute-to-MRF pass.
2010-10-11i965: Move FS backend structures to a header.Eric Anholt
It's time to start splitting some of this up.
2010-10-11i965: Reduce register interference checks for changed FS_OPCODE_DISCARD.Eric Anholt
While I don't know of any performance changes from this (once extra reg available out of 128), it makes the generated asm a lot cleaner looking.
2010-10-11i965: Split FS_OPCODE_DISCARD into two steps.Eric Anholt
Having the single opcode write then read the reg meant that single instruction opcodes had to consider their source regs to interfere with their dest regs.
2010-10-08i965: Add register coalescing to the new FS backend.Eric Anholt
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.
2010-10-08i965: Fix new FS gen6 interpolation for sparsely-populated arrays.Eric Anholt
We'd overwrite the same element twice.
2010-10-07i965: Normalize cubemap coordinates like is done in the Mesa IR path.Eric Anholt
Fixes glsl-fs-texturecube-2-*
2010-10-07i965: Disable emitting if () statements on gen6 until we really fix them.Eric Anholt
2010-10-06i965: Don't assume that WPOS is always provided on gen6 in the new FS.Eric Anholt
We sensibly only provide it if the FS asks for it. We could actually skip WPOS unless the FS needed WPOS.zw, but that's something for later. Fixes: glsl-texture2d and probably many others.
2010-10-06i965: Add support for gl_FrontFacing on gen6.Eric Anholt
Fixes glsl1-gl_FrontFacing var (2) with new FS.
2010-10-06i965: Refactor gl_FrontFacing setup out of general variable setup.Eric Anholt
2010-10-06i965: Gen6's sampler messages are the same as Ironlake.Eric Anholt
This should fix texturing in the new FS backend.
2010-10-06i965: Don't do 1/w multiplication in new FS for gen6Eric Anholt
Not needed now that we're doing barycentric.
2010-10-06i965: Fix botch in the header_present case in the new FS.Eric Anholt
I only set it on the color_regions == 0 case, missing the important case, causing GPU hangs on pre-gen6.
2010-10-06i965: Add back gen6 headerless FB writes to the new FS backend.Eric Anholt
It's not that hard to detect when we need the header.
2010-10-06i965: Also do constant propagation for the second operand of CMP.Eric Anholt
We could do the first operand as well by flipping the comparison, but this covered several CMPs in code I was looking at.
2010-10-06i965: Enable the constant propagation code.Eric Anholt
A debug disable had slipped in.
2010-10-04i965: Add support for gen6 FB writes to the new FS.Eric Anholt
This uses message headers for now, since we'll need it for MRT. We can cut out the header later.
2010-10-04i965: Add initial folding of constants into operand immediate slots.Eric Anholt
We could try to detect this in expression handling and do it proactively there, but it seems like less logic to do it in one optional pass at the end.
2010-10-04i965: Add trivial dead code elimination in the new FS backend.Eric Anholt
The glsl core should be handling most dead code issues for us, but we generate some things in codegen that may not get used, like the 1/w value or pixel deltas. It seems a lot easier this way than trying to work out up front whether we're going to use those values or not.
2010-10-04i965: Be more conservative on live interval calculation.Eric Anholt
This also means that our intervals now highlight dead code.
2010-10-02i965: Add support for EXT_texture_swizzle to the new FS backend.Eric Anholt
2010-10-01i965: Don't try to emit code if we failed register allocation.Eric Anholt