mesa.git
4 years ago.mailmap: add an alias for Renato Caldas
Erik Faye-Lund [Fri, 17 Aug 2018 09:34:10 +0000 (11:34 +0200)]
.mailmap: add an alias for Renato Caldas

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

4 years ago.mailmap: specify spelling for Randy Xu
Erik Faye-Lund [Mon, 16 Sep 2019 18:05:21 +0000 (20:05 +0200)]
.mailmap: specify spelling for Randy Xu

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

4 years ago.mailmap: add an alias for Qiang Yu
Erik Faye-Lund [Mon, 16 Sep 2019 17:46:47 +0000 (19:46 +0200)]
.mailmap: add an alias for Qiang Yu

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

4 years ago.mailmap: add an alias for Plamena Manolova
Erik Faye-Lund [Mon, 16 Sep 2019 17:45:47 +0000 (19:45 +0200)]
.mailmap: add an alias for Plamena Manolova

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

4 years ago.mailmap: update aliases for Pierre-Eric Pelloux-Prayer
Erik Faye-Lund [Mon, 16 Sep 2019 17:44:55 +0000 (19:44 +0200)]
.mailmap: update aliases for Pierre-Eric Pelloux-Prayer

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

4 years ago.mailmap: add an alias for Philipp Zabel
Erik Faye-Lund [Mon, 16 Sep 2019 17:43:41 +0000 (19:43 +0200)]
.mailmap: add an alias for Philipp Zabel

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

4 years ago.mailmap: update aliases for Nicolai Hähnle
Erik Faye-Lund [Mon, 16 Sep 2019 17:42:18 +0000 (19:42 +0200)]
.mailmap: update aliases for Nicolai Hähnle

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

4 years ago.mailmap: add an alias for Nicholas Bishop
Erik Faye-Lund [Mon, 16 Sep 2019 17:40:45 +0000 (19:40 +0200)]
.mailmap: add an alias for Nicholas Bishop

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

4 years ago.mailmap: specify spelling for Nian Wu
Erik Faye-Lund [Fri, 17 Aug 2018 09:49:02 +0000 (11:49 +0200)]
.mailmap: specify spelling for Nian Wu

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

4 years ago.mailmap: add an alias for Neil Roberts
Erik Faye-Lund [Mon, 16 Sep 2019 17:38:36 +0000 (19:38 +0200)]
.mailmap: add an alias for Neil Roberts

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

4 years ago.mailmap: add an alias for Neha Bhende
Erik Faye-Lund [Mon, 16 Sep 2019 17:37:27 +0000 (19:37 +0200)]
.mailmap: add an alias for Neha Bhende

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

4 years ago.mailmap: add alias for Matthias Groß
Erik Faye-Lund [Sun, 15 Sep 2019 14:02:28 +0000 (16:02 +0200)]
.mailmap: add alias for Matthias Groß

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

4 years ago.mailmap: update aliases for Marc-André Lureau
Erik Faye-Lund [Mon, 16 Sep 2019 17:34:04 +0000 (19:34 +0200)]
.mailmap: update aliases for Marc-André Lureau

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

4 years ago.mailmap: specify spelling for Liviu Prodea
Erik Faye-Lund [Sun, 15 Sep 2019 13:51:50 +0000 (15:51 +0200)]
.mailmap: specify spelling for Liviu Prodea

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

4 years ago.mailmap: add an alias for Lionel Landwerlin
Erik Faye-Lund [Mon, 16 Sep 2019 17:32:32 +0000 (19:32 +0200)]
.mailmap: add an alias for Lionel Landwerlin

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

4 years ago.mailmap: add a few aliases for Kristian Høgsberg
Erik Faye-Lund [Mon, 16 Sep 2019 17:31:23 +0000 (19:31 +0200)]
.mailmap: add a few aliases for Kristian Høgsberg

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

4 years ago.mailmap: add a few aliases for Kevin Rogovin
Erik Faye-Lund [Mon, 16 Sep 2019 17:30:08 +0000 (19:30 +0200)]
.mailmap: add a few aliases for Kevin Rogovin

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

4 years ago.mailmap: add a few aliases for Karol Herbst
Erik Faye-Lund [Mon, 16 Sep 2019 17:29:10 +0000 (19:29 +0200)]
.mailmap: add a few aliases for Karol Herbst

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

