mesa.git
4 years agoci: Update versions of packages to remove from rootfses.
Eric Anholt [Wed, 13 May 2020 23:58:26 +0000 (16:58 -0700)]
ci: Update versions of packages to remove from rootfses.

testing's versions have updated, and the apt one was pretty big in the
stripped rootfs.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

4 years agoci: Make the create-rootfs more resilient.
Eric Anholt [Wed, 13 May 2020 21:36:36 +0000 (14:36 -0700)]
ci: Make the create-rootfs more resilient.

If the file doesn't exist, fine.  We didn't happen to get that package
dragged in.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

4 years agoci: Make cmake toolchain file for deqp cross build setup.
Eric Anholt [Thu, 14 May 2020 17:38:12 +0000 (10:38 -0700)]
ci: Make cmake toolchain file for deqp cross build setup.

This adds a few more variables that we found we needed for x86-to-arm dEQP
cross builds.  Also note that we're now fixed to use ccache in the dEQP
builds.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

4 years agoci: Autodetect whether we need cross setup in lava_arm builds.
Eric Anholt [Wed, 13 May 2020 19:14:39 +0000 (12:14 -0700)]
ci: Autodetect whether we need cross setup in lava_arm builds.

The x86 baremetal build would have an armhf cross file, and need the
kernel env setup.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

4 years agoci: Move cross file generation to a shared script.
Eric Anholt [Wed, 13 May 2020 18:54:04 +0000 (11:54 -0700)]
ci: Move cross file generation to a shared script.

We're going to do this in another container soon, and it would also be
nice to consolidate cmake cross setup.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5033>

4 years agoiris: Initialise stub iris_seqno to 0
Chris Wilson [Tue, 12 May 2020 08:17:04 +0000 (09:17 +0100)]
iris: Initialise stub iris_seqno to 0

We create a stub never-signaled seqno to force the iris_fence to use the
fence fd, but we need to fully initialise the iris_seqno struct so that
the unset pointers are NULL and we do not try to destroy them later.

  ==38644== Conditional jump or move depends on uninitialised value(s)
  ==38644==    at 0xF7FBFAA: pipe_resource_reference (u_inlines.h:142)
  ==38644==    by 0xF7FC22F: iris_seqno_destroy (iris_seqno.c:38)
  ==38644==    by 0xF7E8930: iris_seqno_reference (iris_seqno.h:89)
  ==38644==    by 0xF7E8BC3: iris_fence_destroy (iris_fence.c:131)
  ==38644==    by 0xF7E8C41: iris_fence_reference (iris_fence.c:143)
  ==38644==    by 0xEF24525: dri2_destroy_fence (dri_helpers.c:176)
  ==38644==    by 0x4865DC2: dri2_egl_unref_sync (egl_dri2.c:3302)
  ==38644==    by 0x48661E8: dri2_destroy_sync (egl_dri2.c:3433)
  ==38644==    by 0x4855BA4: _eglDestroySync (eglapi.c:1952)
  ==38644==    by 0x4855CF5: eglDestroySyncKHR (eglapi.c:1972)
  ==38644==    by 0x402628: test_cleanup (egl_khr_fence_sync.c:232)
  ==38644==    by 0x40421E: test_eglCreateSyncKHR_native_from_fd (egl_khr_fence_sync.c:1521)

Closes: #2909
Fixes: fd1907efb385a6f66897 ("iris: Convert fences to using lightweight seqno")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5004>

4 years agofreedreno/drm: handle ancient kernels
Rob Clark [Sun, 17 May 2020 23:16:43 +0000 (16:16 -0700)]
freedreno/drm: handle ancient kernels

Older kernels did not support `MSM_INFO_GET_IOVA`.  But this is only
required for (a) clover (ie. `fd_set_global_binding()`) and drm paths
that are limited to newer kernels.  So move the location of the assert
to fix new userspace on old kernels.

