summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Make MESA_GLSL=dump include when compile/link fails, and the info log.Eric Anholt2010-08-181-5/+20
|
* r600: implement SSG instructionAndre Maasikas2010-08-182-0/+67
|
* r600: implement DP2 opcodeAndre Maasikas2010-08-181-2/+10
|
* ir_to_mesa: Allow ir_return in main().Eric Anholt2010-08-171-2/+2
| | | | | | | | | I didn't expect that this would really work, but it turns out there are shaders in the wild that do it. Fixes: (with swrast) glsl-fs-main-return glsl-vs-main-return
* i965: Throw a link error when we see a "return" in main().Eric Anholt2010-08-171-0/+8
| | | | | We'll need to use the HALT instruction to do this right, like returns from other functions.
* ir_to_mesa: Fix implementation of ir_binop_equal, ir_binop_notequal.Eric Anholt2010-08-171-2/+26
| | | | | | | | | | | | | These binops are the vector-to-bool comparisons, not vec-to-bvec. We likely want both operations avilable as expression, since 915 and 965 FS naturally does the vector version, while 965 VS can also naturally do the scalar version. However, we can save that until later. Fixes: glsl-fs-vec4-operator-equal.shader_test glsl-fs-vec4-operator-notequal.shader_test glsl-vs-vec4-operator-equal.shader_test glsl-vs-vec4-operator-notequal.shader_test
* i915: Add support for SSG opcode.Eric Anholt2010-08-171-0/+35
| | | | Fixes glsl-fs-sign and many of the tests of trig builtins.
* i915: Add support for reading output regs in the FS.Eric Anholt2010-08-171-0/+14
| | | | | Fixes glsl-unused-varying and many others, since we produce an output reg read any time gl_FragColor is written inside an if statement.
* i915: Add support for OPCODE_DP2.Eric Anholt2010-08-171-0/+12
| | | | Fixes glsl-fs-dot-vec2.
* i915: Enable ARB_fragment_shader by default.Eric Anholt2010-08-171-1/+1
| | | | | | | | | | | | | | | | Now that we have glsl2 with if flattening in place, most shaders will just work. Remaining failing shaders will mostly be due to loop unrolling (in progress), some possible if flattening failures in inlining functions (planning on fixing), and the register/instruction count limits. While the GLSL and GLSL-ES specs say that shaders shouldn't fail to compile/link due to register/instruction limits, in practice we're not the first vendor to expose GLSL on hardware with these limitations. The benefit to application developers of providing a better language for GPU programming is greater than the pain of having to handle instruction limits (which they had to for ARB_fp on this hardware anyway)
* r600c: Handle reads from PROGRAM_OUTPUTHenri Verbeet2010-08-172-7/+20
| | | | with glsl2, reads from outputs are legal
* prog_optimize: Only merge writes to temporary registersBenjamin Segovia2010-08-171-1/+5
| | | | | | In one optimization pass, register files may have been messed therefore merging instructions which use the same index in two different register files.
* i965: Add support for DP2 in the VS.Eric Anholt2010-08-171-0/+4
| | | | Fixes glsl-vs-dot-vec2.
* mesa: Dump shader source before validating the shader.Eric Anholt2010-08-171-9/+9
| | | | | This will make extracting source to produce minimal testcases for shader compile issues easier.
* r600c: fix dword miscount in blit emit codeAlex Deucher2010-08-171-1/+1
|
* mesa: fix es1/2 build hopefullyDave Airlie2010-08-171-0/+8
| | | | needed to add cpp rules and includes properly for es1/es2
* i965: Use the implied move available in most brw_wm_emit brw_math() calls.Eric Anholt2010-08-161-16/+4
| | | | | | | | This saves an extra message reg move in the program, though I'm not clear on whether it will have any performance impact other than cache footprint. It will also fix those math calls on Sandybridge, where the brw_eu_emit.c brw_math() support relies on the implied move being used.
* i965: Add disasm for Compr4 instruction compression.Eric Anholt2010-08-161-1/+16
|
* Merge branch 'glsl2'Ian Romanick2010-08-1639-121/+3241
|\ | | | | | | | | Conflicts: src/mesa/program/prog_optimize.c
| * ir_to_mesa: Silence unused variable warningsIan Romanick2010-08-161-3/+3
| |
| * ir_to_mesa: Clean up assertions in ir_to_mesa_visitor::visit(ir_texture *)Ian Romanick2010-08-161-1/+4
| |
| * ir_to_mesa: Support texture rectangle targetsIan Romanick2010-08-161-0/+3
| |
| * st/mesa: remove output register reads inside shadersMarek Olšák2010-08-161-0/+8
| | | | | | | | This is a GLSL2 regression fix.
| * mesa: Check that _XOPEN_SOURCE is defined before using it.Vinson Lee2010-08-151-1/+1
| |
| * mesa: Silence gcc warning "control reaches end of non-void function".José Fonseca2010-08-141-0/+1
| |
| * mesa: Silence gcc warning "missing initializer for member".José Fonseca2010-08-141-28/+28
| |
| * mesa: Recent versions of MSVC define the single precision functions already.José Fonseca2010-08-141-1/+2
| |
| * mesa: atan2f and powf need two args.José Fonseca2010-08-141-2/+2
| |
| * Merge branch 'master' into glsl2Ian Romanick2010-08-13174-1158/+1654
| |\
| * | mesa: Work-arounds for platforms that lack C99 math functionsIan Romanick2010-08-131-0/+28
| | |
| * | mesa: Avoid using c++ keyword in dri_util.h when compiled with c++.Eric Anholt2010-08-131-0/+4
| | |
| * | intel: Remove include of texmem.h, since we haven't used it in ages.Eric Anholt2010-08-134-4/+2
| | |
| * | glsl2: Move ir_to_mesa handling to driver CompileShader and LinkShader hooks.Eric Anholt2010-08-134-52/+99
| | | | | | | | | | | | | | | This lets drivers override ir_to_mesa with their own codegen, or at least have a native alternative.
| * | glsl2: Move the common optimization passes to a helper function.Eric Anholt2010-08-131-32/+29
| | | | | | | | | | | | | | | These are passes that we expect all codegen to be happy with. The other lowering passes for Mesa IR are moved to the Mesa IR generator.
| * | scons: Build the new glsl2 code.José Fonseca2010-08-131-3/+5
| | |
| * | glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick2010-08-121-0/+1
| | |
| * | mesa: check for null shader->InfoLog before printingBrian Paul2010-08-121-1/+3
| | |
| * | osmesa: link with new libglsl.a libBrian Paul2010-08-111-2/+1
| | |
| * | glsl2: remove stray semicolonBrian Paul2010-08-111-1/+1
| | |
| * | glsl2: remove stray semicolonBrian Paul2010-08-111-1/+1
| | |
| * | glsl2: Add a pass to transform ir_binop_sub to add(op0, neg(op1))Eric Anholt2010-08-091-0/+1
| | | | | | | | | | | | | | | | | | All the current HW backends transform subtract to adding the negation, so I haven't bothered peepholing it back out in Mesa IR. This allows some subtract of subtract to get removed in ir_algebraic.
| * | glsl2: Add constant propagation.Eric Anholt2010-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Whereas constant folding evaluates constant expressions at rvalue nodes, constant propagation tracks constant components of vectors across execution to replace (possibly swizzled) variable dereferences with constant values, triggering possible constant folding or reduced variable liveness.
| * | i965: More s/stderr/stdout/ for program debug.Eric Anholt2010-08-093-3/+3
| | |
| * | glsl2: Move gl_program->InputsRead/OutputsWritten setting to an ir pass.Eric Anholt2010-08-061-67/+4
| | | | | | | | | | | | | | | | | | | | | This lets us handle arrays much better than trying to work backwards from assembly. Fixes fbo-drawbuffers-maxtargets on swrast (i965 needs loop unrolling)
| * | ir_to_mesa: Add support for sampler arrays.Eric Anholt2010-08-063-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Support for samplers in general is still incomplete -- anything in a uniform struct will still be broken. But that doesn't appear to be any different from master. Fixes: glsl-fs-uniform-sampler-array.shader_test
| * | glsl2: Don't assert in a couple of places when encountering sampler arrays.Eric Anholt2010-08-061-0/+5
| | | | | | | | | | | | Fixes glean shaderAPI.
| * | ir_to_mesa: Give the expected size for _mesa_add_attribute().Eric Anholt2010-08-061-1/+2
| | | | | | | | | | | | Fixes a failure in glean shaderAPI.
| * | ir_to_mesa: Handle texture-array samplersIan Romanick2010-08-051-2/+4
| | | | | | | | | | | | Fixes piglit test array_texture.
| * | glsl2: Add a pass to convert exp and log to exp2 and log2.Eric Anholt2010-08-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes ir_to_mesa handling of unop_log, which used the weird ARB_vp LOG opcode that doesn't do what we want. This also lets the multiplication coefficients in there get constant-folded, possibly. Fixes: glsl-fs-log
| * | ir_to_mesa: Don't do function inlining until linking.Eric Anholt2010-08-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimizations at compile time should generally be done with the goal of reducing instruction count so that other work, particularly linking, is less time-consuming if the shader is used multiple times. However, function inlining increases instruction count for the inlined function bodies without removing the original function body, since we don't know if it will be used at link time or not. Reduces the runtime of linking and executing a Yo Frankie fragment shader from 0.9 seconds to 0.5 seconds (-45.9%, +/- 2.2%, n=5).