4 years ago.mailmap: add an alias for Julien Isorce
Erik Faye-Lund [Mon, 16 Sep 2019 17:27:44 +0000 (19:27 +0200)]
.mailmap: add an alias for Julien Isorce

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

4 years ago.mailmap: clean up aliases for Jeremy Huddleston
Erik Faye-Lund [Sun, 15 Sep 2019 14:40:27 +0000 (16:40 +0200)]
.mailmap: clean up aliases for Jeremy Huddleston

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

4 years ago.mailmap: add an alias for Jan Beich
Erik Faye-Lund [Mon, 16 Sep 2019 17:26:07 +0000 (19:26 +0200)]
.mailmap: add an alias for Jan Beich

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

4 years ago.mailmap: specify spelling for James Zhu
Erik Faye-Lund [Tue, 17 Sep 2019 09:16:53 +0000 (11:16 +0200)]
.mailmap: specify spelling for James Zhu

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

4 years ago.mailmap: add an alias for Illia Iorin
Erik Faye-Lund [Mon, 16 Sep 2019 17:23:28 +0000 (19:23 +0200)]
.mailmap: add an alias for Illia Iorin

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

4 years ago.mailmap: add an alias for Igor Gnatenko
Erik Faye-Lund [Mon, 16 Sep 2019 17:22:26 +0000 (19:22 +0200)]
.mailmap: add an alias for Igor Gnatenko

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

4 years ago.mailmap: specify spelling for Henri Verbeet
Erik Faye-Lund [Tue, 27 Nov 2018 10:59:07 +0000 (11:59 +0100)]
.mailmap: specify spelling for Henri Verbeet

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

4 years ago.mailmap: specify spelling for Heinrich Fink
Erik Faye-Lund [Mon, 16 Sep 2019 17:20:58 +0000 (19:20 +0200)]
.mailmap: specify spelling for Heinrich Fink

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

4 years ago.mailmap: add an alias for Harish Krupo
Erik Faye-Lund [Mon, 16 Sep 2019 17:19:49 +0000 (19:19 +0200)]
.mailmap: add an alias for Harish Krupo

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

4 years ago.mailmap: add an alias for Haihao Xiang
Erik Faye-Lund [Fri, 17 Aug 2018 09:39:30 +0000 (11:39 +0200)]
.mailmap: add an alias for Haihao Xiang

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

4 years ago.mailmap: specify spelling for Gurchetan Singh
Erik Faye-Lund [Mon, 16 Sep 2019 18:13:08 +0000 (20:13 +0200)]
.mailmap: specify spelling for Gurchetan Singh

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

4 years ago.mailmap: specify spelling for Francesco Ansanelli
Erik Faye-Lund [Mon, 16 Sep 2019 18:11:05 +0000 (20:11 +0200)]
.mailmap: specify spelling for Francesco Ansanelli

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

4 years ago.mailmap: add an alias for Erik Faye-Lund
Erik Faye-Lund [Mon, 16 Sep 2019 17:15:31 +0000 (19:15 +0200)]
.mailmap: add an alias for Erik Faye-Lund

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

4 years ago.mailmap: add an alias for Emmanuel Gil Peyrot
Erik Faye-Lund [Mon, 16 Sep 2019 17:12:07 +0000 (19:12 +0200)]
.mailmap: add an alias for Emmanuel Gil Peyrot

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

4 years ago.mailmap: add a couple of aliases for Dylan Noblesmith
Erik Faye-Lund [Fri, 17 Aug 2018 09:19:02 +0000 (11:19 +0200)]
.mailmap: add a couple of aliases for Dylan Noblesmith

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

4 years ago.mailmap: add an alias for Dylan Baker
Erik Faye-Lund [Mon, 16 Sep 2019 17:08:08 +0000 (19:08 +0200)]
.mailmap: add an alias for Dylan Baker

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

4 years ago.mailmap: add an alias for Dave Airlie
Erik Faye-Lund [Mon, 16 Sep 2019 17:06:16 +0000 (19:06 +0200)]
.mailmap: add an alias for Dave Airlie

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

4 years ago.mailmap: add an alias for Danylo Piliaiev
Erik Faye-Lund [Mon, 16 Sep 2019 17:04:43 +0000 (19:04 +0200)]
.mailmap: add an alias for Danylo Piliaiev

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

