platform/upstream/mesa.git
4 years agoclover: Use explicit conversion from llvm::StringRef to std::string
Jan Vesely [Thu, 30 Jan 2020 06:23:54 +0000 (01:23 -0500)]
clover: Use explicit conversion from llvm::StringRef to std::string

Fixes build after llvm 777180a32b61070a10dd330b4f038bf24e916af1
("[ADT] Make StringRef's std::string conversion operator explicit")

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
4 years agozink: disallow depth-stencil blits with format-change
Erik Faye-Lund [Fri, 1 Nov 2019 12:35:55 +0000 (13:35 +0100)]
zink: disallow depth-stencil blits with format-change

The Vulkan spec says this about vkCmdBlitImage:

   "No format conversion is supported between depth/stencil images. The
    formats must match."

So yeah, let's stop trying to do this.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>

4 years agozink: be more careful about the mask-check
Erik Faye-Lund [Fri, 1 Nov 2019 12:21:59 +0000 (13:21 +0100)]
zink: be more careful about the mask-check

We currently disallow blits that we can support. Let's be more accurate
when checking the mask.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>

4 years agopanfrost: Fix the damage box clamping logic
Boris Brezillon [Fri, 31 Jan 2020 12:42:19 +0000 (13:42 +0100)]
panfrost: Fix the damage box clamping logic

When the rendering are is not covering the whole FBO, and the biggest
damage rect is empty, we can have damage.max{x,y} > damage.min{x,y},
which leads to invalid reload boxes.

Fixes: 65ae86b85422 ("panfrost: Add support for KHR_partial_update()")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agopan/midgard: Stop leaking instruction objects in mir_schedule_alu()
Boris Brezillon [Fri, 31 Jan 2020 09:46:04 +0000 (10:46 +0100)]
pan/midgard: Stop leaking instruction objects in mir_schedule_alu()

Allocate those instructions with ralloc() instead of using mem_dup.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agopan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()
Boris Brezillon [Fri, 31 Jan 2020 09:41:35 +0000 (10:41 +0100)]
pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()

There's a writeout bool storing the result of this test. Use it instead
of duplicating the test.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agopan/midgard: Lower bitfield extract to shifts
Boris Brezillon [Fri, 31 Jan 2020 08:25:07 +0000 (09:25 +0100)]
pan/midgard: Lower bitfield extract to shifts

Let's lower bitfield extract to shifts until we figure out if it can be
natively supported.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agopan/midgard: Make sure we pass the right RT id to emit_fragment_store()
Boris Brezillon [Fri, 31 Jan 2020 08:22:50 +0000 (09:22 +0100)]
pan/midgard: Make sure we pass the right RT id to emit_fragment_store()

nir_intrinsic_base() is assigned nir_variable.data.driver_location,
which is assigned a unique ID based on the variable position in the
shader variable list. There's no guarantee that this position will
match the RT id we want to pass to emit_fragment_store().

Add a search_var() helper to retrieve a nir_variable based on its driver
location, so we can pass the right RT value to emit_fragment_store().

We also make sure the shader output is color, since emit_fragment_store()
is not ready for depth/stencil stores yet.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agopan/midgard: Add an enum to describe the render targets
Boris Brezillon [Fri, 31 Jan 2020 07:58:22 +0000 (08:58 +0100)]
pan/midgard: Add an enum to describe the render targets

We are about to add a special ZS render target, let's add a enum so we
can easily know which render target we're dealing with.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

4 years agoutil/os_socket: Include unistd.h to fix build error
Bernd Kuhls [Fri, 31 Jan 2020 17:48:06 +0000 (18:48 +0100)]
util/os_socket: Include unistd.h to fix build error

Fixes

In file included from ../src/util/os_socket.c:8:
../src/util/os_socket.h:26:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
 ssize_t os_socket_recv(int socket, void *buffer, size_t length, int flags);

seen with gcc version 8.3.0 (Buildroot 2019.11) and uClibc 1.0.32.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Fixes: ef5266ebd50e7fa65c56 ("util/os_socket: Add socket related functions.")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3659>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3659>

4 years agogitlab-ci: disable a630 tests as mesa-cheza is down
Eric Engestrom [Mon, 3 Feb 2020 09:58:41 +0000 (09:58 +0000)]
gitlab-ci: disable a630 tests as mesa-cheza is down

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3677>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3677>

4 years agonv50: report max lod bias of 15.0
Ilia Mirkin [Sun, 2 Feb 2020 00:48:07 +0000 (19:48 -0500)]
nv50: report max lod bias of 15.0

The blob returns 15, the state creation code clamps it to 15, but since
the dawn of time we've returned 4.0. Setting this to 15 also fixes

