Commit Graph

102879 Commits

Author SHA1 Message Date
Nicolai Hähnle 23edc5b1ef spirv: translate default-block uniforms
They are supported by SPIR-V for ARB_gl_spirv.

v2 (changes on top of Nicolai's original patch):
   * Handle UniformConstant storage class for uniforms other than
     samplers and images. (Eduardo Lima)
   * Handle location decoration also for samplers and images. (Eduardo
     Lima)
   * Rebase update (spirv_to_nir options added, logging changes, and
     others) (Alejandro Piñeiro)

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Eduardo Lima Mitev 3d6664763d nir/types: Add a utility wrapper to glsl_type::sampler_index()
I think it is more accurate to call it a sampler target (?).

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Eduardo Lima Mitev f1ab16cf17 nir/types: Add a glsl_get_component_slots() utility
It is basically a wrapper around glsl_type::component_slots().

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Eduardo Lima Mitev 2b8765b824 nir/lower_samplers: Limit assert to GLSL shader programs
Vulkan has the concept of separate image and sampler objects in the
SPIR-V code whereas GL conflates them into one. nir_lower_samplers
contains an assert to verify that sampler operand is not being set on
the nir instruction. However when the code comes from spirv_to_nir the
sampler operand is always set. GL_arb_gl_spirv explicitly states that
OpTypeSampler is not supported so it retains the GL behaviour of not
being able to seperate them. Therefore the sampler will always be the
same as the texture. This GL version of the lowering code ignores
instr->sampler and sets instr->sampler_index to the same value as
instr->texture_index. Some other places in the code (such as in
nir_print) assume that once the instruction is lowered then both
instr->texture and instr->sampler will be NULL, so to keep this
behaviour we now set instr->sampler to NULL after ignoring it to fill
in instr->sampler_index.

Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Neil Roberts <nroberts@igalia.com>

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Neil Roberts 652be1563f nir: Add explicit_binding to nir_variable
This is copied from the corresponding value in ir_variable. The
intention is to eventually use it in a pure-NIR linker.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Alejandro Piñeiro 8d1ec2ed5a mesa/main: add NULL name check when searching for a resource name
Since ARB_gl_spirv name reflection can be missing. piglit
shader_runner does several resource checking, so this commit is useful
to get even the more simple piglit tests running without crashing on
SPIR-V mode.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Alejandro Piñeiro a6dc3d22eb i965: use gl_shader_program_data::spirv
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Eduardo Lima Mitev a940683733 mesa/main: Add a 'spirv' flag to gl_shader_program_data
This will be used by the linker code to differentiate between programs
made out of SPIR-V or GLSL shaders.

This was rejected in the past, assuming that it was equivalent to
check for "shProg->_LinkedShaders[stage]->spirv_data != NULL". But:

  * At some points of the linking process it would be needed to check
    if _LinkerShaders[stage] is present, so the full check would be:

    "shProg->_LinkedShaders[stage] != NULL &&
     shProg->_LinkedShaders[stage]->spirv_data != NULL"

  * Sometimes you would like to do some specific to SPIR-V
    independently of the stage, or for any stage. For example, "link
    all the uniforms, for all stages". In that case checking for the
    flag would be equivalent to iterate all the _LinkedShaders and
    check if there is any spirv_data available.

The former makes readibility really worse. Both could be solved by
adding two helpers. But adding a flag seems really more simple and
readable.

v2: added justification for the flag on the commit message (Alejandro)

Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-21 14:25:05 +02:00
Emil Velikov 697254111b docs/release-calendar: restore the missing 18.1 column
Earlier commit removed the column, instead of adjusting the height.

Cc: Dylan Baker <dylan@pnwbakers.com>
Fixes: 0d4f338a11 ("docs: Update release-notes and calendar")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-06-21 12:09:39 +01:00
Emil Velikov dfb1f2759c configure: use compliant grep regex checks
The current `grep "foo\|bar"' trips on some grep implementations, like
the FreeBSD one. Instead use `egrep "foo|bar"' as suggested by Stefan.

Cc: Stefan Esser <se@FreeBSD.org>
Reported-by: Stefan Esser <se@FreeBSD.org>
Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228673
Fixes: 1914c814a6 ("configure: error out if building OMX w/o supported platform")
Fixes: 63e11ac2b5 ("configure: error out if building VA w/o supported platform")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2018-06-21 12:09:39 +01:00
Emil Velikov d589eddc8b glsl/tests/glcpp: reinstate "error out if no tests found"
With the recent rework of converting the shell script to a python one
the check for actual tests was dropped.

Bring that back, since it was explicitly added considering we had a ~2
year period, during which the tests were not run.

v2: use raise Exception() over  print() & return false (Dylan)

Fixes: db8cd8e367 ("glcpp/tests: Convert shell scripts to a python
script")
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-21 12:09:39 +01:00
Emil Velikov a2f5292c82 glsl/glcpp/tests: reinstate srcdir/abs_builddir blurb
Bring back the "detection" of the said variables, to allow
standalone execution.

Fixes: db8cd8e367 ("glcpp/tests: Convert shell scripts to a python
script")
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-06-21 12:09:39 +01:00
Emil Velikov 87cebace54 glsl: fold glcpp-test-cr-lf.sh into glcpp-test.sh
As of recently both of these have been reworked so they invoke a python
script. At the same time the latter can be executed with the combined
arguments of both scripts.

AKA we no longer need to have them separate.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-06-21 12:09:39 +01:00
Emil Velikov 1c1f70d12f st/dri: constify dri_fill_st_visual's screen
As the function says - only the visual is changed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-21 12:09:39 +01:00
Emil Velikov ccaa9f09cc mesa: remove struct gl_extensions::ATI_separate_stencil
Virtually every driver that supports ATI_separate_stencil
also supports EXT_stencil_two_side.

Use the latter boolean for both extension. With that in mind we can drop
the explicit true from the drivers and the nasty comment in
compute_version().

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-21 12:09:39 +01:00
Eric Engestrom 1714dfca8a travis: add libXrandr and its randrproto dependency
Fixes: 3f960c1338 "vulkan: EXT_acquire_xlib_display requires libXrandr headers to build"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2018-06-21 11:46:47 +01:00
Juan A. Suarez Romero d24839be70 swr: bump minimum supported LLVM version to 5.0
RADV now requires LLVM 5.0 or greater, and thus we can't build dist
tarball because swr requires LLVM 4.0.

Let's bump required LLVM to 5.0 in swr too.

Fixes: f9eb1ef870 ("amd: remove support for LLVM 4.0")
Cc: Tim Rowley <timothy.o.rowley@intel.com>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Dylan Baker <dylan@pnwbakers.com>
Cc: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Bruce Cherniak <bruce.cherniak@intel.com>
2018-06-21 12:16:46 +02:00
Grazvydas Ignotas f966929805 radeonsi: add a debug flag to zero vram allocations
This allows to avoid having to see garbage in Dying Light loading screen
at least, which probably expects Windows/NV behavior of all allocations
being zeroed by default.

Analogous to radv flag with the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-21 12:18:50 +03:00
Grazvydas Ignotas 4e0d93dc0e radeonsi: use shifts for sign extension
Avoids a branch and reduces code size a tiny bit:
    text   data     bss      dec    hex filename
10804563 398653 2070368 13273584 ca89f0 /tmp/radeonsi_dri.so.old
10804499 398653 2070368 13273520 ca89b0 /tmp/radeonsi_dri.so

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-21 12:17:34 +03:00
Samuel Pitoiset af17a29ad8 radv: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation
Ported from RadeonSI.
Not sure why this is needed but AMDVLK does something similar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-21 10:31:03 +02:00
Samuel Pitoiset 41f6096c26 radv: use EOP_DATA_SEL_* instead of magic numbers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-21 10:31:02 +02:00
Roland Scheidegger 53959fcbd8 r600: fix copy/paste bug for sampleMaskIn workaround
The sampleMaskIn workaround (b936f4d1ca)
tries to figure out if the shader is running at per-sample frequency, but
there's a typo bug so it will only recognize per-sample linar inputs,
not per-sample perspective ones.

Spotted by Eric Engestrom <eric.engestrom@intel.com>

Fixes: b936f4d1ca0d2ab1e828a "r600: partly fix sampleMaskIn value"
2018-06-21 02:37:11 +02:00
Eric Anholt edb7890750 v3d: Fix min vs mag determination when not doing mip filtering.
Fixes all 128 failing tests in
dEQP-GLES3.functional.texture.filtering.*.combinations
2018-06-20 12:31:54 -07:00
Keith Packard 3f960c1338 vulkan: EXT_acquire_xlib_display requires libXrandr headers to build
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 <keithp@keithp.com>
Fixes: dbac8e25f8 "radv: Add EXT_acquire_xlib_display to radv driver [v2]"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-06-20 10:42:05 -07:00
Eric Anholt f49d112a01 v3d: Implement ALPHA_TO_COVERAGE.
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
2018-06-20 09:30:46 -07:00
Eric Anholt 94f7c011d6 v3d: Track write reference to the separate stencil buffer.
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
2018-06-20 09:30:46 -07:00
Eric Anholt a52c357a65 v3d: Add missing reference to the separate stencil buffer.
Noticed while debugging a missing flush of rendering in the z32f_s8 case.
2018-06-20 09:30:46 -07:00
Eric Anholt 1334295f29 v3d: Fix return value from fence_finish.
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
2018-06-20 09:30:46 -07:00
Christian Gmeiner 8b3099353e mesa/st: only do scalar lowerings if driver benefits
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 <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2018-06-20 17:56:37 +02:00
Christian Gmeiner f485e5671c gallium: add scalar isa shader cap
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 <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-20 17:55:39 +02:00
Keith Packard 050d8a4b42 radv: Add VK_EXT_display_surface_counter to radv driver
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 <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-06-20 08:16:45 -07:00
Keith Packard 1801d7c73c anv: Add VK_EXT_display_surface_counter to anv driver [v2]
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 <jason@jlekstrand.net>

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-06-20 08:16:34 -07:00
Jason Ekstrand b1a013d035 Vulkan/wsi: Implement VK_EXT_display_surface_counter
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 <keithp@keithp.com>
2018-06-20 08:16:03 -07:00
Jason Ekstrand 8f3b58ebee vulkan/wsi: Get rid of the get_capabilities hook
Instead, we can just use get_capabilities2.  This way back-ends only
have to implement one hook.

Reviewed-by: Keith Packard <keithp@keithp.com>
2018-06-20 08:16:03 -07:00
Eric Engestrom 7f3cb7db08 intel/aubinator: drop unused functions
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2018-06-20 15:17:26 +01:00
Samuel Pitoiset 65b3fed037 radv: always initialize the clear depth/stencil values to 0
Similar to the clear color values.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-20 13:21:42 +02:00
Samuel Pitoiset 204cf5714a radv: always initialize the clear color values to 0
Having random data in there is probably not the best.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-20 13:21:42 +02:00
Samuel Pitoiset 4b564bd612 radv: always initialize the DCC predicate to FALSE
This might eventually skip some useless DCC decompression
passes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-20 13:21:42 +02:00
Samuel Pitoiset 70c1bee187 radv: do not use an user SGPR for the sample position offset
We know the number of samples at compile time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-20 13:21:42 +02:00
Samuel Pitoiset 20170865db radv: don't store the number of samples as log2
Needed for the following patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-06-20 13:21:42 +02:00
Gert Wollny 8a6e3f0c5d gallium/aux/util/u_cpu_detect.h: Fix -Wsign-compare warning in u_cpu_detect.c
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny 33f4e8a043 gallium/aux/util/u_debug.h: Fix "noreturn" warnings in debug mode
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny 70f632962a gallium/aux/util: Fix some warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny 3e091d5a7a gallium/aux/tgsi_ureg.c: remove unused parameter from 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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny f79b980486 gallium/aux/tgsi_two_side.c: Fix -Wsign-compare warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny dc5ba7e17c gallium/aux/tgsi_ureg.c: Fix various warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny c5e8280504 gallium/aux/tgsi_text.c: Fix -Wsign-compare warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny b16b6d0889 gallium/aux/tgsi_point_sprite.c: Fix -Wsign-compare warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny 3792d85755 gallium/aux/tgsi_lowering.c: Fix -Wsign-compare warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00
Gert Wollny 7a3daaab41 gallium/aux/tgsi_build.c: Fix -Wsign-compare warnings
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 <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-20 11:08:28 +02:00