mesa.git
5 years agost/mesa: don't call translate_*_program functions for NIR
Marek Olšák [Fri, 27 Sep 2019 21:43:42 +0000 (17:43 -0400)]
st/mesa: don't call translate_*_program functions for NIR

move the initializaton to st_link_nir

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: finalize NIR after shader variant passes for TCS/TES/GS/CS
Marek Olšák [Wed, 16 Oct 2019 01:08:35 +0000 (21:08 -0400)]
st/mesa: finalize NIR after shader variant passes for TCS/TES/GS/CS

Same as VS and FS.

This might fix vertex color clamping.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: unify transform feedback info translation code
Marek Olšák [Fri, 11 Oct 2019 19:08:40 +0000 (15:08 -0400)]
st/mesa: unify transform feedback info translation code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: move vertex program preparation code into st_prepare_vertex_program
Marek Olšák [Fri, 11 Oct 2019 18:53:15 +0000 (14:53 -0400)]
st/mesa: move vertex program preparation code into st_prepare_vertex_program

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: clean up more after the removal of st_compute_program
Marek Olšák [Sat, 12 Oct 2019 00:32:02 +0000 (20:32 -0400)]
st/mesa: clean up more after the removal of st_compute_program

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: deduplicate st_common_program code in st_program_string_notify
Marek Olšák [Mon, 30 Sep 2019 21:37:42 +0000 (17:37 -0400)]
st/mesa: deduplicate st_common_program code in st_program_string_notify

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: sink TCS/TES/GS/CS translate code into st_translate_common_program
Marek Olšák [Mon, 30 Sep 2019 21:24:24 +0000 (17:24 -0400)]
st/mesa: sink TCS/TES/GS/CS translate code into st_translate_common_program

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: deduplicate cases in st_deserialise_ir_program
Marek Olšák [Mon, 30 Sep 2019 21:13:32 +0000 (17:13 -0400)]
st/mesa: deduplicate cases in st_deserialise_ir_program

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: remove st_compute_program in favor of st_common_program
Marek Olšák [Mon, 30 Sep 2019 21:06:45 +0000 (17:06 -0400)]
st/mesa: remove st_compute_program in favor of st_common_program

The conversion from pipe_shader_state to pipe_compute_state is done
at the end.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: don't store stream output info to shader cache for tess ctrl shaders
Marek Olšák [Mon, 30 Sep 2019 20:54:00 +0000 (16:54 -0400)]
st/mesa: don't store stream output info to shader cache for tess ctrl shaders

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: simplify the signature of st_release_basic_variants
Marek Olšák [Mon, 30 Sep 2019 20:45:48 +0000 (16:45 -0400)]
st/mesa: simplify the signature of st_release_basic_variants

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: deduplicate code for ATI fs in st_program_string_notify
Marek Olšák [Mon, 30 Sep 2019 20:39:23 +0000 (16:39 -0400)]
st/mesa: deduplicate code for ATI fs in st_program_string_notify

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agost/mesa: use *prog at the end of st_link_nir
Marek Olšák [Fri, 27 Sep 2019 21:28:48 +0000 (17:28 -0400)]
st/mesa: use *prog at the end of st_link_nir

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
5 years agoappveyor: Cache meson's wrap downloads
Dylan Baker [Mon, 14 Oct 2019 17:20:54 +0000 (10:20 -0700)]
appveyor: Cache meson's wrap downloads

This makes us less reliant on wrap-db (and reduces the amount of
downloading that goes on during the build).

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1936
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agogitlab-ci: Set the meson wrapmode to disabled
Dylan Baker [Mon, 14 Oct 2019 16:04:47 +0000 (09:04 -0700)]
gitlab-ci: Set the meson wrapmode to disabled

This will prevent us from accidentally falling back to the wrap-db
instead of using locally installed versions.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoRevert "gitlab-ci: Disable meson-mingw32-x86_64 job again for now"
Dylan Baker [Fri, 11 Oct 2019 16:04:14 +0000 (09:04 -0700)]
Revert "gitlab-ci: Disable meson-mingw32-x86_64 job again for now"

This reverts commit d60b8679a46212d992dcd94b9d3eeebfcff3f00a.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agogitlab-ci: Add a pkg-config for mingw
Dylan Baker [Fri, 11 Oct 2019 16:21:17 +0000 (09:21 -0700)]
gitlab-ci: Add a pkg-config for mingw

