summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_glsl.c
AgeCommit message (Collapse)Author
2010-09-28i965: fix const register count for sandybridgeZhenyu Wang
Sandybridge's PS constant buffer payload size is decided from push const buffer command, incorrect size would cause wrong data in payload for position and vertex attributes. This fixes coefficients for tex2d/tex3d.
2010-09-28i965: enable accumulator update in PS kernel too on sandybridgeZhenyu Wang
Accumulator update flag must be set for implicit update on sandybridge.
2010-09-28i965: Set up inputs to the fragment shader according to FP InputsRead.Eric Anholt
Sending down data that doesn't get read doesn't make any sense, and would make handling things like gl_FrontFacing and gl_PointCoord harder.
2010-09-28i965: Add support for attribute interpolation on Sandybridge.Eric Anholt
Things are simpler these days thanks to barycentric interpolation parameters being handed in in the payload.
2010-09-21i965: Share the KIL_NV implementation between glsl and non-glsl.Eric Anholt
2010-09-10intel: Remove noise opcode support from i915 and i965 driversIan Romanick
With recent changes to the GLSL compiler, these opcode should never be seen in these drivers.
2010-08-30i965: Make brw_CONT and brw_BREAK take the pop count.Eric Anholt
We always need to set it, so pass it in.
2010-08-27i965: Set the pop count on BRK/CONT inside of an if statement in the FS.Eric Anholt
This is the same as 8de8c97275e9555183a7e8f2238143657bbe60b2 for the VS, and fixes glsl-fs-if-nested-loop and the mandelbrot demo. Bug #29498
2010-08-20i965: Rename nr_depth_regs to nr_payload_regs.Eric Anholt
Only 8 out of the up to 13 regs are for source/dest depth, so the name wasn't particularly appropriate. Note that this doesn't count the constant or URB payload regs. Also, don't pre-divide by 2, so it's actually a number of registers.
2010-08-09i965: More s/stderr/stdout/ for program debug.Eric Anholt
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-02i965: Add support for the DP2 opcode, which we use for dot(vec2, vec2).Eric Anholt
The original glsl compiler would generate a.x * b.x + a.y * b.y, which we would do mul+mul+add for instead of this mul+mac. Fixes glsl-fs-dot-vec2.
2010-06-30i965: Add support for OPCODE_SSG.Eric Anholt
The old compiler didn't use SSG, and instead emitted SGT/SGT/SUB. We can do a little better for SSG than we do for the SGT series.
2010-06-10mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul
2010-05-14i965: Dump out the correct shared function for SEND on Ironlake.Eric Anholt
2010-04-21intel: Clean up chipset name and gen num for IronlakeZhenyu Wang
Rename old IGDNG to Ironlake, and set 'gen' number for Ironlake as 5, so tracking the features with generation num instead of special is_ironlake flag. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-03-24i965: Handle the negate and abs swizzles on brw_wm_glsl.c immediate args.Eric Anholt
Fixes piglit glsl-orangebook-ch06-bump, regressed with 4fc57322258a750c0a9cabc77372b5ccde1fa877
2010-03-22i965: Allow FS constants to be used as immediates instead of push/pull.Eric Anholt
The hope is to later take advantage of the reduced constant usage to free up regs. This only covers the GLSL path at the moment, because the brw_wm_emit path doesn't get the information as to whether a float value is a constant or a uniform.
2010-03-22i965: Add INTEL_DEBUG=glsl_force to force brw_wm_glsl.c.Eric Anholt
I keep finding the desire to force this path to debug it instead of cooking up goofy-looking testcases to do so.
2010-03-10i965: Use the PLN instruction when possible in interpolation.Eric Anholt
Saves an instruction in PINTERP, LINTERP, and PIXEL_W from brw_wm_glsl.c For non-GLSL it isn't used yet because the deltas have to be laid out differently.
2010-03-10i965: Add support for the CMP opcode in the GLSL path.Eric Anholt
This would be triggered by use of sqrt() along with control flow. Fixes piglit-fs-sqrt-branch and a bug in Yo Frankie!.
2010-03-10i965: Print the opcode name for unrecognized opcodes in the GLSL path.Eric Anholt
2010-03-09i965: Fix ENDLOOP to only patch up this loop's BREAK and CONT.Eric Anholt
Corresponds to d225a25e21a24508aea3b877c78beb35502e942d and fixes piglit glsl-fs-loop-nested. Bug #25173.
2010-03-09i965: Unalias all GLSL source regs from the destination regs used.Eric Anholt
We were doing it ad-hoc before, as instructions with potential aliasing problems were identified. But thanks to swizzling basically anything can have aliasing, so just do it generally at source reg setup time. This is somewhat inefficient, because sometimes an operation doesn't need unaliasing protection if the swizzling is safe, but the unaliasing before didn't cover those cases either. Fixes piglit glsl-fs-loop.
2010-02-19Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg
2009-12-31Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: configs/darwin src/gallium/auxiliary/util/u_clear.h src/gallium/state_trackers/xorg/xorg_exa_tgsi.c src/mesa/drivers/dri/i965/brw_draw_upload.c
2009-12-28intel: Silence compiler warnings.Vinson Lee
2009-12-26i965: Extra asserts on flow control instructions to clarify for clang.Eric Anholt
2009-12-26i965: Clean up double initialization of dst_flags from a rebase resolve.Eric Anholt
Caught by clang.
2009-12-22intel: Replace IS_IGDNG checks with intel->is_ironlake or needs_ff_sync.Eric Anholt
Saves ~480 bytes of code.
2009-11-17Merge branch 'outputswritten64'Ian Romanick
Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
2009-11-13i965: Share OPCODE_TXB between brw_wm_emit.c and brw_wm_glsl.cEric Anholt
This should fix TXB on G45 and older in the GLSL case.
2009-11-13i965: Share OPCODE_TEX between brw_wm_emit.c and brw_wm_glsl.c.Eric Anholt
New comments should explain some of the confusion about how this message works.
2009-11-13i965: Clean up Ironlake sampler type definitions.Eric Anholt
They're the same regardless of execution width for 8, 4x2, and 16.
2009-11-06i965: Share min/max between brw_wm_emit.c and brw_wm_glsl.cEric Anholt
2009-11-06i965: Share emit_fb_write() between brw_wm_emit.c and brw_wm_glsl.cEric Anholt
This should fix issues with antialiased lines in GLSL.
2009-11-06i965: Share most of the WM functions between brw_wm_glsl.c and brw_wm_emit.cEric Anholt
The PINTERP code should be faster for brw_wm_glsl.c now since brw_wm_emit.c's had been improved, and pixel_w should no longer stomp on a neighbor to dst.
2009-11-06i965: Share math functions between brw_wm_glsl.c and brw_wm_emit.c.Eric Anholt
2009-11-06i965: Share the sop opcodes between brw_wm_glsl.c and brw_wm_emit.c.Eric Anholt
2009-11-06i965: Share OPCODE_MAD between brw_wm_glsl.c and brw_wm_emit.cEric Anholt
2009-11-06i965: Share the DP3, DP4, and DPH between brw_wm_glsl.c and brw_wm_emit.cEric Anholt
2009-11-06i965: Add generic GLSL code for unaliasing a 3-arg opcode, and share LRP code.Eric Anholt
2009-11-06i965: Use a normal alu1 emit for OPCODE_TRUNC.Eric Anholt
2009-11-06i965: Share basic ALU ops between brw_wm_glsl and brw_wm_emit.cEric Anholt
This drops support for get_src_reg_imm in these, but the prospect of getting brw_wm_pass*.c onto our GLSL path is well worth some temporary pain.
2009-11-06i965: Collect GLSL src/dst regs up in generic code.Eric Anholt
This matches brw_wm_emit.c, which we'll be using shortly. There's a possible penalty here in that we'll allocate registers for unused channels, since we aren't doing ref tracking like brw_wm_pass*.c does. However, my measurements on GM965 don't show any for either OA or UT2004 with the GLSL path forced.
2009-10-29i965: use macros to get/set prog_instruction::Aux fieldBrian Paul
This makes things a bit easier to remember/understand.
2009-09-11i965: Move OPCODE_DDX/DDY to brw_wm_emit.c and make it actually work.Eric Anholt
Previously, it was trying to mess around with the varying's WM setup data to produce a result. Along with not actually working when passed a varying, this wouldn't work if you did dFd[xy]() on a temporary. Instead, just calculate the derivative using the neighbors in the subspan.
2009-08-26i965: fix incorrect tex unit in emit_tex() and emit_txb()Brian Paul
The instructions we're translating already went through the brw_wm_pass_fp() function which does the sampler->texture unit mapping. We were applying the sample->unit mapping a second time in the GLSL texture emitters. Often, this made no difference but other times it could lead to accessing an invalid texture and could cause a GPU lockup.
2009-08-26i965: clean-up tex target switchesBrian Paul
2009-08-25i965: add some texture unit/target assertionsBrian Paul