aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
...
* python: Use explicit integer divisionsMathieu Bridon2018-08-072-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 2, divisions of integers return an integer: >>> 32 / 4 8 In Python 3 though, they return floats: >>> 32 / 4 8.0 However, Python 3 has an explicit integer division operator: >>> 32 // 4 8 That operator exists on Python >= 2.2, so let's use it everywhere to make the scripts compatible with both Python 2 and 3. In addition, using __future__.division tells Python 2 to behave the same way as Python 3, which helps ensure the scripts produce the same output in both versions of Python. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v2) Reviewed-by: Dylan Baker <[email protected]>
* gallium/u_vbuf: handle indirect multidraws correctly and efficiently (v3)Marek Olšák2018-08-031-24/+180
| | | | | | | | | v2: need to do MAX{start+count} instead of MAX{count} added piglit tests v3: use malloc Cc: 18.2 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: return 0 for NaNs in float_to_ubyteRoland Scheidegger2018-08-031-6/+5
| | | | | | | | | | | | | | | | d3d10 requires NaNs to get converted to 0 for float->unorm conversions (and float->int etc.). GL spec probably doesn't care in general, but it would make sense to have reasonable behavior in any case imho - the old code was converting negative NaNs to 0, and positive NaNs to 255. (Note that using float comparison isn't actually all that much more effort in any case, at least with sse2 it's just float comparison (ucommiss) instead of int one - I converted the second comparison to float too simply because it saves the probably somewhat expensive transfer of the float from simd to int domain (with sse2 via stack), so the generated code actually has 2 less instructions, although float comparisons are more expensive than int ones.) Reviewed-by: Brian Paul <[email protected]>
* ddebug: use util_snprintf() in dd_get_debug_filename_and_mkdirAndres Gomez2018-08-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\driver_ddebug\dd_draw.c ... dd_draw.c c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(60) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(dd_draw.obj) : error LNK2001: unresolved external symbol _snprintf build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Nicolai Hähnle <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/aux/util: use util_snprintf() in test_texture_barrierAndres Gomez2018-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\util\u_tests.c ... u_tests.c src\gallium\auxiliary\util\u_tests.c(624) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(u_tests.obj) : error LNK2019: unresolved external symbol _snprintf referenced in function _test_texture_barrier build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 56342c97ee7 ("gallium/u_tests: test FBFETCH and shader-based blending with MSAA") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Dieter Nützel <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: fix ddebug on windowsDylan Baker2018-08-011-1/+5
| | | | | | | | | By including the proper headers for getpid and for mkdir. Fixes: 6ff0c6f4ebcb87ea6c6fe5a4ba90b548f666067d ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: move process.[ch] to u_process.[ch]Dylan Baker2018-08-011-1/+1
| | | | | | | | | | | | | On windows process.h is a system provided header, and it's required in include/c11/threads_win32.h. This header interferes with searching for that header, and results in windows build warnings with scons, but errors in meson which doesn't allow implicit function declarations. Just rename process to u_process, which follows the style of utils anyway. Fixes: 2e1e6511f76370870b5cde10caa9ca3b6d0dc65f ("util: extract get_process_name from xmlconfig.c") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add new SAMP2HND and IMG2HND opcodesRhys Perry2018-08-013-2/+7
| | | | | | | | This commit does not add support for the opcodes in gallivm or tgsi_to_nir.c Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2018-07-3116-22/+33
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samplesMarek Olšák2018-07-314-1/+4
| | | | Tested-by: Dieter Nützel <[email protected]>
* tgsi: whitespace fixes in tgsi_ureg.cBrian Paul2018-07-271-23/+22
| | | | Trivial.
* gallium/util: whitespace fixes in u_inlines.hBrian Paul2018-07-271-36/+44
| | | | Trivial.
* gallium/util: whitespace fixes in u_debug_memory.cBrian Paul2018-07-271-53/+53
| | | | Trivial.
* gallium/u_vbuf: split u_vbuf_get_minmax_index function (v2)Marek Olšák2018-07-271-50/+51
| | | | | | | | This will be used by indirect multidraws. v2: clean up the function further, change return types to unsigned Reviewed-by: Eric Anholt <[email protected]> (v1)
* gallium/auxiliary: Extern "c" fixes.Alexander von Gluck IV2018-07-273-0/+24
| | | | | | Used by C++ code such as Haiku's renderer. Reviewed-by: Brian Paul <[email protected]>
* gallium/noop: implement invalidate_resourceMarek Olšák2018-07-271-0/+6
|
* gallium/auxiliary: Fix Autotools on Android (v2)Chad Versace2018-07-271-1/+5
| | | | | | | | | | | | | | | | | Problem 1: u_debug_stack_android.cpp transitively included "pipe/p_compiler.h", but src/gallium/include was missing from the C++ include path. Problem 2: Add -std=c++11 to AM_CXXFLAGS. Android's libbacktrace headers require C++11, but the Android toolchain (at least in the Chrome OS SDK) does not enable C++11 by default. v2: Add -std=c++11. Reviewed-by: Gurchetan Singh <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Cc: Eric Engestrom <[email protected]>
* gallium: initialize ureg_dst::Invariant bitErik Faye-Lund2018-07-261-0/+3
| | | | | | | | | | | | | | | | | | | | | When this bit was added, it seems the some initialization code was omitted by mistake. Since stack-variables have kinda random contents, and we don't zero initialize the whole struct in these code-paths, we end up getting random-ish values for this bit. Spotted by Coverity in the following CIDs: - 1438115 - 1438123 - 1438130 Fixes: 70425bcfe63c4e9191809659d019ec4af923595d ("gallium: plumb invariant output attrib thru TGSI") Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* draw: force draw pipeline if there's more than 65535 verticesRoland Scheidegger2018-07-233-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | The pt emit path can only handle 65535 - the number of vertices is truncated to a ushort, resulting in a too small buffer allocation, which will crash. Forcing the pipeline path looks suboptimal, then again this bug is probably there ever since GS is supported, so it seems it's not happening often. (Note that the vertex_id in the vertex header is 16 bit too, however this is only used by the draw pipeline, and it denotes the emit vertex nr, and that uses vbuf code, which will only emit smaller chunks, so should be fine I think.) Other solutions would be to simply allow 32bit counts for vertex allocation, however 65535 is already larger than this was intended for (the idea being it should be more cache friendly). Or could try to teach the pt emit path to split the emit in smaller chunks (only the non-index path can be affected, since gs output is always linear), but it's a bit tricky (we don't know the primitive boundaries up-front). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=107295 Cc: <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* u_blitter: Add an option to draw the triangles using an index buffer.Eric Anholt2018-07-122-2/+16
| | | | | | | | | | | | | | | For V3D, the HW will interpolate slightly differently along the shared edge of the trifan. The conformance tests manage to catch this in the nearest_consistency_* group. To get interpolation to match, we need the last vertex of the triangle to be shared. I first tried implementing draw_rectangle to do triangles instead, but that was quite a bit (147 lines) of code duplication from u_blitter, and this seems much simpler and less likely to break as u_blitter changes. Fixes dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_* on V3D. Reviewed-by: Marek Olšák <[email protected]>
* u_draw: Add some indices to the util_draw_elements() helpers.Eric Anholt2018-07-121-1/+8
| | | | | | | | | | | | These helpers have been unused, and were definitely not useful since 330d0607ed60 ("gallium: remove pipe_index_buffer and set_index_buffer") made it so that they never had an index buffer passed in. For an upcoming u_blitter change to use these helpers, I have just 6 bytes of index data, so pass it as user data until a more interesting caller comes along. Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_transfer_helper: Initialize the stride of MSAA maps.Eric Anholt2018-07-121-0/+1
| | | | | | | | | | | We just never set the value that was returned for MSAA mappings (directly reading back an MSAA framebuffer). Since we're handing back ss_map, it should be ss_map's stride from our nested transfer. Fixes piglit /home/anholt/src/piglit/bin/fbo-depthstencil -samples=4 cases. Reviewed-by: Rob Clark <[email protected]>
* gallium/u_transfer_helper: Fix MSAA mappings with nonzero x/y.Eric Anholt2018-07-121-1/+5
| | | | | | | | | | | | We created a temporary with box->{width,height} and then tried to map width,height from a nonzero offset when we meant to just map the whole temporary. Fixes segfaults in V3D in dEQP-GLES3.functional.prerequisite.read_pixels with --deqp-egl-config-name=rgba8888d24s8ms4 and also piglit's read-front clear-front-first -samples=4 Reviewed-by: Rob Clark <[email protected]>
* gallium: Check pipe_screen::resource_changed before dereferencing itMichel Dänzer2018-07-123-3/+6
| | | | | | | | | | It's optional, only implemented by the etnaviv driver so far. Fixes: 501d0edeca32 "st/mesa: call resource_changed when binding a EGLImage to a texture" Fixes: a37cf630b4d1 "gallium: add pipe_screen::resource_changed callback wrappers" Reviewed-by: Lucas Stach <[email protected]>
* python: Use the print functionMathieu Bridon2018-07-064-366/+373
| | | | | | | | | | | | In Python 2, `print` was a statement, but it became a function in Python 3. Using print functions everywhere makes the script compatible with Python versions >= 2.6, including Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* gallium/auxiliary: Fix string matchingMathieu Bridon2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit f69bc797e15fe6beb9e439009fab55f7fae0b7f9 did the following: - if format.layout in ('bptc', 'astc'): + if format.layout in ('astc'): The intention was to go from matching either 'bptc' or 'astc' to matching only 'astc'. But the new code doesn't respect this intention any more, because in Python `('astc')` is not a tuple containing a string, it is just the string. (the parentheses are simply ignored) That means we now match any substring of 'astc', for example 'a'. This commit fixes the test to respect the original intention. Fixes: f69bc797e15fe6beb9e4 "gallium/auxiliary: Add helper support for bptc format compress/decompress" Reviewed-by: Eric Engestrom <[email protected]>
* Shorten u_queue namesMarek Olšák2018-07-041-1/+1
| | | | | | | | There is a 15-character limit for thread names shared by the queue name and process name. Shorten the thread name to make space for the process name. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/os: use util_get_process_name when possibleMarek Olšák2018-07-041-14/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium/u_vbuf: drop min/max-scanning for empty indirect drawsErik Faye-Lund2018-07-021-0/+3
| | | | | | | | | | | | | | | | | | | When building with asserts enabled, we'll end up triggering an assert in pipe_buffer_map_range down this code-path, due to trying to map an empty range. Even if we avoid that, we'll trigger another assert a bit later, because u_vbuf_get_minmax_index returns a min-index of -1 here, which gets promoted to an unsigned value, and gives us an out-of-bounds buffer-mapping offset. Since we can't really have a well-defined min/max range here when the range is empty anyway, we should just drop this dance in the first place. After all, no rendering is going to be produced. This fixes a crash in dEQP-GLES31.functional.draw_indirect.random.0 on VirGL for me. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/auxiliary: Add helper support for bptc format compress/decompressDenis Pauk2018-07-016-1/+408
| | | | | | | | | | | | | | Reuse code shared with mesa/main/texcompress_bptc. v2: Use block decompress function v3: Include static bptc code from texcompress_bptc_tmp.h Suggested-by: Marek Olšák <[email protected]> Signed-off-by: Denis Pauk <[email protected]> CC: Nicolai Hähnle <[email protected]> CC: Marek Olšák <[email protected]> CC: Gert Wollny <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: remove dummy function util_format_is_supportedMarek Olšák2018-06-292-20/+0
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* gallium: plumb invariant output attrib thru TGSIJoe M. Kniss2018-06-295-13/+39
| | | | | | | | | | | | Add support for glsl 'invariant' modifier for output data declarations. Gallium drivers that use TGSI serialization currently loose invariant modifiers in glsl shaders. v2: use boolean for invariant instead of unsigned. Tested: chromiumos on qemu with virglrenderer. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Fix automake for Android (v2)Chad Versace2018-06-271-0/+4
| | | | | | | | | | | | | | | Chromium OS uses Autotools and pkg-config when building Mesa for Android. The gallium drivers were failing to find the headers and libraries for zlib and Android's libbacktrace. v2: - Don't add a check for zlib.pc. configure.ac already checks for zlib.pc elsewhere. [for tfiga] - Check for backtrace.pc separately from the other Android libs. [for tfiga] Reviewed-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/util: Fix build error due to cast to different sizeRobert Foss2018-06-251-2/+2
| | | | | | Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ttn: convert to deref instructionsRob Clark2018-06-221-39/+13
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add scalar isa shader capChristian Gmeiner2018-06-202-0/+4
| | | | | | | | | | | | | | | | v1 -> v2: - nv30 is _NOT_ scalar as suggested by Ilia Mirkin. - Change from a screen cap to a shader cap as suggested by Eric Anholt. - radeonsi is scalar as suggested by Marek Olšák. - Change missing ones to be scalar. v2 -> v3: - r600 prefers vec4 as suggested by Marek Olšák. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/aux/util/u_cpu_detect.h: Fix -Wsign-compare warning in u_cpu_detect.cGert Wollny2018-06-201-1/+1
| | | | | | | | | | | | | Change the type of util_cpu_caps::nr_cpus to int because sysconfig returns a signed value, fixes: u_cpu_detect.c: In function 'util_cpu_detect': u_cpu_detect.c:317:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (util_cpu_caps.nr_cpus == -1) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/util/u_debug.h: Fix "noreturn" warnings in debug modeGert Wollny2018-06-201-2/+2
| | | | | | | | | | | Only decorate function as noreturn when DEBUG is not defined, because when compiled in DEBUG mode the function actually executes an int3 and may return, fixes: u_debug.c: In function '_debug_assert_fail': u_debug.c:309:1: warning: 'noreturn' function does return Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/util: Fix some warningsGert Wollny2018-06-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | util/u_cpu_detect.c: In function 'util_cpu_detect': util/u_cpu_detect.c:377:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (util_cpu_caps.nr_cpus == ~0u) ^~ util/u_hash_table.c:274:21: warning: unused parameter 'k' [-Wunused- parameter] util_hash_inc(void *k, void *v, void *d) ^ util/u_hash_table.c:274:30: warning: unused parameter 'v' [-Wunused- parameter] util_hash_inc(void *k, void *v, void *d) ^ util/u_tests.c: In function 'test_texture_barrier': util/u_tests.c:652:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < num_samples / 2; i++) { ^ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_ureg.c: remove unused parameter from ↵Gert Wollny2018-06-201-2/+1
| | | | | | | | | | | | | | | match_or_expand_immediate64 remove "type" from "match_or_expand_immediate64", fixes: tgsi/tgsi_ureg.c: In function 'match_or_expand_immediate64': tgsi/tgsi_ureg.c:837:34: warning: unused parameter 'type' [-Wunused- parameter] int type, ^~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_two_side.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integer propagation rules can sometimes be irritating. With "unsigned x" "x + 1" gets propagated to a signed integer, so explicitely assign the sum to an unsigned and use that for comaprison. In file included from tgsi/tgsi_two_side.c:41:0: tgsi/tgsi_two_side.c: In function 'xform_decl': ./util/u_math.h:660:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) ^ tgsi/tgsi_two_side.c:86:24: note: in expansion of macro 'MAX2' ts->num_inputs = MAX2(ts->num_inputs, decl->Range.Last + 1); ^~~~ ./util/u_math.h:660:40: warning: signed and unsigned type in conditional expression [-Wsign-compare] #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) ^ tgsi/tgsi_two_side.c:86:24: note: in expansion of macro 'MAX2' ts->num_inputs = MAX2(ts->num_inputs, decl->Range.Last + 1); ^~~~ ./util/u_math.h:660:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) ^ tgsi/tgsi_two_side.c:89:23: note: in expansion of macro 'MAX2' ts->num_temps = MAX2(ts->num_temps, decl->Range.Last + 1); ^~~~ ./util/u_math.h:660:40: warning: signed and unsigned type in conditional expression [-Wsign-compare] #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) ^ tgsi/tgsi_two_side.c:89:23: note: in expansion of macro 'MAX2' ts->num_temps = MAX2(ts->num_temps, decl->Range.Last + 1); ^~~~ tgsi/tgsi_two_side.c: In function 'xform_inst': tgsi/tgsi_two_side.c:184:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (inst->Src[i].Register.Index == ts- >front_color_input[j]) { ^~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_ureg.c: Fix various warningsGert Wollny2018-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_ureg.c: In function 'ureg_DECL_sampler': tgsi/tgsi_ureg.c:721:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ureg->sampler[i].Index == nr) ^~ tgsi/tgsi_ureg.c: In function 'match_or_expand_immediate64': tgsi/tgsi_ureg.c:837:34: warning: unused parameter 'type' [-Wunused- parameter] int type, ^~~~ tgsi/tgsi_ureg.c: In function 'emit_decls': tgsi/tgsi_ureg.c:1821:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ureg->properties[i] != ~0) ^~ tgsi/tgsi_ureg.c: In function 'ureg_create_with_screen': tgsi/tgsi_ureg.c:2193:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(ureg->properties); i++) ^ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_text.c: Fix -Wsign-compare warningsGert Wollny2018-06-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_text.c: In function 'parse_identifier': tgsi/tgsi_text.c:218:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i == len - 1) ^~ tgsi/tgsi_text.c: In function 'parse_optional_swizzle': tgsi/tgsi_text.c:873:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < components; i++) { ^ tgsi/tgsi_text.c: In function 'parse_instruction': tgsi/tgsi_text.c:1103:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) { ^ tgsi/tgsi_text.c:1118:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (i < info->num_dst + info->num_src) { ^ tgsi/tgsi_text.c: In function 'parse_immediate': tgsi/tgsi_text.c:1660:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (type = 0; type < ARRAY_SIZE(tgsi_immediate_type_names); ++type) { ^ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_point_sprite.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_lowering.c: In function 'emit_twoside': tgsi/tgsi_lowering.c:1179:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c:1208:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c:1216:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c: In function 'emit_decls': tgsi/tgsi_lowering.c:1280:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->numtmp; i++) { ^ tgsi/tgsi_lowering.c: In function 'rename_color_inputs': tgsi/tgsi_lowering.c:1311:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (src->Index == ctx->two_side_idx[j]) { ^~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_lowering.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_lowering.c: In function 'emit_twoside': tgsi/tgsi_lowering.c:1179:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c:1208:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c:1216:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->two_side_colors; i++) { ^ tgsi/tgsi_lowering.c: In function 'emit_decls': tgsi/tgsi_lowering.c:1280:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->numtmp; i++) { ^ tgsi/tgsi_lowering.c: In function 'rename_color_inputs': tgsi/tgsi_lowering.c:1311:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (src->Index == ctx->two_side_idx[j]) { ^~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_build.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-2/+4
| | | | | | | | | | | | | | | | tgsi/tgsi_build.c: In function 'tgsi_build_full_immediate': tgsi/tgsi_build.c:622:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) { ^ tgsi/tgsi_build.c: In function 'tgsi_build_full_property': tgsi/tgsi_build.c:1393:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for( i = 0; i < full_prop->Property.NrTokens - 1; i++ ) { ^ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_build.c: Remove now unused variableGert Wollny2018-06-201-7/+1
| | | | | | | | Removing the unused prev_tocken from the function calls made this local variable also unused. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_build.c: Remove unused parameters prev_token from various ↵Gert Wollny2018-06-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions remove parameter prev_token unused in tgsi_build_instruction_label tgsi_build_instruction_texture tgsi_build_instruction_memory tgsi_build_texture_offset This fixes the following warnings: tgsi/tgsi_build.c: In function 'tgsi_build_instruction_label': tgsi/tgsi_build.c:716:24: warning: unused parameter 'prev_token' [- Wunused-parameter] struct tgsi_token *prev_token, ^~~~~~~~~~ tgsi/tgsi_build.c: In function 'tgsi_build_instruction_texture': tgsi/tgsi_build.c:749:23: warning: unused parameter 'prev_token' [- Wunused-parameter] struct tgsi_token *prev_token, ^~~~~~~~~~ tgsi/tgsi_build.c: In function 'tgsi_build_instruction_memory': tgsi/tgsi_build.c:784:23: warning: unused parameter 'prev_token' [- Wunused-parameter] struct tgsi_token *prev_token, ^~~~~~~~~~ tgsi/tgsi_build.c: In function 'tgsi_build_texture_offset': tgsi/tgsi_build.c:819:23: warning: unused parameter 'prev_token' [- Wunused-parameter] struct tgsi_token *prev_token, ^~~~~~~~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_exec.c: Fix various -Wsign-compareGert Wollny2018-06-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_exec.c: In function 'exec_tex': tgsi/tgsi_exec.c:2254:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] assert(shadow_ref >= dim && shadow_ref < ARRAY_SIZE(args)); ^ ./util/u_debug.h:189:30: note: in definition of macro 'debug_assert' #define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__)) ^~~~ tgsi/tgsi_exec.c:2254:7: note: in expansion of macro 'assert' assert(shadow_ref >= dim && shadow_ref < ARRAY_SIZE(args)); ^~~~~~ tgsi/tgsi_exec.c:2290:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = dim; i < ARRAY_SIZE(args); i++) ^ In file included from ./util/u_memory.h:39:0, from tgsi/tgsi_exec.c:62: tgsi/tgsi_exec.c: In function 'exec_lodq': tgsi/tgsi_exec.c:2357:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] assert(dim <= ARRAY_SIZE(coords)); ^ ./util/u_debug.h:189:30: note: in definition of macro 'debug_assert' #define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__)) ^~~~ tgsi/tgsi_exec.c:2357:4: note: in expansion of macro 'assert' assert(dim <= ARRAY_SIZE(coords)); ^~~~~~ tgsi/tgsi_exec.c:2363:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = dim; i < ARRAY_SIZE(coords); i++) { ^ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_exec.c: remove superfluous parameter from etch_source_dGert Wollny2018-06-201-5/+4
| | | | | | | | | | | Remove unused parameter src_datatype from fetch_source_d, fixes warning; tgsi/tgsi_exec.c: In function 'fetch_source_d': tgsi/tgsi_exec.c:1594:40: warning: unused parameter 'src_datatype' [-Wunused-parameter] enum tgsi_exec_datatype src_datatype) ^~~~~~~~~~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>