Fixes: c9e8df61dc8 ("freedreno: Initialize the bo's iova at creation time.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5081>

4 years agofreedreno/drm: don't pass thru 'DUMP' flag on older kernels
Rob Clark [Sun, 17 May 2020 20:01:30 +0000 (13:01 -0700)]
freedreno/drm: don't pass thru 'DUMP' flag on older kernels

"softpin" mode was introduced in the same kernel as the 'DUMP' flag.  So
if we are using the legacy non-softpin path, clear the dump flag.  OTOH
the 'DUMP' flag isn't quite so needed on older kernels, since we would
get all cmdstream, even SDS stateobjs, dumped regardless, as they would
have cmd table entries.

Fixes: b2c23b1e48f ("freedreno: Mark all ringbuffer BOs as to be dumped on crash.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5081>

4 years agofreedreno/a3xx: fix rasterizer discard
Ilia Mirkin [Sun, 17 May 2020 23:50:08 +0000 (19:50 -0400)]
freedreno/a3xx: fix rasterizer discard

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5080>

4 years agofreedreno/fdperf: add dependency on generated headers
Rob Clark [Mon, 18 May 2020 17:14:21 +0000 (10:14 -0700)]
freedreno/fdperf: add dependency on generated headers

To fix an issue reported here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1083815

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5088>

4 years agoci: Fix TypoError error when traces in traces.yml is an empty list
Pablo Saavedra [Wed, 13 May 2020 14:44:30 +0000 (16:44 +0200)]
ci: Fix TypoError error when traces in traces.yml is an empty list

v2: Python's nitpick (Andres)

In case of an empty list of traces, the results.yml will contain an empty
curly braces. In YAML, an associative array can also be specified by text
enclosed in curly braces ({}),

This commit also adds the corresponding test to check the behavior of
tracie when no traces are added in the traces.yml file.

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>

4 years agoci: Split test_tracie_skips_traces_without_checksum in separate cases
Pablo Saavedra [Wed, 13 May 2020 18:48:32 +0000 (20:48 +0200)]
ci: Split test_tracie_skips_traces_without_checksum in separate cases

test_tracie_skips_traces_without_checksum does the logic previous to
the commit 8546d1dd789b58bd0aff5ca0a231efb35c09c1ac. The traces.yml includes
several traces, only the one without checksum is ignored by tracie.

As a complementary action, this change adds an new test
(test_tracie_only_traces_without_checksum) to verify the behavior for
cases where the traces.yml only contains traces without checksum.

Finally, test_tracie_skips_traces_without_checksum is renamed as
test_tracie_traces_with_and_without_checksum

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>

4 years agoci: Migrate tracie tests done in shell script to pytest
Pablo Saavedra [Mon, 4 May 2020 16:11:08 +0000 (18:11 +0200)]
ci: Migrate tracie tests done in shell script to pytest

v2: Verbatim translation from the original shell script
    Make the corrections visible in explicit commits (Andres)
    Remove redundant code (Alexandros)
    Code style nitpick (Rohan)

Reimplementation of the tracie's self-tests using a pythonic test suit
(pytest).

The new tracie/test.py module is almost a direct translation of the
tests defined in the tracie/test.sh. This new implementation of the
test provides a more common framework where define the tests.
Also allows a better introspection for the tests results and/or
resulting errors.

This patch also adds python3-pytest as dependency for the built images
and adapts the tracie-runner scripts to run the self-test using pytest.

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> [v1]
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>

4 years agoci: ArgumentParser receives the args from the main parameters
Pablo Saavedra [Tue, 5 May 2020 13:08:04 +0000 (15:08 +0200)]
ci: ArgumentParser receives the args from the main parameters

Change the main function to receive the args parameter from
sys.argv[1:]. The args parameter will be passed to the
ArgumentParser.parse_args() function as argument.

This change provides an easier  main() function signature to use
with pythonic testsuites.

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>

4 years agoci: TRACES_DB_PATH and RESULTS_PATH defined as relative paths
Pablo Saavedra [Tue, 5 May 2020 07:07:34 +0000 (09:07 +0200)]
ci: TRACES_DB_PATH and RESULTS_PATH defined as relative paths

RESULTS_PATH and RESULTS_PATH, as variables in the module context, are
resolved one single time, only during the first module loading. If the
the Python code in execution changes the current dir at some point,
those paths are not going to be updated anymore keeping the paths
wrongly pointing to the old working dir.

This change modify the definition of those variables to use simply
relative paths.

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>

4 years agoetnaviv: don't expose timer queries
Lucas Stach [Mon, 18 May 2020 13:50:36 +0000 (15:50 +0200)]
etnaviv: don't expose timer queries

We don't support any timer queries, so stop lying about our
ability to do so.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5086>

4 years agofreedreno/a3xx: parameterize ubo optimization
Ilia Mirkin [Sun, 17 May 2020 22:08:11 +0000 (18:08 -0400)]
freedreno/a3xx: parameterize ubo optimization

A3xx apparently has higher alignment requirements than later gens for
indirect const uploads. It also has fewer of them. Add compiler
parameters for both settings, and set accordingly for a3xx and a4xx+.
This fixes all the ubo test failures caused by this optimization.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5077>

4 years agofreedreno: fix off-by-one in assertions checking for const sizes
Ilia Mirkin [Sun, 17 May 2020 05:42:06 +0000 (01:42 -0400)]
freedreno: fix off-by-one in assertions checking for const sizes

Caused assertions to trip even though everything was fine. The number of
constants can be equal to length, so we need less-than-or-equal.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5077>

4 years agofreedreno/a3xx: fix const footprint
Ilia Mirkin [Sun, 17 May 2020 22:05:42 +0000 (18:05 -0400)]
freedreno/a3xx: fix const footprint

In commit 5d8f40a53a5, the change was done incorrectly, switching from
max_const to constlen + 1. Instead it should have been constlen - 1,
which is the analog to the former max_const.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5077>

4 years agofreedreno/ir3: avoid applying (sat) on bary.f
Ilia Mirkin [Sun, 17 May 2020 03:59:40 +0000 (23:59 -0400)]
freedreno/ir3: avoid applying (sat) on bary.f

This causes failures on a3xx resulting in the non-sensical dEQP failures
on packUnorm2x16. The same test uses ldlv on a4xx+, so just disallow
(sat) on bary.f on all generations.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5074>

4 years agofreedreno/a3xx: reinstate rgb10_a2ui texture format
Ilia Mirkin [Sun, 17 May 2020 01:39:09 +0000 (21:39 -0400)]
freedreno/a3xx: reinstate rgb10_a2ui texture format

Rendering doesn't work, but having the format in place avoids an assert
when selecting the texture format in st_format. I believe it's required
for GLES3, so more tracing is required to determine what bit we're
missing to make rendering work.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5073>

4 years agofreedreno/a3xx: there's no r8i/ui rb format, only rg8i/rg8ui
Ilia Mirkin [Sun, 17 May 2020 01:37:53 +0000 (21:37 -0400)]
freedreno/a3xx: there's no r8i/ui rb format, only rg8i/rg8ui

This fixes a number of dEQP tests:

  dEQP-GLES3.functional.fbo.blit.conversion.r8*
  dEQP-GLES3.texture.specification.basic_teximage2d.r8*

and others. The reason why this enum showed up in traces for R8 is that
it was an "upgraded" texture to R8G8.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5073>

4 years agoradv: use util_float_to_half_rtz
Christopher Egert [Fri, 15 May 2020 14:41:15 +0000 (16:41 +0200)]
radv: use util_float_to_half_rtz

Since commit 8b8af6d398a94cb07015c695fdfdb5c157aa72cf there is a
performance regression in dirt 4 on picasso APUs.

The game ends up feeding a large value into this which overflows on the
conversion to 16bit float. With the old implementation (which now lives
in util_float_to_half_rtz) it would be clamped to inf-1, while the new
one returns inf. This causes a performance hit somehow at some point
down the line.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 8b8af6d398a "gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5062>

4 years agolima/ppir: optimize tex loads with single successor
Erico Nunes [Thu, 23 Apr 2020 18:12:01 +0000 (20:12 +0200)]
lima/ppir: optimize tex loads with single successor

These don't need a mov, and can be used directly with pipeline output.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>

4 years agolima/ppir: rework tex lowering
Erico Nunes [Sun, 19 Apr 2020 17:36:57 +0000 (19:36 +0200)]
lima/ppir: rework tex lowering

Move steps from lowering to emit, since they can be done earlier in a
single place, rather than in two-steps.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>

4 years agolima/ppir: improve handling for successors in other blocks
Erico Nunes [Sun, 10 May 2020 14:08:13 +0000 (16:08 +0200)]
lima/ppir: improve handling for successors in other blocks

ppir doesn't register successors in other blocks, and causes
ppir_node_has_single_succ to be unreliable as it might return true for
nodes with successors in other blocks.
This is bad for optimization passes that try to pipeline registers or
avoid insertion of movs, as that can generally only be done for nodes
with a single user.
As of now, ppir can't just start adding successors in other blocks as
that breaks the scheduling code.
So this patch is a little hacky but enables pipelining optimizations
during lowering. It can hopefully be removed during future scheduler
rework.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>

4 years agolima/ppir: handle failures on all ppir_emit_cf_list paths
Erico Nunes [Sun, 19 Apr 2020 19:36:19 +0000 (21:36 +0200)]
lima/ppir: handle failures on all ppir_emit_cf_list paths

In some paths where ppir_emit_cf_list is called, compilation errors such
as in unsupported features were not being handled, allowing compilation
to continue and fail at some random point later.
Handle them properly so compilation aborts in the expected way rather
than what may look like a compiler crash/bug.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>

4 years agoutil/rand_xor: extend the urandom path to all non-Windows platforms
Eric Engestrom [Sun, 13 Oct 2019 07:57:35 +0000 (08:57 +0100)]
util/rand_xor: extend the urandom path to all non-Windows platforms

Any system that provides `/dev/urandom` should be allowed to try to use it.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>

4 years agoutil/rand_xor: fallback Linux to time-based instead of fixed seed
Eric Engestrom [Sun, 13 Oct 2019 15:09:22 +0000 (16:09 +0100)]
util/rand_xor: fallback Linux to time-based instead of fixed seed

When the caller asked for a randomised_seed, we should fall back to the
time-based seed instead of the fixed seed.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>

4 years agoutil/rand_xor: drop unused header
Eric Engestrom [Sun, 13 Oct 2019 08:34:36 +0000 (09:34 +0100)]
util/rand_xor: drop unused header

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>

4 years agoutil/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t
Eric Engestrom [Sun, 13 Oct 2019 07:52:59 +0000 (08:52 +0100)]
util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>

4 years agogitlab-ci: exclude scripts that don't affect the build
Eric Engestrom [Thu, 14 May 2020 20:51:38 +0000 (22:51 +0200)]
gitlab-ci: exclude scripts that don't affect the build

All the other files in bin/ are not used by any build system and as such
cannot affect the build.

I've been working on maintainer tools lately and it's frustrating to have
the CI wait for 45 minutes to rebuild everything and not even read/run
the files in the MR when it could've just been merged and moved on to
the next MR 45 minutes ago.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5046>

4 years agogallium/auxiliary/vl: Fix compute shader scaling for non-square pixels
Thong Thai [Fri, 15 May 2020 18:07:05 +0000 (14:07 -0400)]
gallium/auxiliary/vl: Fix compute shader scaling for non-square pixels

Calculate the scale_y parameter instead of assuming square pixels.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5057>

4 years agogallium/u_threaded: execute transfer_unmap with THREAD_SAFE directly
Marek Olšák [Wed, 13 May 2020 19:43:58 +0000 (15:43 -0400)]
gallium/u_threaded: execute transfer_unmap with THREAD_SAFE directly

This was the original intention, but it wasn't fully implemented.

Fixes: 7f22e0fd29369f478da1d36520049f001cd698d1
Closes: #2953
Tested by: John Galt <johngalt@fake.mail>

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

4 years agoradeonsi: test uncached clear/copy buffer performance with compute shaders
Marek Olšák [Wed, 6 May 2020 23:29:51 +0000 (19:29 -0400)]
radeonsi: test uncached clear/copy buffer performance with compute shaders

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

4 years agoradeonsi: compute perf tests - don't test 1 wave/SA limit, test no limit first
Marek Olšák [Wed, 6 May 2020 23:32:01 +0000 (19:32 -0400)]
radeonsi: compute perf tests - don't test 1 wave/SA limit, test no limit first

1 wave/SA is always slow and thus not useful

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

4 years agoradeonsi: disable the L2 cache for CPU read mappings of buffers
Marek Olšák [Wed, 6 May 2020 18:51:50 +0000 (14:51 -0400)]
radeonsi: disable the L2 cache for CPU read mappings of buffers

for faster copying over PCIe and no need to flush L2

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

4 years agoradeonsi: disable the L2 cache for most CPU mappings of textures
Marek Olšák [Wed, 6 May 2020 18:51:50 +0000 (14:51 -0400)]
radeonsi: disable the L2 cache for most CPU mappings of textures

for faster blits over PCIe and no need to flush L2

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

4 years agowinsys/amdgpu: add RADEON_FLAG_UNCACHED for faster blits over PCIe
Marek Olšák [Wed, 6 May 2020 18:46:13 +0000 (14:46 -0400)]
winsys/amdgpu: add RADEON_FLAG_UNCACHED for faster blits over PCIe

Small blits benefit more. Good access pattern is required.

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

4 years agoradeonsi: use display_dcc_offset for setting displayable_dcc_cb_mask
Marek Olšák [Thu, 7 May 2020 17:46:41 +0000 (13:46 -0400)]
radeonsi: use display_dcc_offset for setting displayable_dcc_cb_mask

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

4 years agoradeonsi: use vi_dcc_enabled instead of using tex->surface.dcc_offset directly
Marek Olšák [Thu, 7 May 2020 17:46:10 +0000 (13:46 -0400)]
radeonsi: use vi_dcc_enabled instead of using tex->surface.dcc_offset directly

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

4 years agoradeonsi: rename SI_RESOURCE_FLAG_TRANSFER to FORCE_LINEAR
Marek Olšák [Thu, 7 May 2020 17:18:25 +0000 (13:18 -0400)]
radeonsi: rename SI_RESOURCE_FLAG_TRANSFER to FORCE_LINEAR

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

4 years agoradeonsi: simplify setting resource usage for si_init_temp_resource_from_box
Marek Olšák [Thu, 7 May 2020 00:56:52 +0000 (20:56 -0400)]
radeonsi: simplify setting resource usage for si_init_temp_resource_from_box

usage was set twice, once in the function, and then after the function

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

4 years agoradeonsi: tweak clear/copy_buffer limits when to use compute
Marek Olšák [Thu, 7 May 2020 03:22:23 +0000 (23:22 -0400)]
radeonsi: tweak clear/copy_buffer limits when to use compute

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

4 years agoradeonsi: optimize access pattern for compute blits with linear textures
Marek Olšák [Wed, 6 May 2020 18:12:27 +0000 (14:12 -0400)]
radeonsi: optimize access pattern for compute blits with linear textures

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

4 years agoradeonsi: use correct clear value size for EQAA in expand_fmask
Marek Olšák [Wed, 6 May 2020 16:27:56 +0000 (12:27 -0400)]
radeonsi: use correct clear value size for EQAA in expand_fmask

based on the fmask_expand_values array.

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

4 years agoac/nir: honor ACCESS_STREAM_CACHE_POLICY for L1 and L0 caches too
Marek Olšák [Wed, 6 May 2020 23:06:35 +0000 (19:06 -0400)]
ac/nir: honor ACCESS_STREAM_CACHE_POLICY for L1 and L0 caches too

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>

4 years agoradeonsi: Use TRUNC_COORD on samplers
Joshua Ashton [Wed, 22 Apr 2020 04:30:36 +0000 (05:30 +0100)]
radeonsi: Use TRUNC_COORD on samplers

The default behaviour (0) is: "round-nearest-even to n.6 and drop fraction when point sampling" whereas the OpenGL spec simply wants us to floor it (1) "truncate when point sampling".
See 8.14.2 in the OpenGL spec:

https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf

The Direct3D spec also mandates this (https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#7.18.7%20Point%20Sample%20Addressing)

On WineD3D:
This fixes some point-sampling texture precision issues in some Direct3D 9 titles such as Guild Wars 2 and htoL#NiQ: The Firefly Diary that are not present on other vendors.

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

4 years agoiris: Use modfiy disables for 3DSTATE_WM_DEPTH_STENCIL command
Sagar Ghuge [Tue, 4 Feb 2020 18:49:59 +0000 (10:49 -0800)]
iris: Use modfiy disables for 3DSTATE_WM_DEPTH_STENCIL command

Add new IRIS_DIRTY_STENCIL_REF dirty flag which would help us to trigger
separate 3DSTATE_WM_DEPTH_STENCIL packet using modify disable fields.

Instead of merging two packets into one in order to build
3DSTATE_WM_DEPTH_STENCIL state, set_stencil_ref can use
IRIS_DIRTY_STENCIL_REF bit and bind_zsa_state can use
IRIS_DIRTY_WN_DEPTH_STENCIL, both could cause packet to happen with
available information using modify disable bits which allow us to
construct packet by ignoring set of fields.

v2: (Kenneth Graunke)
- Fix condition ordering.
- Club GEN cases.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3688>

4 years agoradeon: Fix whitespaces
Thong Thai [Wed, 22 Jan 2020 21:24:35 +0000 (16:24 -0500)]
radeon: Fix whitespaces

Minor adjustment to whitespace to align text since the indentation changed

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3523>

4 years agoradeonsi: don't expose 16xAA on chips with 1 RB due to an occlusion query issue
Marek Olšák [Thu, 14 May 2020 22:47:36 +0000 (18:47 -0400)]
radeonsi: don't expose 16xAA on chips with 1 RB due to an occlusion query issue

Only Stoney and Raven2 are affected.

Cc: 20.0 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5047>

4 years agospirv: handle OpCopyObject correctly with any types
Samuel Pitoiset [Tue, 5 May 2020 16:25:08 +0000 (18:25 +0200)]
spirv: handle OpCopyObject correctly with any types

This implements OpCopyObject as a blind copy and propagates the
access mask properly even if the source object type isn't a SSA
value.

This fixes some recent dEQP-VK.descriptor_indexing.* failures
since CTS changed and now apply nonUniformEXT after constructing
a combined image/sampler.

Original patch is from Jason Ekstrand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4909>

4 years agoetnaviv: retarget transfer to render resource when necessary
Lucas Stach [Thu, 14 May 2020 10:59:01 +0000 (12:59 +0200)]
etnaviv: retarget transfer to render resource when necessary

If we have a separate render resource, it may contain more up-to-date
data than what is available in the base resource, so we need to retarget
the transfer to this resource. As the most likely reason for the
existence of the render resource is a multi-tiled render layout we need
to allow this transfer to go through the resolve/blit copy path, as we
can't de-/tile those layouts in software.

Fixes: b96277653033 (etnaviv: rework compatible render base)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5051>

4 years agointel: Store the aperture size in devinfo.
Rafael Antognolli [Thu, 14 May 2020 18:44:29 +0000 (11:44 -0700)]
intel: Store the aperture size in devinfo.

We will later use the devinfo from iris_bufmgr, where we don't have
access to the screen pointer. And since we are moving it, we can reuse
it in Anv and i965.

v2: return error code and check for it on Anv (Lionel).
v3: Remove anv_gem_get_aperture() from anv_private.h and stubs (Lionel).

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

4 years agost/nine: Handle full pSourceRect better
Axel Davy [Sat, 9 May 2020 11:31:25 +0000 (13:31 +0200)]
st/nine: Handle full pSourceRect better

Some apps do set pSourceRect to the full area even if not needed.

Filtering out this case is helpful, as we currently do not handle
properly resizing (pDestRect or window size not of the size of the resource)
when pSourceRect is set. Indeed in this case pSourceRect needs to be modified
before being passed to the presentation backend.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Ignore pDirtyRegion
Axel Davy [Sat, 9 May 2020 11:18:42 +0000 (13:18 +0200)]
st/nine: Ignore pDirtyRegion

We supported it, but it's not much useful.
Besides it gets more complicated to handle right when
you support resizing before display.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Improve pDestRect handling
Axel Davy [Sat, 9 May 2020 11:17:17 +0000 (13:17 +0200)]
st/nine: Improve pDestRect handling

pSourceRect and pDestRect allows to:
A) display a crop of the backbuffer
B) display the content in a subregion (after an offset)
C) resize the content before displaying