GTF-GL33.gtf21.GL3Tests.texture_lod_bias.texture_lod_bias_clamp_m_le_M

which is sensitive to these limits.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
4 years agoegl: put full path to libEGL_mesa.so in GLVND json
Eric Engestrom [Fri, 6 Dec 2019 16:17:12 +0000 (16:17 +0000)]
egl: put full path to libEGL_mesa.so in GLVND json

This is useful when installing to a non-standard path.

glvnd_icd.py copied & adapted from src/intel/vulkan/anv_icd.py

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3038>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3038>

4 years agoradv: Allow non-dedicated linear images and buffer.
Bas Nieuwenhuizen [Mon, 27 Jan 2020 15:50:23 +0000 (16:50 +0100)]
radv: Allow non-dedicated linear images and buffer.

Requested for virtualized Vulkan as they need to export memory to
map it.

Since radeonsi and the kernel assume an image without metadata is
linear, this should work just fine.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3583>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3583>

4 years agopan/midgard: Implement mixed-type constant packing
Alyssa Rosenzweig [Fri, 31 Jan 2020 13:11:44 +0000 (08:11 -0500)]
pan/midgard: Implement mixed-type constant packing

Lot of churn but mostly just specializes types per source instead of per
instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3653>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3653>

4 years agopan/midgard: Break out one-src read_components
Alyssa Rosenzweig [Fri, 31 Jan 2020 13:11:13 +0000 (08:11 -0500)]
pan/midgard: Break out one-src read_components

For constant packing, this is interesting to break down further.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3653>

4 years agopanfrost: Fix non-debug builds
Icecream95 [Sat, 1 Feb 2020 00:50:35 +0000 (13:50 +1300)]
panfrost: Fix non-debug builds

For non-debug builds, where assertions are compiled out, GCC complains
about the end of the non-void function panfrost_translate_channel_width
being reached.

Fixes: 226c1efe9a8 ("panfrost: Add more info to some assertions")
Reported-by: Piotr Oniszczuk
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3665>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3665>

4 years agoanv/blorp: Use the correct size for vkCmdCopyBufferToImage
Jason Ekstrand [Fri, 31 Jan 2020 22:08:31 +0000 (16:08 -0600)]
anv/blorp: Use the correct size for vkCmdCopyBufferToImage

Now that we're using an uncompressed format for the buffer, we have to
scale down the dimensions we pass into BLORP when doing buffer->image
copies.

Fixes: dd92179a72 "anv: Canonicalize buffer formats for image/buffer..."
Closes: #2452
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3664>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3664>

4 years agoVERSION: bump after 20.0 branch point
Eric Engestrom [Sun, 2 Feb 2020 06:54:14 +0000 (06:54 +0000)]
VERSION: bump after 20.0 branch point

Closes: #2457

4 years agolima: Fix build with GCC 10.
Vinson Lee [Fri, 31 Jan 2020 06:19:32 +0000 (22:19 -0800)]
lima: Fix build with GCC 10.

This patch fixes this build error with GCC 10.