4 years ago.mailmap: add an alias for Daniel Schürmann
Erik Faye-Lund [Mon, 16 Sep 2019 17:03:47 +0000 (19:03 +0200)]
.mailmap: add an alias for Daniel Schürmann

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

4 years ago.mailmap: add an alias for Craig Stout
Erik Faye-Lund [Tue, 17 Sep 2019 07:32:48 +0000 (09:32 +0200)]
.mailmap: add an alias for Craig Stout

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

4 years ago.mailmap: specify spelling for Constantine Kharlamov
Erik Faye-Lund [Mon, 16 Sep 2019 16:56:20 +0000 (18:56 +0200)]
.mailmap: specify spelling for Constantine Kharlamov

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

4 years ago.mailmap: add an alias for Colin McDonald
Erik Faye-Lund [Mon, 16 Sep 2019 16:54:23 +0000 (18:54 +0200)]
.mailmap: add an alias for Colin McDonald

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

4 years ago.mailmap: add a few aliases for Christoph Haag
Erik Faye-Lund [Mon, 16 Sep 2019 16:52:33 +0000 (18:52 +0200)]
.mailmap: add a few aliases for Christoph Haag

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

4 years ago.mailmap: add an alias for Christian Inci
Erik Faye-Lund [Mon, 16 Sep 2019 16:50:04 +0000 (18:50 +0200)]
.mailmap: add an alias for Christian Inci

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

4 years ago.mailmap: add an alias for Christian Gmeiner
Erik Faye-Lund [Mon, 16 Sep 2019 16:48:34 +0000 (18:48 +0200)]
.mailmap: add an alias for Christian Gmeiner

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

4 years ago.mailmap: add alias for Chenglei Ren
Erik Faye-Lund [Sun, 15 Sep 2019 14:00:26 +0000 (16:00 +0200)]
.mailmap: add alias for Chenglei Ren

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

4 years ago.mailmap: add a couple of aliases for Chandu Babu Namburu
Erik Faye-Lund [Mon, 16 Sep 2019 16:46:57 +0000 (18:46 +0200)]
.mailmap: add a couple of aliases for Chandu Babu Namburu

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

4 years ago.mailmap: add an alias for Chad Versace
Erik Faye-Lund [Mon, 16 Sep 2019 16:45:12 +0000 (18:45 +0200)]
.mailmap: add an alias for Chad Versace

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

4 years ago.mailmap: update aliases for Carl-Philip Hänsch
Erik Faye-Lund [Mon, 16 Sep 2019 16:43:25 +0000 (18:43 +0200)]
.mailmap: update aliases for Carl-Philip Hänsch

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

4 years ago.mailmap: add an alias for Bruce Cherniak
Erik Faye-Lund [Fri, 17 Aug 2018 09:45:49 +0000 (11:45 +0200)]
.mailmap: add an alias for Bruce Cherniak

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

4 years ago.mailmap: add an alias for Boris Brezillon
Erik Faye-Lund [Mon, 16 Sep 2019 16:40:39 +0000 (18:40 +0200)]
.mailmap: add an alias for Boris Brezillon

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

4 years ago.mailmap: add an alias for Axel Davy
Erik Faye-Lund [Mon, 16 Sep 2019 16:38:10 +0000 (18:38 +0200)]
.mailmap: add an alias for Axel Davy

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

4 years ago.mailmap: add an alias for Anuj Phogat
Erik Faye-Lund [Mon, 16 Sep 2019 16:36:46 +0000 (18:36 +0200)]
.mailmap: add an alias for Anuj Phogat

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

4 years ago.mailmap: add an alias for Andrii Simiklit
Erik Faye-Lund [Mon, 16 Sep 2019 16:35:46 +0000 (18:35 +0200)]
.mailmap: add an alias for Andrii Simiklit

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

4 years ago.mailmap: add an alias for Alyssa Rosenzweig
Erik Faye-Lund [Mon, 16 Sep 2019 16:34:27 +0000 (18:34 +0200)]
.mailmap: add an alias for Alyssa Rosenzweig

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

4 years ago.mailmap: add an alias for Alan Swanson
Erik Faye-Lund [Mon, 16 Sep 2019 16:30:50 +0000 (18:30 +0200)]
.mailmap: add an alias for Alan Swanson

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