Before this patch, only features A and B were supported.
This patch adds C, but breaks A, which current support
relied on C not being implemented.

I think C is more important than A, and A can be added later.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Retry allocations after freeing some space
Axel Davy [Fri, 8 May 2020 21:23:17 +0000 (23:23 +0200)]
st/nine: Retry allocations after freeing some space

Managed resources can be released whenever we need.
When we have an allocation failure, free them and retry.
Try also to flush the csmt queue in case there were some things released.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Increase available GPU memory
Axel Davy [Fri, 8 May 2020 20:26:07 +0000 (22:26 +0200)]
st/nine: Increase available GPU memory

This patch caps to 4GB the limit of GPU memory accessible
only for 32bits build.
This would deserve some tests on windows, so we might change that
behaviour in the future. For example, it's possible that
GetAvailableTextureMem is capped to 4GB on 64bits build.

We cap to a bit less than 4GB, which might help
https://github.com/iXit/Mesa-3D/issues/323

In addition, increase from 80% to 95% the allocation limit above
which we fail allocating.

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

4 years agost/nine: Add missing NULL checks
Axel Davy [Thu, 7 May 2020 21:28:59 +0000 (23:28 +0200)]
st/nine: Add missing NULL checks

Ideally apps shouldn't make buggy calls.
Still if some do, let's avoid crashing.

