summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* nvc0: add maxwell classBen Skeggs2014-05-152-0/+4
| | | | | Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: allow for easier modification of compiler library routinesBen Skeggs2014-05-1513-1057/+1057
| | | | | Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: properly distribute macros in source formBen Skeggs2014-05-155-244/+365
| | | | | Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* automake: Honor GL_LIB for gallium libgl-xlibBrad King2014-05-141-7/+7
| | | | | | | Use "@GL_LIB@" in src/gallium/targets/libgl-xlib/Makefile.am to produce the library name specified by the configure --with-gl-lib-name option. Reviewed-by: Emil Velikov <[email protected]>
* gallivm: only fetch pointers to constant buffers onceRoland Scheidegger2014-05-142-37/+65
| | | | | | | | | | | | | | | | | In 1d35f77228ad540a551a8e09e062b764a6e31f5e support for multiple constant buffers was introduced. This meant we had another indirection, and we did resolve the indirection for each constant buffer access. This looks very reasonable since llvm can figure out if it's the same pointer, however it turns out that this can cause llvm compilation time to go through the roof and beyond (I've seen cases in excess of factor 100, e.g. from 50 ms to more than 10 seconds (!)), with all the additional time spent in IR optimization passes (and in the end all of it in DominatorTree::dominate()). I've been unable to narrow it down a bit more (only some shaders seem affected, seemingly without much correlation to overall shader complexity or constant usage) but it is easily avoidable by doing the buffer lookups themeselves just once (at constant buffer declaration time). Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix output stream flushing in error case for disassembly.Roland Scheidegger2014-05-141-0/+5
| | | | | When there's an error, also need to flush the stream, otherwise an assertion is hit (meaning you don't actually see the error neither).
* radeonsi: Fix anisotropic filtering state setupMichel Dänzer2014-05-143-13/+12
| | | | | | | | | | | | Bring it back in line with r600g. I broke this in the original radeonsi bringup. :( Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78537 Cc: "10.1 10.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* tgsi: support parsing texture offsets from text tgsi shadersIlia Mirkin2014-05-141-5/+48
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: clarify when query results are resetRob Clark2014-05-141-0/+2
| | | | | | | | It wasn't completely clear from the docs, so I had to figure out by looking at piglit results. Hopefully this saves the next driver writer implementing queries some time. Signed-off-by: Rob Clark <[email protected]>
* gallivm: Remove lp_func_delete_body.José Fonseca2014-05-143-15/+0
| | | | | | | Not necessary, now that we will free the whole module (hence all function bodies) immediately after compiling. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Remove gallivm_free_function.José Fonseca2014-05-142-23/+0
| | | | | | Unused. Deprecated by gallivm_free_ir(). Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Delete unneeded LLVM stuff earlier.José Fonseca2014-05-147-34/+16
| | | | | | Same as Frank's change to draw module but for llvmpipe module. Reviewed-by: Roland Scheidegger <[email protected]>
* draw: Delete unneeded LLVM stuff earlier.Frank Henigman2014-05-141-15/+4
| | | | | | | | | | Free up unneeded LLVM stuff immediately after generating vertex shader code. Saves about 500K per shader. v2: Don't bother calling gallivm_free_function (Jose) Signed-off-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Separate freeing LLVM intermediate data from freeing final code.Frank Henigman2014-05-142-7/+22
| | | | | | | | | | | | Split free_gallivm_state() into two steps. First step is gallivm_free_ir() which cleans up the LLVM scaffolding used to generate code while preserving the code itself. Second step is gallivm_free_code() to free the memory occupied by the code. v2: s/gallivm_teardown/gallivm_free_ir/ (Jose) Signed-off-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: One code memory pool with deferred free.Frank Henigman2014-05-144-1/+283
| | | | | | | | | | | | | | | | Provide a JITMemoryManager derivative which puts all generated code into one memory pool instead of creating a new one each time code is generated. This saves significant memory per shader as the pool size is 512K and a small shader occupies just several K. This memory manager also defers freeing generated code until you tell it to do so, making it possible to destroy the LLVM engine while keeping the code, thus enabling future memory savings. v2: Fix compilation errors with LLVM 3.4 (Jose) Signed-off-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Run passes per module, not per function.José Fonseca2014-05-141-28/+19
| | | | | | This is how it is meant to be done nowadays. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Use LLVM global context.José Fonseca2014-05-141-23/+17
| | | | | | | | | | | I saw that LLVM internally uses its global context for some things, even when we use our own. Given ours is also global, might as well use LLVM's. However, sepearate contexts can still be enabled with a simple source code modification, for when the need/benefit arises. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Stop using module providers.José Fonseca2014-05-142-27/+7
| | | | | | | Nowadays LLVMModuleProviderRef is just an alias for LLVMModuleRef, so its use just causes unnecessary confusion. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm,draw,llvmpipe: Remove support for versions of LLVM prior to 3.1.José Fonseca2014-05-1415-548/+20
| | | | | | | Older versions haven't been tested probably don't work anyway. But more importantly, code supporting it is hindering further work. Reviewed-by: Roland Scheidegger <[email protected]>
* freedreno/a3xx: occlusion query supportRob Clark2014-05-135-3/+185
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: add support for hw queriesRob Clark2014-05-1310-8/+734
| | | | | | | | | | | Real GPU queries need some infrastructure to track samples per tile and accumulate the results. But fortunately this can be shared across GPU generation. See: https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries Signed-off-by: Rob Clark <[email protected]>
* freedreno/query: allow multiple query implementationsRob Clark2014-05-136-107/+269
| | | | | | | | Split out fd_query into an abstract base class, to allow multiple implementations. The current sw based queries are moved into fd_sw_query. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add point-sizeRob Clark2014-05-131-4/+14
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-05-134-54/+252
| | | | Signed-off-by: Rob Clark <[email protected]>
* nv50,nvc0: fix blit 3d path for 1d array texturesIlia Mirkin2014-05-111-0/+6
| | | | | | | | | | Need to adjust coordinates since the shader receives the array index as depth in z, but the TEX instruction expects it to be the second coordinate for a 1D array texture. This fixes fbo-generatemipmap-array. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.2" <[email protected]>
* nv50,nvc0: leave queries on during blit, turn them on for 2d engineIlia Mirkin2014-05-116-6/+35
| | | | | | | | Fixes the new logic of the conditional rendering piglit test. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.2" <[email protected]>
* gallium: add bit to pipe_blit_info to leave current query enabledIlia Mirkin2014-05-111-0/+3
| | | | | | | | | | Previously the implication was that queries should be disabled during blits. However glBlitFramebuffer() is supposed to obey the current query, and this new bit will indicate that to the driver. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* nv50: fix setting of texture ms info to be per-stageIlia Mirkin2014-05-113-6/+10
| | | | | | | | | | Different textures may be bound to each slot for each stage. So we need to be able to upload ms parameters for each one without stages overwriting each other. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.1 10.2" <[email protected]>
* nv50/ir: make sure to reverse cond codes on all the OP_SET variantsIlia Mirkin2014-05-111-1/+2
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.2 10.1" <[email protected]>
* freedreno/a2xx: fix compiler warningRob Clark2014-05-111-1/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* radeonsi: prepare depth export registers at compile timeMarek Olšák2014-05-103-14/+14
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: simplify depth/stencil export codeMarek Olšák2014-05-101-11/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeon/llvm: add support for non-scalar system valuesMarek Olšák2014-05-101-0/+6
| | | | | | The sample position is one of them. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add and use a helper function for loading constantsMarek Olšák2014-05-101-19/+19
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: only count CS space for state atoms if we're going to drawMarek Olšák2014-05-101-5/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove unused variable exports_ps in si_pipe_shader_psMarek Olšák2014-05-101-12/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use DRAW_PREAMBLE on CIKMarek Olšák2014-05-102-5/+10
| | | | | | | It's the same as setting the 3 regs separately, but shorter, and it also seems to be required on GFX7.2 and later. This doesn't fix Hawaii. Reviewed-by: Michel Dänzer <[email protected]>
* r600g: simplify framebuffer state size computationMarek Olšák2014-05-101-26/+4
| | | | | | Take the upper bound. The number doesn't have to absolutely correct, only safe. Reviewed-by: Michel Dänzer <[email protected]>
* ilo: destroy the mutex, if winsys creation failsEmil Velikov2014-05-101-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* radeonsi: Enable geometry shaders with LLVM 3.4.1Tom Stellard2014-05-094-9/+13
| | | | | | Reviewed-by: Michel Dänzer <[email protected]> CC: "10.1 10.2" <[email protected]>
* st/xa: Fix performance regression introduced by commit "Cache render target ↵Thomas Hellstrom2014-05-091-1/+1
| | | | | | | | | | | | surface" The mentioned commit has the nasty side-effect of turning off accelerated copies. Cc: "10.1 10.2" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* clover: Destory pipe_screen when device does not support compute v2Tom Stellard2014-05-091-1/+4
| | | | | | | | v2: - Make sure screen was successfully created before destroying it. Cc: "10.2" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: Don't destroy the winsys in the sw loaderTom Stellard2014-05-091-3/+0
| | | | | | | | | | | | | The screen takes ownership of the winsys, and is responsible for destroying it. Users of pipe-loader should make sure they destory and screens they've created to avoid memory leaks. This fixes a crash in clover introduced by ce6c17c0833032e91a2d1b34f9eb80c738a854a2 where the pipe-loader was destroying the winsys while a screen was still using it. Cc: "10.2" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radeonsi: Don't use anonymous struct trick in atom trackingAdam Jackson2014-05-086-10/+10
| | | | | | | | I'm somewhat impressed that current gccs will let you do this, but sufficiently old ones (including 4.4.7 in RHEL6) won't. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* llvmpipe: change LP_MAX_SHADER_INSTRUCTIONS limit definition.Roland Scheidegger2014-05-081-1/+3
| | | | | | | | | | When the limit was changed to be defined in terms of LP_MAX_SHADER_VARIANTS (75f1fea14f524ef05e980d825fda3ae226ae2ffe) when it was increased, this inadvertently lowered the limit in some branches (that have a lower LP_MAX_SHADER_VARIANTS number) when merged. So, make sure the limit is always at least the number it once was. Reviewed-by: Jose Fonseca <[email protected]>
* draw: do not use draw_get_option_use_llvm() inside draw execution pathsRoland Scheidegger2014-05-085-12/+12
| | | | | | | | | | | | | | 1c73e919a4b4dd79166d0633075990056f27fd28 made it possible to not allocate the tgsi machine if llvm was used. However, draw_get_option_use_llvm() is not reliable after draw context creation, since drivers can explicitly request a non-llvm draw context even if draw_get_option_use_llvm() would return true (and softpipe does just that) which leads to crashes. Thus use draw->llvm to determine if we're using llvm or not instead (and make draw->llvm available even if HAVE_LLVM is false so we don't have to put even more ifdefs). Cc: "10.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nv50/ir/gk110: fix set with f32 destIlia Mirkin2014-05-071-0/+3
| | | | | | | | | Should fix comparison opcodes like SGE/SLT/etc which expected a float to be returned. These were previously getting integer 0/-1 values. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: 10.2 <[email protected]>
* nv50/ir: allow load propagation when flags are definedIlia Mirkin2014-05-071-3/+4
| | | | | | | | | The old condition disallowed load propagation any time flags were defined, even with e.g. set and a constbuf reference. The new condition disallows it only with immediate propagation. (There are no opcodes that set the condition flag and have an immediate argument.) Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add a cap for supporting 4-offset TG4 opcodesIlia Mirkin2014-05-0714-6/+21
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: add switch case for PIPE_SHADER_CAP_PREFERRED_IR, remove default caseBrian Paul2014-05-071-8/+10
| | | | | | | Remove default switch case so we're warned of missing cases at compile time. Reviewed-by: José Fonseca <[email protected]>