The one debian provides is broken in buster+, so I've just written my
own. This allows meson to find the installed zlib and prevents it from
falling back to wraps.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agomeson: Don't use expat on windows
Dylan Baker [Fri, 11 Oct 2019 16:19:25 +0000 (09:19 -0700)]
meson: Don't use expat on windows

It's not really needed, and there's no debian package for it so we're
forced to fall back to wraps in mesa's CI. This can be problematic in
itself.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agost/mesa: fix crash for drivers supporting nir defaulting to tgsi
Karol Herbst [Mon, 14 Oct 2019 23:06:18 +0000 (01:06 +0200)]
st/mesa: fix crash for drivers supporting nir defaulting to tgsi

nvc0 and I assume radeonsi as well hit an assert inside glsl_to_tgsi as atan
instructions get inserted into the shader.

Fixes: cece947a8dfa ("glsl/builtin: Add alternate versions of atan using new ops")
Cc: Neil Roberts <nroberts@igalia.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
5 years agoutil/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,...
Eric Engestrom [Wed, 16 Oct 2019 12:58:56 +0000 (13:58 +0100)]
util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,}xchg()

We're trying to cast the return type to the type of the var, but instead
we were casting `sizeof(*v)`.

Fixes: 6df72e970c0e2794a565 ("util: Make u_atomic.h typeless.")
Fixes: 0a7f17cf5b591330a257 ("util/u_atomic: add p_atomic_xchg")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agomesa/math: delete duplicate extern symbol
Eric Engestrom [Wed, 16 Oct 2019 11:55:33 +0000 (12:55 +0100)]
mesa/math: delete duplicate extern symbol

It's already defined in `m_debug_util.h`, along with an explanation of
what it is and how to use it.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agomesa/math: delete leftover... from 18 years ago (!)
Eric Engestrom [Wed, 16 Oct 2019 11:45:05 +0000 (12:45 +0100)]
mesa/math: delete leftover... from 18 years ago (!)

Left over from 0a79baf1bff93718e50a ("remove dead vertex assembly").

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agolima: Fix crash when there are no vertex shader attributes
Andreas Baierl [Fri, 27 Sep 2019 06:32:12 +0000 (08:32 +0200)]
lima: Fix crash when there are no vertex shader attributes

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
5 years agolima: Fix compiler warning in standalone compiler
Andreas Baierl [Wed, 9 Oct 2019 07:11:28 +0000 (09:11 +0200)]
lima: Fix compiler warning in standalone compiler

'struct lima_context' has to be declared before usage in lima_program.h

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
5 years agoaco: emit_split_vector() s_memtime results
Rhys Perry [Thu, 10 Oct 2019 16:05:09 +0000 (17:05 +0100)]
aco: emit_split_vector() s_memtime results

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
5 years agoaco: don't CSE s_memtime
Rhys Perry [Thu, 10 Oct 2019 16:04:47 +0000 (17:04 +0100)]
aco: don't CSE s_memtime

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
5 years agoaco: fix scheduling with s_memtime/s_memrealtime
Rhys Perry [Thu, 10 Oct 2019 16:04:06 +0000 (17:04 +0100)]
aco: fix scheduling with s_memtime/s_memrealtime

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
5 years agointel/common: include unistd.h for ioctl() prototype on Solaris
Alan Coopersmith [Tue, 8 Oct 2019 22:36:48 +0000 (15:36 -0700)]
intel/common: include unistd.h for ioctl() prototype on Solaris

Fixes build errors of:
In file included from ../src/intel/vulkan/anv_private.h:48,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
../src/intel/common/gen_gem.h: In function ‘gen_ioctl’:
../src/intel/common/gen_gem.h:68:15: error: implicit declaration of function ‘ioctl’ [-Werror=implicit-function-declaration]
   68 |         ret = ioctl(fd, request, arg);
      |               ^~~~~
In file included from ../include/c11/threads_posix.h:35,
                 from ../include/c11/threads.h:66,
                 from ../src/mesa/main/mtypes.h:39,
                 from ../src/intel/compiler/brw_compiler.h:30,
                 from ../src/intel/vulkan/anv_private.h:51,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
/usr/include/unistd.h: At top level:
/usr/include/unistd.h:471:12: error: conflicting types for ‘ioctl’
  471 | extern int ioctl(int, int, ...);
      |            ^~~~~
