summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* gallium/aux/tgsi_exec.c: remove superfluous parameter from store_dest_dstretGert Wollny2018-06-201-9/+5
| | | | | | | | | | | | | remove unused parameter inst from store_dest_dstret (and consequently also from store_dest_double), fixes warning: tgsi/tgsi_exec.c: In Funktion »store_dest_dstret«: tgsi/tgsi_exec.c:1765:47: Warning: unused parameter »inst« [-Wunused-parameter] const struct tgsi_full_instruction *inst) ^~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_exec.c: Remove unused parameter from fetch_src_file_channelGert Wollny2018-06-201-10/+3
| | | | | | | | | | | | | remove unused parameter chan_index from fetch_src_file_channel, fixes warning: tgsi/tgsi_exec.c: In Funktion »fetch_src_file_channel«: tgsi/tgsi_exec.c:1480:35: Warning: unused parameter »chan_index« [-Wunused-parameter] const uint chan_index, ^~~~~~~~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_exec.c: Remove paramater inst from exec_killGert Wollny2018-06-201-3/+2
| | | | | | | | | | | Fixes warning: tgsi/tgsi_exec.c: In Funktion »exec_kill«: tgsi/tgsi_exec.c:2049:47: Warning: unused parameter »inst« [-Wunused-parameter] const struct tgsi_full_instruction *inst) ^~~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_aa_point.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tgsi/tgsi_aa_point.c:32:0: tgsi/tgsi_aa_point.c: In Funktion »aa_decl«: ./util/u_math.h:660:29: Comparison between signed and unsigned in conditional expressions [-Wsign-compare] #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) ^ tgsi/tgsi_aa_point.c:76:21: Remark: when substituting of the macro »MAX2« ts->num_tmp = MAX2(ts->num_tmp, 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_aa_point.c:76:21: Remark: when substituting of the macro »MAX2« ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1); ^~~~ tgsi/tgsi_aa_point.c: In Funktion »aa_inst«: tgsi/tgsi_aa_point.c:220:31: Comparison between signed and unsigned in conditional expressions [-Wsign-compare] dst->Register.Index == ts->color_out) { Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi_sanity.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-2/+2
| | | | | | | | | | | | | | | tgsi_sanity.c: In function 'iter_instruction': tgsi_sanity.c:316:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ctx->index_of_END != ~0) { ^~ tgsi_sanity.c: In function 'epilog': tgsi_sanity.c:488:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ctx->index_of_END == ~0) { Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi/tgsi_parse.c: Fix two warningsGert Wollny2018-06-201-3/+7
| | | | | | | | | | | | | | tgsi_parse.c: In function 'tgsi_parse_free': tgsi_parse.c:54:31: warning: unused parameter 'ctx' [-Wunused-parameter] struct tgsi_parse_context *ctx ) ^~~ tgsi_parse.c: In function 'tgsi_parse_end_of_tokens': tgsi_parse.c:62:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] return ctx->Position >= Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/tgsi/tgsi_dump.c: Fix -Wsign-compare warningsGert Wollny2018-06-201-1/+1
| | | | | | | | | | | | | | | tgsi_dump.c: In function 'iter_property': tgsi_dump.c:443:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < prop->Property.NrTokens - 1; ++i) { ^ tgsi_dump.c:459:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i < prop->Property.NrTokens - 2) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux/cso_cache: Fix various warningsGert Wollny2018-06-202-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cso_cache.c: In Function »delete_blend_state«: cso_cache/cso_cache.c:90:51: Warning: unused parameter »data« [-Wunused- parameter] static void delete_blend_state(void *state, void *data) ^~~~ cso_cache/cso_cache.c: In Funktion »delete_depth_stencil_state«: cso_cache/cso_cache.c:98:59: Warning: unused parameter »data« [-Wunused- parameter] static void delete_depth_stencil_state(void *state, void *data) ^~~~ cso_cache/cso_cache.c: In Funktion »delete_sampler_state«: cso_cache/cso_cache.c:106:53: Warning: unused parameter »data« [- Wunused-parameter] static void delete_sampler_state(void *state, void *data) ^~~~ cso_cache/cso_cache.c: In Funktion »delete_rasterizer_state«: cso_cache/cso_cache.c:114:56: Warning: unused parameter »data« [- Wunused-parameter] static void delete_rasterizer_state(void *state, void *data) ^~~~ cso_cache/cso_cache.c: In Funktion »delete_velements«: cso_cache/cso_cache.c:122:49: Warning: unused parameter »data« [- Wunused-parameter] static void delete_velements(void *state, void *data) ^~~~ cso_cache/cso_cache.c: In Funktion »sanitize_cb«: cso_cache/cso_cache.c:166:52: Warning: unused parameter »user_data« [- Wunused-parameter] int max_size, void *user_data) ^~~~~~~~~ gallium/aux/cso_context.c: a -Wunused-parameter warning cso_cache/cso_context.c: In Funktion »delete_sampler_state«: cso_cache/cso_context.c:163:57: Warning: unused parameter »ctx« [- Wunused-parameter] static boolean delete_sampler_state(struct cso_context *ctx, void *state) ^~~ Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa/util: add allow_glsl_relaxed_es driconfig overrideTimothy Arceri2018-06-191-0/+1
| | | | | | | | | | | | | | | This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following: - allows linking ES shaders with desktop shaders - allows mismatching precision qualifiers - always enables standard derivative builtins These relaxations allow Google Earth VR shaders to compile. Reviewed-by: Dave Airlie <[email protected]>
* mesa/util: add allow_glsl_builtin_const_expression driconf overrideTimothy Arceri2018-06-191-0/+1
| | | | | | | Google Earth VR shaders uses builtins in constant expressions with GLSL 1.10. That feature wasn't allowed until GLSL 1.20. Reviewed-by: Dave Airlie <[email protected]>
* gallium/hud: = should rename the last added data sourceMarek Olšák2018-06-181-1/+4
| | | | Tested-by: Dieter Nützel <[email protected]>
* mesa: Unconditionally enable floating-point texturesTimothy Arceri2018-06-181-9/+0
| | | | | | | | | | | | | | ARB_texture_float references US Patent #6,650,327 [1] which has a filing date of June 16 1998. According to [2], patents filed after 1995 expire 20 years from the filing date, giving an expiration of June 17 2018. [1] https://www.google.com/patents/US6650327 [2] https://en.wikipedia.org/wiki/Term_of_patent_in_the_United_States Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: add support for programmable sample locationsRhys Perry2018-06-142-0/+35
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v2) Reviewed-by: Marek Olšák <[email protected]> (v2)
* meson: only build vl_winsys_dri.c when x11 platform is usedLukas Rusak2018-06-141-1/+1
| | | | | | | | | | | | | | This seems to have been missed in the move from autotools This fixes the following build issue: ../src/gallium/auxiliary/vl/vl_winsys_dri.c:34:10: fatal error: X11/Xlib-xcb.h: No such file or directory #include <X11/Xlib-xcb.h> ^~~~~~~~~~~~~~~~ Fixes: b1b65397d0c4978e36a84c0a1c98a4bd6cb9588e ("meson: Build gallium auxiliary") Reviewed-by: Dylan Baker <[email protected]>
* virgl: add ARB_tessellation_shader support. (v2)Dave Airlie2018-06-141-4/+0
| | | | | | | | | | This should add all the pieces to enable tess shaders on virgl. v2: fixup transform to handle tess and strip out precise. set default for max patch varyings to work around issue when tess gets enabled from v1 caps but v2 caps aren't in place. (Elie) Reviewed-by: Elie Tournier <[email protected]>
* autotools: add missing android file to packageEric Engestrom2018-06-051-0/+1
| | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106779 Fixes: ff904978a1d299a36b587 "gallium/util: Android backtrace support" Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* trace: Fix trace_context_transfer_unmap methods.Jose Fonseca2018-06-041-18/+42
| | | | | | | | | The emitted buffer_subdata/texture_subdata call didn't match the respective signatures. v2: Actually emit buffer_subdata call. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/winsys: rename DRM_API_HANDLE_* to WINSYS_HANDLE_*Dave Airlie2018-05-304-6/+6
| | | | | | | | | | | | This just renames this as we want to add an shm handle which isn't really drm related. Originally by: Marc-André Lureau <[email protected]> (airlied: I used this sed script instead) This was generated with: git grep -l 'DRM_API_' | xargs sed -i 's/DRM_API_/WINSYS_/g' Reviewed-by: Marek Olšák <[email protected]>
* util/u_math: Implement a logbase2 function for unsigned longPierre Moreau2018-05-291-0/+55
| | | | | | | | | | v2 (Karol Herbst <[email protected]>): * removed unneeded ll * ll -> ull Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* tgsi/scan: add hw atomic to the list of memory accessing filesDave Airlie2018-05-231-1/+2
| | | | | | | | This fixes 4 out of 5 cases in: arb_framebuffer_no_attachments-atomic on cayman. Reviewed-by: Marek Olšák <[email protected]> Cc: "18.0 18.1" <[email protected]>
* draw: get rid of special logic to not emit null trisRoland Scheidegger2018-05-191-38/+0
| | | | | | | | I've confirmed after 77554d220d6d74b4d913dc37ea3a874e9dc550e4 we no longer need this to pass some tests from another api (as we no longer generate the bogus extra null tris in the first place). Reviewed-by: Jose Fonseca <[email protected]>
* tgsi: fix incorrect tgsi_shader_info::num_tokens computationBrian Paul2018-05-171-2/+1
| | | | | | | | | | | | | We were incrementing num_tokens in each loop iteration while parsing the shader. But each call to tgsi_parse_token() can consume more than one token (and often does). Instead, just call the tgsi_num_tokens() function. Luckily, this issue doesn't seem to effect any current users of this field (llvmpipe just checks for <= 1, for example). Reviewed-by: Neha Bhende<[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* v3d: Rename the driver files from "vc5" to "v3d".Eric Anholt2018-05-161-1/+1
|
* v3d: Rename the vc5_dri.so driver to v3d_dri.so.Eric Anholt2018-05-163-11/+11
| | | | | | This allows the driver to load against the merged kernel DRM driver. In the process, rename most of the build system variables and gallium plumbing functions.
* gallium/hud: add frametime graph (v2)Matthias Groß2018-05-153-1/+38
| | | | | | | | | Thanks for your comment. This version has an additional boolean in the fps_info struct to distinguish between fps and frame time calculation. The struct is initialised in the respecting install functions for this purpose. Signed-off-by: Marek Olšák <[email protected]>
* gallivm: Use alloca_undef with array type instead of alloca_arrayRoland Scheidegger2018-05-161-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a single allocation of array type instead of the old-style array allocation for the temp and immediate arrays. Probably only makes a difference if they aren't used indirectly (so, if we used them solely because there's too many temps or immediates). In this case the sroa and early-cse passes can sometimes do some optimizations which they otherwise cannot. (As a side note, for the temp reg array, we actually really should use one allocation per array id, not just one for everything.) Note that the instcombine pass would actually promote such allocations to single alloc of array type as well, but it's too late for some artificial shaders we've seen to help (we don't want to run instcombine at the beginning due to its cost, hence would need another sroa/cse pass after instcombine). sroa/early-cse help there because they can actually eliminate all of the huge shader, reducing it to a single const output (don't ask...). (Interestingly, instcombine also removes all the bitcasts we do on that allocation for single-value gathering, and in the end directly indexes into the single vector elements, which according to spec is only semi-valid, but this happens regardless. Another thing instcombine also does is use inbound GEPs, which is probably something we should do manually as well - for indirectly indexed reg files llvm may not be able to figure it out on its own, but we should be able to guarantee all pointers are always inbound. In any case, by the looks of it using single allocation with array type seems to be the right thing to do even for ordinary shaders.) No piglit change. Reviewed-by: Jose Fonseca <[email protected]>
* cso: check count == 0 in cso_set_vertex_buffersMarek Olšák2018-05-151-0/+3
| | | | | | | | The code didn't expect that, leading to crashes. Fixes: 86d63b53a20a747e "gallium: remove aux_vertex_buffer_slot code" Tested-by: Michel Dänzer <[email protected]>
* gallium: remove aux_vertex_buffer_slot codeMarek Olšák2018-05-126-67/+38
| | | | | | The slot index is always 0, and is pretty unlikely to change in the future. Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary: Add helper function to count the number of entries in ↵Jan Vesely2018-05-102-0/+22
| | | | | | | | hash table CC: <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* pipe-loader: Free driver_name in error pathJan Vesely2018-05-081-0/+1
| | | | | | CC: <[email protected]> Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: use enums instead of unsigned in ureg codeBrian Paul2018-04-302-12/+12
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* gallium/util: Fix incorrect refcounting of separate stencil.Eric Anholt2018-04-251-2/+1
| | | | | | | | | | | The driver may have a reference on the separate stencil buffer for some reason (like an unflushed job using it), so we can't directly free the resource and should instead just decrement the refcount that we own. Fixes double-free in KHR-GLES3.packed_depth_stencil.blit.depth32f_stencil8 on vc5. Fixes: e94eb5e6000e ("gallium/util: add u_transfer_helper") Reviewed-by: Rob Clark <[email protected]>
* draw: fix different sign logic when clippingRoland Scheidegger2018-04-251-9/+8
| | | | | | | | | | | | | | | | | | | The logic was flawed, since mul(x,y) will be <= 0 (exactly 0) when the sign is the same but both numbers are sufficiently small (if the product is smaller than 2^-128). This could apparently lead to emitting a sufficient amount of additional bogus vertices to overflow the allocated array for them, hitting an assertion (still safe with release builds since we just aborted clipping after the assertion in this case - I'm however unsure if this is now really no longer possible, so that code stays). Not sure if the additional vertices could cause other grief, I didn't see anything wrong even when hitting the assertion. Essentially, both +-0 are treated as positive (the vertex is considered to be inside the clip volume for this plane), so integrate the logic determining different sign into the branch there. Reviewed-by: Jose Fonseca <[email protected]>
* draw: simplify clip null tri logicRoland Scheidegger2018-04-251-11/+9
| | | | | | | | | Simplifies the logic when to emit null tris (albeit the reasons why we have to do this remain unclear). This is strictly just logic simplification, the behavior doesn't change at all. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: dump bitcode before optimizationRoland Scheidegger2018-04-241-13/+20
| | | | | | | | | | | | | | | | | | If we dump the bitcode for off-line debug purposes, we really want the pre-optimized bitcode, otherwise it's useless in identifying problems with IR optimization (if you have a shader which takes an hour to do IR optimization, it's also nice you don't have to wait that hour...). Also, print out the function passes for opt which correspond to what was used for jit compilation (and also the opt level for codegen). Using opt/llc this way should then pretty much mimic what was done for jit. (When specifying something like -time-passes -debug-pass=[Structure|Arguments] (for either opt or llc) that also gives very useful information in which passes all the time was spent, and which passes are really run along with the order - llvm will add passes due to dependencies on its own, and of course -O2 for llc comes with a ~100 pass list.) Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: (trivial) do division by 1000 with int64Roland Scheidegger2018-04-241-1/+1
| | | | | | | Conversion to int can otherwise overflow if compile times are over ~71min. (Yes this can happen...) Reviewed-by: Jose Fonseca <[email protected]>