aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
...
* 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]>
* gallivm: fix texture wrapping for texture gather for mirror modesRoland Scheidegger2017-12-121-74/+171
| | | | | | | | | | | | | | | | | | | Care must be taken that all coords end up correct, the tests are very sensitive that everything is correctly rounded. This doesn't matter for bilinear filter (since picking a wrong texel with weight zero is ok), and we could also switch the per-sample coords mistakenly. While here, also optimize the coord_mirror helper a bit (we can do the mirroring directly by exploiting float rounding, no need for fixing up odd/even manually). I did not touch the mirror_clamp and mirror_clamp_to_border modes. In contrast to mirror_clamp_to_edge and mirror_repeat these are legacy modes. They are specified against old gl rules, which actually does the mirroring not per sample (so you get swapped order if the coord is in the mirrored section). I think the idea though is that they should follow the respecified mirror_clamp_to_edge rules so the order would be correct. Reviewed-by: Jose Fonseca <[email protected]>
* meson: add dep_thread to every lib that includes threads.hEric Engestrom2017-12-071-1/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104141 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[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/hud: use #ifdef to test for macro existenceEric Engestrom2017-12-016-11/+11
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add AllowGLSLCrossStageInterpolationMismatch workaroundTapani Pälli2017-11-301-0/+1
| | | | | | | | | | | | | This fixes issues seen with certain versions of Unreal Engine 4 editor and games built with that using GLSL 4.30. v2: add driinfo_gallium change (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97852 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103801 Acked-by: Andres Gomez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/hud: add HUD sharing within a context share groupMarek Olšák2017-11-253-12/+96
| | | | | | | This is needed for profiling multi-context applications like Chrome. One context can record queries and another context can draw the HUD. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: update the HUD interface for multiple contextsMarek Olšák2017-11-252-6/+8
| | | | | | | This is the boring subset of the following commit. All new parameters are optional. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent a crash if the recording context is inactiveMarek Olšák2017-11-251-1/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for record context init/releaseMarek Olšák2017-11-252-16/+37
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for draw context init/releaseMarek Olšák2017-11-251-70/+111
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: don't use hud->pipe in hud_parse_env_varMarek Olšák2017-11-251-6/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: use cso_get_pipe_contextMarek Olšák2017-11-252-3/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* cso: add cso_get_pipe_contextMarek Olšák2017-11-252-0/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: pass pipe_context explicitly to most functionsMarek Olšák2017-11-255-64/+57
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: split hud_draw into 3 separate functionsMarek Olšák2017-11-252-75/+95
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* llvmpipe: fix snorm blendingRoland Scheidegger2017-11-212-25/+32
| | | | | | | | | | | | | | | | | | | The blend math gets a bit funky due to inverse blend factors being in range [0,2] rather than [-1,1], our normalized math can't really cover this. src_alpha_saturate blend factor has a similar problem too. (Note that piglit fbo-blending-formats test is mostly useless for anything but unorm formats, since not just all src/dst values are between [0,1], but the tests are crafted in a way that the results are between [0,1] too.) v2: some formatting fixes, and fix a fairly obscure (to debug) issue with alpha-only formats (not related to snorm at all), where blend optimization would think it could simplify the blend equation if the blend factors were complementary, however was using the completely unrelated rgb blend factors instead of the alpha ones... Reviewed-by: Jose Fonseca <[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]>
* tgsi: s/uint/enum pipe_shader_type/Brian Paul2017-11-172-2/+2
| | | | Roland Scheidegger <[email protected]>
* tgsi: bump tgsi_opcode_info::output_mode size to 4 bitsBrian Paul2017-11-172-1/+3
| | | | | | | To avoid problems with MSVC. And verify size with ASSERT_BITFIELD_SIZE(). Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[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/os/os_thread.h: Silence -Wunused-param.Gert Wollny2017-11-171-0/+2
| | | | | | | | With --disable-debug a parameter is not used. Silence this warning by fake-using it. 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)
* 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]>