Without this patch, if some calls are invalid,
for example if replaying a trace of a game needing
a lot of VRAM on a card with not much VRAM, it can
crash.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Fix a crash if the state is not initialized
Axel Davy [Sun, 26 Jan 2020 19:40:00 +0000 (20:40 +0100)]
st/nine: Fix a crash if the state is not initialized

I don't remember exactly the conditions of the crash,
but I had a trace which was crashing in the gallium driver
before doing any rendering (something about viewports being not initialized).

It's not the first time we hit such a problem, so rather than investigating
that crash, I chose to just initialize every states at device creation.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Fix uninitialized variable in BEM()
Axel Davy [Sun, 21 Jul 2019 08:33:29 +0000 (10:33 +0200)]
st/nine: Fix uninitialized variable in BEM()

tmp was not initialized.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Improve return error code in CheckDeviceFormat
Axel Davy [Mon, 3 Jun 2019 22:37:28 +0000 (00:37 +0200)]
st/nine: Improve return error code in CheckDeviceFormat

This seems suspicious, but is better than what we currently do.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Pass more adapter formats for CheckDepthStencilMatch
Axel Davy [Mon, 3 Jun 2019 22:24:15 +0000 (00:24 +0200)]
st/nine: Pass more adapter formats for CheckDepthStencilMatch

