aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* gallium/aux/util/u_blit.c: Fix -Wunused-param warningsGert Wollny2017-11-171-1/+1
| | | | | | | | | Annotate the parameters accordingly. v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> v1: Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_transfer.c: Fix some -Wunused-param warnings.Gert Wollny2017-11-171-10/+10
| | | | | | | | | Decorate the params with "UNUSED" accordingly. v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_threaded_context.c: Fix some -Wunused-param warnings.Gert Wollny2017-11-171-10/+11
| | | | | | | | | | Decorate the params accordingly with UNUSED or MAYBE_UNUSED (for params that are used in debug mode). v2: move *UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_surface.c: Silence a -Wsign-compare warning.Gert Wollny2017-11-171-1/+1
| | | | | | | Explicitely convert one value to compare. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_pstipple.c: Fix one -Wsign-compare warning in ?: construct.Gert Wollny2017-11-171-1/+1
| | | | | | | Silence the warning by making the conversion to int explicit. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_mm.c: Fix one -Wparam-unused warning.Gert Wollny2017-11-171-1/+1
| | | | | | | | | Decorate the unused param accordingly with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format_yuv.c: Fix a number of -Wunused-param warnings.Gert Wollny2017-11-171-116/+116
| | | | | | | | | Decorate the params accordingly with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format_rgtc.c: Fix a number of -Wunused-param warningsGert Wollny2017-11-171-6/+16
| | | | | | | | | Decorate the params accordingly with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format_other.c: Fix various -Wunused-param warningsGert Wollny2017-11-171-17/+17
| | | | | | | | | Decorate the unused params with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format_latc.c: Fix various -Wunused-param warnings, (v2)Gert Wollny2017-11-171-6/+16
| | | | | | | | | Decorate the unused params with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format_etc.c: Fix eight -Wunused-param warnings (v2)Gert Wollny2017-11-171-2/+6
| | | | | | | | | Decorate the parameters accordingly with "UNUSED". v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_format.c: Fix one -Wunused-param warningGert Wollny2017-11-171-0/+2
| | | | | | | | This warning was issued only in release mode. Fix it by fake-using the parameter. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_dump_state.c: Fix two -Wunused-paramter warningsGert Wollny2017-11-171-2/+2
| | | | | | | v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_dump_defines.c: Fix -Wcompare-unsigned warningGert Wollny2017-11-171-1/+1
| | | | | | | | | u_bit_scan may return -1 that then may be interpreted as (unsigned)-1 in the following comparison, since num_names is unsigned. Convert the latter to be int as well. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_debug_stack.c: Silence -Wunused-result warningGert Wollny2017-11-171-2/+2
| | | | | | | | | | | asprintf is decorated with the attrbute "warn_unused_result", and if the function call fails, the pointer "temp" will be undefined, but since it is used later it should contain some usable value. Test return value of asprintf and assign some save value to "temp" if the call failed. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_debug_describe.c: Silence an -Wunused-param warningGert Wollny2017-11-171-1/+1
| | | | | | | | | Annotate the unused parameter. v2: move UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* gallium/aux/util/u_blitter.c: Silence some warningsGert Wollny2017-11-171-5/+5
| | | | | | | | | | * Annotate three parameters that are not used in release mode. * explicitely convert an int to unsigned in an ?: construct. v2: move MAYBE_UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* util/tgsi: use ASSERT_BITFIELD_SIZE() to check opcode field sizeBrian Paul2017-11-161-0/+2
| | | | | | | | | I've noticed at least two places where we store the TGSI opcode in an unsigned:8 bitfield. We're at 249 opcodes now. If we hit 256 we'll need to grow those bitfields. Use the new ASSERT_BITFIELD_SIZE() macro to detect that. Reviewed-by: Nicolai Hähnle <[email protected]>
* 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]>