/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_context.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_resource.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_draw.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_bo.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_submit.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_util.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here
/usr/bin/ld: src/gallium/drivers/lima/liblima.a(lima_texture.c.o):src/gallium/drivers/lima/lima_util.h:32: multiple definition of `lima_dump_command_stream'; src/gallium/drivers/lima/liblima.a(lima_screen.c.o):src/gallium/drivers/lima/lima_util.h:32: first defined here

Fixes: d71cd245d744 ("lima: Rotate dump files after each finished pp frame")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
4 years agofreedreno/ir3: fix a dirty lie
Rob Clark [Mon, 27 Jan 2020 16:35:20 +0000 (08:35 -0800)]
freedreno/ir3: fix a dirty lie

Lies, damn lies, and leftover hacks!

We no longer hard-code these two, so fix the disasm to print the correct
values.

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

4 years agofreedreno/ir3: simplify split from collect
Rob Clark [Mon, 27 Jan 2020 16:29:35 +0000 (08:29 -0800)]
freedreno/ir3: simplify split from collect

In some cases we need to split components out from what was already a
collect.  That was making it hard to DCE unused components of the
collect.  (Ie. unused components of fragcoord, etc)

So just detect this case and skip the chained collect+split.

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

4 years agofreedreno/ir3: create fragcoord instructions in input block
Rob Clark [Mon, 27 Jan 2020 16:26:04 +0000 (08:26 -0800)]
freedreno/ir3: create fragcoord instructions in input block

This was somehow working to create the instructions in a random block,
and use the value in other blocks, by dumb luck.  But two-pass-RA's
better choice of register assignment causes a couple dEQPs to start
failing without this fix:

dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_1
dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_2

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

4 years agofreedreno/ir3: remove unused tex arg harder
Rob Clark [Fri, 24 Jan 2020 00:45:29 +0000 (16:45 -0800)]
freedreno/ir3: remove unused tex arg harder

Just killing the SSA link isn't enough.  It confuses RA, legalize,
and postsched to see a bogus unused reg.

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

4 years agofreedreno/ir3: add RA sanity check
Rob Clark [Wed, 15 Jan 2020 22:52:43 +0000 (14:52 -0800)]
freedreno/ir3: add RA sanity check

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

4 years agofreedreno/a6xx: fix lrz overflow
Rob Clark [Sun, 12 Jan 2020 01:30:24 +0000 (17:30 -0800)]
freedreno/a6xx: fix lrz overflow

Running the complete deqp_gles2 seems to trigger an overflow in lrz
cmdstream.  We skip the blit clear fast-path if there have been any
draws (so mid-batch clears of any attached buffer hit the 3d pipe).
Which means it is safe to simply discard any lrz clear rendering.

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

4 years agofreedreno/ir3: two pass register allocation
Rob Clark [Tue, 22 Oct 2019 21:00:09 +0000 (14:00 -0700)]
freedreno/ir3: two pass register allocation

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

4 years agofreedreno/ir3: don't precolor unused inputs
Rob Clark [Sat, 18 Jan 2020 21:44:26 +0000 (13:44 -0800)]
freedreno/ir3: don't precolor unused inputs

This apparently can happen with gs/tess.  And will cause problems with
two-pass-ra, so lets just skip them.

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

4 years agofreedreno/ir3: add is_tex_or_prefetch()
Rob Clark [Sat, 18 Jan 2020 19:03:38 +0000 (11:03 -0800)]
freedreno/ir3: add is_tex_or_prefetch()

Some of the aspects of tex prefetch are in common with normal tex
instructions, such as having a wrmask to control which components
are written.  Add a helper for this.

This should result in actually using the prefetch wrmask to avoid
fetching unneeded components.

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

4 years agofreedreno/ir3: number instructions from one
Rob Clark [Wed, 15 Jan 2020 22:23:23 +0000 (14:23 -0800)]
freedreno/ir3: number instructions from one

ra_block_compute_live_ranges() treats zero as "not yet defined", so
probably best to not let this be a valid instruction #

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

4 years agofreedreno/ir3: post-RA sched pass
Rob Clark [Fri, 13 Dec 2019 22:09:39 +0000 (14:09 -0800)]
freedreno/ir3: post-RA sched pass

After RA, we can schedule to increase parallelism (reduce nop's) without
worrying about increasing register pressure.  This pass lets us cut down
the instruction count ~10%, and prioritize bary.f, kill, etc, which
would tend to increase register pressure if we tried to do that before
RA.

It should be more useful if RA round-robin'd register choices.

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

4 years agofreedreno/ir3: fix kill scheduling
Rob Clark [Thu, 23 Jan 2020 18:26:27 +0000 (10:26 -0800)]
freedreno/ir3: fix kill scheduling

kill (and other cat0/flow instructions) do not have a dst register.
Which was mostly harmless before, other than RA thinking it would need
a free register to write.  (But nothing consumed it, so the value would
be immediately dead.)  But this would cause more problems with postsched
which would see a bogus dependency.

Also, post-RA sched *does* need to see the dependency on the predicate
register.

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

4 years agofreedreno/ir3/ra: make use()/def() functions instead of macros
Rob Clark [Tue, 22 Oct 2019 23:05:41 +0000 (16:05 -0700)]
freedreno/ir3/ra: make use()/def() functions instead of macros

Originally these were nested functions, which worked nicely, giving us
the function of a local macro that was actual 'c' syntax (ie. not token
pasted macro).  But these were converted to macros because clang doesn't
let us have nice gcc extensions.

Extract these back out into functions, before adding more things and
making the macros even more cumbersome.

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

4 years agofreedreno/ir3: a bit more optmsgs debug
Rob Clark [Thu, 19 Dec 2019 21:58:32 +0000 (13:58 -0800)]
freedreno/ir3: a bit more optmsgs debug

Also dump where arrays are allocated.  This was useful for debugging.

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

4 years agofreedreno/ir3: move atomic fixup after RA
Rob Clark [Fri, 10 Jan 2020 22:07:03 +0000 (14:07 -0800)]
freedreno/ir3: move atomic fixup after RA

A post-RA sched pass will move the extra mov's to the wrong place, so
rework the fixup so it can run after RA (and therefore after postsched)

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

4 years agofreedreno/ir3: move block-scheduling into legalize
Rob Clark [Wed, 18 Dec 2019 22:04:36 +0000 (14:04 -0800)]
freedreno/ir3: move block-scheduling into legalize

We want to do this only once.  If we have post-RA sched pass, then we
don't want to do it pre-RA.  Since legalize is where we resolve the
branch/jumps, we might as well move this into legalize.

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

4 years agofreedreno/ir3: move nop padding to legalize
Rob Clark [Wed, 18 Dec 2019 19:57:41 +0000 (11:57 -0800)]
freedreno/ir3: move nop padding to legalize

This way we can deal with it in one place, *after* all the blocks have
been scheduled.  Which will simplify life for a post-RA sched pass.

This has the benefit of already taking into account nop's that legalize
has to insert for non-delay related reasons.

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

4 years agofreedreno/ir3: split out delay helpers
Rob Clark [Wed, 18 Dec 2019 19:10:12 +0000 (11:10 -0800)]
freedreno/ir3: split out delay helpers

We're going to want these also for a post-RA sched pass.  And also to
split nop stuffing out into it's own pass.

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

4 years agofreedreno/ir3: fix crash when no non-input instructions
Rob Clark [Thu, 19 Dec 2019 17:48:39 +0000 (09:48 -0800)]
freedreno/ir3: fix crash when no non-input instructions

This scenario can come up with block-sched and nop-sched moved to after
RA.  So lets fix it first to keep things bisectable.

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

4 years agofreedreno/ir3: cleanup after lower_locals_to_regs
Rob Clark [Tue, 17 Dec 2019 19:57:14 +0000 (11:57 -0800)]
freedreno/ir3: cleanup after lower_locals_to_regs

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

4 years agofreedreno/ir3: shuffle a few ir3_register fields
Rob Clark [Tue, 17 Dec 2019 17:09:16 +0000 (09:09 -0800)]
freedreno/ir3: shuffle a few ir3_register fields

It makes life easier for postsched to always be able to rely on wrmask.

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

4 years agointel/gen12+: Set way_size_per_bank to 4
Anuj Phogat [Sat, 5 Jan 2019 00:06:04 +0000 (16:06 -0800)]
intel/gen12+: Set way_size_per_bank to 4

This patch fixes the way_size_per_bank for Gen12+

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Sagar Ghuge<sagar.ghuge@intel.com>
4 years agointel/gen12+: Reserve 4KB of URB space per bank for Compute Engine
Anuj Phogat [Fri, 31 Jan 2020 17:31:29 +0000 (09:31 -0800)]
intel/gen12+: Reserve 4KB of URB space per bank for Compute Engine

This patch is required to fix 11K+ vulkan CTS failures we were
getting with way_size_per_bank of 4 (see next patch).

Thanks to Sagar Ghuge and Jordan Justen for all the hard work of
debugging and testing.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Sagar Ghuge<sagar.ghuge@intel.com>
4 years agovirgl: Use align_free for align_malloc allocated buffer
Szymon Andrzejuk [Mon, 13 Jan 2020 12:01:58 +0000 (13:01 +0100)]
virgl: Use align_free for align_malloc allocated buffer

Signed-off-by: Szymon Andrzejuk <s.andrzejuk@samsung.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agofreedreno/drm: readonly cmdstream
Rob Clark [Fri, 31 Jan 2020 21:01:52 +0000 (13:01 -0800)]
freedreno/drm: readonly cmdstream

Noticed that we weren't consistently making cmdstream buffers
gpu-readonly.  Fix that and drop the need to pass flags to
fd_bo_new_ring().

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

4 years agointel/fs: Write the address register with NoMask for MOV_INDIRECT
Jason Ekstrand [Thu, 30 Jan 2020 17:34:51 +0000 (11:34 -0600)]
intel/fs: Write the address register with NoMask for MOV_INDIRECT

This fixes a hang in the following Vulkan CTS test on TGL-LP:

    dEQP-VK.descriptor_indexing.storage_buffer_dynamic_in_loop

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3642>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3642>

4 years agointel/tools: Handle strides better when dumping buffers
Jason Ekstrand [Thu, 30 Jan 2020 17:35:52 +0000 (11:35 -0600)]
intel/tools: Handle strides better when dumping buffers

The old code would only break at stride boundaries if the stride was
less than 32B; otherwise it would just break every 32B.  This commit
makes it break at stride boundaries and 32B boundaries (starting from
the last stride).  This makes reading large vertex buffers in aubinator
much nicer.

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

4 years agointel/disasm: SEND has two sources on Gen12+
Jason Ekstrand [Wed, 29 Jan 2020 22:20:23 +0000 (16:20 -0600)]
intel/disasm: SEND has two sources on Gen12+

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3642>

4 years agointel/eu/validate: Don't validate regions of sends
Jason Ekstrand [Wed, 29 Jan 2020 22:23:25 +0000 (16:23 -0600)]
intel/eu/validate: Don't validate regions of sends

Otherwise, the validator tries to read the type of src1 of a SEND/SENDS
which doesn't actually have a type field.  This prevents validation
issues in the next commit.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3642>

4 years agoaco: fix image_atomic_cmp_swap
Daniel Schürmann [Fri, 31 Jan 2020 09:41:39 +0000 (10:41 +0100)]
aco: fix image_atomic_cmp_swap

Fixes: 71440ba0f5512fe455be66ca48b253ecc37478a9 ('aco: reorder VMEM operands in ACO IR')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3652>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3652>

4 years agoaco: fix MUBUF VS input loads when expanding vec3 to vec4 on GFX6
Samuel Pitoiset [Fri, 31 Jan 2020 07:23:02 +0000 (08:23 +0100)]
aco: fix MUBUF VS input loads when expanding vec3 to vec4 on GFX6

When some unused channels are skipped and that we expand vec3 loads
to vec4 loads, we have to adjust the fourth component.

While we are at it, add an assertion to make sure we don't use
MUBUF for vec3 loads on GFX6.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2450
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2442
Fixes: 6aecc316 ("aco: fix VS input loads with MUBUF on GFX6")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3641>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3641>

4 years agogallium/swr: Fix gcc 4.8.5 compile error
Krzysztof Raszkowski [Thu, 30 Jan 2020 16:25:58 +0000 (17:25 +0100)]
gallium/swr: Fix gcc 4.8.5 compile error

Stop using C++14 feature so it can be compile on default centos7
gcc compiler.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3640>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3640>

4 years agoswr: Fix build with GCC 10.
Vinson Lee [Fri, 31 Jan 2020 04:48:26 +0000 (20:48 -0800)]
swr: Fix build with GCC 10.

GCC 10 added _mm256_storeu2_m128i.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91341

This patch fixes this build error with GCC 10.

In file included from src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.cpp:39:
../src/gallium/drivers/swr/rasterizer/common/os.h:178:20: error: ‘void _mm256_storeu2_m128i(__m128i*, __m128i*, __m256i)’ redeclared inline without ‘gnu_inline’ attribute
  178 | static INLINE void _mm256_storeu2_m128i(__m128i* hi, __m128i* lo, __m256i a)
      |                    ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/10/include/immintrin.h:51,
                 from /usr/lib/gcc/x86_64-redhat-linux/10/include/x86intrin.h:32,
                 from ../src/gallium/drivers/swr/rasterizer/common/os.h:107,
                 from src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.cpp:39:
/usr/lib/gcc/x86_64-redhat-linux/10/include/avxintrin.h:1580:1: note: ‘void _mm256_storeu2_m128i(__m128i_u*, __m128i_u*, __m256i)’ previously defined here
 1580 | _mm256_storeu2_m128i (__m128i_u *__PH, __m128i_u *__PL, __m256i __A)
      | ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3650>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3650>

4 years agogallium/swr: fix gcc warnings
Krzysztof Raszkowski [Wed, 29 Jan 2020 15:46:04 +0000 (16:46 +0100)]
gallium/swr: fix gcc warnings

Few changes to make gcc happy.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3629>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3629>

4 years agozink: implement support for derivative-control
Erik Faye-Lund [Thu, 30 Jan 2020 15:50:59 +0000 (16:50 +0100)]
zink: implement support for derivative-control

Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3645>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3645>

4 years agozink: implement load_instance_id
Erik Faye-Lund [Thu, 30 Jan 2020 19:35:04 +0000 (20:35 +0100)]
zink: implement load_instance_id

Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3644>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3644>

4 years agozink: enable texture-buffer objects
Erik Faye-Lund [Thu, 30 Jan 2020 22:15:51 +0000 (23:15 +0100)]
zink: enable texture-buffer objects

This seems to work as-is, and just need enabling. There's a few piglit
failures, but those seems to be problems with the tests, where they
don't handle lacking GL3-support.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3647>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3647>

4 years agoradeonsi: Add support for midstream bitrate change in encoder
Zhang, Boyuan [Wed, 4 Dec 2019 14:16:29 +0000 (14:16 +0000)]
radeonsi: Add support for midstream bitrate change in encoder

BACKPORT: Remove |picture| argument from enc->begin in radeon_vcn_enc.c

Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3426>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3426>

4 years agopanfrost: Use DBG macro to avoid noise in the console
Tomeu Vizoso [Mon, 6 Jan 2020 09:48:20 +0000 (10:48 +0100)]
panfrost: Use DBG macro to avoid noise in the console

It pollutes the output of programs that use Panfrost and can confuse its
callers, such as test runners.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>

4 years agopan/midgard: Handle nir_intrinsic_load_barycentric_centroid
Tomeu Vizoso [Fri, 3 Jan 2020 08:42:11 +0000 (09:42 +0100)]
pan/midgard: Handle nir_intrinsic_load_barycentric_centroid

To avoid hitting the assert in the default case, add a nop for this
intrinsic.

dEQP-GLES3.functional.transform_feedback.random.interleaved.lines.3

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>

4 years agopanfrost: Add more info to some assertions
Tomeu Vizoso [Thu, 19 Dec 2019 14:07:39 +0000 (15:07 +0100)]
panfrost: Add more info to some assertions

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>

4 years agopanfrost: Print intended field when decoding
Tomeu Vizoso [Thu, 19 Dec 2019 13:02:54 +0000 (14:02 +0100)]
panfrost: Print intended field when decoding

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>

4 years agoanv: Always fill out the AUX table even if CCS is disabled
Jason Ekstrand [Mon, 27 Jan 2020 19:13:20 +0000 (13:13 -0600)]
anv: Always fill out the AUX table even if CCS is disabled

Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agoiris: Plumb deref block size through to 3DSTATE_SF
Jason Ekstrand [Fri, 17 Jan 2020 20:41:50 +0000 (14:41 -0600)]
iris: Plumb deref block size through to 3DSTATE_SF

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

4 years agoanv: Plumb deref block size through to 3DSTATE_SF
Jason Ekstrand [Fri, 17 Jan 2020 20:14:03 +0000 (14:14 -0600)]
anv: Plumb deref block size through to 3DSTATE_SF

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

4 years agointel/blorp: Plumb deref block size through to 3DSTATE_SF
Jason Ekstrand [Fri, 17 Jan 2020 20:13:28 +0000 (14:13 -0600)]
intel/blorp: Plumb deref block size through to 3DSTATE_SF

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

4 years agointel/common: Return the block size from get_urb_config
Jason Ekstrand [Fri, 17 Jan 2020 20:10:40 +0000 (14:10 -0600)]
intel/common: Return the block size from get_urb_config

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

4 years agoanv: Emit URB setup earlier
Jason Ekstrand [Thu, 16 Jan 2020 23:05:10 +0000 (17:05 -0600)]
anv: Emit URB setup earlier

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

4 years agoiris: Consolodate URB emit
Jason Ekstrand [Fri, 17 Jan 2020 19:38:52 +0000 (13:38 -0600)]
iris: Consolodate URB emit

Now that we don't have to carry a URB state emit function for BLORP we
can roll some stuff together and drop a genX helper.

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

4 years agointel/blorp: Always emit URB config on Gen7+
Jason Ekstrand [Fri, 17 Jan 2020 18:09:13 +0000 (12:09 -0600)]
intel/blorp: Always emit URB config on Gen7+

Previously, i965/iris tried to reuse the currently programmed URB config
if it was good enough for BLORP, rather than reprogramming it each time.
However, this will make some things harder on Gen12+ and we've not seen
any performance impact from emitting URB more frequently in ANV.

This makes the blorp <-> driver interface a bit simpler on Gen7+ because
now all the driver has to do is to provide the L3$ config rather than
trying to hand off URB re-config to blorp.

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

4 years agointel: Take a gen_l3_config in gen_get_urb_config
Jason Ekstrand [Thu, 16 Jan 2020 23:02:26 +0000 (17:02 -0600)]
intel: Take a gen_l3_config in gen_get_urb_config

Instead of making each driver pass in the same push constant size and do
it's own L3$ config URB size calculation, just make them pass in their
L3$ configuration.

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

4 years agoi965: Re-emit l3 state before BLORP executes
Jason Ekstrand [Fri, 17 Jan 2020 19:30:48 +0000 (13:30 -0600)]
i965: Re-emit l3 state before BLORP executes

If BLORP is the first thing to execute, we may not have set the L3$
config yet.  That's not normally a problem but we're about to add code
to BLORP which will look at brw_context::l3::config and we'd like that
to be initialized.  It's also just good practice.

Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agoiris: Use the URB size from the L3$ config
Jason Ekstrand [Fri, 17 Jan 2020 20:22:58 +0000 (14:22 -0600)]
iris: Use the URB size from the L3$ config

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

4 years agoiris: Store the L3$ configs in the screen
Jason Ekstrand [Fri, 17 Jan 2020 17:37:31 +0000 (11:37 -0600)]
iris: Store the L3$ configs in the screen

We only calculate them based on device info and never change them so
this seems like a reasonable place to put them.  We could also put them
in the context, but that's not accessible from iris_init_*_context.

Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agoiris: Set SLMEnable based on the L3$ config
Jason Ekstrand [Fri, 17 Jan 2020 17:36:52 +0000 (11:36 -0600)]
iris: Set SLMEnable based on the L3$ config

Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agointel/genxml: Drop SLMEnable from L3CNTLREG on Gen11
Jason Ekstrand [Fri, 17 Jan 2020 17:23:14 +0000 (11:23 -0600)]
intel/genxml: Drop SLMEnable from L3CNTLREG on Gen11

SML is no longer in the L3$ on Gen11+.  It's not incredibly clear from
the docs but no Gen11 platforms are in the list of platforms on which
this bit exists.  Also, we've been always setting it false on Gen11 in
ANV and i965 thanks to GEN_L3P_SLM being zero with no ill effects.

Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agoanv,iris: Set 3DSTATE_SF::DerefBlockSize to per-poly on Gen12+
Jason Ekstrand [Thu, 16 Jan 2020 23:59:43 +0000 (17:59 -0600)]
anv,iris: Set 3DSTATE_SF::DerefBlockSize to per-poly on Gen12+

According to the BSpec, this should prevent hangs when using shaders
with large URB entries.  A more precise fix can be done but it requires
re-arranging URB setup.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agogenxml: Add a new 3DSTATE_SF field on gen12
Jason Ekstrand [Thu, 16 Jan 2020 23:54:49 +0000 (17:54 -0600)]
genxml: Add a new 3DSTATE_SF field on gen12

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

4 years agodocs/release-calendar: 20.0.0-rc1 has been released
Dylan Baker [Thu, 30 Jan 2020 22:43:17 +0000 (14:43 -0800)]
docs/release-calendar: 20.0.0-rc1 has been released

4 years agoturnip: Fix vkCmdCopyQueryPoolResults with available flag
Brian Ho [Fri, 24 Jan 2020 23:04:50 +0000 (18:04 -0500)]
turnip: Fix vkCmdCopyQueryPoolResults with available flag

Previously, calling vkCmdCopyQueryPoolResults with the
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT flag set the query result
field in the buffer to 0 if unavailable and the query result if
available. This was a misunderstanding of the Vulkan spec, and this
commit corrects the behavior to emitting a separate available
result in addition to the query result.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>

4 years agoturnip: Fix vkGetQueryPoolResults with available flag
Brian Ho [Fri, 24 Jan 2020 21:39:47 +0000 (16:39 -0500)]
turnip: Fix vkGetQueryPoolResults with available flag

Previously, calling vkGetQueryPoolResults with the
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT flag set the query result
field in *pData to 0 if unavailable and the query result if
available. This was a misunderstanding of the Vulkan spec, and this
commit corrects the behavior to eriting a separate available result
in addition to the query result.

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

4 years agoturnip: Free event->bo on vkDestroyEvent
Brian Ho [Thu, 30 Jan 2020 16:02:29 +0000 (11:02 -0500)]
turnip: Free event->bo on vkDestroyEvent

Fixes a leak from freeing event but not event->bo.

Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3639>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3639>

4 years agoloader: Fix leak of kernel driver name
Kenneth Graunke [Wed, 29 Jan 2020 15:50:16 +0000 (07:50 -0800)]
loader: Fix leak of kernel driver name

This is strdup'd, it needs to be freed.

CID: 1458032
Fixes: f93bb2fb102 ("loader: Check if the kernel driver is i915 before loading iris")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3630>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3630>

4 years agodocs: Update SWR tessellation support
Jan Zielinski [Thu, 30 Jan 2020 08:34:55 +0000 (09:34 +0100)]
docs: Update SWR tessellation support

Update features.txt to reflect ARB_tessellation_shader
support in SWR

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3636>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3636>

4 years agoi965: Use brw_batch_references in tex_busy check
Kenneth Graunke [Wed, 29 Jan 2020 08:22:02 +0000 (00:22 -0800)]
i965: Use brw_batch_references in tex_busy check

If the batch references the buffer, we will have to flush the batch
immediately before mapping it, at which point it will be busy.

(This bug has existed for a long time...even going back to BLT-era...)

Fixes: 779923194c6 ("i965/tex_image: Use meta for instead of the blitter PBO TexImage and GetTexImage")
Fixes: d5d4ba9139a ("i965/tex_subimage: use meta instead of the blitter for PBO TexSubImage")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3616>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3616>

4 years agoetnaviv: drm-shim: add GC400
Christian Gmeiner [Sat, 21 Dec 2019 19:54:29 +0000 (20:54 +0100)]
etnaviv: drm-shim: add GC400

These are the ETNAVIV_PARAM's returned from a GC400 found on a
STM32MP157C-DK2 Discovery Board running mainline kernel.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195>

4 years agolima: add noheap debug option
Qiang Yu [Wed, 15 Jan 2020 10:00:19 +0000 (18:00 +0800)]
lima: add noheap debug option

Disable using heap buffer when set.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>

4 years agolima: create heap buffer with new interface if available
Qiang Yu [Wed, 1 Jan 2020 12:25:45 +0000 (20:25 +0800)]
lima: create heap buffer with new interface if available

Newly added heap buffer create interface can create a
large enough buffer whose backup memory can increase
dynamically as needed.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>

4 years agolima: sync lima_drm.h with kernel
Qiang Yu [Tue, 31 Dec 2019 06:55:35 +0000 (14:55 +0800)]
lima: sync lima_drm.h with kernel

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>

4 years agolima: fix lima_set_vertex_buffers()
Icenowy Zheng [Wed, 29 Jan 2020 12:45:22 +0000 (20:45 +0800)]
lima: fix lima_set_vertex_buffers()

When setting the vertex buffers, lima calls
util_set_vertex_buffers_mask() to reference and copy buffers. That
function
function adds dst with start_slot internally, so lima should not offset
the destination address again.

This is discovered when comparing with other drivers, and fixed by
removing the extra offset in lima_set_vertex_buffers().

This fixes draws that get translated in u_vbuf, because u_vbuf adds
extra vertex buffers when translating.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3620>

4 years agoturnip: hook up cmdbuffer event set/wait
Jonathan Marek [Mon, 16 Dec 2019 15:56:54 +0000 (10:56 -0500)]
turnip: hook up cmdbuffer event set/wait

Gets some basic tests under "dEQP-VK.synchronization.*event*" passing

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3123>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3123>

4 years agoetnaviv: drop default state for PE_STENCIL_CONFIG_EXT2
Christian Gmeiner [Wed, 29 Jan 2020 22:06:35 +0000 (23:06 +0100)]
etnaviv: drop default state for PE_STENCIL_CONFIG_EXT2

It gets emitted when needed.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3631>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3631>

4 years agodocs: add new features for RADV/ACO.
Daniel Schürmann [Wed, 29 Jan 2020 14:30:25 +0000 (15:30 +0100)]
docs: add new features for RADV/ACO.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3627>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3627>

4 years agoradv: refactor physical device properties
Samuel Pitoiset [Wed, 29 Jan 2020 14:02:26 +0000 (15:02 +0100)]
radv: refactor physical device properties

Based on ANV. This removes a bunch of duplicated code for properties.

Fixes: 1b8d99e2885 ("radv: bump conformance version to 1.2.0.0")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3626>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3626>

4 years agofreedreno: remove flush-queue
Rob Clark [Wed, 22 Jan 2020 00:15:28 +0000 (16:15 -0800)]
freedreno: remove flush-queue

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

4 years agofreedreno: add gmem_lock
Rob Clark [Tue, 21 Jan 2020 23:59:22 +0000 (15:59 -0800)]
freedreno: add gmem_lock

The gmem state is split out now, so it does not require synchronization.
But gmem rendering still accesses vsc state from the context.

TODO maybe there is a better way?  For gen's that don't do vsc resizing,
this is probably easier.. but for a6xx there isn't really a great
position for more fine grained locking.  Maybe it doesn't matter since
in practice the lock shouldn't be contended.

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

4 years agofreedreno: add gmem state cache
Rob Clark [Tue, 21 Jan 2020 22:28:06 +0000 (14:28 -0800)]
freedreno: add gmem state cache

Which also has the benefit of getting rid of fd_context::gmem.

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

4 years agofreedreno: get GMEM state from batch
Rob Clark [Tue, 21 Jan 2020 19:27:14 +0000 (11:27 -0800)]
freedreno: get GMEM state from batch

Prep work to reduce churn in next patch.

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

4 years agofreedreno/a2xx: constify gmem state
Rob Clark [Sat, 25 Jan 2020 19:18:32 +0000 (11:18 -0800)]
freedreno/a2xx: constify gmem state

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

4 years agofreedreno/a3xx: constify gmem state
Rob Clark [Sat, 25 Jan 2020 19:17:43 +0000 (11:17 -0800)]
freedreno/a3xx: constify gmem state

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