summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* vl/dri: Move the DRI3 check out of sources include into C.Jose Fonseca2016-05-162-5/+5
| | | | | | Fixes SCons build. Trivial. Built locally with SCons and autotools.
* vl/dri3: implement functions for get and set timestampLeo Liu2016-05-161-6/+53
| | | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: handle PresentCompleteNotify eventLeo Liu2016-05-161-1/+27
| | | | | | | | and get timestamp calculated based on the event's reply Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: implement DRI3 BufferFromPixmapLeo Liu2016-05-161-3/+113
| | | | | | | | | | | | We also need render to the front buffer of temporary X pixmap, this is the case of when we using opengl as video out for vaapi. the basic implementation is to pass pixmap ID to X server, and then X will return dma-buf fd, we will get the buffer object through this dma-buf fd. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: add support for resizingLeo Liu2016-05-161-4/+13
| | | | | | | | | When drawable size changed, PresentConfigureNotify event will be emitted, by handling the event to re-allocate resized buffer. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: implement funciton for get dirty areaLeo Liu2016-05-161-2/+9
| | | | | | | | This will clear presentation area not covered by video content Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: implement function for flush frontbufferLeo Liu2016-05-161-2/+30
| | | | | | | | | Request drawable content in pixmap by calling DRI3 PresentPixmap, and handle PresentIdleNotify event. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: add back buffers supportLeo Liu2016-05-161-2/+185
| | | | | | | | | | | This implements DRI3 PixmapFromBuffer. Create buffer objects, and associate it to a dma-buf fd, and then pass this fd with a pixmap ID to X server for creating pixmap object; also add a function for wait events. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: implement flushing for queued eventsLeo Liu2016-05-161-0/+36
| | | | | | | | also place holder for present events handling Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: register present eventsLeo Liu2016-05-161-0/+27
| | | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: set drawable geometryLeo Liu2016-05-161-0/+35
| | | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: add DRI3 support and implement create and destroyLeo Liu2016-05-163-0/+208
| | | | | | | | | | | | | Required functions into place for implementation, create screen with device fd returned from X server, also bail out to DRI2 with certain conditions. v2: -organize the error out path (Axel) -squash previous patch 1 and 2 into one (Emil) Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri: fix close fd error outLeo Liu2016-05-121-3/+5
| | | | | | fd should be set to -1 only if it got closed by pipe_loader_release. Signed-off-by: Leo Liu <[email protected]>
* swr: properly expose compressed format supportTim Rowley2016-05-121-0/+6
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: refactor pipe_shader_state to support multiple IR'sRob Clark2016-05-115-17/+20
| | | | | | | | | | | | | | | | The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI intermediate step (such as glsl->nir vs glsl->tgsi->nir). I think pipe_compute_state should get similar treatment. Currently, afaict, it has one user and one consumer, which has allowed it to be sloppy wrt. supporting alternative IR's. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: improve dumping of bitcodeRoland Scheidegger2016-05-112-4/+9
| | | | | | | | | Use GALLIVM_DEBUG=dumpbc for dumping of modules as bitcode. Instead of a fixed llvmpipe.bc name, use ir_<modulename>.bc so multiple modules can be dumped (albeit it might still overwrite previous modules, particularly the modules from draw tend to always have the same name). Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: print declarations of intrinsics with GALLIVM_DEBUG=irRoland Scheidegger2016-05-101-0/+5
| | | | | | | Those aren't really interesting, however outputting them is helpful when trying to feed the IR to llvm llc (or opt) for debugging. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: use InternalLinkage instead of PrivateLinkage for texture functionsRoland Scheidegger2016-05-101-1/+1
| | | | | | | At least with MCJIT the disassembler will crash otherwise when trying to disassemble such functions. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: disable avx512 featuresRoland Scheidegger2016-05-101-0/+12
| | | | | | | | | | | | | | | We don't target this yet, and some llvm versions incorrectly enable it based on cpu string, causing crashes. (Albeit this is a losing battle, it is pretty much guaranteed when the next new feature comes along llvm will mistakenly enable it on some future cpu, thus we would have to proactively disable all new features as llvm adds them.) This should fix https://bugs.freedesktop.org/show_bug.cgi?id=94291 (untested) Tested-by: Timo Aaltonen <[email protected]> Reviewed-by: Jose Fonseca <[email protected] CC: <[email protected]>
* gallium: enable intel jitevents profilingTim Rowley2016-05-091-0/+9
| | | | | | | | LLVM when configured with "intel jitevents" enabled can inform VTune about dynamic code, so individual shaders are attributed profiling data and the resulting assembly can be examined. Acked-by: Roland Scheidegger <[email protected]>
* gallium: fix various undefined left shifts into sign bitNicolai Hähnle2016-05-073-3/+3
| | | | | | | | | Funnily enough, some of these were turned into a compile-time error by gcc with -fsanitize=undefined ("initializer is not a constant"). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: change assertion to conditional in util_bitmask_destroy()Brian Paul2016-05-031-4/+4
| | | | | | | | If we fail to create a context in the VMware driver we call this function unconditionally to free a bunch of bit vectors. Instead of asserting on a null pointer, just no-op. Reviewed-by: Jose Fonseca <[email protected]>
* cso: null-out previously bound sampler statesBrian Paul2016-05-031-1/+3
| | | | | | | | | | | | | If, for example, we previously had 2 sampler states bound and now we are binding one, we'd leave the second sampler state unchanged. This change nulls-out the second sampler state in this situation. We're already doing the same thing for sampler views. This silences an occasional warning issued by the VMware driver when the number of sampler views and sampler states disagreed. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium,utils: Fix trivial sign compare warningsJan Vesely2016-05-038-21/+21
| | | | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Jakob Sinclair <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* tgsi: initialize stack allocated structWuZhen2016-05-011-0/+7
| | | | | | Cc: "11.2 11.1" <[email protected]> Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/target-helpers: remove inline_wrapper_sw_helper.hEmil Velikov2016-05-011-42/+0
| | | | | | | Unused as of commit dddedbec0ed "{st,targets}/nine: use static/dynamic pipe-loader" Signed-off-by: Emil Velikov <[email protected]>
* tgsi/text: fix parsing of memory instructionsNicolai Hähnle2016-04-291-13/+27
| | | | | | | Properly handle Target and Format parameters when present. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/text: add str_match_name_from_arrayNicolai Hähnle2016-04-291-0/+18
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/text: add str_match_format helper functionNicolai Hähnle2016-04-291-9/+22
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/build: pass Memory.Texture and .Format through tgsi_build_full_instructionNicolai Hähnle2016-04-291-2/+6
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/dump: signal nospace when the last print exceeded the sizeNicolai Hähnle2016-04-291-4/+6
| | | | | | | Previously, there was a bug where nospace wasn't signalled if it just so happened that the very last print exceeded the available space. Reviewed-by: Dave Airlie <[email protected]>
* tgsi/dump: shared dump_ctx initializationNicolai Hähnle2016-04-291-31/+17
| | | | Reviewed-by: Dave Airlie <[email protected]>
* gallium/util: s/Elements/ARRAY_SIZE/Brian Paul2016-04-289-25/+25
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: s/Elements/ARRAY_SIZE/Brian Paul2016-04-276-28/+28
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* os: s/Elements/ARRAY_SIZE/Brian Paul2016-04-271-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* hud: s/Elements/ARRAY_SIZE/Brian Paul2016-04-273-7/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: s/Elements/ARRAY_SIZE/Brian Paul2016-04-279-29/+29
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* draw: s/Elements/ARRAY_SIZE/Brian Paul2016-04-277-24/+24
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: add u_bit_consecutive for generating a consecutive range of bitsNicolai Hähnle2016-04-271-0/+12
| | | | | | | There are some undefined behavior subtleties, so having a function to match the u_bit_scan_consecutive_range makes sense. Reviewed-by: Marek Olšák <[email protected]>
* tgsi/exec: initialise SysSemanticToIndex array to -1Dave Airlie2016-04-271-0/+3
| | | | | | | | We want to use the SysSemanticToIndex to tell if we've seen the semantics at all. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/exec: implement restartable machine.Dave Airlie2016-04-272-17/+35
| | | | | | | | | | | | | | This lets us restart the machine at a PC value, and exits the machine when we hit a barrier. Compute shaders will then execute all the threads up to the barrier, then restart the machines after the barrier once all are done. v2: comment the code a bit, change return types. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/exec: make inputs/outputs optional for compute shaders.Dave Airlie2016-04-271-19/+24
| | | | | | | | compute shaders don't need input/outputs so don't bother allocating memory for these. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/exec: implement load/store/atomic on MEMORY.Dave Airlie2016-04-272-3/+150
| | | | | | | | This implements basic load/store/atomic ops on MEMORY types for compute shaders. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/exec: split out setting up masks to separate functionDave Airlie2016-04-271-9/+14
| | | | | | | | This is just a cleanup that will make later changes easier to make. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: accept a starting PC value for exec machine.Dave Airlie2016-04-274-4/+4
| | | | | | | | This will be used later to restart barriered execution threads in compute, for now we just want to change the API. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: move to using vector for system values.Dave Airlie2016-04-274-7/+7
| | | | | | | | | | For compute support some of the system values are .xyz types, so move to using a vector instead of a single channel. [airlied: squash swizzle fix from compute series]. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/exec: fix system value handling.Dave Airlie2016-04-271-3/+5
| | | | | | | | | | | a) SysSemanticToIndex needs to be indexed with the semantic name not the decl->Declaration.Semantic. b) doing this in run is too late, as the mappings are all setup prior to run in the execs. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Include intrin.h instead of defining ourselves.Jose Fonseca2016-04-261-2/+4
| | | | | | | | | More portable, particularly when building with Clang, which implements all MSVC intrisincs in its own intrin.h, but doesn't actually support `#pragma instrinsic`. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: pass a shader type to the machine create and clean up.Dave Airlie2016-04-264-14/+14
| | | | | | | | | | | | | There was definitely bugs here mixing up the PIPE_ and TGSI_ defines, hopefully they didn't cause any problems, since mostly it was special cases for GEOMETRY. This clarifies at shader machine create what type of shader this machine will execute. This is needed also for compute shaders where we don't want to allocate inputs/outputs. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/tgsi: move tgsi_exec.h header out of draw_context.hDave Airlie2016-04-262-1/+1
| | | | | | | | | It gets annoying that changing the tgsi exec rebuilds the state tracker unnecessarily. Putting this include into draw_gs.h which uses it causes a lot less rebuilds. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>