summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* gallium/u_tests: add texture_barrier and FBFETCH testsMarek Olšák2018-01-241-1/+110
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* util: add trivial comment on u_upload_create()Brian Paul2017-12-261-0/+1
|
* gallium/util: add util_num_layers helperMarek Olšák2017-12-253-5/+11
|
* gallium/util: add u_transfer_helperRob Clark2017-12-152-0/+638
| | | | | | | | | | | | | | | | | | | | | | | | Add a new helper that drivers can use to emulate various things that need special handling in particular in transfer_map: 1) z32_s8x24.. gl/gallium treats this as a single buffer with depth and stencil interleaved but hardware frequently treats this as separate z32 and s8 buffers. Special pack/unpack handling is needed in transfer_map/unmap to pack/unpack the exposed buffer 2) fake RGTC.. GPUs designed with GLES in mind, but which can other- wise do GL3, if native RGTC is not supported it can be emulated by converting to uncompressed internally, but needs pack/unpack in transfer_map/unmap 3) MSAA resolves in the transfer_map() case v2: add MSAA resolve based on Eric's "gallium: Add helpers for MSAA resolves in pipe_transfer_map()/unmap()." patch; avoid wrapping pipe_resource, to make it possible for drivers to use both this and threaded_context. Signed-off-by: Rob Clark <[email protected]>
* gallium/u_blitter: replace tabs with spacesBrian Paul2017-12-121-18/+18
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: don't pass a pipe_resource to util_resource_is_array_texture()Brian Paul2017-12-121-3/+3
| | | | | | | | | No need to pass a pipe_resource when we can just pass the target. This makes the function potentially more usable. Rename it too. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/aux: include nr_samples in util_resource_size() computationBrian Paul2017-12-121-1/+2
| | | | | | | | | | | | | This function is only used in two places: 1. VMware driver, but only for HUD reporting 2. st/nine state tracker, used for texture memory accounting Fixes: a69efa9482d ("util: add new util_resource_size() function in u_resource.[ch]") Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_upload_mgr: allow drivers to specify pipe_resource::flagsMarek Olšák2017-12-052-6/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_threaded: avoid syncing in threaded_context_flushNicolai Hähnle2017-11-202-4/+15
| | | | | | | | We could always do the flush asynchronously, but if we're going to wait for a fence anyway and the driver thread is currently idle, the additional communication overhead isn't worth it. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: avoid syncing the driver thread in si_fence_finishNicolai Hähnle2017-11-201-0/+8
| | | | | | It is really only required when we need to flush for deferred fences. Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_threaded: properly initialize fence unflushed tokensNicolai Hähnle2017-11-201-2/+1
| | | | | | | This got lost in a rebase but never hurt anything because we happened to always sync in fence_finish anyway... Reviewed-by: Marek Olšák <[email protected]>
* u_threaded_gallium: remove synchronization in fence_server_syncNicolai Hähnle2017-11-203-3/+13
| | | | | | | | The whole point of fence_server_sync is that it can be used to avoid waiting in the application thread. Reviewed-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/aux/util/u_surface.c: Silence warnings and remove unneeded MAYBE_UNUSEDGert Wollny2017-11-171-5/+5
| | | | | | | | * Explicitely convert values to int in comparison. * Remove one MAYBE_UNUSED that is actually not needed. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_debug_image.c: Silence warnings -Wunused-paramGert Wollny2017-11-171-2/+2
| | | | | | | Decorate the according parameters with UNUSED. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_debug_flush.c: Silence warnings -Wunused-paramGert Wollny2017-11-171-3/+4
| | | | | | | Decorate the unused parameters with UNUSED. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_debug.c: Silence warnings -Wunused-paramGert Wollny2017-11-171-3/+6
| | | | | | | Silence warnings by decoration the parameters with UNUSED. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_format_table.py: Add UNUSED decoration to the generated ↵Gert Wollny2017-11-171-1/+1
| | | | | | | function headers Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_async_debug.c: Fix -Wtype-limits warning.Gert Wollny2017-11-171-1/+1
| | | | | | | | Use size_t instread of unsigned for new_max. realloc later expects size_t as parameter anyway. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util/u_debug_refcnt.h: Fix -Wunused-param warningsGert Wollny2017-11-171-2/+2
| | | | | | | | | Annotate the according parameters 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_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)
* 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/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-091-150/+0
| | | | | Cc: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-091-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add async debug message forwarding helperNicolai Hähnle2017-11-092-0/+188
| | | | | | 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]>
* 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]>