mesa.git
3 years agofreedreno/registers: update varying-related registers
Jonathan Marek [Sun, 14 Jun 2020 04:12:05 +0000 (00:12 -0400)]
freedreno/registers: update varying-related registers

Note:

* a3xx change based on available register documentation
* a4xx guesses (RB_RENDER_CONTROL2 bits especially)
* a5xx change based on a6xx, these registers seem identical

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5582>

3 years agogitlab-ci: Automatically run pipelines for Marge Bot pre-merge only
Michel Dänzer [Mon, 29 Jun 2020 09:33:13 +0000 (11:33 +0200)]
gitlab-ci: Automatically run pipelines for Marge Bot pre-merge only

Marge only merges an MR if the pipeline passed. Running the pipeline
again after merging is redundant.

v2:
* Add rule to ensure docker images are up to date in the main project
  registry (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5680>

3 years agov3d/compiler: fix image size for 1D arrays
Iago Toral Quiroga [Tue, 30 Jun 2020 08:59:47 +0000 (10:59 +0200)]
v3d/compiler: fix image size for 1D arrays

Reviewed by: Alejandro Piñeiro <apinheiro@igalia.com>

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5692>

3 years agost/mesa: do not clear NewDriverState for inactive states
Pierre-Eric Pelloux-Prayer [Thu, 25 Jun 2020 15:12:57 +0000 (17:12 +0200)]
st/mesa: do not clear NewDriverState for inactive states

Fixes: 085aa7f91e8 ("st/mesa: don't update atomic, SSBO, UBO and TBO states that have no effect")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2951
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5660>

3 years agogallium/docs: remove unused imgmath extension
Erik Faye-Lund [Tue, 30 Jun 2020 09:57:53 +0000 (11:57 +0200)]
gallium/docs: remove unused imgmath extension

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: remove non-existent static dir
Erik Faye-Lund [Tue, 30 Jun 2020 09:06:31 +0000 (11:06 +0200)]
gallium/docs: remove non-existent static dir

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: prefix exts dir with underscore
Erik Faye-Lund [Tue, 30 Jun 2020 10:09:31 +0000 (12:09 +0200)]
gallium/docs: prefix exts dir with underscore

It's generally considered good practice to use underscore-prefixes for
directories that contains non-doumentation files, so let's do this for
our custom extensions as well.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: use none for highlight_language
Erik Faye-Lund [Tue, 30 Jun 2020 10:06:03 +0000 (12:06 +0200)]
gallium/docs: use none for highlight_language

We have much more blocks that are of no particular language (mostly
custom ASM variants), so let's instead opt in if we want
syntax-highlighting.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: remove reference to non-existent label
Erik Faye-Lund [Tue, 30 Jun 2020 09:13:51 +0000 (11:13 +0200)]
gallium/docs: remove reference to non-existent label

This label was removed a long time ago, let's also remove the reference
to it.

Fixes: 3acd7a34ab0 ("st/vega: Remove.")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: fixup formatting of numbered lists
Erik Faye-Lund [Tue, 30 Jun 2020 09:09:20 +0000 (11:09 +0200)]
gallium/docs: fixup formatting of numbered lists

Fixes: 0caf74bbcdf ("gallium: add PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS")
Fixes: 8632626c81a ("gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samples")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agogallium/docs: update to recent sphinx
Erik Faye-Lund [Tue, 30 Jun 2020 09:05:42 +0000 (11:05 +0200)]
gallium/docs: update to recent sphinx

add_description_unit has been deprectated for a really long time, and was
finally removed (seemingly in Sphinx 2.0, but this doesn't seem to be
properly documented anywhere I can find), so we shouldn't be using this
any more.

Anyway, let's update the code.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5691>

3 years agodraw/llvm: fix big-endian mask adjusting
Dave Airlie [Tue, 30 Jun 2020 03:21:04 +0000 (13:21 +1000)]
draw/llvm: fix big-endian mask adjusting

This code was broken, but it worked by accident, as the
pad and the edgeflag were reversed, however when Roland
removed the cliptest field back in 2015, he stopped copying
the pad which actually stopped copy the edgeflag.

Fix the function to actually copy the edgeflag.

Fixes: 1b22815af624 ("draw: don't pretend have_clipdist is per-vertex")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>

3 years agomesa/get: fix enum16 big-endian getting.
Dave Airlie [Mon, 29 Jun 2020 19:04:19 +0000 (05:04 +1000)]
mesa/get: fix enum16 big-endian getting.

These values were getting casted up to 32-bit, but then extracted
via 16-bit pointer later. Just store via 16-bit.

Fixes a lot of piglit on s390

Fixes: f96a69f916ae ("mesa: replace GLenum with GLenum16 in common structures (v4)");
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>

3 years agollvmpipe: fix occlusion queries on big-endian.
Dave Airlie [Mon, 29 Jun 2020 05:57:14 +0000 (15:57 +1000)]
llvmpipe: fix occlusion queries on big-endian.

Casting to u8 arrays and picking the lowest byte is fairly LE specific
grab the other byte.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>

3 years agogallivm/nir: fix big-endian 64-bit splitting/merging.
Dave Airlie [Mon, 29 Jun 2020 04:59:20 +0000 (14:59 +1000)]
gallivm/nir: fix big-endian 64-bit splitting/merging.

The shuffles need to be swapped to do this properly on big-endian

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>

3 years agoglsl: fix constant packing for 64-bit big endian.
Dave Airlie [Mon, 29 Jun 2020 03:26:56 +0000 (13:26 +1000)]
glsl: fix constant packing for 64-bit big endian.

In a piglit run on s390 a lot of double tests fail, explicitly
packing/shifting things rather than using memcpy seems to help

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>

3 years agodocs: add a page explaining the GitLab CI and the Intel CI
Eric Engestrom [Mon, 7 Oct 2019 22:26:39 +0000 (23:26 +0100)]
docs: add a page explaining the GitLab CI and the Intel CI

This explains what they are, what they do and how to use them.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Clayton Craft <clayton.a.craft@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2250>

3 years agomesa/swrast: use logf2 instead of util_fast_log2
Dylan Baker [Thu, 30 Apr 2020 19:40:56 +0000 (12:40 -0700)]
mesa/swrast: use logf2 instead of util_fast_log2

The fast version is apparently not accurate enough. I wrote a very
simply test program that called logf2 and the old LOG2 function 100000
times. Across that the two functions had very similar run times, neither
appeared meaningfully faster, so the optimization of bringing back yet
another way to calculate log2f seems pointless.

Fixes: bd4e769515345a6b20562310334bc828c0bb6605
       ("replace LOG2 with util_fast_log2")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2856
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5406>

3 years agoanv: disable i915_perf warning on non-Linux
Jan Beich [Thu, 21 May 2020 01:55:11 +0000 (01:55 +0000)]
anv: disable i915_perf warning on non-Linux

$ vkcube
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5461>

3 years agomeson: Revert commit overriding C++ standard with gnu++11 on ppc64el
Frédéric Bonnard [Thu, 7 May 2020 14:30:52 +0000 (16:30 +0200)]
meson: Revert commit overriding C++ standard with gnu++11 on ppc64el

Since a few versions, mesa now needs c++14 and compiling with gnu++11
on ppc64el fails.
Let's use the default standard and fix the collision of types between
c++ and altivec in a another patch.

Cc: mesa-stable
Signed-off-by: Frédéric Bonnard <frediz@debian.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4948>

3 years agoclover: Fix types collision between c++ and altivec
Frédéric Bonnard [Mon, 11 May 2020 13:57:20 +0000 (15:57 +0200)]
clover: Fix types collision between c++ and altivec

For that, we undefine bool, vector, pixel as advised by altivec.h in the
specific case that defines them.

Cc: mesa-stable
Signed-off-by: Frédéric Bonnard <frediz@debian.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4948>

3 years agonir: Propagate *2*16 conversions into vectors
Alyssa Rosenzweig [Mon, 11 May 2020 14:02:49 +0000 (10:02 -0400)]
nir: Propagate *2*16 conversions into vectors

If we have code like:

   ('f2f16', ('vec2', ('f2f32', 'a@16'), '#b@32'))

We would like to eliminate the conversions, but the existing rules can't
see into the the (heterogenous) vector. So instead of trying to
eliminate in one pass, we add opts to propagate the f2f16 into the
vector. Even if nothing further happens, this is often a win since then
the created vector is smaller (half2 instead of float2). Hence the above
gets transformed to

   ('vec2', ('f2f16', ('f2f32', 'a@16')), ('f2f16', '#b@32'))

Then the existing f2f16(f2f32) rule will kick in for the first component
and constant folding will for the second and we'll be left with

   ('vec2', 'a@16', '#b@16')

...eliminating all conversions.

v2: Predicate on !options->vectorize_vec2_16bit. As discussed, this
optimization helps greatly on true vector architectures (like Midgard)
but wreaks havoc on more modern SIMD-within-a-register architectures
(like Bifrost and modern AMD). So let's predicate on that.

v3: Extend for integers as well and add a comment explaining the
transforms.

Results on Midgard (unfortunately a true SIMD architecture):

total instructions in shared programs: 51359 -> 50963 (-0.77%)
instructions in affected programs: 4523 -> 4127 (-8.76%)
helped: 53
HURT: 0
helped stats (abs) min: 1 max: 86 x̄: 7.47 x̃: 6
helped stats (rel) min: 1.71% max: 28.00% x̄: 9.66% x̃: 7.34%
95% mean confidence interval for instructions value: -10.58 -4.36
95% mean confidence interval for instructions %-change: -11.45% -7.88%
Instructions are helped.

total bundles in shared programs: 25825 -> 25670 (-0.60%)
bundles in affected programs: 2057 -> 1902 (-7.54%)
helped: 53
HURT: 0
helped stats (abs) min: 1 max: 26 x̄: 2.92 x̃: 2
helped stats (rel) min: 2.86% max: 30.00% x̄: 8.64% x̃: 8.33%
95% mean confidence interval for bundles value: -3.93 -1.92
95% mean confidence interval for bundles %-change: -10.69% -6.59%
Bundles are helped.

total quadwords in shared programs: 41359 -> 41055 (-0.74%)
quadwords in affected programs: 3801 -> 3497 (-8.00%)
helped: 57
HURT: 0
helped stats (abs) min: 1 max: 57 x̄: 5.33 x̃: 4
helped stats (rel) min: 1.92% max: 21.05% x̄: 8.22% x̃: 6.67%
95% mean confidence interval for quadwords value: -7.35 -3.32
95% mean confidence interval for quadwords %-change: -9.54% -6.90%
Quadwords are helped.

total registers in shared programs: 3849 -> 3807 (-1.09%)
registers in affected programs: 167 -> 125 (-25.15%)
helped: 32
HURT: 1
helped stats (abs) min: 1 max: 3 x̄: 1.34 x̃: 1
helped stats (rel) min: 20.00% max: 50.00% x̄: 26.35% x̃: 20.00%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for registers value: -1.54 -1.00
95% mean confidence interval for registers %-change: -29.41% -20.69%
Registers are helped.

total threads in shared programs: 2471 -> 2520 (1.98%)
threads in affected programs: 49 -> 98 (100.00%)
helped: 25
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.96 x̃: 2
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
95% mean confidence interval for threads value: 1.88 2.04
95% mean confidence interval for threads %-change: 100.00% 100.00%
Threads are [helped].

total spills in shared programs: 168 -> 168 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 186 -> 186 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4999>

3 years agopanfrost: Do fine-grained flushing for occlusion query results
Icecream95 [Sun, 28 Jun 2020 08:48:36 +0000 (20:48 +1200)]
panfrost: Do fine-grained flushing for occlusion query results

This allows doing occlusion queries in one frame and getting the
results in the next frame without having to flush.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5676>

3 years agofreedreno/a4xx: fix *_NONE enum conversion
Shawn Guo [Tue, 30 Jun 2020 12:40:53 +0000 (20:40 +0800)]
freedreno/a4xx: fix *_NONE enum conversion

Commit e369b8931c67 ("freedreno: Use explicit *_NONE enum for undefined
formats") only partially converts ~0 to *_NONE enum.  It breaks texture
support, and glmark2 texture scene gives a black screen.

Adding the missing conversion of ~0 to *_NONE enum fixes the issue.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5693>

3 years agoCI: Re-enable Panfrost T860 jobs
Daniel Stone [Tue, 30 Jun 2020 13:49:16 +0000 (14:49 +0100)]
CI: Re-enable Panfrost T860 jobs

The lab is back online.

This reverts commit 34db50558d9a6dca89218f74c4418cdf0b0acbcb.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5694>

3 years agoradeonsi: add a debug option to enable NGG culling for tessellation
Marek Olšák [Wed, 17 Jun 2020 15:59:27 +0000 (11:59 -0400)]
radeonsi: add a debug option to enable NGG culling for tessellation

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoradeonsi: don't try to enable NGG culling for GS
Marek Olšák [Wed, 17 Jun 2020 15:57:45 +0000 (11:57 -0400)]
radeonsi: don't try to enable NGG culling for GS

It doesn't do anything.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoradeonsi: always use Wave64 for HS/GS/VS shader stages (except GS fast launch)
Marek Olšák [Tue, 16 Jun 2020 18:53:03 +0000 (14:53 -0400)]
radeonsi: always use Wave64 for HS/GS/VS shader stages (except GS fast launch)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoradeonsi: always use Wave32 for GS fast launch, because Wave64 hangs
Marek Olšák [Wed, 17 Jun 2020 15:45:16 +0000 (11:45 -0400)]
radeonsi: always use Wave32 for GS fast launch, because Wave64 hangs

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoradeonsi: fix NGG culling for Wave64
Marek Olšák [Tue, 16 Jun 2020 18:52:19 +0000 (14:52 -0400)]
radeonsi: fix NGG culling for Wave64

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoac/gpu_info: fix num_physical_sgprs_per_simd for gfx10
Marek Olšák [Wed, 17 Jun 2020 14:55:33 +0000 (10:55 -0400)]
ac/gpu_info: fix num_physical_sgprs_per_simd for gfx10

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

3 years agoradeonsi: don't flush in fence_server_sync
Marek Olšák [Tue, 23 Jun 2020 03:54:59 +0000 (23:54 -0400)]
radeonsi: don't flush in fence_server_sync

This reverts commit 50b06cbc10dbca1dfee89b529ba9b564cc4ea6f6 and fixes
an Android performance regression.

Fixes: 50b06cbc10dbca1dfee89b529ba9b564cc4ea6f6 "radeonsi: fix fence_server_sync() holding up extra work v2"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5602>

3 years agoCI: Temporarily disable Panfrost T860 jobs
Daniel Stone [Tue, 30 Jun 2020 09:34:51 +0000 (10:34 +0100)]
CI: Temporarily disable Panfrost T860 jobs

Phase two of our network reconfiguration is happening this afternoon, so
we need to drop our RK3399 out for a little while. (Part of this
reconfiguration is to shard our devices across networks and racks, so
losing one part of our infrastructure doesn't mean losing any particular
device type.)

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5689>

3 years agoCI: Re-enable the Windows VS2019 build job
Daniel Stone [Thu, 18 Jun 2020 07:35:19 +0000 (08:35 +0100)]
CI: Re-enable the Windows VS2019 build job

Let's try this and see how it goes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5689>

3 years agoCI: Correct build-directory path on Windows, and keep it
Daniel Stone [Thu, 18 Jun 2020 07:34:52 +0000 (08:34 +0100)]
CI: Correct build-directory path on Windows, and keep it

Build job artifacts capture Meson logs from _build, so we can analyse
what Meson did during configuration, as well as the full output of any
test jobs.

We were previously calling our build directory 'build', which meant it
wouldn't have been captured by the artifacts, and we were also deleting
it to make really sure there was no chance of logs getting captured
either.

Rename the build directory to '_build' to match the others, and don't
delete it either, so we can keep our configure/test logs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5689>

3 years agoCI: Try shared libraries on Windows
Daniel Stone [Thu, 18 Jun 2020 07:31:50 +0000 (08:31 +0100)]
CI: Try shared libraries on Windows

This might make linking a bit less prone to OOM when trying to pull in
LLVM.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5689>

3 years agoCI: Enable assertions on Windows
Daniel Stone [Thu, 18 Jun 2020 07:31:31 +0000 (08:31 +0100)]
CI: Enable assertions on Windows

Getting assertion failures is helpful to have, even if we are doing a
release build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5689>

3 years agoradeonsi: bump SI_NUM_SHADER_BUFFERS to 32
Pierre-Eric Pelloux-Prayer [Fri, 29 May 2020 09:59:50 +0000 (11:59 +0200)]
radeonsi: bump SI_NUM_SHADER_BUFFERS to 32

Some app uses more than 8 SSBOs (https://gitlab.freedesktop.org/mesa/mesa/-/issues/2946),
so increase SI_NUM_SHADER_BUFFERS to 32 (which allows 16 SSBOs).

Since we're now using a 64 bits number to track buffers, we could bump
SI_NUM_SHADER_BUFFERS to 48 but that would conflict with Mesa's
MAX_COMBINED_ATOMIC_BUFFERS limit (= 90).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2122
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5632>

3 years agoglsl: remove stale FIXME
Timothy Arceri [Fri, 26 Jun 2020 07:01:25 +0000 (17:01 +1000)]
glsl: remove stale FIXME

This is no longer an issue, was likely fixed years ago.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5657>

3 years agost/glsl_to_nir: disable st_nir_lower_builtin() when packing supported
Timothy Arceri [Fri, 26 Jun 2020 05:28:51 +0000 (15:28 +1000)]
st/glsl_to_nir: disable st_nir_lower_builtin() when packing supported

There is no need to lower builtins when uniform packing is
supported by the driver. Lowering is only required by other drivers
because we prepack builtin uniforms.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3140
CC: <stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>

3 years agoglsl: define gl_LightSource members in ARB_vertex_program order
Timothy Arceri [Fri, 26 Jun 2020 08:54:56 +0000 (18:54 +1000)]
glsl: define gl_LightSource members in ARB_vertex_program order

GLSL shares functionality with ARB_vertex_program but the GLSL
spec defines the gl_LightSource builtin with a member order that
is different from the packing expected in ARB_vertex_program.
This difference introduces a need for specialist lowering code
when handling builtin structs that is not required for normal
uniform structs due to member location mismatches.

Since gl_LightSource can't be redefined it shouldn't matter if
we add the members in the order listed in the spec, just so long
as we add them all. So here we rearrange the definition of the
glsl builtin to reflex our internal layout and that of
ARB_vertex_program. This required for the following patch.

CC: <stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>

3 years agomesa: add _mesa_program_state_value_size() helper
Timothy Arceri [Fri, 26 Jun 2020 09:56:11 +0000 (19:56 +1000)]
mesa: add _mesa_program_state_value_size() helper

This allows us to query the uniform size required to store the
state value.

CC: <stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>

3 years agomesa: remove _mesa prefix from static function
Timothy Arceri [Fri, 26 Jun 2020 05:37:26 +0000 (15:37 +1000)]
mesa: remove _mesa prefix from static function

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>

3 years agozink: set lower_uadd_carry in nir options
Mike Blumenkrantz [Fri, 26 Jun 2020 23:07:20 +0000 (19:07 -0400)]
zink: set lower_uadd_carry in nir options

fixes a bunch of mulextended piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5685>

3 years agoloader/dri3: Check for window destruction in dri3_wait_for_event_locked
Michel Dänzer [Fri, 5 Jun 2020 17:07:55 +0000 (19:07 +0200)]
loader/dri3: Check for window destruction in dri3_wait_for_event_locked

If the underlying X11 window gets destroyed, the event we're waiting
for may never be delivered, in which case xcb_wait_for_special_event
would hang indefinitely.

Solution:

1. Use xcb_poll_for_special_event to check if an event has arrived yet.
2. If not, Wait up to ~1s for XCB's file descriptor to become readable;
   if it does, go back to step 1.
3. If the file descriptor didn't become readable, make a round-trip to
   the X server to check that the window still exists. Go back to step
   1 if it does, otherwise bail.

Also add an early bail-out when it's known that the window was
destroyed.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5368>

3 years agoloader/dri3: Use dri3_wait_for_event_locked in loader_dri3_wait_for_msc
Michel Dänzer [Fri, 5 Jun 2020 16:22:31 +0000 (18:22 +0200)]
loader/dri3: Use dri3_wait_for_event_locked in loader_dri3_wait_for_msc

Before, if one thread ended up waiting in dri3_wait_for_event_locked
and another one in loader_dri3_wait_for_msc at the same time, one thread
could end up processing an event the other thread was waiting for, which
could result in the latter thread waiting longer than necessary
(possibly indefinitely).

Noticed by inspection.

v2:
* Drop xcb_flush call from loader_dri3_wait_for_msc in favour of the one
  in dri3_wait_for_event_locked (Kenneth Graunke)

Fixes: 7b0e8264dd21 "loader/dri3: Try to make sure we only process our
                     own NotifyMSC events"

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5368>

3 years agoloader/dri3: Add dri3_wait_for_event_locked full_sequence out parameter
Michel Dänzer [Fri, 5 Jun 2020 16:12:33 +0000 (18:12 +0200)]
loader/dri3: Add dri3_wait_for_event_locked full_sequence out parameter

Preparation for the next commit, no functional change intended.

Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5368>

3 years agov3d: Fix -Wmaybe-uninitialized compiler warning in the v33 code.
Eric Anholt [Fri, 26 Jun 2020 23:31:55 +0000 (16:31 -0700)]
v3d: Fix -Wmaybe-uninitialized compiler warning in the v33 code.

We weren't initializing the VCM bits in the !gs path, but v33 doesn't have
GS so we can just mark it unreachable.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2952>

3 years agov3d: Enable PIPE_CAP_TGSI_TEXCOORD.
Eric Anholt [Tue, 3 Dec 2019 22:48:39 +0000 (14:48 -0800)]
v3d: Enable PIPE_CAP_TGSI_TEXCOORD.

Dave wants to drop the !TEXCOORD path from NIR, and it's easy enough to
do.  Untested.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2952>

3 years agovc4: Enable PIPE_CAP_TGSI_TEXCOORD.
Eric Anholt [Tue, 3 Dec 2019 22:46:56 +0000 (14:46 -0800)]
vc4: Enable PIPE_CAP_TGSI_TEXCOORD.

Dave wants to drop the !TEXCOORD path from NIR, and it's easy enough to
do.  Untested.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2952>

3 years agogallium/util: Add a helper function for point sprite handling.
Eric Anholt [Tue, 3 Dec 2019 23:26:29 +0000 (15:26 -0800)]
gallium/util: Add a helper function for point sprite handling.

Many drivers will need to do the same thing here, so consolidate it.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2952>

3 years agoturnip: enable depthBiasClamp
Jonathan Marek [Mon, 29 Jun 2020 00:27:46 +0000 (20:27 -0400)]
turnip: enable depthBiasClamp

Passes at least dEQP-VK.dynamic_state.rs_state.depth_bias_clamp

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5678>

3 years agoturnip: enable largePoints
Jonathan Marek [Sun, 28 Jun 2020 23:58:08 +0000 (19:58 -0400)]
turnip: enable largePoints

Passes dEQP-VK.rasterization.primitive_size.points.point_size_*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5678>

3 years agofreedreno/regs: add extra bits for UBWC array pitch
Jonathan Marek [Sun, 28 Jun 2020 23:57:42 +0000 (19:57 -0400)]
freedreno/regs: add extra bits for UBWC array pitch

This is not completely tested, but matches the max array pitch allowed by
A6XX_TEX_CONST_9_FLAG_BUFFER_ARRAY_PITCH.

Note this still doesn't allow all image sizes, but it allows 16384x16384
cpp=4 images to work.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5678>

3 years agofrontends/va: Handle dynamic resolution/SVC for VP9
Satyajit Sahu [Wed, 24 Jun 2020 10:31:01 +0000 (16:01 +0530)]
frontends/va: Handle dynamic resolution/SVC for VP9

VP9 allows frame to use another resolution frame as reference
frames so updating the resolution for decoder when there is a
resolution change.

Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5646>

3 years agov3d/compiler: fix spill offset
Iago Toral Quiroga [Fri, 26 Jun 2020 10:25:01 +0000 (12:25 +0200)]
v3d/compiler: fix spill offset

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Fixes: 97566efe5cac0ff11b ("v3d: Rematerialize MOVs of uniforms instead of spilling them.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5664>

3 years agoradv: add support for MRTs compaction to avoid holes
Samuel Pitoiset [Thu, 11 Jun 2020 19:54:01 +0000 (21:54 +0200)]
radv: add support for MRTs compaction to avoid holes

SPI_SHADER_COL_FORMAT allocates export memory and CB_SHADER_MASK
map them to higher MRTs if necessary. The hardware allows to remap
MRTs to avoid holes somehow.

For example, if we have a scenario where MRT0 is unused and only
MRT1 and MRT2 are used, SPI_SHADER_COL_FORMAT is 0x77 and
CB_SHADER_MASK/CB_TARGET_MASK are 0x770 (this assumes
SPI_SHADER_UINT16_ABGR is set).

This allows us to remove one workaround that was added for fixing
GPU hangs with DXVK. I think this is because SPI_SHADER_COL_FORMAT
expects contiguous MRTs to be allocated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5434>

3 years agoradv: use SPI_SHADER_ZERO for non-written color attachments
Samuel Pitoiset [Thu, 11 Jun 2020 19:51:42 +0000 (21:51 +0200)]
radv: use SPI_SHADER_ZERO for non-written color attachments

When colorWriteMask is 0 we can assume that this color attachment
is unused.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5434>

3 years agoradv: rework 8/16-bit color attachment formats detection
Samuel Pitoiset [Thu, 25 Jun 2020 07:40:16 +0000 (09:40 +0200)]
radv: rework 8/16-bit color attachment formats detection

To prepare for MRTs compaction.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5434>

3 years agoradv: adjust CB_SHADER_MASK for dual-source blending in the shader info pass
Samuel Pitoiset [Thu, 11 Jun 2020 15:14:27 +0000 (17:14 +0200)]
radv: adjust CB_SHADER_MASK for dual-source blending in the shader info pass

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5434>

3 years agoradv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends
Samuel Pitoiset [Fri, 26 Jun 2020 07:36:46 +0000 (09:36 +0200)]
radv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends

It gives +1-2 FPS with Doom Eternal on Pitcairn.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5659>

3 years agonir: Add new rules to optimize NOOP pack/unpack pairs
Boris Brezillon [Fri, 19 Jun 2020 15:24:44 +0000 (17:24 +0200)]
nir: Add new rules to optimize NOOP pack/unpack pairs

nir_load_store_vectorize_test.ssbo_load_adjacent_32_32_64_64 expectations
need to be fixed accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5589>

3 years agogallivm/nir: fix const loading on big endian systems
Dave Airlie [Sun, 28 Jun 2020 21:40:13 +0000 (07:40 +1000)]
gallivm/nir: fix const loading on big endian systems

The code was expecting the lower 32-bits of the 64-bit to be
what it wanted, don't be implicit, pull the value from the union.

This should fix rendering on big endian systems since NIR was
introduced.

Fixes: 44a6b0107b37 ("gallivm: add nir->llvm translation (v2)")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5677>

3 years agofreedreno/ir3: fix resinfo wrmask
Jonathan Marek [Sun, 28 Jun 2020 01:50:17 +0000 (21:50 -0400)]
freedreno/ir3: fix resinfo wrmask

resinfo always writes 3 components, which was not being taken into account

Fixes these tests:
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_3
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_7

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5674>

3 years agodocs: use ref-links for internal references
Erik Faye-Lund [Sat, 27 Jun 2020 08:00:10 +0000 (10:00 +0200)]
docs: use ref-links for internal references

Ref-link have two benefits over generic links:

1. They produce the right result for non-HTML outputs
2. They get validated at build-time

So let's use them for internal references instead.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>

3 years agodocs: fix internal references
Erik Faye-Lund [Sat, 27 Jun 2020 08:21:45 +0000 (10:21 +0200)]
docs: fix internal references

It seems last time I tried to fix these, I missed a few spots. So let's
try to get things right this time.

Fixes: 429ff054917 ("docs/relnotes: update internal references")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>

3 years agodocs: restore accidentally dropped labels
Erik Faye-Lund [Sat, 27 Jun 2020 07:48:48 +0000 (09:48 +0200)]
docs: restore accidentally dropped labels

These were accidentally dropped when cleaning up the TOC, making links to
them dead. Because we used plain links, sphinx didn't inform us that
these became dead. Let's restore them.

Fixes: 14f2a81b6f6 ("docs: drop open-coded toc for articles")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>

3 years agodocs: remove non-existent reference
Erik Faye-Lund [Sat, 27 Jun 2020 08:31:18 +0000 (10:31 +0200)]
docs: remove non-existent reference

The section referenced here was removed a while ago, but it was always
empty anyway. Let's just remove it instead of trying to fix it up.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>

3 years agomeson: Do not require shader cache for radv.
Bas Nieuwenhuizen [Thu, 25 Jun 2020 16:06:42 +0000 (18:06 +0200)]
meson: Do not require shader cache for radv.

We fixed the compile error a while ago.

Fixes: cc10b34e9ed "util/disk_cache: Fix disk_cache_get_function_timestamp with disabled cache."
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5649>

3 years agorbug: Fix rbug_delete_vs_state lock acquisition.
Vinson Lee [Sun, 24 May 2020 22:40:39 +0000 (15:40 -0700)]
rbug: Fix rbug_delete_vs_state lock acquisition.

Fix warning reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: mtx_unlock unlocks rb_pipe->call_mutex while it is
unlocked.

Fixes: 07838ff990a7 ("rbug: Use the call mutex")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3023
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5196>

3 years agov3d: moving v3d simulator to src/broadcom
Alejandro Piñeiro [Fri, 29 Nov 2019 10:17:18 +0000 (11:17 +0100)]
v3d: moving v3d simulator to src/broadcom

So it could be used by both the OpenGL and the Vulkan driver.

In addition to the move, some small changes were needed to be made on
the API. For example, the simulator was receiving v3d_screen on
initialization, and that code setted v3d_screen->sim_file. Now it
returns the new sim_file created.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5666>

3 years agoturnip: Put VK_KHR_external_fence_fd stubs back
Kristian H. Kristensen [Fri, 26 Jun 2020 23:29:15 +0000 (16:29 -0700)]
turnip: Put VK_KHR_external_fence_fd stubs back

tu_ImportFenceFdKHR is used by tu_AcquireImageANDROID, which may or
may not work, but let's at least keep things compiling until somebody
has time to tie up the loose ends on the Android side.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5670>

3 years agoiris: Implement pipe->texture_subdata directly
Kenneth Graunke [Thu, 14 Mar 2019 08:21:16 +0000 (01:21 -0700)]
iris: Implement pipe->texture_subdata directly

Chris Wilson noted that u_default_texture_subdata's transfer path
sometimes results in wasteful double copies.  This patch is based
on an earlier path he wrote, but updated now that we have staging
blits for busy or compressed textures.

Consider the case of idle, non-CCS-compressed, tiled images:

The transfer-based CPU path has to return a "linear" mapping, so upon
map, it mallocs a temporary buffer.  u_default_texture_subdata then
copies the client memory to this malloc'd buffer, and transfer unmap
performs a tiled_memcpy to copy it back into the texture.  By writing
a direct texture_subdata() implementation, we're able to directly do
a tiled_memcpy from the client memory into the destination texture,
resulting in only one copy.

For linear buffers, there is no advantage to doing things directly, so
we simply fall back to u_default_texture_subdata()'s transfer path to
avoid replicating those cases.

We still may want to use GPU staging buffers for busy destinations
(to avoid stalls) or CCS-compressed images (to compress the data),
at which point we also fall back to the existing path.  We thought
to try and use a tiled temporary, but this didn't appear to help.

Improves performance in x11perf -shmput500 by 1.96x on my Icelake.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2500
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3818>

3 years agoturnip: Properly return VK_DEVICE_LOST on queuesubmit failures.
Eric Anholt [Wed, 17 Jun 2020 22:58:33 +0000 (15:58 -0700)]
turnip: Properly return VK_DEVICE_LOST on queuesubmit failures.

The device lost support closely matches the anv code for the same.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>

3 years agoturnip: Fix error handling of DRM_MSM_GEM_INFO ioctls.
Eric Anholt [Wed, 17 Jun 2020 19:33:07 +0000 (12:33 -0700)]
turnip: Fix error handling of DRM_MSM_GEM_INFO ioctls.

drmCommandWriteRead gives us a -errno, and we only checked for -1 (-EPERM,
incidentally).  All the callers wanted 0 for errors, which they were
getting by the fact that req.value was 0-initialized in our stack
allocation (though this only works as long as the kernel doesn't return an
error after setting req.value to something), and -EPERM not really being
an answer we would expect from an ioctl at this stage in the driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>

3 years agoturnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure.
Eric Anholt [Wed, 17 Jun 2020 18:25:17 +0000 (11:25 -0700)]
turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>

3 years agoturnip: semaphore support.
Bas Nieuwenhuizen [Sun, 17 Nov 2019 05:23:15 +0000 (06:23 +0100)]
turnip: semaphore support.

There is only one queue for now, so for non-shared semaphores, the
implementation is basically a no-op. For shared semaphores, this
always uses syncobjs. This depends on syncobj support in the msm
kernel driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>

3 years agoci/baremetal: Bump the kernel to a recent drm-msm-fixes for msm semaphores.
Eric Anholt [Tue, 16 Jun 2020 19:05:23 +0000 (12:05 -0700)]
ci/baremetal: Bump the kernel to a recent drm-msm-fixes for msm semaphores.

We need this to test the new VK feature we're about to land.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>

3 years agoaco: fix partial copies on GFX6/7
Daniel Schürmann [Fri, 26 Jun 2020 11:13:20 +0000 (12:13 +0100)]
aco: fix partial copies on GFX6/7

While we don't allow partial subdword copies,
we still need to be able to split 64bit registers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5663>

3 years agomapi: x86: Fix dynamic entries in x86 tsd stubs.
Lepton Wu [Mon, 22 Jun 2020 22:33:32 +0000 (15:33 -0700)]
mapi: x86: Fix dynamic entries in x86 tsd stubs.

We need to update dynamic entries related code after updating
asm stubs.

Fixes: 45206d7673a ("mapi: Adapted libglvnd x86 tsd changes")
Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5598>

3 years agoci/bare-metal: Fail early when we get stuck powering on a cheza.
Eric Anholt [Thu, 25 Jun 2020 18:10:07 +0000 (11:10 -0700)]
ci/bare-metal: Fail early when we get stuck powering on a cheza.

I think I've seen about 3 of this error total so far, but waiting 60
minutes for the scripts to give up wastes marge time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5651>

3 years agofreedreno/ir3: move nir finalization to after cache miss
Rob Clark [Tue, 23 Jun 2020 17:09:30 +0000 (10:09 -0700)]
freedreno/ir3: move nir finalization to after cache miss

In cases where every variant is a shader-cache-hit, we never need the
post-finalize round of nir opt/lowering passes.  So defer this until
the first shader-cache-miss to avoid doing pointless work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: disk-cache support
Rob Clark [Fri, 5 Jun 2020 17:05:45 +0000 (10:05 -0700)]
freedreno/ir3: disk-cache support

Adds a shader disk-cache for ir3 shader variants.  Note that builds with
`-Dshader-cache=false` have no-op stubs with `disk_cache_create()` that
returns NULL.

Binning pass variants are serialized together with their draw-pass
counterparts, due to shared const-state.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: build binning variant at same time as draw variant
Rob Clark [Sat, 20 Jun 2020 19:53:36 +0000 (12:53 -0700)]
freedreno/ir3: build binning variant at same time as draw variant

For shader-cache, we are going to want to serialize them together.
Which is awkward if the two related variants are not compiled together.

This also decouples allocation and compile, which will simplify adding
shader-cache (which still needs to allocate, but can skip compile).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/a6xx+ir3: stop generating pointless binning shaders
Rob Clark [Sat, 20 Jun 2020 19:39:14 +0000 (12:39 -0700)]
freedreno/a6xx+ir3: stop generating pointless binning shaders

Currently we always do sysmem if there is tess.  And for GS, the binning
pass VS ends up identical to the draw pass VS, so no point in compiling
it twice.  (For GS what we should do someday is generate a binning pass
GS, and possibly if we can do cross-stage linking opts, an optimized
binning pass VS, but the required outputs would somehow have to end up
in the shader variant key.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: shuffle some variant fields
Rob Clark [Fri, 5 Jun 2020 19:07:02 +0000 (12:07 -0700)]
freedreno/ir3: shuffle some variant fields

Just to group together the parts that will get serialized when we have
shader disk-cache.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: add ir3_compiler_destroy()
Rob Clark [Thu, 4 Jun 2020 19:55:41 +0000 (12:55 -0700)]
freedreno/ir3: add ir3_compiler_destroy()

Use ir3_compiler_destroy() rather than open-coding ralloc_free().  This
will give us a place to add more compiler related cleanup code in the
following patches.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: move finalize_nir to pscreen hook
Rob Clark [Mon, 15 Jun 2020 21:37:24 +0000 (14:37 -0700)]
freedreno/ir3: move finalize_nir to pscreen hook

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agofreedreno/ir3: add ir3_finalize_nir()
Rob Clark [Mon, 15 Jun 2020 21:24:00 +0000 (14:24 -0700)]
freedreno/ir3: add ir3_finalize_nir()

The next step is to hook this into pscreen->finalize_nir() so it can
come before the state tracker's shader-caching.

Unfortunately we still need to do lower_io after mesa/st, so that is
split out into a post-finalize pass.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>

3 years agozink: use OpFUnordNotEqual for nir_op_fne
Mike Blumenkrantz [Thu, 25 Jun 2020 13:25:45 +0000 (09:25 -0400)]
zink: use OpFUnordNotEqual for nir_op_fne

we want to detect NaNs here, and OpFUnordNotEqual is the variant which does this

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: set lower_mul_high and lower_rotate in ntv compiler options
Mike Blumenkrantz [Mon, 22 Jun 2020 14:33:32 +0000 (10:33 -0400)]
zink: set lower_mul_high and lower_rotate in ntv compiler options

we don't implement these

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: handle isign alu in ntv
Mike Blumenkrantz [Tue, 16 Jun 2020 15:17:47 +0000 (11:17 -0400)]
zink: handle isign alu in ntv

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: handle ixor in ntv
Mike Blumenkrantz [Tue, 16 Jun 2020 15:14:19 +0000 (11:14 -0400)]
zink: handle ixor in ntv

fixes spec@glsl-1.30@execution@built-in-functions@fs-op-assign-bitxor tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: lower byte/word extract ops in nir
Mike Blumenkrantz [Mon, 15 Jun 2020 17:52:02 +0000 (13:52 -0400)]
zink: lower byte/word extract ops in nir

we don't implement these, and pre-optimizing them breaks things in ntv->vtn

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: add bitfield_reverse handling to ntv
Mike Blumenkrantz [Fri, 12 Jun 2020 14:19:56 +0000 (10:19 -0400)]
zink: add bitfield_reverse handling to ntv

fixes several piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: add ult handling for ntv
Mike Blumenkrantz [Wed, 10 Jun 2020 14:04:36 +0000 (10:04 -0400)]
zink: add ult handling for ntv

fixes shaders@glsl-vs-absolutedifference-uint piglit test

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agozink: handle signed and unsigned min/max ops in ntv
Mike Blumenkrantz [Mon, 8 Jun 2020 17:59:02 +0000 (13:59 -0400)]
zink: handle signed and unsigned min/max ops in ntv

fixes a number of piglit amd_shader_trinary_minmax tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

3 years agoradv: remove the load/store workaround for Monster Hunter World with LLVM
Samuel Pitoiset [Fri, 26 Jun 2020 07:27:46 +0000 (09:27 +0200)]
radv: remove the load/store workaround for Monster Hunter World with LLVM

Now that ACO is default, this is pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>

3 years agoradv: remove the shader ballot workaround for Youngblood with LLVM
Samuel Pitoiset [Fri, 26 Jun 2020 07:23:40 +0000 (09:23 +0200)]
radv: remove the shader ballot workaround for Youngblood with LLVM

Now that ACO is default, this is now pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>

3 years agodocs: update favicon
Erik Faye-Lund [Wed, 17 Jun 2020 10:45:21 +0000 (12:45 +0200)]
docs: update favicon

I created a new and cleaner favicon for mesa3d.org, and it seems like a
good idea to use that one for the docs as well.

While we're at it, replace the original PNG with the original SVG asset
the ICO-file was generated from.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5643>