/usr/include/unistd.h:471:1: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration
  471 | extern int ioctl(int, int, ...);
      | ^~~~~~
In file included from ../src/intel/vulkan/anv_private.h:48,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
../src/intel/common/gen_gem.h:68:15: note: previous implicit declaration of ‘ioctl’ was here
   68 |         ret = ioctl(fd, request, arg);
      |               ^~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agomeson: recognize "sunos" as the system name for Solaris
Alan Coopersmith [Tue, 8 Oct 2019 01:46:41 +0000 (18:46 -0700)]
meson: recognize "sunos" as the system name for Solaris

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
5 years agoutil: Solaris has linux-style pthread_setname_np
Alan Coopersmith [Tue, 8 Oct 2019 01:10:43 +0000 (18:10 -0700)]
util: Solaris has linux-style pthread_setname_np

Fixes: dcf9d91a ("util: Handle differences in pthread_setname_np")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoutil: Workaround lack of flock on Solaris
Alan Coopersmith [Sat, 22 Apr 2017 04:57:50 +0000 (21:57 -0700)]
util: Workaround lack of flock on Solaris

v2: Replace autoconf check for flock() with meson check

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoutil: Make Solaris implemention of p_atomic_add work with gcc
Alan Coopersmith [Sun, 12 Feb 2017 02:35:55 +0000 (18:35 -0800)]
util: Make Solaris implemention of p_atomic_add work with gcc

gcc is very particular about where you place the (void) cast
The previous placement made it error out with:

In file included from disk_cache.c:40:0:
../../src/util/u_atomic.h:203:29: error: void value not ignored as it ought to be
 #define p_atomic_add(v, i) ((void)         \
                              ^
disk_cache.c:658:4: note: in expansion of macro ‘p_atomic_add’
    p_atomic_add(cache->size, size);
    ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoc99_compat.h: Don't try to use 'restrict' in C++ code
Alan Coopersmith [Sat, 10 Sep 2016 16:46:02 +0000 (09:46 -0700)]
c99_compat.h: Don't try to use 'restrict' in C++ code

Fixes build failures on Solaris in C++ files using gcc:

../src/util/u_math.h:628:41: error: expected ‘,’ or ‘...’ before ‘dest’
  628 | util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n)
      |                                         ^~~~
../src/util/u_math.h: In function ‘void* util_memcpy_cpu_to_le32(void*)’:
../src/util/u_math.h:641:18: error: ‘dest’ was not declared in this scope
  641 |    return memcpy(dest, src, n);
      |                  ^~~~
../src/util/u_math.h:641:24: error: ‘src’ was not declared in this scope
  641 |    return memcpy(dest, src, n);
      |                        ^~~
../src/util/u_math.h:641:29: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
  641 |    return memcpy(dest, src, n);
      |                             ^
      |                             yn

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agopan/midgard: Do not repeatedly spill same value
Alyssa Rosenzweig [Sun, 13 Oct 2019 18:16:37 +0000 (14:16 -0400)]
pan/midgard: Do not repeatedly spill same value

It doesn't make sense. You already spilled it once, and it didn't help.
Don't try again, or you'll end up in a loop.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Fix memory corruption in register spilling
Alyssa Rosenzweig [Tue, 8 Oct 2019 02:42:35 +0000 (22:42 -0400)]
pan/midgard: Fix memory corruption in register spilling

Essentially an off-by-one error ... bit of an edge case, but seems to
occur in some glamor shaders.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stage
Alyssa Rosenzweig [Sat, 12 Oct 2019 15:30:52 +0000 (11:30 -0400)]
pan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stage

Fixes: ada752afe40 ("panfrost: Extend the panfrost_batch_add_bo() API to pass access flags")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Use 16-bit liveness masks
Alyssa Rosenzweig [Wed, 16 Oct 2019 02:01:16 +0000 (22:01 -0400)]
pan/midgard: Use 16-bit liveness masks

We'll want liveness per-byte, so we need to accomodate up to 16 bytes.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Disable frame throttling
Alyssa Rosenzweig [Wed, 16 Oct 2019 01:36:48 +0000 (21:36 -0400)]
panfrost: Disable frame throttling

The new frame throttling implemention interacts unfortunately with
pipelining, leading to fence fds leaking like crazy and ultimately apps
crashing quickly.

With this patch, apps still crash but not as quickly. We need to either
figure out the real cause or revert the core changes.

