summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
AgeCommit message (Collapse)AuthorFilesLines
2017-02-21gallivm: add no-signed-zeros-fp-math option to lp_create_builder (v2)Marek Olšák2-4/+19
v2: define lp_float_mode Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-21tgsi/scan: add basic info about tessellation OUT and IN usesMarek Olšák2-0/+34
not all of them will be used immediately Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-21gallium: do not #include foo.h within extern C {}Emil Velikov1-2/+2
Analogous to previous commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2017-02-20gallivm: Reenable PPC VSX (v3)Ben Crocker1-1/+13
Reenable the PPC64LE Vector-Scalar Extension for LLVM versions >= 3.8.1, now that LLVM bug 26775 and its corollary, 25503, are fixed. Amendment: remove extraneous spaces in macro def & invocations. We would prefer a runtime check, e.g. via an LLVMQueryString (analogous to glGetString, eglQueryString) or LLVMGetVersion API, but no such API exists at this time. Signed-off-by: Ben Crocker <bcrocker@redhat.com> [Emil Velikov: remove LLVM_VERSION macro] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-20gallivm: Override getHostCPUName() "generic" w/ "pwr8" (v4)Ben Crocker1-0/+13
If llvm::sys::getHostCPUName() returns "generic", override it with "pwr8" (on PPC64LE). This is a work-around for a bug in LLVM: a table entry for "POWER8NVL" is missing, resulting in (big-endian) "generic" being returned on little-endian Power8NVL systems. The result is that code that attempts to load the least significant 32 bits of a 64-bit quantity in memory loads the wrong half. This omission should be fixed in the next version of LLVM (4.0), but this work-around should be left in place in case some future version of POWER<n> also ends up unrepresented in LLVM's table. This workaround fixes failures in the Piglit arb_gpu_shader_fp64 conversion tests on POWER8NVL processors. (V4: add similar comment in the code.) Signed-off-by: Ben Crocker <bcrocker@redhat.com> Cc: 12.0 13.0 17.0 <mesa-stable@lists.freedesktop.org> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-20gallivm: Improve debug output (V2)Ben Crocker2-1/+18
Improve debug output from gallivm_compile_module and lp_build_create_jit_compiler_for_module, printing the -mcpu and -mattr options passed to LLC. V2: enclose MAttrs debug_printf block and llc -mcpu debug_printf in "if (gallivm_debug & <flags>)..." Signed-off-by: Ben Crocker <bcrocker@redhat.com> Cc: 12.0 13.0 17.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> (v2) [Emil Velikov: rebase] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-02-20gallium/u_suballoc: update commentsMarek Olšák1-3/+5
as requested by Brian. Trivial.
2017-02-19gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionallyMarek Olšák2-3/+9
It's OK for r300g (because r300g can't write to buffers via the GPU), but not later hardware. This issue was spotted randomly. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium: remove TGSI_OPCODE_CLAMPMarek Olšák7-54/+1
Not used and not widely supported. Use MIN+MAX instead. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18tgsi/lowering: stop using TGSI_OPCODE_CLAMPMarek Olšák1-4/+13
v2: do it correctly Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18vl: fix a buffer leak in the bicubic filter by using an uploaderMarek Olšák1-16/+11
there's no error checking, because the previous code didn't do it either. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium/hud: create files after graphs are created to get final namesMarek Olšák5-12/+23
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
2017-02-18gallium/u_suballoc: allow setting pipe_resource::flagsMarek Olšák2-5/+19
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium/u_suballoc: use clear_buffer if availableMarek Olšák1-7/+14
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium/util: correctly unref a buffer in u_prim_restartMarek Olšák1-1/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium/util: remove unused u_index_modify helpersMarek Olšák2-101/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18gallium/util: remove unused helper util_draw_texquadMarek Olšák2-72/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-16gallium: add extern "C" guardsGeorge Kyriazis2-0/+15
Added extern "C" __cplusplus guards on headers that did not have them. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2017-02-14gallium/hud: add monitoring of API thread busy statusMarek Olšák3-0/+64
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium/u_queue: add util_queue_get_thread_time_nanoMarek Olšák2-0/+12
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium/os: add per-thread time clock queriesMarek Olšák1-0/+31
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium: let state trackers tell u_vbuf whether user VBOs are possibleMarek Olšák5-12/+18
This can affect whether u_vbuf will be enabled or not. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium/hud: don't use user vertex buffersMarek Olšák1-7/+19
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium/hud: call u_upload_alloc only onceMarek Olšák1-8/+29
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium/u_upload_mgr: remove deprecated function u_upload_bufferMarek Olšák2-51/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/vl: use the common uploaderMarek Olšák2-13/+2
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/vbuf: use the common uploaderMarek Olšák1-10/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/blitter: use the common uploaderMarek Olšák1-9/+3
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/primconvert: use the common uploaderMarek Olšák1-10/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/hud: use the common uploaderMarek Olšák1-9/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14gallium/u_upload_mgr: add a helper that creates the default uploaderMarek Olšák2-0/+16
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-02-14tgsi: fix memory leak in tgsi sanity checkDave Airlie1-3/+5
This just fixes this without repeating the code. Reported-by: Li Qiang Cc: "17.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-13vl: remove DRI2DriverPrimeShift compile guardsEmil Velikov1-2/+0
DRI2DriverPrimeShift was added in dri2proto-2.8, which we now require as of the previous commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-02-10tgsi-dump: dump label if instruction has oneMarc-André Lureau1-11/+13
The instruction has an associated label when Instruction.Label == 1, as can be seen in ureg_emit_label() or tgsi_build_full_instruction(). This fixes dump generating extra :0 labels on conditionals, and virgl parsing more than the expected tokens and eventually reaching "Illegal command buffer" (when parsing more than a safety margin of 10 we currently have). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-10tgsi: remove ureg_label_insnMarc-André Lureau2-38/+0
Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-02-07gallium/tgsi: fix oob access in parse instructionLi Qiang1-1/+1
When parsing texture instruction, it doesn't stop if the 'cur' is ',', the loop variable 'i' will also be increased and be used to index the 'inst.TexOffsets' array. This can lead an oob access issue. This patch avoid this. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Li Qiang <liq3ea@gmail.com>
2017-02-06gallium: Remove vc4 simulator hack from loader infrastructure.Eric Anholt1-11/+0
Now that there's MESA_LOADER_DRIVER_OVERRIDE for choosing the driver name we load, we don't need this any more. v2: Get the junk out of pipe_loader_drm.c, too. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v1) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v2)
2017-02-03ilo: EOL unplumb unmaintained gallium drv from winsysEdward O'Callaghan2-34/+0
This is no longer actively maintained and is just accumulating bitrot. Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net> Acked-by: Chia-I Wu <olvaffe@gmail.com>
2017-02-02gallium: turn PIPE_SHADER_CAP_DOUBLES into a screen capabilityNicolai Hähnle2-3/+0
Make the cap consistent with PIPE_CAP_INT64. Aside from the hypothetical case of using draw for vertex shaders (and actually caring about doubles...), every implementation supports doubles either nowhere or everywhere. Also, st/mesa didn't even check the cap correctly in all supported shader stages. While at it, add a missing LLVM version check for 64-bit integers in radeonsi. This is conservative: judging by the log, LLVM 3.8 might be sufficient, but there are probably bugs that have been fixed since then. v2: fix clover (Marek) Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-02-01vl: add h264 constrained baseline profileBoyuan Zhang1-0/+1
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2017-01-30hud: fix compilation warnings in hud_nic_graph_install()Samuel Pitoiset1-2/+2
v2: use PRId64 instead of PRIx64 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-01-27gallivm: remove explicit __STDC_.*_MACROS definesEmil Velikov1-8/+0
Correctly handled by the build systems. Cc: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-24gallivm: don't try to use fast rcp for fdivRoland Scheidegger1-1/+3
The use of fast rcp instruction is disabled, and will always fall back to use a division instead (1 / x). Hence, if we get a division opcode, it doesn't make much sense trying to split that into rcp/mul. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-24gallivm: (trivial) fix ddiv cpu implementationRoland Scheidegger1-1/+0
we can't use the cpu implementation of fdiv, as this one uses different lp_build_context, which causes assertion failure. Just use default fdiv action (there is no fast rcp for doubles which we could potentially use anyway). Cc: 17.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-24tgsi: implement ddiv opcodeRoland Scheidegger1-0/+14
softpipe (along with llvmpipe) claims to support arb_gpu_shader_fp64, so we really need to support that opcode. Cc: 17.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-23gallium: add TGSI_PROPERTY_MUL_ZERO_WINSIlia Mirkin1-1/+2
This will be useful for proper D3D9 emulation, where this behavior is expected by some shaders. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Axel Davy <axel.davy@ens.fr>
2017-01-20gallium/hud: add missing break in hud_cpufreq_graph_install()Samuel Pitoiset1-0/+1
Fixes: e99b9395bef "gallium/hud: Add support for CPU frequency monitoring" Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-19gallivm: use #ifdef not #if for PIPE_ARCH_BIG_ENDIANDave Airlie1-1/+1
This fixes the build on ppc/s390. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Cc: "17.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-01-18android: gallium/auxiliary: fix building error in Android 7.0Mauro Rossi1-1/+1
Conditional libLLVMCore static library dependency is added, for the case when MESA_ENABLE_LLVM is true Fixes the following building error with Android 7.0: In file included from external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:62: ... external/llvm/include/llvm/IR/Attributes.h:68:14: fatal error: 'llvm/IR/Attributes.inc' file not found #include "llvm/IR/Attributes.inc" ^ 1 error generated. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-18gallium: correctly manage libsensors link flagsEmil Velikov1-2/+0
We should be using LIBS rather than the LDFLAGS variable. Furthermore try to keep the linking to the final stage, rather than intermetent static library. Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>