It seems CheckDepthStencilMatch should accept A8R8G8B8
as adapter format. Given the lack of clarity of the doc
relative to the difference between display format
and adapter format (== display format modulo alpha bits),
for now just accept display formats with and without alpha bits.

Fixes: https://github.com/iXit/Mesa-3D/issues/317
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Do not return invalidcall on getrenderstate
Axel Davy [Mon, 3 Jun 2019 20:22:59 +0000 (22:22 +0200)]
st/nine: Do not return invalidcall on getrenderstate

To be fair I don't remember why I wrote this patch,
but it seems reasonable.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Return error when setting invalid depth buffer
Axel Davy [Tue, 28 May 2019 20:47:44 +0000 (22:47 +0200)]
st/nine: Return error when setting invalid depth buffer

Prevents a crash with the trace of
https://github.com/iXit/wine-nine-standalone/issues/40

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agost/nine: Add checks for pure device
Axel Davy [Wed, 24 Oct 2018 21:28:28 +0000 (23:28 +0200)]
st/nine: Add checks for pure device

Some Get* functions are forbidden for pure device.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

4 years agozink: implement i2b1
Erik Faye-Lund [Fri, 15 May 2020 10:05:11 +0000 (12:05 +0200)]
zink: implement i2b1

This shuold really have been implemented before starting to use these,
but I guess I missed them.