4 years agomesa/st: initialize all winsys_handle fields for memory objects
Tapani Pälli [Tue, 14 Apr 2020 09:05:46 +0000 (12:05 +0300)]
mesa/st: initialize all winsys_handle fields for memory objects

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reported-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4547>

4 years agoamd/addrlib: Use enum instead of sparse chars to identify dimensions
Michel Dänzer [Fri, 10 Apr 2020 14:01:17 +0000 (16:01 +0200)]
amd/addrlib: Use enum instead of sparse chars to identify dimensions

The enum values can be used directly as indices into arrays, simplifying
the code.

This significantly cuts down the number of CPU cycles spent inside

* Addr::V2::Gfx9Lib::HwlComputeDccAddrFromCoord:

+------------------------------------------------------------------------+
|+         +++    +                                                x x xx|
|    |_____AM____|                                                 |_A__||
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5         14.89         15.44         15.14        15.156    0.24704251
+   5          8.26          9.96          9.37         9.282     0.6262747
Difference at 95.0% confidence
-5.874 +/- 0.694294
-38.7569% +/- 4.58098%
(Student's t, pooled s = 0.476051)

* Addr::V2::CoordEq::solve:

+------------------------------------------------------------------------+
| +                                                                x     |
| + +   +   +                                       x           x  x    x|
||__MA____|                                              |______A__M____||
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5          8.11          9.59          9.21          9.02    0.55605755
+   5          4.28          5.05          4.48         4.564    0.32867917
Difference at 95.0% confidence
-4.456 +/- 0.666135
-49.4013% +/- 7.38509%
(Student's t, pooled s = 0.456744)

(The measured numbers are the percentages of samples inside the
respective function and its calles for
`perf record --call-graph=fp kitty -e false`, measured on a Lenovo
Thinkpad E595 (Picasso))

v2:
* Add missed 'coords[dim] |= bit << ord;' (Pierre-Eric Pelloux-Prayer)
* Put 'ADDR_ASSERT(dim < DIM_S);' where the code previous had
  'ADDR_ASSERT_ALWAYS()' for the s/m dimensions.
* Use 1u for BitsValid (since it's 32-bit unsigned values).
* Use parens in 'BitsValid[dim] & (1u << ord)' for clarity.

Acked-by: Marek Olšák <marek.olsak@amd.com> # v1
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4523>

4 years agogbm/dri: Propagate queryDmaBufModifiers return value
Michel Dänzer [Wed, 15 Apr 2020 16:13:54 +0000 (18:13 +0200)]
gbm/dri: Propagate queryDmaBufModifiers return value

We were treating count == 0 as the format not being supported at all,
but queryDmaBufModifiers would return false in that case.

Fixes spuriously reporting all formats as unsupported with radeonsi
(which doesn't support modifiers yet), which would e.g. cause mutter
to think the HW cursor format isn't supported and fall back to SW
cursor.

Suggested-by: Daniel Stone <daniels@collabora.com>
Fixes: 4e3a7dcf6ee4 "gallium: enable
                     EGL_EXT_image_dma_buf_import_modifiers
                     unconditionally"

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4532>

4 years agozink: be less picky about tiled resources
Erik Faye-Lund [Mon, 23 Sep 2019 20:00:12 +0000 (22:00 +0200)]
zink: be less picky about tiled resources

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

4 years agost/dri: make sure software color-buffers are linear
Erik Faye-Lund [Mon, 23 Sep 2019 19:56:36 +0000 (21:56 +0200)]
st/dri: make sure software color-buffers are linear

Otherwise, we might end up with a tiling-capable driver creating a
tiled resource here instead of linear. This is currently possible with
Zink, although we currently force all display-targets to be linear.

But that doesn't seem like a good idea in the long run, so let's loosen
this restriction.

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

4 years agovirgl: Use ETC2 formats directly when possible.
Lepton Wu [Sat, 11 Apr 2020 22:10:45 +0000 (15:10 -0700)]
virgl: Use ETC2 formats directly when possible.

Don't emulate them with uncompressed formats if the host
support them since uncompressed formats like GL_R16 could
be not available on GLES hosts.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
4 years agoradeonsi: use thread_context::bytes_mapped_limit
Pierre-Eric Pelloux-Prayer [Fri, 10 Apr 2020 12:46:17 +0000 (14:46 +0200)]
radeonsi: use thread_context::bytes_mapped_limit

Limit the amount of "in-flight" mapping to 1/4 of the total RAM.

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

4 years agogallium/u_threaded: flush batch when hitting mapping limit
Pierre-Eric Pelloux-Prayer [Fri, 10 Apr 2020 12:40:37 +0000 (14:40 +0200)]
gallium/u_threaded: flush batch when hitting mapping limit

tc_transfer_map maps buffers directly, but the unmap operation is executed
in the driver thread.
When an application does a lot of map/unmap operations, without flushing,
this increase the RAM used (and eventually get the app killed by the oom-killer).

This commit allows tc to keep track of how many bytes were mapped during
the current batch. When this estimation becomes higher than a threshold,
we flush the batch.

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

4 years agoradv: do not abort with unknown/unimplemented descriptor types
Samuel Pitoiset [Wed, 15 Apr 2020 16:08:10 +0000 (18:08 +0200)]
radv: do not abort with unknown/unimplemented descriptor types

To workaround a crash with Wolfeinstein Younglood because the
games creates one descriptor with
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV...

I reported the problem to Machine Games, but still no answer, so
let's remove the unreachable calls (which are technically not
unreachable for buggy apps) to help gamers.

Note that AMDVLK and AMDGPU-PRO don't crash because they ignore
unsupported descriptor types.

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

4 years agoaco: fix emitting stream output with tess eval shaders
Samuel Pitoiset [Tue, 14 Apr 2020 15:46:51 +0000 (17:46 +0200)]
aco: fix emitting stream output with tess eval shaders

Fixes dEQP-VK.transform_feedback.simple.winding_patch_list_12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4553>

4 years agoaco: implement nir_op_f2i8/nir_op_f2u8
Samuel Pitoiset [Tue, 14 Apr 2020 14:59:20 +0000 (16:59 +0200)]
aco: implement nir_op_f2i8/nir_op_f2u8

I think we should really refactor the conversions path.

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

4 years agonvc0: enable GL_NV_viewport_array2
Ilia Mirkin [Sat, 11 Apr 2020 03:47:04 +0000 (23:47 -0400)]
nvc0: enable GL_NV_viewport_array2

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-By: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agost/mesa: add support for GL_NV_viewport_array2
Ilia Mirkin [Sat, 11 Apr 2020 03:46:08 +0000 (23:46 -0400)]
st/mesa: add support for GL_NV_viewport_array2

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agogallium: add PIPE_CAP_VIEWPORT_MASK
Ilia Mirkin [Sat, 11 Apr 2020 03:53:18 +0000 (23:53 -0400)]
gallium: add PIPE_CAP_VIEWPORT_MASK

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agogallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE
Ilia Mirkin [Sat, 11 Apr 2020 03:45:41 +0000 (23:45 -0400)]
gallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agogallium: add TGSI_SEMANTIC_VIEWPORT_MASK
Ilia Mirkin [Sat, 11 Apr 2020 03:43:29 +0000 (23:43 -0400)]
gallium: add TGSI_SEMANTIC_VIEWPORT_MASK

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agomesa: add NV_viewport_array2 enable, attach to glsl
Ilia Mirkin [Fri, 10 Apr 2020 20:06:03 +0000 (16:06 -0400)]
mesa: add NV_viewport_array2 enable, attach to glsl

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agoglsl: add NV_viewport_array2 support
Ilia Mirkin [Fri, 10 Apr 2020 20:02:09 +0000 (16:02 -0400)]
glsl: add NV_viewport_array2 support

This enables gl_Layer/gl_ViewportIndex when the ext is enabled, as well
as adding the new gl_ViewportMask[] array and viewport_relative layout
qualifier for gl_Layer.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agocompiler: add VARYING_SLOT_VIEWPORT_MASK
Ilia Mirkin [Fri, 10 Apr 2020 17:47:05 +0000 (13:47 -0400)]
compiler: add VARYING_SLOT_VIEWPORT_MASK

See GL_NV_viewport_array2::gl_ViewportMask for how this is supposed
to work.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

4 years agoir3: Handle load_ubo_ir3 when promoting to constants
Connor Abbott [Wed, 15 Apr 2020 13:20:25 +0000 (15:20 +0200)]
ir3: Handle load_ubo_ir3 when promoting to constants

This restores support for promoting UBO loads to constant loads when
using LDC.

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

4 years agoir3: Fix LDC offset units
Connor Abbott [Wed, 15 Apr 2020 12:18:03 +0000 (14:18 +0200)]
ir3: Fix LDC offset units

I had missed that LDC actually uses vec4 units for its offset. This
means that we have to create a new instruction, and lower it in
ir3_nir_lower_io_offsets, similar to the existing SSBO instructions.
Unfortunately we can't assume that loads are always vec4-aligned, so we
have to use the alignment information that NIR gives us. Unfortunately,
it's currently woefully inadequate, and will have to be fixed to give us
good codegen in the future.

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

4 years agoRevert "nvc0: fix line width on GM20x+"
Karol Herbst [Wed, 15 Apr 2020 20:24:35 +0000 (22:24 +0200)]
Revert "nvc0: fix line width on GM20x+"

This reverts commit a0e57432b76c32f2109dab0ad3df0ba03967441c.

It's unclear what caused the test to fail back then. Now it's seems to be
reversed. I tested with a close enough piglit and mesa branch and wasn't
able to reproduce the same test result I've got in some older piglit runs.

Fixes:
dEQP-GLES2.functional.rasterization.primitives.lines_wide
dEQP-GLES2.functional.rasterization.primitives.line_strip_wide
dEQP-GLES2.functional.rasterization.primitives.line_loop_wide
dEQP-GLES2.functional.rasterization.limits.points
dEQP-GLES2.functional.clipping.line.wide_line_z_clip
dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_center
dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_corner
dEQP-GLES2.functional.clipping.line.wide_line_clip
dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center
dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner
dEQP-GLES2.functional.clipping.line.wide_line_attrib_clip
dEQP-GLES2.functional.polygon_offset.default_result_depth_clamp
dEQP-GLES2.functional.polygon_offset.default_factor_1_slope
dEQP-GLES2.functional.polygon_offset.fixed16_result_depth_clamp
dEQP-GLES2.functional.polygon_offset.fixed16_factor_1_slope

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4575>

4 years agoanv: Fix UBO range detection in anv_nir_compute_push_layout
Jason Ekstrand [Fri, 3 Apr 2020 17:38:32 +0000 (12:38 -0500)]
anv: Fix UBO range detection in anv_nir_compute_push_layout

This fixes two bugs:  First, if the same block index showed up twice, we
only pick the first one.  Second, we weren't multiplying by 32.  This
didn't show up in tests because RBA testing is garbage.  Found while
looking at shaders from the UE4 Shooter demo.

Fixes: e03f9652 "anv: Bounds-check pushed UBOs when..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4578>

4 years agoanv: Advertise SEND count through VK_EXT_pipeline_executable_properties
Jason Ekstrand [Fri, 3 Apr 2020 18:09:41 +0000 (13:09 -0500)]
anv: Advertise SEND count through VK_EXT_pipeline_executable_properties

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

4 years agoiris: make BATCH_SZ smaller by BATCH_RESERVED bytes
Paulo Zanoni [Thu, 2 Apr 2020 23:03:41 +0000 (16:03 -0700)]
iris: make BATCH_SZ smaller by BATCH_RESERVED bytes

Iris allocates gem buffers using buckets of allocation sizes that are
page aligned. We always ask for batch buffers of size BATCH_SZ +
BATCH_RESERVED, which is not page aligned: we ask for 65552 bytes,
which ends up in the bucket of size 81920, resulting in 20% unused
space. Adjust things so there is no waste of space: BATCH_SZ +
BATCH_RESERVED is now 65536.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>

4 years agoiris: remove useless bo->gtt_offset assignment
Paulo Zanoni [Mon, 23 Mar 2020 22:58:17 +0000 (15:58 -0700)]
iris: remove useless bo->gtt_offset assignment

We assign a real value a few lines below, and none of the lines in
between rely on the zeroed bo->gtt_offset value.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>

4 years agoiris: remove unnecessary forward declaration
Paulo Zanoni [Mon, 23 Mar 2020 23:23:23 +0000 (16:23 -0700)]
iris: remove unnecessary forward declaration

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>

4 years agoiris: remove hole from struct iris_bo
Paulo Zanoni [Tue, 31 Mar 2020 00:06:32 +0000 (17:06 -0700)]
iris: remove hole from struct iris_bo

This decreases the size of the struct on a 64bit machine from 144 to
136. While that's not a lot, this is one of the structs that we're
allocating all the time.

For a full Aztec run on BDW we allocate this struct 3273 times, and we
can have up to 3259 of them live at the same time. So we end up saving
just a little over 6 pages for this benchmark.

Spotted this while trying to add another bool for an unrelated
feature.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>

4 years agoFix util/process test on Cygwin
Jon Turney [Wed, 25 Mar 2020 13:22:30 +0000 (13:22 +0000)]
Fix util/process test on Cygwin

It seems meson returns the filename with extension for full_path(), even
though Cygwin does it's best to pretend the file doesn't have that
extension.

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

4 years agollvmpipe/nir: free the nir shader
Dave Airlie [Wed, 15 Apr 2020 00:45:47 +0000 (10:45 +1000)]
llvmpipe/nir: free the nir shader

Fixes: 18f896e55d96 (llvmpipe: add initial nir support)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>

4 years agodraw/tess: free the NIR
Dave Airlie [Wed, 15 Apr 2020 00:44:43 +0000 (10:44 +1000)]
draw/tess: free the NIR

Fixes: 0d02a7b8ca794 (draw: add main tessellation code)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>

4 years agodraw: free the NIR IR.
Dave Airlie [Wed, 15 Apr 2020 00:43:52 +0000 (10:43 +1000)]
draw: free the NIR IR.

Not sure how I missed this, the ownership was a bit blurry,
free the NIR.

Fixes: bf12bc2dd7a2 (draw: add nir info gathering and building support)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>

4 years agofreedreno/turnip: Update GRAS_LAYER_CNTL to GRAS_MAX_LAYER_INDEX
Brian Ho [Mon, 13 Apr 2020 22:30:31 +0000 (15:30 -0700)]
freedreno/turnip: Update GRAS_LAYER_CNTL to GRAS_MAX_LAYER_INDEX

After some experimentation, I believe that GRAS_LAYER_CNTL is
actually just a count register storing the number of layers in the
render target. While debugging cube_array geometry tests, I noticed
that the blob was setting an unknown 0x8 to LAYER_CNTL, so I checked
the value of LAYER_CNTL for various layer sizes:

1: LAYER_CNTL=0
2: LAYER_CNTL=1
3: LAYER_CNTL=2
4: LAYER_CNTL=3
9: LAYER_CNTL=8
256: LAYER_CNTL=255
2000: LAYER_CNTL=1999

Seems like this register just stores a count of the largest layer
that can be written to via gl_Layer. This commit updates the reg
docs, freedreno's gs implementation, and turnip's gs implementation.

Fixes dEQP-VK.geometry.layered.cube_array.*

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

4 years agoturnip: Emit geometry shader descriptor consts
Brian Ho [Mon, 13 Apr 2020 22:04:33 +0000 (15:04 -0700)]
turnip: Emit geometry shader descriptor consts

Without these consts, the geometry shader is unable to read from
textures or uniforms.

Fixes dEQP-VK.geometry.layered.*.readback

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

4 years agoturnip: Correctly set layer stride for 3D images
Brian Ho [Mon, 13 Apr 2020 21:57:45 +0000 (14:57 -0700)]
turnip: Correctly set layer stride for 3D images

Previously we were using layout.layer_size for the layer stride, but
in Vulkan, you can alias a 3D image as an array of 2D images via the
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT flag. One reason to use
this behavior is so the geometry shader can write to a specific
depth in a 3D framebuffer with gl_Layer.

Since the 3D image is not a *true* layered image, layer_size is 0.
Instead, we can copy what freedreno does and use the slice size.

Fixes dEQP-VK.geometry.layered.3d.*

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

4 years agogallium: initialize viewport swizzle in cso_set_viewport_dims
Karol Herbst [Wed, 15 Apr 2020 11:37:39 +0000 (13:37 +0200)]
gallium: initialize viewport swizzle in cso_set_viewport_dims

Fixes: dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_* and more
Fixes: 4137a79c2a7e ("gallium: add viewport swizzling state and cap")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4567>

4 years agomesa: fix enum value of VIEWPORT_SWIZZLE_POSITIVE_W_NV
Karol Herbst [Wed, 15 Apr 2020 11:34:55 +0000 (13:34 +0200)]
mesa: fix enum value of VIEWPORT_SWIZZLE_POSITIVE_W_NV

Fixes: ff168b297d94 ("mesa: add GL_NV_viewport_swizzle support")
Reported-by: Roy Spliet <nouveau@spliet.org>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4567>

4 years agoradv/aco: do not advertise VK_KHR_shader_subgroup_extended_types
Samuel Pitoiset [Tue, 14 Apr 2020 13:39:26 +0000 (15:39 +0200)]
radv/aco: do not advertise VK_KHR_shader_subgroup_extended_types

It's unsupported because small bitsizes are still not completely
supported. It should have been disabled by default with ACO.

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

4 years agonvc0: enable ASTC and ETC on GM20B
Karol Herbst [Mon, 13 Apr 2020 14:07:18 +0000 (16:07 +0200)]
nvc0: enable ASTC and ETC on GM20B

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4554>

4 years agoglx: omit loader_loader() for macOS
Emil Velikov [Tue, 7 Apr 2020 16:45:33 +0000 (17:45 +0100)]
glx: omit loader_loader() for macOS

Earlier commit added the code unconditionally, since the loader code
itself is already built on macOS.
Although it did not consider the #include mayhem that src/glx is.

In particular, none of the __GLXDRI{screen,context,drawable) are
available for macOS... those are pulled by dri_common.[ch].

Ideally we'll untangle that, but for the time being simply #ifdef out
the include/call.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2726
Fixes: b699d070a6d ("glx: set the loader_logger early and for everyone")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4490>

4 years agoclover: expose cl_arm_shared_virtual_memory for devices with SVM support
Karol Herbst [Fri, 24 May 2019 13:47:28 +0000 (15:47 +0200)]
clover: expose cl_arm_shared_virtual_memory for devices with SVM support

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

4 years agoclover: implement cl_arm_shared_virtual_memory
Karol Herbst [Wed, 22 May 2019 12:27:23 +0000 (14:27 +0200)]
clover: implement cl_arm_shared_virtual_memory

v2: use static array to keep name -> func mapping
v3: use unordered_map
v4: handle ARM constants
    reorder dispatch table
    wrap enqueue APIs as the command value differs between khr and arm
v5: move declarations into dispatch.hpp
    handle CL_MEM_USES_SVM_POINTER_ARM in clGetMemObjectInfo
v6: breaking long lines

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

4 years agoclover: implement SVM functions for devices with fine grained system SVM support
Karol Herbst [Wed, 22 May 2019 20:34:09 +0000 (22:34 +0200)]
clover: implement SVM functions for devices with fine grained system SVM support

all of the functionality can be mapped to malloc/free if the device supports
fine grained system SVM.

v2: fix some API bugs found with the OpenCL CTS
v3: remove validate_even_wait_list
    improve implementation of clSetKernelExecInfo
    make clEnqueueSVMFree spec compliant
    rename can_emulate_non_system_svm to has_system_svm and make it a member method
    improve validation in clEnqueueSVMMemFill
    handle CL_MEM_USES_SVM_POINTER in clGetMemObjectInfo
v4: break long lines and other minor cosmetic adjustments

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

4 years agoclover: implement clSetKernelArgSVMPointer
Karol Herbst [Mon, 12 Mar 2018 10:04:53 +0000 (11:04 +0100)]
clover: implement clSetKernelArgSVMPointer

it is pretty much identical to a clSetKernelArg for a scalar field, except
it is only valid for global and constant memory pointers.

Also the type equals void* on the Host, so we can just check the size of it.

v2: prefer using target_size to extend the pointer value
v3: handle more corner cases in combiation to clSetKernelArg

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

4 years agoclover: implement CL_DEVICE_SVM_CAPABILITIES
Karol Herbst [Mon, 21 May 2018 10:19:42 +0000 (12:19 +0200)]
clover: implement CL_DEVICE_SVM_CAPABILITIES

v2: without supporting userptrs SVM can't be implemented as it's impossible
    to ensure memory consistency with HOST_PTR buffers
v3: fix comment style
v4: fixes typo in comment

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

4 years agoclover: add stubs for SVM
Karol Herbst [Wed, 22 May 2019 11:46:40 +0000 (13:46 +0200)]
clover: add stubs for SVM

although most of those are 2.0 core functions, there is
cl_arm_shared_virtual_memory to expose those in a 1.2 context. But we
should be able to expose this extension with 1.1 as well as there is no
technicaly reason why this shouldn't work.

v2: move svm functions into existing files
v3: rename func args to match convention

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>