summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* r600g: disable render condition for some blitter operationsMarek Olšák2011-06-153-6/+34
|
* r600g: fix TXD src regs needing fetching.Mike Kaplinskiy2011-06-151-46/+50
| | | | | | | | | [airlied: final chunk of Mike's patch from bug 37476 this uses a loop to emit the GRADIENTS and does a check to see if we need to fetch to a temporary register. It also increases the context src gpr to 4 which is needed here.] Signed-off-by: Dave Airlie <[email protected]>
* r600g: use inlines for some common tex instr setup code.Mike Kaplinskiy2011-06-151-11/+24
| | | | | | [airlied: taken from Mike's patch in bug 37476] Signed-off-by: Dave Airlie <[email protected]>
* glsl/builtins: Actually implement int/ivec variants of abs().Kenneth Graunke2011-06-141-0/+20
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable release branches (and don't forget to re-run "make builtins" after cherry-picking.)
* r600g: fix TXD when shadowing is enabled.Mike Kaplinskiy2011-06-152-6/+17
| | | | | | | | Mike had actually done a lot of the TXD support in a patch in bug 37476 which I see now, I'll add the bits of his work that I didn't think to add to my work. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add TXD support.Dave Airlie2011-06-154-6/+64
| | | | | | | | This at least passes the piglit arb_shader_texture_lod-texgrad test, the AMD shader analyzer seems to multiply the V component by an unspecified constant value no idea why. Signed-off-by: Dave Airlie <[email protected]>
* i915g: add const qualifier to silence warningBrian Paul2011-06-141-1/+1
|
* r600g: also set TILE_MODE of the base levelMarek Olšák2011-06-151-1/+1
|
* r600g: force OpenGL's BASE_LEVEL behavior on r600-r700Marek Olšák2011-06-151-10/+16
| | | | | | | | | | This sets the base level as the zero level, which fixes piglit/texturing/tex-miplevel-selection*. The r600 hardware ignores the BASE_LEVEL field in some cases, so we can't use it. Evergreen might need this too.
* glsl/generate_builtins.py: Remove regexp to kill pointer addresses.Kenneth Graunke2011-06-141-4/+0
| | | | | | | | | Commit 56ef62d9885f805bbfb2243dc860ff425d5b4d3b "glsl: Generate readable unique names at print time." changed ir_print_visitor to not generate @0x1234567 suffixes except where necessary. So there's no need to manually remove them. Signed-off-by: Kenneth Graunke <[email protected]>
* glapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather ↵Jeremy Huddleston2011-06-142-2586/+2666
| | | | | | | | | | | | | | than NULL This change to _glapi_create_table_from_handle causes it to fill the dispatch table with NoOps for unimplemented functionality. This matches what is done in indirect_init.c and also allows us to enable logging (when built with -DDEBUG and the MESA_DEBUG or LIBGL_DEBUG environment variables are set) to catch cases where clients are trying to use these unimplemented extentions. Additionally, this fixes some gcc -pedantic warnings. Signed-off-by: Jeremy Huddleston <[email protected]>
* st/mesa: fix indentation, whitespaceBrian Paul2011-06-141-69/+74
|
* st/mesa: replace st->ctx with ctxBrian Paul2011-06-147-69/+80
|
* st/mesa: fix comments, whitespaceBrian Paul2011-06-141-3/+4
|
* st/mesa: improved is_interleaved_arrays() checkingBrian Paul2011-06-141-31/+19
| | | | | | | | | | | | | | Check that the difference in array pointers/offsets from the 0th array are less than the stride, for both VBOs and user-space arrays. Previously, we were only doing this for the later. This tightens up the interleaved array test and fixes a problem with the llvmpipe driver where we were creating way too many vertex fetch variants only because the pipe_vertex_element::src_offset values were changing frequently. This change results in a 5x speed-up for one of the viewperf tests. Also, clean up the function to make it easier to understand.
* r600c: add tiling support for evergreen+Alex Deucher2011-06-141-45/+95
| | | | Signed-off-by: Alex Deucher <[email protected]>
* r600g: fix RGB32F texturingMarek Olšák2011-06-141-1/+2
|
* r600g: fix indentation and commentsMarek Olšák2011-06-142-37/+40
|
* mesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.Eric Anholt2011-06-144-69/+52
| | | | | | | | | | | | | The code was playing fast and loose with rowstrides, which meant that if a driver chose anything different for its alignment requirements, the generated mipmaps came out garbage. Unlike the uncompressed case, we can't generate mipmaps directly into image->Data, so by using TexImage2D we cut out most of the weird logic that existed to generate in-place into ->Data. The up/downside is that the driver recovery code for the fact that _mesa_generate_mipmaps whacked ->Data has to be turned off for compressed now. Fixes 6 piglit tests about compressed mipmap gen.
* mesa: Remove uncompressed code from generate_mipmaps_compressed().Eric Anholt2011-06-141-100/+77
|
* mesa: Remove compressed code from generate_mipmaps_uncompressed().Eric Anholt2011-06-141-114/+4
|
* mesa: Split _mesa_generate_mipmap along compressed/uncompressed lines.Eric Anholt2011-06-141-26/+225
| | | | | | | | | | The path taken is wildly different based on this (do we generate from a temporary image, or from level-1's data), and we appear to have stride bugs in the compressed case that are tough to disentangle. This just duplicates the code for the moment, the followon commit will do the actual changes. Only real code change here is handling maxLevel in one common place.
* intel: Fix miptree height alignment for compressed NPOT textures.Eric Anholt2011-06-141-4/+2
| | | | | | This is effectively just "round up when dividing by 4" compared to the previous code. Fixes the broken stripe at the top of fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc.
* intel: Drop dead preinitialization of align_w, align_h.Eric Anholt2011-06-141-1/+1
|
* intel: Drop the cpp argument to intel_miptree_create().Eric Anholt2011-06-145-22/+5
|
* intel: Calculate compress_byte in intel_miptree_create.Eric Anholt2011-06-145-26/+18
| | | | One less argument and thing to get wrong.