Fixes a crash when starting a game in Warzone 2100.

Fixes: 7f6a491eec0 ("zink: lower b2b to b2i")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5053>

4 years agoutil/rand_xor: use getrandom() when available
Emmanuel Gil Peyrot [Wed, 18 Sep 2019 11:20:57 +0000 (13:20 +0200)]
util/rand_xor: use getrandom() when available

This function has been added in glibc 2.25, and the related syscall in
Linux 3.17, in order to avoid requiring the /dev/urandom to exist, and
doing the open()/read()/close() dance on it.

We pass GRND_NONBLOCK so that it doesn’t block if not enough entropy has
been gathered to initialise the /dev/urandom source, and fallback to the
next source in any error case.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2026>

4 years agozink: mark depth-component cube-maps as done
Erik Faye-Lund [Thu, 14 May 2020 19:02:57 +0000 (21:02 +0200)]
zink: mark depth-component cube-maps as done

This worked fine all along, nothing to be done for this feature. The
piglit tests mostly pass.

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

4 years agonir: Use 8-bit types for most info fields
Jason Ekstrand [Thu, 14 May 2020 19:50:52 +0000 (14:50 -0500)]
nir: Use 8-bit types for most info fields

This shrinks nir_intrinsics.c.o from 73K to 35K and nir_opcodes.c.o from
64K to 31K on a release build.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5045>

4 years agoradv: Implement VK_EXT_custom_border_color
Joshua Ashton [Tue, 7 Apr 2020 05:11:24 +0000 (06:11 +0100)]
radv: Implement VK_EXT_custom_border_color

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

4 years agoradv: Provide a better error for permission issues with priorities.
Bas Nieuwenhuizen [Wed, 29 Apr 2020 21:13:17 +0000 (23:13 +0200)]
radv: Provide a better error for permission issues with priorities.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4816>

4 years agofreedreno/uuid: Generate meaningful device and driver UUID
Eduardo Lima Mitev [Wed, 13 May 2020 10:57:43 +0000 (12:57 +0200)]
freedreno/uuid: Generate meaningful device and driver UUID

Device UUID becomes SHA1('freedreno' + gpu_id).
Driver UUID becomes SHA1(mesa-version + git-head-sha1).

v2: Don't use build_id for driver UUID since it generates different
    values for vulkan and gl shared objects. (Kristian)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4847>

4 years agofreedreno: Centralize UUID generation into new files freedreno_uuid.c/h
Eduardo Lima Mitev [Thu, 9 Apr 2020 10:56:08 +0000 (12:56 +0200)]
freedreno: Centralize UUID generation into new files freedreno_uuid.c/h

The new files are created under a 'common' folder under 'src/freedreno',
where shared functionality between GL and Vulkan drivers (that is not
registers, layout or compiler) will be placed.

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

4 years agoaco: split operations that use a swap's definition
Rhys Perry [Thu, 7 May 2020 15:26:42 +0000 (16:26 +0100)]
aco: split operations that use a swap's definition

Instead of relying it's read being entirely within the swap's definition.

No shader-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4950>

4 years agotu: Advertise COLOR_ATTACHMENT_BLEND_BIT for blendable formats
Connor Abbott [Thu, 14 May 2020 10:34:53 +0000 (12:34 +0200)]
tu: Advertise COLOR_ATTACHMENT_BLEND_BIT for blendable formats

