summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add st_glsl_to_tgsi.cpp to SconscriptBrian Paul2011-08-041-0/+1
|
* mesa: fix out of bounds array access in rtgc debug codeBrian Paul2011-08-041-1/+1
| | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39841 This would only be hit if someone set RGTC_DEBUG=1.
* mesa: don't use K&R style function pointer callsBrian Paul2011-08-041-3/+3
|
* Merge branch 'glsl-to-tgsi'Bryan Cain2011-08-0443-323/+5610
|\ | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_atom_pixeltransfer.c src/mesa/state_tracker/st_program.c
| * st/mesa: replace duplicated create_color_map_texture() function with shared ↵Bryan Cain2011-08-044-43/+26
| | | | | | | | function
| * glsl_to_tgsi: remove debugging printfBryan Cain2011-08-041-1/+0
| |
| * glsl_to_tgsi: copy reladdr in st_src_reg(st_dst_reg) constructorBryan Cain2011-08-011-1/+1
| | | | | | | | This is a glsl_to_tgsi port of commit f7cd9a858c04.
| * glsl_to_tgsi: add each relative address to the previousBryan Cain2011-08-011-0/+12
| | | | | | | | This is a glsl_to_tgsi port of commit d6e1a8f71437.
| * glsl_to_tgsi: lower all ir_quadop_vector expressionsBryan Cain2011-08-011-1/+1
| | | | | | | | Unlike Mesa IR, TGSI doesn't have a SWZ opcode.
| * glsl_to_tgsi: rework immediate tracking to not use gl_program_parameter_listBryan Cain2011-08-011-47/+88
| |
| * glsl_to_tgsi: update commentsBryan Cain2011-08-011-12/+11
| |
| * glsl_to_tgsi: make coding style more consistentBryan Cain2011-08-011-137/+126
| |
| * glsl_to_tgsi: make assignment hack saferBryan Cain2011-08-011-3/+4
| | | | | | | | Fixes an assertion failure in piglit test glsl-texcoord-array.
| * glsl_to_tgsi: separate immediates from array constants during IR translationBryan Cain2011-08-011-48/+95
| | | | | | | | | | | | | | | | Before, if any uniform or constant array was accessed with indirect addressing, st_translate_program() would emit uniform constants in the place of immediates. This behavior was unavoidable with ir_to_mesa/mesa_to_tgsi, but glsl_to_tgsi can work around it since the GLSL IR backend and the TGSI emission are both inside the state tracker.
| * glsl_to_tgsi: fix mistakes in get_pixel_transfer_visitor()Bryan Cain2011-08-011-3/+3
| | | | | | | | I noticed these issues while working on get_bitmap_visitor().
| * st/mesa, glsl_to_tgsi: support glBitmap with a GLSL fragment shader activeBryan Cain2011-08-013-6/+105
| |
| * st/mesa, glsl_to_tgsi: support glDrawPixels/glCopyPixels with a GLSL ↵Bryan Cain2011-08-013-0/+194
| | | | | | | | | | | | | | fragment shader active Since this was previously implemented using Mesa IR and _mesa_combine_programs, this commit adds a new code path that works with glsl_to_tgsi.
| * glsl_to_tgsi: replace MAX_PROGRAM_TEMPS (256) with MAX_TEMPS (4096)Bryan Cain2011-08-011-6/+8
| |
| * r200, r600c, i965: fix buildBryan Cain2011-08-017-30/+30
| |
| * glsl_to_tgsi: always run copy_propagate() and eliminate_dead_code_advanced()Bryan Cain2011-08-011-5/+4
| | | | | | | | These two passes are written to handle indirect addressing properly.
| * glsl_to_tgsi: fix mistake in new dead code elimination passBryan Cain2011-08-011-4/+4
| | | | | | | | | | The conditions of IF opcodes were not being counted as reads, which sometimes led to the condition register being wrong or undefined.
| * glsl_to_tgsi: improve assignment handlingBryan Cain2011-08-011-3/+14
| | | | | | | | | | This is a hack, but it's better than emitting an unnecessary MOV instruction and hoping the optimization passes clean it up.
| * glsl_to_tgsi: improve eliminate_dead_code_advanced()Bryan Cain2011-08-011-0/+9
| |
| * glsl_to_tgsi: use the correct writemask in try_emit_mad() and try_emit_sat()Bryan Cain2011-08-011-2/+7
| |
| * glsl_to_tgsi: use a more specific condition for gl_FragDepth hack in ↵Bryan Cain2011-08-011-2/+2
| | | | | | | | | | | | | | generating assignments This reduces the number of instructions in the fragment shader of glsl-fs-atan-2 from 174 to 146 with EmitNoIfs enabled.
| * glsl_to_tgsi: add a better, more advanced dead code elimination passBryan Cain2011-08-011-0/+140
| |
| * glsl_to_tgsi: remove handling of XPD opcode in compile_tgsi_instruction()Bryan Cain2011-08-011-8/+0
| | | | | | | | | | The opcode is never emitted by the glsl_to_tgsi_visitor, so its special case in compile_tgsi_instruction() was dead code.
| * glsl_to_tgsi: use swizzle_for_size for src reg in conditional movesBryan Cain2011-08-011-2/+5
| | | | | | | | | | This prevents the copy propagation pass from being confused by undefined channels and thus missing optimization opportunities.
| * glsl_to_tgsi: execute merge_registers() after eliminate_dead_code()Emil Velikov2011-08-011-1/+1
| | | | | | | | | | | | | | | | | | Fixes a regression unintentionally introduced by "glsl_to_tgsi: fix shaders with indirect addressing of temps" that caused missing leaves in 3dmark01 test 4 (Nature) and missing/displaced textures on human models in Counter-Strike: Source. Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Bryan Cain <[email protected]>
| * glsl_to_tgsi: implement simplify_cmp pass needed by r300gBryan Cain2011-08-011-0/+95
| |
| * glsl_to_tgsi: fix compile error with g++ 4.6Bryan Cain2011-08-011-1/+1
| |
| * glsl: remove glsl_type::get_vec4_type()Bryan Cain2011-08-012-17/+2
| | | | | | | | | | | | | | | | Thanks to Kenneth Graunke for pointing out that glsl_type::get_instance(base, 4, 1) is the same as glsl_type::get_vec4_type(base). The function was only used in st_glsl_to_tgsi, and this commit replaces that usage with get_instance.
| * glsl_to_tgsi: silence compiler warningBryan Cain2011-08-011-1/+1
| |
| * glsl_to_tgsi: finish some loose endsBryan Cain2011-08-011-10/+36
| |
| * glsl-to-tgsi: fix piglit testsBryan Cain2011-08-011-9/+11
| | | | | | | | | | This commit fixes all of the piglit tests regressed by "mesa, glsl_to_tgsi: add native support for integers in shaders" on softpipe.
| * mesa, glsl_to_tgsi: add native support for integers in shadersBryan Cain2011-08-015-60/+328
| | | | | | | | | | Disabled by default on all drivers. To enable it, change ctx->GLSLVersion to 130 in st_extensions.c. Currently, softpipe is the only driver with integer support.
| * tgsi: add support for TGSI_OPCODE_MOD in tgsi_execBryan Cain2011-08-011-1/+12
| |
| * mesa: support boolean and integer-based parameters in prog_parameterBryan Cain2011-08-0113-66/+88
| | | | | | | | | | | | The functionality is not used by anything yet, and the glUniform functions will need to be reworked before this can reach its full usefulness. It is nonetheless a step towards integer support in the state tracker and classic drivers.
| * gallium: add PIPE_SHADER_CAP_INTEGERSBryan Cain2011-08-0110-0/+19
| |
| * glsl_to_tgsi: fix shaders with indirect addressing of tempsBryan Cain2011-08-011-4/+12
| | | | | | | | Fixes several Piglit tests, although it's a step backwards for optimization.
| * glsl_to_tgsi: use TGSI opcodes when converting from GLSL IRBryan Cain2011-08-011-333/+217
| | | | | | | | | | Before, the translator used Mesa IR opcodes (a holdover from ir_to_mesa) and converted them to TGSI opcodes during TGSI emission.
| * glsl_to_tgsi: support DDY (ir_unop_dFdy)Bryan Cain2011-08-011-6/+1
| |
| * glsl_to_tgsi: lower noise opcodes when converting from GLSL IR, not when ↵Bryan Cain2011-08-011-13/+8
| | | | | | | | generating TGSI
| * glsl_to_tgsi: define the sampler objects usedBryan Cain2011-08-011-2/+11
| | | | | | | | Fixes the Nexuiz title screen and the water in 0 A.D.
| * glsl_to_tgsi: remove a bad assertionBryan Cain2011-08-011-4/+5
| | | | | | | | It was triggered by Alien Arena.
| * glsl_to_tgsi: remove reads to output registersBryan Cain2011-08-011-0/+91
| | | | | | | | Fixes a regression in 0 A.D. introduced by 809a11c77073e999fd47.
| * glsl_to_tgsi: stop generating Mesa IRBryan Cain2011-08-012-270/+33
| | | | | | | | | | Before, it was still generating unused Mesa IR as a remnant of ir_to_mesa, and depended on some of the information from it.
| * mesa: fix segfault when no Mesa IR is generatedBryan Cain2011-08-011-2/+3
| |
| * st/mesa: Add a GLSL IR to TGSI translator.Bryan Cain2011-08-018-183/+4767
| | | | | | | | | | | | | | | | | | | | It is still a work in progress at this point, but it produces working and reasonably well-optimized code. Originally based on ir_to_mesa and st_mesa_to_tgsi, but does not directly use Mesa IR instructions in TGSI generation, instead generating TGSI from the intermediate class glsl_to_tgsi_instruction. It also has new optimization passes to replace _mesa_optimize_program.
* | st/mesa: silence int/float and double/float conversion warningsBrian Paul2011-08-041-4/+4
| |