Nevertheless, we don't want frame throttling in the first place, so.

Fixes: a65e29ccb26 ("gallium: simplify throttle implementation")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agomesa: fix invalid target error handling for teximage
Pierre-Eric Pelloux-Prayer [Mon, 14 Oct 2019 09:32:40 +0000 (11:32 +0200)]
mesa: fix invalid target error handling for teximage

This commit moves the target check before using _mesa_get_current_tex_object
to fix a "Mesa implementation error: bad target in _mesa_get_current_tex_object()"
error.

Fixes: 9dd1f7cec01 ("mesa: pass gl_texture_object as arg to not depend on state")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi/nir: simplify si_lower_nir signature
Marek Olšák [Thu, 26 Sep 2019 23:54:09 +0000 (19:54 -0400)]
radeonsi/nir: simplify si_lower_nir signature

just a cleanup

5 years agopan/midgard: Fix mir_mask_of_read_components with dot products
Alyssa Rosenzweig [Tue, 15 Oct 2019 20:49:37 +0000 (16:49 -0400)]
pan/midgard: Fix mir_mask_of_read_components with dot products

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add perspective ops to mir_get_swizzle
Alyssa Rosenzweig [Tue, 15 Oct 2019 20:19:08 +0000 (16:19 -0400)]
pan/midgard: Add perspective ops to mir_get_swizzle

I really need to just make this a table..

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Don't try to propagate swizzles to branches
Alyssa Rosenzweig [Tue, 15 Oct 2019 20:10:08 +0000 (16:10 -0400)]
pan/midgard: Don't try to propagate swizzles to branches

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Allow non-contiguous masks in UBO lowering
Alyssa Rosenzweig [Tue, 15 Oct 2019 19:56:15 +0000 (15:56 -0400)]
pan/midgard: Allow non-contiguous masks in UBO lowering

We don't really need to impose this condition, but we do need to cope
with the slightly more general case.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Report read mask for branch arguments
Alyssa Rosenzweig [Tue, 15 Oct 2019 18:54:07 +0000 (14:54 -0400)]
pan/midgard: Report read mask for branch arguments

Conditionals in particular read values.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoiris: finish aux import on get_param
James Xiong [Mon, 14 Oct 2019 22:55:18 +0000 (15:55 -0700)]
iris: finish aux import on get_param

A buffer and its aux are imported separately, if the aux import is
not completed yet when resource_get_param is called, merge the
separate aux a.k.a the 2nd image into the main image.

Fixes: 246eebba4a8 ("iris: Export and import surfaces with modifiers that have aux data")
Signed-off-by: James Xiong <james.xiong@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
5 years agomesa: Handle pbuffers in desktop GL framebuffer attachment queries
Kenneth Graunke [Mon, 14 Oct 2019 17:07:30 +0000 (10:07 -0700)]
mesa: Handle pbuffers in desktop GL framebuffer attachment queries

Once again, we were handling back-to-front in the GLES3 case, but not
the desktop GL case.

Fixes GTF-GL46.gtf30.GL3Tests.framebuffer_srgb.framebuffer_srgb_default_encoding when run with --deqp-surface-type=pbuffer --deqp-gl-context-type=egl.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: Make back_to_front_if_single_buffered non-static
Kenneth Graunke [Mon, 14 Oct 2019 17:07:11 +0000 (10:07 -0700)]
mesa: Make back_to_front_if_single_buffered non-static

So I can use it in fbobject.c in the next commit.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: Use ctx->ReadBuffer in glReadBuffer back-to-front tests
Kenneth Graunke [Mon, 14 Oct 2019 16:58:57 +0000 (09:58 -0700)]
mesa: Use ctx->ReadBuffer in glReadBuffer back-to-front tests

We were looking at ctx->DrawBuffer when asking about the read buffer,
which was good enough for CTS purposes, but definitely not right.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoetnaviv: remove variable from global namespace
Lionel Landwerlin [Tue, 15 Oct 2019 13:24:33 +0000 (16:24 +0300)]
etnaviv: remove variable from global namespace

Found out by accident this was clashing with another driver.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Cc: <mesa-stable@lists.freedesktop.org>
5 years agost/mesa: always allocate pack/unpack buffers as staging
Marek Olšák [Tue, 27 Aug 2019 20:38:05 +0000 (16:38 -0400)]
st/mesa: always allocate pack/unpack buffers as staging

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agogallium/xlib: Fix xmesa drawable creation
Adam Jackson [Thu, 10 Oct 2019 18:05:10 +0000 (14:05 -0400)]
gallium/xlib: Fix xmesa drawable creation