Whoops. After fixing dual-source blending, dEQP-VK.pipeline.blend.* all
go from skipped to pass, and fixes a bunch of
dEQP-VK.api.info.format_properties.* tests where blending is required.

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

4 years agotu: Implement dual-src blending
Connor Abbott [Thu, 14 May 2020 15:17:46 +0000 (17:17 +0200)]
tu: Implement dual-src blending

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

4 years agotu: Move RENDER_COMPONENTS setting to pipeline state
Connor Abbott [Thu, 14 May 2020 14:41:02 +0000 (16:41 +0200)]
tu: Move RENDER_COMPONENTS setting to pipeline state

This needs to be pipeline state because it can change when dual-source
blending is active.

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

4 years agoir3: Fixup dual-source blending slot
Connor Abbott [Thu, 14 May 2020 14:11:58 +0000 (16:11 +0200)]
ir3: Fixup dual-source blending slot

The hardware expects that where MRT0 and MRT1 would normally go are the
dual sources for MRT0, whereas GLSL has an extra "index" parameter that
indicates which source it is. Remap it when handling FS outputs.

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

4 years agofreedreno/a6xx: Document dual-src blending enable bits
Connor Abbott [Thu, 14 May 2020 14:34:45 +0000 (16:34 +0200)]
freedreno/a6xx: Document dual-src blending enable bits

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

4 years agoRevert "nir/validate: validate the stride for deref_ptr_as_array"
Karol Herbst [Thu, 14 May 2020 17:36:43 +0000 (17:36 +0000)]
Revert "nir/validate: validate the stride for deref_ptr_as_array"

This reverts commit 667e14e7bd759a77e732c4de09fb978ee3816eaf

4 years agodocs: update calendar, add news item, and link releases notes for 20.0.7
Dylan Baker [Thu, 14 May 2020 17:14:53 +0000 (10:14 -0700)]
docs: update calendar, add news item, and link releases notes for 20.0.7

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

4 years agodocs/relnotes Add sha256 sums to 20.0.7
Dylan Baker [Thu, 14 May 2020 17:09:24 +0000 (10:09 -0700)]
docs/relnotes Add sha256 sums to 20.0.7

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

4 years agodocs: Add release notes for 20.0.7
Dylan Baker [Thu, 14 May 2020 16:38:57 +0000 (09:38 -0700)]
docs: Add release notes for 20.0.7

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

4 years agointel: Silence unused parameter warning in __intel_log_use_args
Ian Romanick [Mon, 11 May 2020 20:10:52 +0000 (13:10 -0700)]
intel: Silence unused parameter warning in __intel_log_use_args

...in every file that includes intel_log.h.

In file included from src/intel/vulkan/anv_private.h:93,
                 from src/intel/vulkan/genX_cmd_buffer.c:27:
src/intel/common/intel_log.h: In function ‘__intel_log_use_args’:
src/intel/common/intel_log.h:75:34: warning: unused parameter ‘format’ [-Wunused-parameter]

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>

4 years agoanv: Silence unused parameter warning in anv_image_get_clear_color_addr
Ian Romanick [Mon, 11 May 2020 20:09:17 +0000 (13:09 -0700)]
anv: Silence unused parameter warning in anv_image_get_clear_color_addr

...in every file that includes anv_private.h.

In file included from src/intel/vulkan/genX_cmd_buffer.c:27:
src/intel/vulkan/anv_private.h: In function ‘anv_image_get_clear_color_addr’:
src/intel/vulkan/anv_private.h:3690:57: warning: unused parameter ‘device’ [-Wunused-parameter]

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>

4 years agoanv/tests: Silence unused parameter warnings in main
Ian Romanick [Mon, 11 May 2020 20:06:56 +0000 (13:06 -0700)]
anv/tests: Silence unused parameter warnings in main

src/intel/vulkan/tests/block_pool_no_free.c: In function ‘main’:
src/intel/vulkan/tests/block_pool_no_free.c:147:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/block_pool_no_free.c:147:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

src/intel/vulkan/tests/block_pool_grow_first.c: In function ‘main’:
src/intel/vulkan/tests/block_pool_grow_first.c:27:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/block_pool_grow_first.c:27:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

src/intel/vulkan/tests/state_pool.c: In function ‘main’:
src/intel/vulkan/tests/state_pool.c:36:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/state_pool.c:36:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

src/intel/vulkan/tests/state_pool_padding.c: In function ‘main’:
src/intel/vulkan/tests/state_pool_padding.c:27:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/state_pool_padding.c:27:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

src/intel/vulkan/tests/state_pool_no_free.c: In function ‘main’:
src/intel/vulkan/tests/state_pool_no_free.c:115:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/state_pool_no_free.c:115:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

src/intel/vulkan/tests/state_pool_free_list_only.c: In function ‘main’:
src/intel/vulkan/tests/state_pool_free_list_only.c:35:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
src/intel/vulkan/tests/state_pool_free_list_only.c:35:27: warning: unused parameter ‘argv’ [-Wunused-parameter]

v2: Use 'int main(void)' instead.  Suggested by Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>

4 years agoanv/tests: Don't rely on assert or changing NDEBUG in tests
Ian Romanick [Mon, 11 May 2020 19:33:24 +0000 (12:33 -0700)]
anv/tests: Don't rely on assert or changing NDEBUG in tests

