summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* v3d: Fix min vs mag determination when not doing mip filtering.Eric Anholt2018-06-201-2/+10
| | | | | Fixes all 128 failing tests in dEQP-GLES3.functional.texture.filtering.*.combinations
* vulkan: EXT_acquire_xlib_display requires libXrandr headers to buildKeith Packard2018-06-208-5/+13
| | | | | | | | | | | | | | | | | When VK_USE_PLATFORM_XLIB_XRANDR_EXT is defined, vulkan.h includes X11/extensions/Xrandr.h for the RROutput typedef which is used in the vkGetRandROutputDisplayEXT interface. Make sure we have the required header by checking during the build, and also set CFLAGS to point at the right directory. We don't need to link against the library as we don't use any functions from there, so don't add the _LIBS value in the autotools build. Signed-off-by: Keith Packard <[email protected]> Fixes: dbac8e25f851ed44c51f "radv: Add EXT_acquire_xlib_display to radv driver [v2]" Reviewed-by: Eric Engestrom <[email protected]>
* v3d: Implement ALPHA_TO_COVERAGE.Eric Anholt2018-06-202-2/+15
| | | | | | There's a convenient "FTOC" instruction for generating the coverage now, unlike vc4. This fixes dEQP-GLES3.functional.multisample.fbo_4_samples.proportionality_alpha_to_coverage
* v3d: Track write reference to the separate stencil buffer.Eric Anholt2018-06-201-1/+16
| | | | | | | | | | | | | Otherwise, a blit from separate stencil may fail to flush the job that initialized it, or new drawing could fail to flush a blit reading from stencil. Fixes: dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_basic dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_scale dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_stencil_only dEQP-GLES3.functional.fbo.msaa.2_samples.depth32f_stencil8 dEQP-GLES3.functional.fbo.msaa.4_samples.depth32f_stencil8
* v3d: Add missing reference to the separate stencil buffer.Eric Anholt2018-06-201-11/+13
| | | | Noticed while debugging a missing flush of rendering in the z32f_s8 case.
* v3d: Fix return value from fence_finish.Eric Anholt2018-06-201-1/+1
| | | | | | | We needed to convert from a -errno to a boolean success value. Fixes: GTF-GLES3.gtf.GL3Tests.sync.sync_functionality_clientwaitsync_flush GTF-GLES3.gtf.GL3Tests.sync.sync_functionality_clientwaitsync_signaled
* mesa/st: only do scalar lowerings if driver benefitsChristian Gmeiner2018-06-201-9/+30
| | | | | | | | | As not every (upcoming) backend compiler is happy with nir_lower_xxx_to_scalar lowerings do them only if the backend is scalar (and not vec4) based. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: add scalar isa shader capChristian Gmeiner2018-06-2015-1/+32
| | | | | | | | | | | | | | | | 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]>
* radv: Add VK_EXT_display_surface_counter to radv driverKeith Packard2018-06-202-0/+13
| | | | | | | | This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add VK_EXT_display_surface_counter to anv driver [v2]Keith Packard2018-06-202-0/+13
| | | | | | | | | | | | | This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. v2: Add extension to list in alphabetical order Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Vulkan/wsi: Implement VK_EXT_display_surface_counterJason Ekstrand2018-06-202-0/+60
| | | | | | | | | | | | | This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. Internally, it is implemented using a fake MESA extension which provides a chain-in to GetSurfaceCapabilities2KHR which contains the one added field. This has the advantage of reducing number of callbacks needed in the back-ends. It also means that anything chained into GetSurfaceCapabilities2EXT through VkSurfaceCapabilities2KHR::pNext so we only need to handle crawling the pNext chain once per back-end. Reviewed-by: Keith Packard <[email protected]>
* vulkan/wsi: Get rid of the get_capabilities hookJason Ekstrand2018-06-205-6/+10
| | | | | | | Instead, we can just use get_capabilities2. This way back-ends only have to implement one hook. Reviewed-by: Keith Packard <[email protected]>
* intel/aubinator: drop unused functionsEric Engestrom2018-06-201-16/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* radv: always initialize the clear depth/stencil values to 0Samuel Pitoiset2018-06-203-22/+27
| | | | | | | Similar to the clear color values. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: always initialize the clear color values to 0Samuel Pitoiset2018-06-203-8/+26
| | | | | | | Having random data in there is probably not the best. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: always initialize the DCC predicate to FALSESamuel Pitoiset2018-06-201-0/+2
| | | | | | | | This might eventually skip some useless DCC decompression passes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not use an user SGPR for the sample position offsetSamuel Pitoiset2018-06-203-40/+30
| | | | | | | We know the number of samples at compile time. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: don't store the number of samples as log2Samuel Pitoiset2018-06-204-7/+12
| | | | | | | Needed for the following patch. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[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]>
* 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]>
* configure.ac: Add CFLAG -Wno-missing-field-initializers (v5)Gert Wollny2018-06-202-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is misleading: When a struct is partially initialized without assigning to the structure members by name, then the remaining fields will be zeroed out, and this warning will be issued (if enabled). If, on the other hand, the partial initialization is done by assigning to named members, the remaining structure elements may hold random data, but the warning is not issued. Since in Mesa the first approach to initialize structure elements is used very often, and it is usually assumed that the remaining elements are zeroed out, heeding this warning would be counter-productive. v2: - add -Wno-missing-field-initializers to meson-build - fix empty line error (both Eric Engestrom) v3: * check for -Wmissing-field-initializers warning and then disable it because gcc and clang always accept -Wno-* (Dylan Baker) * Also disable this warning for C++ v4: * meson.build add -Wno-missing-field-initializers to c_args instead of no_override_init_args (Eric Engstrom) v5: * configure.ac: Correct copy/paste error with CFLAGS/CXXFLAGS Reviewed-by: Marek Olšák <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> (v2) Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Gert Wollny <[email protected]>
* radv: remove unnecessary code around CACHE_FLUSH_AND_INV_TS_EVENTSamuel Pitoiset2018-06-201-18/+1
| | | | | | | | | AMDVLK also always uses CACHE_FLUSH_AND_INV_TS_EVENT. The other workaround is to flush DB metadata after emitting the framebuffer, but that seems slower. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix flush_bits being used uninitialized.Bas Nieuwenhuizen2018-06-201-1/+1
| | | | | | | A case of making things worse while trying to fix something minor ... Fixes: ef79457004e "radv: Merge the flush bits of CMASK & DCC clear." Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add EXT_acquire_xlib_display to radv driver [v2]Keith Packard2018-06-195-6/+52
| | | | | | | | | | | | | | This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application to the radv driver. v2: Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add EXT_acquire_xlib_display to anv driver [v3]Keith Packard2018-06-196-6/+52
| | | | | | | | | | | | | | | | | | | This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application to the anv driver. v2: Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> v3: Add extension to list in alphabetical order Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan: Add EXT_acquire_xlib_display [v5]Keith Packard2018-06-197-0/+565
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application. For DRM, we use the Linux resource leasing mechanism. v2: Clean up xlib_lease detection * Use separate temporary '_xlib_lease' variable to hold the option value to avoid changin the type of a variable. * Use boolean expressions instead of additional if statements to compute resulting with_xlib_lease value. * Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> Move mode list from wsi_display to wsi_display_connector Fix scope for wsi_display_mode and wsi_display_connector allocs Suggested-by: Jason Ekstrand <[email protected]> v3: Adopt Jason Ekstrand's coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Explicitly forbid multiple DRM leases. Making the code support this looks tricky and will require additional thought. Use xcb_randr_output_t throughout the internals of the implementation. Convert at the public API (wsi_get_randr_output_display). Clean up check for usable active_crtc (possible when only the desired output is connected to the crtc). Suggested-by: Jason Ekstrand <[email protected]> v4: Move output resource fetching closer to use in wsi_display_get_output. This simplifies the error returns in earlier parts of the code a bit. Return VK_ERROR_INITIALIZATION_FAILED from wsi_acquire_xlib_display. Jason says this is the right error message. Suggested-by: Jason Ekstrand <[email protected]> v5: randr doesn't pass vscan over the wire, so we set vscan to 0 for randr-acquired modes, and test wsi modes for vscan <= 1 when comparing against randr modes. Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: Add EXT_direct_mode_display to radv driverKeith Packard2018-06-192-0/+12
| | | | | | | | Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add EXT_direct_mode_display to anv driver [v2]Keith Packard2018-06-192-0/+12
| | | | | | | | | | | | Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. v2: Add extension to list in alphabetical order Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan: Add EXT_direct_mode_display [v2]Keith Packard2018-06-192-0/+23
| | | | | | | | | | | | | | | | Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. v2: Adopt Jason Ekstrand's coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: Add KHR_display extension to radv [v5]Keith Packard2018-06-197-2/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the KHR_display extension to the radv Vulkan driver. The driver now attempts to open the master DRM node when the KHR_display extension is requested so that the common winsys code can perform the necessary operations. v2: * Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> v3: Adapt to new wsi_device_init API (added display_fd) v4: Adopt Jason Ekstrand's coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Suggested-by: Jason Ekstrand <[email protected]> v5: Add vkCreateDisplayModeKHR. This doesn't actually create new modes, it only looks to see if the requested parameters matches an existing mode and returns that. Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>