aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
...
* tgsi/exec: fix LDEXP in softpipeNicolai Hähnle2017-11-161-1/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103128 Fixes: cad959d90145 ("gallium: add LDEXP TGSI instruction and corresponding cap") Reviewed-by: Brian Paul <[email protected]>
* tgsi: whitespace clean-ups in tgsi_util.[ch]Brian Paul2017-11-152-40/+34
| | | | Trivial.
* tgsi: s/unsigned/enum tgsi_texture_type/Brian Paul2017-11-152-8/+8
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* gallium/tgsi: add tess output supoort to tgsi_get_gl_varying_semantic()Timothy Arceri2017-11-151-0/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/tgsi: add prim id to tgsi_get_gl_varying_semantic()Timothy Arceri2017-11-151-0/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* meson: add nir_builder_opcodes_h to gallium_auxiliaryDylan Baker2017-11-101-1/+1
| | | | | | | | | This creates a dependency on this header being generated before trying to compile any of these targets, as well as passing the correct -I to the compiler to ensure it's included correctly. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium/u_threaded: fix end_query regressionNicolai Hähnle2017-11-101-2/+0
| | | | | | | | Ouch... Fixes: 244536d3d6b4 ("gallium/u_threaded: avoid syncs for get_query_result") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103653 Reviewed-by: Marek Olšák <[email protected]>
* gallium/tgsi: start adding hw atomics (v3.2)Dave Airlie2017-11-103-0/+89
| | | | | | | | | | | | | | | | | | | | | This adds support for a hw atomic counters to TGSI. A new register file for storing atomic counters is added, along with a new atomic counter semantic, along with docs for both. v2: drop semantic, move hw counter to backend, Ilia pointed out SSO would have busted my plan, and he was right. v3: drop BUFFER decls. (Marek) v3.1: minor fixups for whitespace, set ureg error if we overflow the hw atomic limits. (nha) v3.2: fix some docs inconsistencies (Ilia) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add CAPs to support HW atomic counters. (v3)Dave Airlie2017-11-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like an evergreen specific feature, but with atomic counters AMD have hw specific counters they use instead of operating on buffers directly. These are separate to the buffer atomics, so require different limits and code paths. I've left the CAP for atomic type extensible in case someone else has a variant on this sort of thing (freedreno maybe?) and needs to change it. This adds all the CAPs required to add support for those atomic counters, along with a related CAP for limiting the number of output resources. I'd like to land this and the st patch then I can start to upstream the evergreen support for these and other GL4.x features. v2: drop the ATOMIC_COUNTER_MODE cap, just use the return from the HW counters. If 0 we use the current mode. v3: fix some rebase errors (Gert Wollny) Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/u_dump: add and use util_dump_transfer_usageNicolai Hähnle2017-11-094-16/+61
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_dump: add util_dump_nsNicolai Hähnle2017-11-092-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_dump: export util_dump_ptrNicolai Hähnle2017-11-092-2/+5
| | | | | | Change format to %p while we're at it. Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_context::callbackNicolai Hähnle2017-11-092-0/+47
| | | | | | | For running post-draw operations inside the driver thread. ddebug will use it. Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_threaded: implement pipe_context::set_log_contextNicolai Hähnle2017-11-091-0/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_threaded: avoid syncs for get_query_resultNicolai Hähnle2017-11-091-17/+48
| | | | | | | | | | Queries should still get marked as flushed when flushes are executed asynchronously in the driver thread. To this end, the management of the unflushed_queries list is moved into the driver thread. Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_threaded: implement asynchronous flushesNicolai Hähnle2017-11-093-2/+154
| | | | | | | | | | | | | This requires out-of-band creation of fences, and will be signaled to the pipe_context::flush implementation by a special TC_FLUSH_ASYNC flag. v2: - remove an incorrect assertion - handle fence_server_sync for unsubmitted fences by relying on the improved cs_add_fence_dependency - only implement asynchronous flushes on amdgpu Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_threaded: mark queries flushed only for non-deferred flushesNicolai Hähnle2017-11-092-4/+6
| | | | | | | | | | | The driver uses (and must use) the flushed flag of queries as a hint that it does not have to check for synchronization with currently queued up commands. Deferred flushes do not actually flush queued up commands, so we must not set the flushed flag for them. Found by inspection. Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove unused and deprecated u_time.hNicolai Hähnle2017-11-097-156/+1
| | | | | Cc: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-0913-338/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: move pipe_barrier into src/util and rename to util_barrierNicolai Hähnle2017-11-091-76/+0
| | | | | | | | | The #if guard is probably not 100% equivalent to the previous PIPE_OS check, but if anything it should be an over-approximation (are there pthread implementations without barriers?), so people will get either a good implementation or compile errors that are easy to fix. Reviewed-by: Marek Olšák <[email protected]>
* gallium: add async debug message forwarding helperNicolai Hähnle2017-11-094-0/+192
| | | | | | v2: use util_vasprintf for Windows portability Reviewed-by: Marek Olšák <[email protected]> (v1)
* gallium: clarify the constraints on sampler_view_destroyNicolai Hähnle2017-11-091-6/+10
| | | | | | | | | | | | | | | | | r600 expects the context that created the sampler view to still be alive (there is a per-context list of sampler views). svga currently bails when the context of destruction is not the same as creation. The GL state tracker, which is the only one that runs into the multi-context subtleties (due to share groups), already guarantees that sampler views are destroyed before their context of creation is destroyed. Most drivers are context-agnostic, so the warning message in pipe_sampler_view_release doesn't really make sense. Reviewed-by: Marek Olšák <[email protected]>
* gallivm: Use new LLVM fast-math-flags APITobias Droste2017-11-081-0/+4
| | | | | | | | | | | | | LLVM 6 changed the API on the fast-math-flags: https://reviews.llvm.org/rL317488 NOTE: This also enables the new flag 'ApproxFunc' to allow for approximations for library functions (sin, cos, ...). I'm not completly convinced, that this is something mesa should do. Signed-off-by: Tobias Droste <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* gallium: Guard assertions by NDEBUG instead of DEBUGMichel Dänzer2017-11-071-1/+1
| | | | | | | This matches the standard assert.h header. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_vbuf: use signed vertex buffers offsets for optimal uploadsMarek Olšák2017-11-061-2/+10
| | | | | | | | | | | | | | | Uploaded data must start at (stride * start), because we can't modify start in all cases. If it's the first allocation, it's also the amount of memory wasted. If the starting offset is larger than the size of the upload buffer, the buffer is re-created, used for 1 upload, and then thrown away. If the upload is small, most of the buffer space is unused and wasted. Keep doing that and the OOM killer comes. It's actually pretty quick. With signed VB offsets, we can set min_out_offset = 0 in u_upload_alloc/u_upload_data. This fixes OOM situations with SPECviewperf.
* gallium/u_threaded: don't map big VRAM buffers for the first upload directlyMarek Olšák2017-11-062-0/+20
| | | | | | | This improves Paraview "many spheres" performance 4x along with the radeonsi commit. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_threaded: clean up tc_improve_map_buffer_flags and prevent reentryMarek Olšák2017-11-061-7/+12
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallivm: allow arch rounding with avx512Tim Rowley2017-11-021-1/+2
| | | | | | Fixes piglit vs-roundeven-{float,vec[234]} with simd16 VS. Reviewed-by: Roland Scheidegger <[email protected]>
* meson: use dep_m in libgalliumErik Faye-Lund2017-10-311-1/+1
| | | | | | | | The u_format_other.c users sqrtf, which on some systems require a math-library. So let's make sure we link with it. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: s/unsigned/enum pipe_prim_type/Brian Paul2017-10-271-1/+2
| | | | | | In the vbuf_render::set_primitive() functions. Reviewed-by: Roland Scheidegger <[email protected]>
* draw: don't cull tris with zero areaRoland Scheidegger2017-10-272-3/+12
| | | | | | | | | | | | | | Culling tris with zero area seems like a great idea, but apparently with fill mode line (and point) we're supposed to draw them, at least some tests for some other state tracker complained otherwise. Such tris also always seem to be back facing (not sure if this can be inferred from anything, since in a mathematical sense it cannot really be determined), so make sure to account for this when filling in the face information. (For solid tris, this is of course unnecessary, drivers will throw the tris away later in any case.) Reviewed-by: Brian Paul <[email protected]>
* meson: move gallium include declarations to srcDylan Baker2017-10-271-2/+0
| | | | | | | | These are used by non-gallium osmesa, so they need to be defined outside of the gallium subdirectory. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium/os: fix align_malloc() / os_malloc_aligned() comment mix-upBrian Paul2017-10-271-1/+1
| | | | | os_free_aligned() is the counterpart to os_malloc_aligned(). Trivial.
* gallium/util: remove some block alignment assertionsRoland Scheidegger2017-10-251-8/+0
| | | | | | | | | | | | | These assertions were revisited a couple of times in the past, and they still weren't quite right. The problem I was seeing (with some other state tracker) was a copy between two 512x512 s3tc textures, but from mip level 0 to mip level 8. Therefore, the destination has only size 2x2 (not a full block), so the box width/height was only 2, causing the assertion to trigger for src alignment. As far as I can tell, such a copy is completely legal, and because a correct assertion would get ridiculously complicated just get rid of it for good. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: use util_snprintf() in u_socket_connect()Brian Paul2017-10-241-1/+2
| | | | | | | | | Instead of plain snprintf(). To fix the MSVC build. snprintf() is used in various places in Mesa/gallium, but apparently, not in code built with MSVC. Reviewed-by: Eric Engestrom <[email protected]>
* gallium/util: don't call close() on Windows in u_tests.cBrian Paul2017-10-231-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: use util_strdup() macro in u_debug_symbol.cBrian Paul2017-10-231-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: replace gethostbyname() with getaddrinfo()Brian Paul2017-10-231-13/+22
| | | | | | | | | | Compiling with MSVC options /we4995 /we4996 (a subset of /sdl) generates a warning that the gethostbyname() function is deprecated in favor of getaddrinfo() or GetAddrInfoW(). Replace the call with getaddrinfo(). Untested. There are no callers to u_socket_connect() in Gallium. Reviewed-by: Nicolai Hähnle <[email protected]>
* nir: Get rid of nir_shader::stageJason Ekstrand2017-10-201-1/+1
| | | | | | | | It's redundant with nir_shader::info::stage. Acked-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* gallium: add more exceptions to tgsi_util_get_inst_usage_maskTim Rowley2017-10-191-0/+12
| | | | | | | | | | | | | A number of double/int64 operations don't have matching read and write usage masks, which the fallthrough case of tgsi_util_get_inst_usage_mask assumes for componentwise tagged instructions. No regressions in llvmpipe piglit; fixes a large number of swr regressions. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: fix tgsi_util_get_inst_usage_maskRoland Scheidegger2017-10-191-6/+6
| | | | | | | | The logic for handling shadow coords was completely broken. Fixes be3ab867bd444594f9d9e0f8e59d305d15769afd. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103265 Reviewed-by: Marek Olšák <[email protected]>
* meson: build gallium winsys for dri, null, and wrapperDylan Baker2017-10-161-3/+9
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: Build gallium pipe-loaderDylan Baker2017-10-162-0/+65
| | | | Signed-off-by: Dylan Baker <[email protected]>
* meson: Build gallium auxiliaryDylan Baker2017-10-161-0/+528
| | | | | | | v2: - guard gallivm files with "with_llvm" instead of "dep_llvm.found()" Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v1)
* gallium: add tests for PIPE_FORMAT_{X1,A1}B5G5R5_UNORM formatsNicolai Hähnle2017-10-121-0/+13
| | | | | | | This is a left-over from my version of adding the new format after rebasing on Eric's version. Reviewed-by: Marek Olšák <[email protected]>
* gallium: allow 512-bit vectorsTim Rowley2017-10-112-9/+9
| | | | | | | | | Increase the max allowed vector size from 256 to 512. No piglit llvmpipe regressions running on avx2. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.Eric Anholt2017-10-103-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | V3D 3.3 is a continuation of the 3D implementation in VC4 (v2.1 and v2.6). V3D 3.3 introduces an MMU (no more CMA allocations) and support for GLES3.1. This driver is not currently conformant, though that will be a target as soon as possible. V3D 3.x parts use a new texture tiling layout common across many Broadcom graphics parts including and the HVS scanout engine. It also massively changes the QPU instructions, introducing a common physical register file (no more A/B split) and half-float instructions, while removing the 4x8 unorm instructions in favor of half-float for talking to fixed function interfaces. Because so much has changed, vc5 is implemented in a separate gallium driver, using only the XML code-generation support from vc4. v2: Fix tile layout for 64bpp textures. Fix texture swizzling for 32-bit returns. Fix up a bit of MRT setup. Sync the simulator to kernel behavior a bit more. Improve uniform debugging code. Rebase on QIR->VIR rename. Move texture state mostly to the CSOs. Improve cache flushing on the simulator. Fix program deletion use-after-frees. Acked-by: Dave Airlie <[email protected]> (uabi plan) Acked-by: Daniel Vetter <[email protected]> (uabi plan)
* gallium: Add support for 5551 with the 1-bit field in the low bit.Eric Anholt2017-10-101-0/+2
| | | | | | | | | | | | This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. v3: Rebase on PIPE_FORMAT_R10G10B10X2_UNORM addition. Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Nicolai Hähnle <[email protected]> (v2)
* u_threaded_context: fix a memory leakNicolai Hähnle2017-10-101-7/+8
| | | | | | | | The uploaders can own transfers which need to be unmapped. Destroy them before the final sync (they're not used from the driver thread anyway) so that the transfer_unmap call is processed by the driver. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: don't change viewport for blits, use window-space positionsMarek Olšák2017-10-072-1/+4
| | | | | | The viewport state was an identity anyway. Reviewed-by: Nicolai Hähnle <[email protected]>