This is the last part of the fix for #2903.

v2: Add test_common.h.

Fixes: f7c56475d25 ("anv/tests: compile to something sensible in release builds")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>

4 years agoaco: fix WQM coalescing
Daniel Schürmann [Thu, 14 May 2020 11:40:55 +0000 (12:40 +0100)]
aco: fix WQM coalescing

get_reg_specified() doesn't handle special registers like SCC.
Fixes: a5fc96b533418dc2d68f17f3f19ac5f82d59b978 ('aco: coalesce parallelcopies during register allocation')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5036>

4 years agoanv: Fix descriptor set clean-up on BO allocation failure
Jason Ekstrand [Thu, 14 May 2020 03:57:46 +0000 (22:57 -0500)]
anv: Fix descriptor set clean-up on BO allocation failure

This was a bit of rebase fail when writing 682c81bdfb.  We stopped
freeing descriptor sets back to the pool and started calling
vk_object_base_finish.  This commit reverts a that hunk should have
never made its way into the final patch.

Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5032>

4 years agoanv: Call vk_object_base_finish for image views
Jason Ekstrand [Wed, 13 May 2020 21:26:22 +0000 (16:26 -0500)]
anv: Call vk_object_base_finish for image views

Fixes: 682c81bdfb7 "vulkan,anv: Add a base object struct type"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5032>

4 years agozink: correct PIPE_SHADER_CAP_MAX_SHADER_IMAGES
Erik Faye-Lund [Wed, 13 May 2020 15:13:47 +0000 (17:13 +0200)]
zink: correct PIPE_SHADER_CAP_MAX_SHADER_IMAGES

We don't support shader-images yet, so this is premature to expose.

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

4 years agozink: do not expose real value for PIPE_CAP_MAX_VIEWPORTS
Erik Faye-Lund [Wed, 13 May 2020 12:40:47 +0000 (14:40 +0200)]
zink: do not expose real value for PIPE_CAP_MAX_VIEWPORTS

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

4 years agometa: Remove support for multisample blits
Ian Romanick [Thu, 15 Jun 2017 21:47:54 +0000 (14:47 -0700)]
meta: Remove support for multisample blits

Since i965 no longer uses this function for blitting color buffers,
there is no driver left that will ever support multisample textures and
use _mesa_meta_BlitFramebuffer.

v2: Delete blit_state::msaa_shaders and enum blit_msaa_shader.

   text     data     bss      dec    hex  filename
12243286 1344936 1290748 14878970 e308fa  before/lib64/dri/i965_dri.so
12240398 1344936 1290748 14876082 e2fdb2  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

4 years agometa: Coalesce the GLSL and FF paths in meta_clear
Ian Romanick [Fri, 2 Jun 2017 23:29:20 +0000 (16:29 -0700)]
meta: Coalesce the GLSL and FF paths in meta_clear

   text     data     bss      dec    hex  filename
12243286 1344936 1290748 14878970 e308fa  before/lib64/dri/i965_dri.so
12243286 1344936 1290748 14878970 e308fa  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

4 years agometa: Use same vertex coordinates for GLSL and FF clears
Ian Romanick [Fri, 2 Jun 2017 23:21:25 +0000 (16:21 -0700)]
meta: Use same vertex coordinates for GLSL and FF clears

   text     data     bss      dec    hex  filename
12243446 1344936 1290748 14879130 e3099a  before/lib64/dri/i965_dri.so
12243286 1344936 1290748 14878970 e308fa  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

4 years agometa: Stop frobbing MatrixMode
Ian Romanick [Fri, 2 Jun 2017 23:15:52 +0000 (16:15 -0700)]
meta: Stop frobbing MatrixMode

   text     data     bss      dec    hex  filename
12243510 1344936 1290748 14879194 e309da  before/lib64/dri/i965_dri.so
12243446 1344936 1290748 14879130 e3099a  after/lib64/dri/i965_dri.so

v2: Use _mesa_load_matrix to set the projection matrix instead of
frobbing dirty bits directly.  Suggested by Jason.  Clean up some
comments in the neighborhood.  Since glOrtho isn't called, there's no
point in mentioning it in the comment.  Only _mesa_load_identity_matrix
on the projection matrix when it isn't set to an ortho matrix.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

4 years agomesa: Add function to calculate an orthographic projection
Ian Romanick [Tue, 28 Apr 2020 17:18:47 +0000 (10:18 -0700)]
mesa: Add function to calculate an orthographic projection

Unlike the existing _math_matrix_ortho, the new _math_float_ortho
function just stores the calculated matrix in an array of floats.  It
does not multiply the new matrix with data already stored.

   text     data     bss      dec    hex  filename
12243486 1344936 1290748 14879170 e309c2  before/lib64/dri/i965_dri.so
12243510 1344936 1290748 14879194 e309da  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

4 years agomesa: Add matrix utility functions to load matrices
Ian Romanick [Fri, 2 Jun 2017 22:59:24 +0000 (15:59 -0700)]
mesa: Add matrix utility functions to load matrices

These are basically DSA versions of glLoadIdentity() and glLoadMatrix()
that are available for internal Mesa use.

   text     data     bss      dec    hex  filename
12243574 1344936 1290748 14879258 e30a1a  before/lib64/dri/i965_dri.so
12243486 1344936 1290748 14879170 e309c2  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>