The first time you call glXMakeCurrent, current != ctx. As a result we
would never look up whether the drawable already had an XMesaDrawable,
and would instead always create one. Then XMesaBufferList would have two
different buffers for the same XID, and you'd be reading and drawing to
different places, and that's not what you want at all.

Instead just always look up the drawable.

Fixes: db8be355 (gallium/xlib: Remove drawable caching from the MakeCurrent path)
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1196
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agogitlab-ci: set a common job parent for test stage
Eric Engestrom [Mon, 14 Oct 2019 22:53:15 +0000 (23:53 +0100)]
gitlab-ci: set a common job parent for test stage

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agogitlab-ci: set a common job parent for build stage
Eric Engestrom [Mon, 14 Oct 2019 22:52:58 +0000 (23:52 +0100)]
gitlab-ci: set a common job parent for build stage

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agogitlab-ci: set a common job parent for container stage
Eric Engestrom [Mon, 14 Oct 2019 22:04:14 +0000 (23:04 +0100)]
gitlab-ci: set a common job parent for container stage

While at it, rename to singular "container" for consistency.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agoRevert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"
Samuel Pitoiset [Tue, 15 Oct 2019 12:40:51 +0000 (14:40 +0200)]
Revert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"

This reverts commit 2ca8629fa9b303e24783b76a7b3b0c2513e32fbd.

This was initially ported from RadeonSI, but in the meantime it has
been reverted because it might hang. Be conservative and re-introduce
this packet emission.

Unfortunately this doesn't fix anything known.

Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agospirv: set correct dest_type for texture query ops
Jonathan Marek [Mon, 14 Oct 2019 21:15:56 +0000 (17:15 -0400)]
spirv: set correct dest_type for texture query ops

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
5 years agoturnip: more descriptor sets
Jonathan Marek [Mon, 7 Oct 2019 01:42:27 +0000 (21:42 -0400)]
turnip: more descriptor sets

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: push constants
Jonathan Marek [Mon, 14 Oct 2019 15:09:27 +0000 (11:09 -0400)]
turnip: push constants

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: depth/stencil
Jonathan Marek [Mon, 14 Oct 2019 15:28:31 +0000 (11:28 -0400)]
turnip: depth/stencil

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: basic msaa working
Jonathan Marek [Mon, 14 Oct 2019 16:46:37 +0000 (12:46 -0400)]
turnip: basic msaa working

Not perfect but gets through some tests.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: improve CmdCopyImage and implement CmdBlitImage
Jonathan Marek [Sat, 5 Oct 2019 16:38:40 +0000 (12:38 -0400)]
turnip: improve CmdCopyImage and implement CmdBlitImage

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: use nir_assign_io_var_locations instead of nir_assign_var_locations
Jonathan Marek [Mon, 7 Oct 2019 02:26:49 +0000 (22:26 -0400)]
turnip: use nir_assign_io_var_locations instead of nir_assign_var_locations

Variables with same location should use the same driver_location.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add missing nir passes
Jonathan Marek [Mon, 7 Oct 2019 02:25:59 +0000 (22:25 -0400)]
turnip: add missing nir passes

Avoids assert fails in ir3.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add code to lower indirect samplers
Jonathan Marek [Mon, 7 Oct 2019 01:40:19 +0000 (21:40 -0400)]
turnip: add code to lower indirect samplers

Taken from nir_lower_samplers. Sampler arrays don't work though, this is
just to avoid an assert fail in ir3.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fixup consts
Jonathan Marek [Mon, 7 Oct 2019 01:07:57 +0000 (21:07 -0400)]
turnip: fixup consts

Fix some mistakes in previous series.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: update some shader state bits from GL driver
Jonathan Marek [Mon, 7 Oct 2019 01:05:47 +0000 (21:05 -0400)]
turnip: update some shader state bits from GL driver

Notably includes centroid varying bits that were missing.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: Emit clears of gmem using linear.
Eric Anholt [Mon, 30 Sep 2019 18:04:38 +0000 (11:04 -0700)]
turnip: Emit clears of gmem using linear.

This is what we do in freedreno.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: Set up the correct tiling mode for small attachments.
Eric Anholt [Mon, 14 Oct 2019 16:33:42 +0000 (12:33 -0400)]
turnip: Set up the correct tiling mode for small attachments.

Noticed while debugging a tiling-looking issue by comparing our gmem
blit setup to freedreno's.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: Tell spirv_to_nir that we want fragcoord as a sysval.
Eric Anholt [Fri, 27 Sep 2019 23:04:30 +0000 (16:04 -0700)]
turnip: Tell spirv_to_nir that we want fragcoord as a sysval.

Fixes ir3 compiler failure failure in
dEQP-VK.renderpass.dedicated_allocation.formats.r8g8b8a8_unorm.clear.clear_draw
(now just a rendering failure where the subpass clear isn't happening)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: Fill in clear color packing for r10g11b11 and rgb9e5.
Eric Anholt [Fri, 27 Sep 2019 22:24:00 +0000 (15:24 -0700)]
turnip: Fill in clear color packing for r10g11b11 and rgb9e5.

Fixes assertion failures in
dEQP-VK.api.image_clearing.core.clear_color_image.2d.* for these
formats, though the test set as a whole is stil failing.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: Drop unused tu_pack_clear_value() return.
Eric Anholt [Fri, 27 Sep 2019 22:20:16 +0000 (15:20 -0700)]
turnip: Drop unused tu_pack_clear_value() return.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add anisotropy and compressed formats to device features
Jonathan Marek [Sat, 5 Oct 2019 16:39:13 +0000 (12:39 -0400)]
turnip: add anisotropy and compressed formats to device features

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: disable tiling as necessary
Jonathan Marek [Fri, 4 Oct 2019 19:57:28 +0000 (15:57 -0400)]
turnip: disable tiling as necessary

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: update setup_slices
Jonathan Marek [Fri, 4 Oct 2019 19:56:32 +0000 (15:56 -0400)]
turnip: update setup_slices

Deal with tiled r8g8 having different alignment and other updates taken
from fd6_resource. Additionally track image samples/cpp.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add VK_KHR_sampler_mirror_clamp_to_edge
Jonathan Marek [Sat, 5 Oct 2019 16:41:48 +0000 (12:41 -0400)]
turnip: add VK_KHR_sampler_mirror_clamp_to_edge

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add black border color
Jonathan Marek [Sat, 5 Oct 2019 16:40:18 +0000 (12:40 -0400)]
turnip: add black border color

Avoids hangs and some texture tests are happy with just this.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: improve sampler descriptor
Jonathan Marek [Sat, 5 Oct 2019 16:29:01 +0000 (12:29 -0400)]
turnip: improve sampler descriptor

Fixes anisotropy and shadow texture

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: improve view descriptor
Jonathan Marek [Sat, 5 Oct 2019 16:24:29 +0000 (12:24 -0400)]
turnip: improve view descriptor

Changes to make compressed, tiled, 3d, etc textures work

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add more 2d_ifmt translations
Jonathan Marek [Sat, 5 Oct 2019 16:13:29 +0000 (12:13 -0400)]
turnip: add more 2d_ifmt translations

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: format table fixes
Jonathan Marek [Sat, 5 Oct 2019 16:12:47 +0000 (12:12 -0400)]
turnip: format table fixes

* Fix R16G16 SCALED and R16G16B16A16 SCALED having texture format
* Fix B5G6R5 swap value
* Use R8_UINT instead of R8_UNORM for S8_UINT rb format
* Disable 96-bit texture formats instead having a check for NPOT formats
* Don't fail assert on D24X8 format

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add format_is_uint/format_is_sint
Jonathan Marek [Sat, 5 Oct 2019 16:05:52 +0000 (12:05 -0400)]
turnip: add format_is_uint/format_is_sint

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: add astc format layout
Jonathan Marek [Sat, 5 Oct 2019 16:04:48 +0000 (12:04 -0400)]
turnip: add astc format layout

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fix assert failing for 0 color attachments
Jonathan Marek [Mon, 14 Oct 2019 15:41:08 +0000 (11:41 -0400)]
turnip: fix assert failing for 0 color attachments

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fix segmentation fault with compute pipeline
Jonathan Marek [Mon, 14 Oct 2019 15:25:11 +0000 (11:25 -0400)]
turnip: fix segmentation fault with compute pipeline

Not supported, so always set pointer to NULL

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fix segmentation fault in events
Jonathan Marek [Mon, 14 Oct 2019 15:24:27 +0000 (11:24 -0400)]
turnip: fix segmentation fault in events

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fix 32 vertex attributes case
Jonathan Marek [Mon, 14 Oct 2019 15:16:02 +0000 (11:16 -0400)]
turnip: fix 32 vertex attributes case

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoturnip: fix triangle strip
Jonathan Marek [Mon, 14 Oct 2019 15:15:05 +0000 (11:15 -0400)]
turnip: fix triangle strip

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agofreedreno/regs: update a6xx 2d blit bits
Jonathan Marek [Sat, 5 Oct 2019 16:52:54 +0000 (12:52 -0400)]
freedreno/regs: update a6xx 2d blit bits

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
5 years agoradv: rename VK_KHR_shader_float16_int8 structs/constants
Samuel Pitoiset [Tue, 15 Oct 2019 08:29:46 +0000 (10:29 +0200)]
radv: rename VK_KHR_shader_float16_int8 structs/constants

Trivial change.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agov3d: drop unused shader_rec_count member from context
Iago Toral [Tue, 15 Oct 2019 06:56:45 +0000 (06:56 +0000)]
v3d: drop unused shader_rec_count member from context

Looks like this was copied from the vc4 driver where it is actually
included in the submit CL ioctl.

Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agofreedreno/ir3: implement fquantize2f16
Jonathan Marek [Mon, 14 Oct 2019 15:42:12 +0000 (11:42 -0400)]
freedreno/ir3: implement fquantize2f16

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agofreedreno/ir3: implement texop_texture_samples
Jonathan Marek [Mon, 7 Oct 2019 20:21:52 +0000 (16:21 -0400)]
freedreno/ir3: implement texop_texture_samples

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agofreedreno/ir3: fix GETLOD for negative LODs
Jonathan Marek [Mon, 7 Oct 2019 20:21:09 +0000 (16:21 -0400)]
freedreno/ir3: fix GETLOD for negative LODs

Note: for output type U32, negative LOD is not sign extended from 16 bits

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agofreedreno/ir3: implement fdd{x,y}_coarse opcodes
Jonathan Marek [Mon, 7 Oct 2019 01:00:11 +0000 (21:00 -0400)]
freedreno/ir3: implement fdd{x,y}_coarse opcodes

Same as regular fddx/fddy.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agofreedreno/ir3: increase size of inputs/outputs arrays
Jonathan Marek [Mon, 7 Oct 2019 00:55:11 +0000 (20:55 -0400)]
freedreno/ir3: increase size of inputs/outputs arrays

Makes it possible to support 32 varyings.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agofreedreno/ir3: remove input ncomp field
Jonathan Marek [Mon, 7 Oct 2019 00:53:41 +0000 (20:53 -0400)]
freedreno/ir3: remove input ncomp field

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robclark@gmail.com>
5 years agoetnaviv: fix vertex buffer state emission for single stream GPUs
Lucas Stach [Mon, 16 Sep 2019 12:37:01 +0000 (14:37 +0200)]
etnaviv: fix vertex buffer state emission for single stream GPUs

GPUs with a single supported vertex stream must use the single state
address to program the stream.

Fixes: 3d09bb390a39 (etnaviv: GC7000: State changes for HALTI3..5)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
5 years agogallivm/draw/swr: make the gs_iface not depend on tgsi.
Dave Airlie [Tue, 30 Jul 2019 22:23:29 +0000 (08:23 +1000)]
gallivm/draw/swr: make the gs_iface not depend on tgsi.

This gs_iface doesn't seem to require a dependence on the tgsi
context, except for the swr end prim code.

This refactors the API to include all the info that the swr
code needs in the interface rather than having to dig it out of
the struct inheritance.

This is a precursor to adding NIR support to llvmpipe.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
5 years agoiris: Implement the Gen < 9 tessellation quads workaround
Kenneth Graunke [Mon, 14 Oct 2019 08:20:20 +0000 (01:20 -0700)]
iris: Implement the Gen < 9 tessellation quads workaround

Fixes several CTS tests:
- KHR-GL46.tessellation_shader.vertex.vertex_spacing
- KHR-GL46.tessellation_shader.tessellation_shader_point_mode.points_verification

Fixes: 823609b1a39 ("iris/WIP: add broadwell support")