Compare commits

...

650 Commits

Author SHA1 Message Date
Marek Olšák
027ccc89b2 egl: don't expose swrast device if swrast is not built
This fixes piglit/egl_ext_device_base without swrast.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
(cherry picked from commit 48e218b49d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28885>
2024-04-23 14:33:54 -04:00
Marek Olšák
f62e842e31 egl: reorder code in _eglQueryDevicesEXT, add *swrast variable
This is a preparation for the next commit. No change in behavior.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
(cherry picked from commit 5952715064)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28885>
2024-04-23 14:33:47 -04:00
Tapani Pälli
775d126791 glsl: allow image*Shadow keywords on ES and GLSL >= 420
These were not reserved keywords in GLSL ES and also allowed on
desktop GLSL after 420. New CTS compiler tests will test this.

https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3007

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28278>
2024-03-19 11:13:20 -07:00
A. Wilcox
4927991457 nouveau: Avoid NULL deref of pushbuf on flush
The fix in f911daf1 is incomplete for nouveau; PUSH_KICK is called before
the DrawBuffer check, which causes a similar traceback:

PUSH_KICK (push=0x0)
nouveau_flush
_mesa_make_current
_mesa_free_context_data
nouveau_context_deinit
nv10_context_destroy
nouveau_context_destroy
driDestroyContext
dri2_destroy_context
glXDestroyContext

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10030
Fixes: f911daf16d ("dri: avoid NULL deref of DrawBuffer on flush")
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25848>
2023-10-23 01:33:54 -05:00
Andres Calderon Jaramillo
14d7da2464 i965: Plumb YUV range to nir_lower_tex().
This patch plumbs the YUV range provided through
EGL_EXT_image_dma_buf_import all the way to nir_lower_tex().

v2: Account for new field in debug_sampler_recompile() (Lionel).

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16652>
2023-01-09 23:48:26 +00:00
Yevhenii Kolesnikov
221f3ca17e i965: set BRW_NEW_FS_PROG_DATA on color_calc_state for SNB
Fixes flickering shadows in RealMyst on SandyBridge.

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3416
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7273>
2023-01-09 23:35:02 +00:00
Daniel Stone
5a1c36ce5a ci: Consistently build Wayland and protocols
Rather than relying on distro packages, build libwayland and
wayland-protocols from known versions everywhere we need it.

The only place we do not do so but rely on distro packages is the LAVA
rootfs, for which it does not matter right now since the version is
sufficiently new, but this could/should be cleaned up later.

Solved Conflicts:
  - .gitlab-ci.yml
  - .gitlab-ci/container/build-wayland.sh
  - .gitlab-ci/container/debian/x86_test-gl.sh

Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit a2fd507973)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-23 01:12:09 -03:00
Daniel Stone
6f0933c648 ci: Use common build script for libwayland
Rather than open-coding libwayland install for each container, create a
common build script like the rest, using both git and meson like the
rest.

Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 9bab991be0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-23 01:12:09 -03:00
Guilherme Gallo
9fc8c2b08a ci/fedora: Fix fedora-release job
Remove missing `vulkan-device-select-layer=true` argument from fedora
mesa build arguments.

Based on: ace13203f3 (at main branch)

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-23 01:12:09 -03:00
Guilherme Gallo
9a3eec75d7 ci/amber: Remove windows-related jobs
As discussed in this merge request, the current Windows-related hardware
does not support Amber build/test jobs, so let's remove all windows
related jobs.

See: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928#note_1652924

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-23 01:12:09 -03:00
Guilherme Gallo
3b4c9f84f5 ci: Delete unused yml files
After pruning test jobs, we have a bunch of dead yml files.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-22 10:19:13 -03:00
Guilherme Gallo
d3e0a92cd4 ci: Remove all test jobs from Amber branch
As discussed at #freedesktop@OFTC, we decided to remove test jobs from
Amber branch, only keeping the build ones.

The main reason for that is that this branch is not being updated often
enough with backports to keep the test jobs green.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-22 10:15:21 -03:00
Benjamin Tissoires
c5a2af1167 CI: convert to use the new S3 server instead of the legacy minio
We don't need to login anymore, but we can't use plain minio commands
now. `ci-fairy` got a helper as `s3cp` to keep an almost identical
API.

Solved Conflicts:
	.gitlab-ci.yml
	.gitlab-ci/common/init-stage2.sh
	.gitlab-ci/container/lava_build.sh
	.gitlab-ci/lava/lava-submit.sh
	.gitlab-ci/piglit/piglit-traces.sh
	.gitlab-ci/prepare-artifacts.sh
	.gitlab-ci/test/gitlab-ci.yml
	src/broadcom/ci/traces-broadcom.yml
	src/freedreno/ci/gitlab-ci.yml
	src/gallium/drivers/crocus/ci/traces-crocus.yml
	src/gallium/drivers/virgl/ci/traces-virgl-iris.yml

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
(cherry picked from commit 67cee534a8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-22 09:44:23 -03:00
Guilherme Gallo
700b671e02 ci: Update piglit with s3 support
With new S3 support, we can use JWT-only server interaction via the
removal of `role-session` and `minio-host` arguments from PIGLIT_ARGS in
YAML.
This parameter change will come in a later commit.

Solved Conflicts:
	.gitlab-ci/container/build-piglit.sh
	.gitlab-ci.yml

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
(cherry picked from commit 70ce1dcacc)

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19928>
2022-11-14 00:24:08 -03:00
Filip Gawin
acfef002a0 meson: print warning when using i915/i965 on amber
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19122>
2022-11-03 22:29:00 +00:00
Andres Calderon Jaramillo
54a564e679 nir: Account for YUV range.
This patch expands on what commit
d8fdb8dab4 did. It adds support for
YUV-to-RGB conversions depending on the range of the YUV samples.

The conversion matrices and offsets are derived from
https://gist.github.com/yohhoy/dafa5a47dade85d8b40625261af3776a.

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
(cherry picked from commit a5d09d7a0a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17114>
2022-11-03 19:39:40 +00:00
Dylan Baker
95a111f826 docs: add release notes for 22.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
41adfa29e2 docs: add release notes for 22.1.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
0930855f7f docs: add release notes for 22.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
2dd2e97451 docs: add release notes for 22.1.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
576dbc5d6a docs: add release notes for 22.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
d979e2da66 docs: add release notes for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
ca2c116f28 docs: add release notes for 22.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
32a8db17a3 docs: link releases notes for 21.3.9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
6f7718bea9 docs: add release notes for 21.2.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
5114e0119e docs: add release notes for 21.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
554255bf6b docs: add release notes for 21.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
90256ad72a docs: add release notes for 22.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Erik Faye-Lund
600bb7945c docs: fixup breakage in release-calendar
Seems the branch was accidentally changed to no longer match the
release. Let's fix that.

Fixes: 9ba636cdc7 ("docs: update calendar and link releases notes for 21.3.8")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
08bb5c157e docs: update calendar and link releases notes for 21.3.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
7f9daeb8fe docs: update calendar and link releases notes for 21.3.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
55fee38aa1 docs: update calendar and link releases notes for 21.3.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
cec15c3b07 docs: update calendar and link releases notes for 21.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
36e71b8a70 docs: update calendar and link releases notes for 21.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
543fddcdb6 docs: update calendar and link releases notes for 21.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
a0bdf5249b docs: update calendar and link releases notes for 21.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
fcdb34afd4 docs: update calendar and link releases notes for 21.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
d070b5c993 docs: update calendar and link releases notes for 21.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
a6c4e26b49 docs: update calendar and link releases notes for 21.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Dylan Baker
10ab00552c docs: update calendar and link releases notes for 21.2.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
1a681fa3d9 docs: update calendar and link releases notes for 21.3.0
(cherry picked from commit 9aea588900)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Jesse Natalie
d89e01883d docs: Fix relnotes\21.3.0 formatting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Erik Faye-Lund
afc69c1cfb docs: set language to english
It seems recent versions of Sphinx has started issuing a warning when
language isn't set to a recognized value. Since we're building with
warnings as errors on CI, this causes issues for people.

We're writing English docs, so we should set this to English. I probably
confused this setting with the highlight_language setting or something
when I set this up initially.

Fixes: 00cd1346bf ("docs: use sphinx")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6711
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Jesse Natalie
6e8ae10c14 CI: Disable Windows jobs for Amber
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19501>
2022-11-03 17:09:25 +00:00
Eric Engestrom
55540962be ci: don't report flakes anymore 2022-11-03 16:37:25 +00:00
Eric Engestrom
a4f68e1d42 ci: disable virgl-traces as it's broken by now 2022-11-03 16:17:15 +00:00
Filip Gawin
651e30663f meson: remove LTS from amber's description
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19121>
2022-10-17 20:05:01 +02:00
Dylan Baker
83c21b5289 docs Add sha256 sums for 21.3.9 2022-06-08 12:38:22 -07:00
Dylan Baker
78c96ae5b6 VERSION: bump for 21.3.9 release 2022-06-08 11:13:35 -07:00
Dylan Baker
9ee3437bc0 docs: add release notes for 21.3.9 2022-06-08 11:13:28 -07:00
Matt Turner
bb738a5db3 intel/perf: Destination array calculation into function
Cuts 119 KiB from iris_dri.so and libvulkan_intel.so.

   text    data     bss     dec     hex filename
 917511       0       0  917511   e0007 meson-generated_.._intel_perf_metrics.c.o (before)
 796986       0       0  796986   c293a meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14130948 365708  210004 14706660 e067e4 iris_dri.so (before)
14009332 365708  210004 14585044 de8cd4 iris_dri.so (after)

   text    data     bss     dec     hex filename
8124225  214264   22820 8361309  7f955d libvulkan_intel.so (before)
8002609  214264   22820 8239693  7dba4d libvulkan_intel.so (after)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 8860ff3310)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
2ebf4b1590 intel/perf: Fix mistake in description string
Along with fixing the grammar, this allows it to be deduplicated since
the properly worded description exists in later generations' XMLs.

Cuts 96 B from iris_dri.so and libvulkan_intel.so.

   text	   data	    bss	    dec	    hex	filename
 917613	      0	      0	 917613	  e006d	meson-generated_.._intel_perf_metrics.c.o (before)
 917511	      0	      0	 917511	  e0007	meson-generated_.._intel_perf_metrics.c.o (after)

   text	   data	    bss	    dec	    hex	filename
14131044 365708	 210004	14706756 e06844	iris_dri.so (before)
14130948 365708	 210004	14706660 e067e4	iris_dri.so (after)

   text	   data	    bss	    dec	    hex	filename
8124321	 214264	  22820	8361405	 7f95bd	libvulkan_intel.so (before)
8124225	 214264	  22820	8361309	 7f955d	libvulkan_intel.so (after)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit d80d3c6760)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
eb1e25d117 intel/perf: Mark intel_perf_counter_* enums as PACKED
Reduces their sizes from 4 bytes to 1. Cuts 6 KiB from iris_dri.so and
libvulkan_intel.so.

   text    data     bss     dec     hex filename
 924401       0       0  924401   e1af1 meson-generated_.._intel_perf_metrics.c.o (before)
 917613       0       0  917613   e006d meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14137732 365708  210004 14713444 e08264 iris_dri.so (before)
14131044 365708  210004 14706756 e06844 iris_dri.so (after)

   text    data     bss     dec     hex filename
8131009  214264   22820 8368093  7fafdd libvulkan_intel.so (before)
8124321  214264   22820 8361405  7f95bd libvulkan_intel.so (after)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 7024b8e0eb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
063863ddd6 intel/perf: Store indices to strings rather than pointers
The compiler does a good job of deduplicating strings already, but we
can eliminate the pointers to each string by combining the strings into
a single char array and storing only an index into that array.

The longest of the char arrays is the descriptions array, which is a
little over 45 KiB, so still under MSVC's 64 KiB string literal limit
[0]. Because the string length is under 64 KiB we can use uint16_t as
the index type, which roughly doubles our savings as compared to an int.

This cuts 77 KiB from iris_dri.so (0.5%) and libvulkan_intel.so (0.9%).

   text    data     bss     dec     hex filename
 926811   25920       0  952731   e899b meson-generated_.._intel_perf_metrics.c.o (before)
 924401       0       0  924401   e1af1 meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14190852 391628  210004 14792484 e1b724 iris_dri.so (before)
14137732 365708  210004 14713444 e08264 iris_dri.so (after)

   text    data     bss     dec     hex filename
8184097  240184   22820 8447101  80e47d libvulkan_intel.so (before)
8131009  214264   22820 8368093  7fafdd libvulkan_intel.so (after)

relinfo:
iris_dri.so (before): 17765 relocations, 17545 relative (98%), 452 PLT entries, 1 for local syms (0%), 0 users
iris_dri.so (after) : 15605 relocations, 15385 relative (98%), 452 PLT entries, 1 for local syms (0%), 0 users

libvulkan_intel.so (before): 10720 relocations, 6989 relative (65%), 355 PLT entries, 1 for local syms (0%), 0 users
libvulkan_intel.so (after) :  8560 relocations, 4829 relative (56%), 355 PLT entries, 1 for local syms (0%), 0 users

[0] https://docs.microsoft.com/en-us/cpp/cpp/string-and-character-literals-cpp?view=msvc-170&viewFallbackFrom=vs-2019

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 6c0246dcf4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
39818465c1 intel/perf: Use slimmer intel_perf_query_counter_data struct
intel_perf_query_counter contains fields for things we can't or don't
want to store in our static data (like runtime-determined max values) or
oa_read_counter function pointers which are dependent on the GPU gen and
would make deduplication very ineffective.

Cuts 16 KiB from iris_dri.so and libvulkan_intel.so.

   text    data     bss     dec     hex filename
 926811   43200       0  970011   ecd1b meson-generated_.._intel_perf_metrics.c.o (before)
 926811   25920       0  952731   e899b meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14190852 408908  210004 14809764 e1faa4 iris_dri.so (before)
14190852 391628  210004 14792484 e1b724 iris_dri.so (after)

   text    data     bss     dec     hex filename
8184097  257464   22820 8464381  8127fd libvulkan_intel.so (before)
8184097  240184   22820 8447101  80e47d libvulkan_intel.so (after)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit df5e743c80)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
c0e75fa0ff intel/perf: Use a function to initialize perf counters
And specifically mark it with ATTRIBUTE_NOINLINE. Otherwise it will be
inlined and actually slightly increase code size.

Cuts 505 KiB from iris_dri.so and libvulkan_intel.so.

   text    data     bss     dec     hex filename
1538720       0       0 1538720  177aa0 meson-generated_.._intel_perf_metrics.c.o (before)
 926811   43200       0  970011   ecd1b meson-generated_.._intel_perf_metrics.c.o (after)

   text    data     bss     dec     hex filename
14751700 365708  210004 15327412 e9e0b4 iris_dri.so (before)
14190852 408908  210004 14809764 e1faa4 iris_dri.so (after)

   text    data     bss     dec     hex filename
8744913  214264   22820 8981997  890ded libvulkan_intel.so (before)
8184097  257464   22820 8464381  8127fd libvulkan_intel.so (after)

Relocations increase because the counter initializations are moved from
code (in .text) to pointers (in .text) to .rodata, which require
relocations.

relinfo:
iris_dri.so (before): 15605 relocations, 15385 relative (98%), 452 PLT entries, 1 for local syms (0%), 0 users
iris_dri.so (after) : 17765 relocations, 17545 relative (98%), 452 PLT entries, 1 for local syms (0%), 0 users

libvulkan_intel.so (before):  8560 relocations, 4829 relative (56%), 355 PLT entries, 1 for local syms (0%), 0 users
libvulkan_intel.so (after) : 10720 relocations, 6989 relative (65%), 355 PLT entries, 1 for local syms (0%), 0 users

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit bbbbb0325b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
06cb4be8be intel/perf: Deduplicate perf counters
No changes in resulting code (yes, seriously!). GCC constant propagates
the static const arrays into the code, yielding bit for bit identical
results. This will however enable further cleanups.

Before this patch, we emit 11916 different initializations of
intel_perf_query_counter. With this patch we emit an array of 539 and
initialize the intel_perf_query_counters in terms of those.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 5e6c7a572e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Matt Turner
ca158e4dd6 intel/perf: Don't print leading space from desc_units()
Just an annoyance I noticed when I needed to generate the description
string in two different places.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 3172b5bbb8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Emma Anholt
f3500570be intel/perf: Move some static blocks of C code out of the python script.
Now my editor can help me format code as I type.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 12e065ddec)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Dave Airlie
502823aef7 intel/perf: use a function to do common allocations
This cuts the compile time down for this file on my ryzen from
real	1m4.077s
to
real	0m30.827s

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit acc2d08cf9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16405>
2022-05-09 12:43:36 -04:00
Georg Lehmann
45b4a998d6 radv: Don't hash ycbcr sampler base object.
Stops gamescope from recompiling pipelines on every start.

Cc: mesa-stable

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15454>
(cherry picked from commit 4f6c7a6025)
2022-03-19 18:11:13 +00:00
Mike Blumenkrantz
e6d82a0897 zink: only update usage on buffer rebind if rebinds occurred
this is a harmless case, but it's still wrong

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15429>
(cherry picked from commit 8294d45424)
2022-03-18 20:00:47 +00:00
Mike Blumenkrantz
165e05d27d zink: force-add usage when adding last-ref tracking
this fixes desync+crash when:
1. usage is added for bs A
2. tracking is added for bs B
3. tracking is removed for bs B
4. context is destroyed
5. usage A is now dangling and will crash if accessed

as seen in glmark2

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15429>
(cherry picked from commit 7da211e24f)
2022-03-18 20:00:46 +00:00
Lionel Landwerlin
adde3a7cc2 anv: flush tile cache with query copy command
This fixes the test_resolve_non_issued_query_data vkd3d-proton test.

This change is required on TGL+ (maybe ICL?) because on all platforms
3D pipeline writes are not coherent with CS. On previous platform we
fixed this by flushing the render cache to make sure data is visble to
CS before it writes to memory. But on more recently platforms,
flushing the render cache leaves the data in the tile cache which is
still not coherent with CS, so we need to flush that one too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14552>
(cherry picked from commit 8b71118aa0)
2022-03-18 20:00:46 +00:00
Lionel Landwerlin
37cc181b9a anv: emit timestamp & availability using the same part of CS
We've run into issues before where PIPE_CONTROL races MI_STORE_*
commands. So make sure we emit the availability using the same type of
CS so that memory writes are properly ordered.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14552>
(cherry picked from commit 4e30da7874)
2022-03-18 20:00:46 +00:00
Mike Blumenkrantz
4855a4d445 zink: flag sample locations for re-set on batch flush
this needs to be re-set any time the cmdbuf changes

cc: mesa-stable

Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15397>
(cherry picked from commit efa724133f)
2022-03-18 20:00:46 +00:00
Ian Romanick
32807e38c3 intel/fs: Force destination types on DP4A instructions
Most of the time, this doesn't matter.  On the versions with _sat, if
the destination type is incorrect, the clamping will not happen
correctly.

Fixes the following CTS tests:

dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_packed_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_packed_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_packed_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_packed_uu_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.all_uu_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_packed_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_packed_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_packed_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_packed_uu_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.limits_uu_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_packed_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_packed_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_packed_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_packed_uu_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_ss_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_su_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_us_v4i8_out32
dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.small_uu_v4i8_out32

v2: Update anv-tgl-fails.txt.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 0f809dbf40 ("intel/compiler: Basic support for DP4A instruction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15417>
(cherry picked from commit 19330eeb1d)
2022-03-18 20:00:46 +00:00
Lionel Landwerlin
2e048268e5 anv: zero-out anv_batch_bo
anv_batch_bo has a length field that we use to flush cachelines. Not
having that field initialized properly leads us to access out of bound
memory.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>
(cherry picked from commit d68b9f0e6b)
2022-03-18 20:00:46 +00:00
Lionel Landwerlin
9b71ebf574 anv: fix variable shadowing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 83fee30e85 ("anv: allow multiple command buffers in anv_queue_submit")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>
(cherry picked from commit 78acae3865)
2022-03-18 20:00:46 +00:00
Emma Anholt
78b826a235 vulkan: Make sure we've loaded our connectors when querying plane props.
If you hadn't already called wsi_GetPhysicalDeviceDisplayProperties2KHR or
wsi_GetDrmDisplayEXT before calling
GetPhysicalDeviceDisplayPlaneProperties2KHR, then the connectors list
wouldn't be populated and you'd get no plane properties.  Fixes failure of
dEQP-VK.wsi.display.get_display_plane_capabilities when run on its own.

Fixes: #4575
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15353>
(cherry picked from commit da834a12cf)
2022-03-18 20:00:46 +00:00
Mike Blumenkrantz
f17ebb138f gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray
these all need to check for z coord oob to avoid crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15388>
(cherry picked from commit 6345575f8a)
2022-03-18 20:00:46 +00:00
Mike Blumenkrantz
73ed1e1f23 lavapipe: always clone shader nir for shader states
these become owned and freed by llvmpipe, so ensure that freeing
them there won't cause crashes

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15281>
(cherry picked from commit 2f9976debc)
2022-03-18 20:00:46 +00:00
Eric Engestrom
7c00af093b Revert "glx: Fix build errors with --enable-mangling (v2)"
This reverts commit a27f2d991b.

As of a0829cf23b ("GL: drop symbols mangling support"), this
extra complexity isn't needed anymore.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2298>
(cherry picked from commit 5dbbc0f0a8)
2022-03-18 20:00:46 +00:00
Erik Faye-Lund
be338ef32d Revert "ci: downgrade sphinx to v3.x"
The readthedocs theme now supports Sphinx 4.x, so there's no longer any
reason to stick with 3.x.

This reverts commit a545b6eda0.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15212>
(cherry picked from commit dd9b8881e0)
2022-03-18 20:00:46 +00:00
Icecream95
ce4b620e39 panfrost: Optimise recalculation of max sampler view
Previously we always searched through 128 sampler views for set
sampler views, now we never look above the maximum updated view.

Fixes: 304851422a ("panfrost: Fix set_sampler_views for big GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
(cherry picked from commit d5870c45ae)
2022-03-18 20:00:45 +00:00
Icecream95
9552166f27 panfrost: Don't initialise the trampolines array
PIPE_MAX_SHADER_SAMPLER_VIEWS is 128, so we just end up initialising a
kilobyte of memory for no reason, when usually only a couple of
sampler views are used.

Fixes: 53ef20f08d ("panfrost: Handle NULL sampler views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
(cherry picked from commit 3e405afeb9)
2022-03-18 20:00:45 +00:00
Alyssa Rosenzweig
5ae5b38e96 pan/bi: Handle non-2D arrays
Handle arrays generically by using the last component of the coordinate source
as the array index. That works for both 2D arrays and cube arrays, fixing cube
arrays. Cube arrays were already handled correctly in core Panfrost code.

This code path is not tested in dEQP-GLES31 without exposing OES_cube_map_array,
which depends on OES_geometry_shader, which we don't have. Yet we do expose
PIPE_CAP_CUBE_ARRAY, so ARB_cube_map_array is exposed.

Disabling PIPE_CAP_CUBE_ARRAY would be an easy band-aid fix, but it's easy
enough to handle correctly.

dEQP-GLES31 passes with a hack enabling OES_cube_map_array [without geometry
shaders].

Also fixes 1D arrays on Bifrost for the same reasons.

Fixes: 70d6c5675d ("pan/bi: Emit TEXC with builder")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15254>
(cherry picked from commit 53f1e57ee7)
2022-03-18 20:00:45 +00:00
Alyssa Rosenzweig
02f4e610a4 panfrost: Emulate GL_CLAMP on Bifrost
Hardware support was removed with Midgard. Use mesa/st to emulate GL_CLAMP with
nir_lower_tex automatically (the Zink lowering), and disable GL_MIRROR_CLAMP
which isn't lowered correctly.

Fixes *texwrap* Piglit tests on G52.

Fixes: f9ceab7b23 ("panfrost: Fix CLAMP wrap mode")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15253>
(cherry picked from commit 1f97819fbe)
2022-03-18 20:00:45 +00:00
Eric Engestrom
40db7e6e89 .pick_status.json: Update to fc381fa1e3 2022-03-18 20:00:45 +00:00
Jonathan Gray
04dfe94bc8 util: fix msvc build
Fix msvc build regression after 0536b69133
reported by Prodea Alexandru-Liviu.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6137
Fixes: 0536b69133 ("util: fix build with clang 10 on mips64")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15355>
(cherry picked from commit e50eb1ce7a)
2022-03-18 20:00:45 +00:00
Jason Ekstrand
352b0210e7 anv: Allow MSAA resolve with different numbers of planes
The Vulkan spec for VK_KHR_depth_stencil_resolve allows a format
mismatch between the primary attachment and the resolve attachment
within certain limits.  In particular,

    VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03181

    If pDepthStencilResolveAttachment is not NULL and does not have the
    value VK_ATTACHMENT_UNUSED and VkFormat of
    pDepthStencilResolveAttachment has a depth component, then the
    VkFormat of pDepthStencilAttachment must have a depth component with
    the same number of bits and numerical type

    VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182

    If pDepthStencilResolveAttachment is not NULL and does not have the
    value VK_ATTACHMENT_UNUSED, and VkFormat of
    pDepthStencilResolveAttachment has a stencil component, then the
    VkFormat of pDepthStencilAttachment must have a stencil component
    with the same number of bits and numerical type

So you can resolve from a depth/stencil format to a depth-only or
stencil-only format so long as the number of bits matches.
Unfortunately, this has never been tested because the CTS tests which
purport to test this are broken and actually test with a destination
combined depth/stencil format.

Fixes: 5e4f9ea363 ("anv: Implement VK_KHR_depth_stencil_resolve")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15333>
(cherry picked from commit d65dbe8018)
2022-03-18 20:00:45 +00:00
Pierre-Eric Pelloux-Prayer
0203a971ac radeonsi: don't clear framebuffer.state before dcc decomp
This causes inconsistencies between sctx->framebuffer.state and other
sctx->framebuffer properties (like compressed_cb_mask).

The point of this code was to fix an issue with vi_separate_dcc_stop_query,
which was removed by 804e292440 we can safely drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6099
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15261>
(cherry picked from commit 968d68125c)
2022-03-18 20:00:45 +00:00
Mike Blumenkrantz
639aa7ccf7 anv: fix some dynamic rasterization discard cases in pipeline construction
cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15280>
(cherry picked from commit 5ab0e3f0bb)
2022-03-18 20:00:45 +00:00
Mike Blumenkrantz
d3157618ef anv: fix CmdSetColorWriteEnableEXT for maximum rts
Fixes: b15bfe92f7 ("anv: implement VK_EXT_color_write_enable")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15280>
(cherry picked from commit 1e3e7b3a4d)
2022-03-18 20:00:45 +00:00
Mike Blumenkrantz
9d3d5b5c46 anv: fix xfb usage with rasterizer discard
in the initial implementation, a stream like:

* CmdBeginTransformFeedbackEXT
* CmdSetRasterizerDiscardEnableEXT
* CmdDraw
* CmdEndTransformFeedbackEXT
* CmdBeginTransformFeedbackEXT
* CmdDraw
* CmdEndTransformFeedbackEXT

would never enable transform feedback, as it only checked for the change
in rasterizer_discard state

Fixes: 4d531c67df ("anv: support rasterizer discard dynamic state")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15269>
(cherry picked from commit 52f6978484)
2022-03-18 20:00:45 +00:00
Dave Airlie
874f8ca2ac crocus: don't map scanout buffers as write-back
This essentially ports 6440523077
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Aug 6 16:11:18 2021 -0700

    iris: Map scanout buffers WC instead of WB [v2]

to crocus.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15313>
(cherry picked from commit e8c3be0eb8)
2022-03-18 20:00:45 +00:00
Mike Blumenkrantz
6af52034b2 llvmpipe: fix occlusion queries with early depth test
for genuine early depth tests, the samplecount must be updated after depth
test but before samplemask is applied

for inferred-early or regular depth tests, the samplemask can be applied
before the depth test

Fixes: d9276ae965 ("llvmpipe: handle gl_SampleMask writing.")

fixes:
dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15319>
(cherry picked from commit 42e78ba125)
2022-03-18 20:00:45 +00:00
Eric Engestrom
518d3be130 .pick_status.json: Update to 05d6877235 2022-03-18 20:00:45 +00:00
Eric Engestrom
813ee839be VERSION: bump for 21.3.8 2022-03-18 19:26:47 +00:00
Eric Engestrom
722a83ae34 docs: add release notes for 21.3.8 2022-03-18 19:26:42 +00:00
Mike Blumenkrantz
2e8d69c0ce lavapipe: run nir_opt_copy_prop_vars during optimization loop
this enables better elimination of operations

fixes:
dEQP-VK.graphicsfuzz.spv-stable-mergesort-flatten-selection-dead-continues

fixes #5458

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15322>
(cherry picked from commit cf5c32a4b2)
2022-03-10 23:24:02 +00:00
Mike Blumenkrantz
282b323e18 lavapipe: skip format checks for EXTENDED_USAGE
we can effectively skip any kind of checks here and just assume that one
of two scenarios is in effect:
* the user is about to attempt some incredibly illegal behavior that VVL will catch
* the user is about to attempt a pro gamer move and we'll be fine

in either case, it's EXTENDED_USAGE, so hopefully we're about to make a texture
view from a compatible and supported format

cc: mesa-stable

fixes:
dEQP-VK.image.extended_usage_bit_compatibility.image_format_properties*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15320>
(cherry picked from commit 6a4c7ef728)
2022-03-10 23:24:02 +00:00
Dave Airlie
444c93f633 lavapipe: remove broken workaround for zink depth texturing.
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15297>
(cherry picked from commit 938488f439)
2022-03-10 23:24:02 +00:00
Dave Airlie
bb8f6811ad zink: workaround depth texture mode alpha.
Since spir-v only has single channel depth sampling, it breaks
with the old school GL_ALPHA depth mode swizzle, so just detect
that case and smash all the channels.

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15297>
(cherry picked from commit 30cb63bead)
2022-03-10 23:24:02 +00:00
Connor Abbott
de9ad8b0de util/bitset: Fix off-by-one in __bitset_set_range
Fixes: b3b03e33c9 ("util/bitset: add BITSET_SET_RANGE(..)")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107>
(cherry picked from commit 410e746198)
2022-03-10 23:24:02 +00:00
Connor Abbott
0f7392147d ir3/ra: Sanitize parallel copy flags better
For pcopies we only care about the register's type, i.e. whether its a
half-register and whether it's an array (plus its size). Copying over
other flags like IR3_REG_RELATIV just leads to sadness and validator
assertions.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107>
(cherry picked from commit ab0ed4ff3f)
2022-03-10 23:24:02 +00:00
Jason Ekstrand
85c8320385 lavapipe: Reset the free_cmd_buffers list in TrimCommandPool
We delete all the command buffers but they're still in the list so
future allocations may try to re-use them post-free and another trim
will re-delete them.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15311>
(cherry picked from commit 66cb64c8ad)
2022-03-10 23:24:01 +00:00
Rob Clark
e3ff6df798 mesa: Fix discard_framebuffer for fbo vs winsys
GL is annoying when it comes to having different enums for winsys vs
fbo.

Note that the issue this closes was only accidentially exposed by a
change the resulted in sysmem vs GMEM path taken.

Fixes: db2ae51121 ("mesa: Skip partial InvalidateFramebuffer of packed depth/stencil.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6103
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15308>
(cherry picked from commit f4ec900953)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
e16f7f458a zink: lower dmod on AMD hardware
this hardware won't return the correct value from dmod instructions,
so lower it to ensure that cts passes

nobody else will ever hit this, so perf isn't an issue and regular fmod
can be left alone

fixes (amd):
KHR-GL46.gpu_shader_fp64.builtin.mod_d*

Fixes: 5fae35fb17 ('zink: fix 64bit float shader ops ')

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15306>
(cherry picked from commit c24bca2d3a)
2022-03-10 23:24:01 +00:00
Erik Faye-Lund
434fabe221 docs: fixup zink gl 4.3 requirements
The multiViewport feature isn't required for GL 4.3, it's required for
GL 4.1. Technically speaking, we could have just dropped it because we
already list the maxViewports requirement. But it seems better to be
very clear here to me.

Fixes: 29f8f21bff ("docs: document zink GL 4.3 requirements")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15300>
(cherry picked from commit e666134975)
2022-03-10 23:24:01 +00:00
Pierre-Eric Pelloux-Prayer
0bef7767b2 gallium/tc: zero alloc transfers
Otherwise this causes trouble with unitialized memory, eg with:
   struct si_transfer {
      struct threaded_transfer b;
      struct si_resource *staging;
   };
'staging' will not be initialized and this causes #6109.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6109

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15298>
(cherry picked from commit 3c3a8f853d)
2022-03-10 23:24:01 +00:00
Pierre-Eric Pelloux-Prayer
eb7534abc8 util/slab: add slab_zalloc
A a variant that clears the allocated object to 0.

Cc: mesa-stable

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15298>
(cherry picked from commit caeec6262d)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
983da3104e aux/trace: rzalloc the context struct
this has problems if pointers are garbage

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14854>
(cherry picked from commit 8142fc5a45)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
c31de8e007 lavapipe: update multisample state after blend state
null blend pipeline state will zero the blend struct, which would cause
values set here to be overwritten

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15282>
(cherry picked from commit 7114490115)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
7fc105358b llvmpipe: clamp surface clear geometry
avoid oob writes to avoid crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14655>
(cherry picked from commit 165a880f1a)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
752af7467e llvmpipe: fix debug print iterating in set_framebuffer_state
this would potentially access garbage memory by checking the existing
state using the incoming state's iterator values

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14857>
(cherry picked from commit 4c76a19ca3)
2022-03-10 23:24:01 +00:00
Mike Blumenkrantz
35f4051a90 zink: fix 64bit float shader ops
this was being set from back before zink actually supported 64bit
natively and only 32bit was functional, but it breaks 64bit support

cc: mesa-stable

fixes (lavapipe):
KHR-GL46.gpu_shader_fp64.builtin.mod_dvec2
KHR-GL46.gpu_shader_fp64.builtin.mod_dvec3
KHR-GL46.gpu_shader_fp64.builtin.mod_dvec4

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15274>
(cherry picked from commit 5fae35fb17)
2022-03-10 23:24:00 +00:00
Dave Airlie
129966c778 gallivm/nir: extract a valid texture index according to exec_mask.
When using indirect textures, some lanes may not be active,
particularly in a loop, so as with some other areas, extracting
the correct lane is needed here. This extracts the last valid one.

KHR-GL45.texture_barrier.* on zink.

Fixes: e168d148d7 ("gallivm/nir: handle non-uniform texture offsets")

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15259>
(cherry picked from commit 8346983775)
2022-03-10 23:24:00 +00:00
Pierre-Eric Pelloux-Prayer
45e0a5ddb4 radeonsi: change rounding mode to round to even
Use ROUND_TO_EVEN instead of TRUNCATE; this matches what pal and radv do.

This fixes the spec@ext_framebuffer_multisample@turn-on-off tests.

Cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15240>
(cherry picked from commit 9c49550163)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
1aba006c84 zink: invalidate non-punted recycled descriptor sets that are not valid
these sets may contain refs from the descriptors which need to be removed
to avoid invalid memory access if the ref is leaked

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit e0030bc39f)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
3cca717bc1 zink: stop leaking descriptor sets
when migrating a recycled set here, the set was previously invalid and
in the recycled table, meaning it can be reused directly so long as
it's first invalidated

the previous code would instead pop a different set off the allocation array,
leaking this one

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit d63f3c31b7)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
3579041897 zink: mark fbfetch push sets as non-cached
these can't be cached, so ensure the value isn't uninitialized

Test case 'KHR-GL46.blend_equation_advanced.blend_all.GL_HARDLIGHT_KHR_all_qualifier'..
==1193311== Conditional jump or move depends on uninitialised value(s)
==1193311==    at 0x634EF05: update_push_ubo_descriptors (zink_descriptors.c:1230)
==1193311==    by 0x634FCC5: zink_descriptors_update (zink_descriptors.c:1412)
==1193311==    by 0x63A5EA1: void zink_draw<(zink_multidraw)1, (zink_dynamic_state)3, true, false>(pipe_context*, pipe_draw_info const*, unsigned int, pipe_draw_indirect_info const*, pipe_draw_start_count_bias const*, unsigned int, pipe_vertex_state*, unsigned int) (zink_draw.cpp:788)
==1193311==    by 0x635A0AF: void zink_draw_vbo<(zink_multidraw)1, (zink_dynamic_state)3, true>(pipe_context*, pipe_draw_info const*, unsigned int, pipe_draw_indirect_info const*, pipe_draw_start_count_bias const*, unsigned int) (zink_draw.cpp:907)
==1193311==    by 0x6174397: tc_call_draw_single (u_threaded_context.c:3150)
==1193311==    by 0x616C403: tc_batch_execute (u_threaded_context.c:211)
==1193311==    by 0x616CA44: _tc_sync (u_threaded_context.c:362)
==1193311==    by 0x61725E9: tc_texture_map (u_threaded_context.c:2274)
==1193311==    by 0x5A9DAE9: pipe_texture_map_3d (u_inlines.h:572)
==1193311==    by 0x5A9EB80: st_ReadPixels (st_cb_readpixels.c:530)
==1193311==    by 0x5A0647A: read_pixels (readpix.c:1178)
==1193311==    by 0x5A0647A: _mesa_ReadnPixelsARB (readpix.c:1195)
==1193311==    by 0x5A06517: _mesa_ReadPixels (readpix.c:1210)

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit 9a91a520de)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
7efd944384 zink: fix descriptor cache pointer array allocation
this got mixed up during some refactor and started indexing based on the
number of bindings instead of the number of descriptors, which means
that array descriptor bindings would have overlapping array memory

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit ab3725f533)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
ffee465701 zink: wait on program cache fences before destroying programs
if these still have outstanding cache jobs, deleting the object now
will cause a crash

maybe fixes some cts flakiness?

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit c5f585f45a)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
969b7b4a8a zink: use a fence for pipeline cache update jobs
otherwise there's nothing to wait on

cc: mesa-stable

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit 382798ddbd)
2022-03-10 23:24:00 +00:00
Mike Blumenkrantz
2579355eea zink: always update shader variants when rebinding a gfx program
the variant data may have changed in the meanwhile, so do a pass to
ensure that the correct variant is used

cc: mesa-stable

fixes caselist:
dEQP-GLES31.functional.shaders.sample_variables.sample_mask.discard_half_per_two_samples.multisample_texture_4
dEQP-GLES31.functional.shaders.sample_variables.sample_mask.discard_half_per_two_samples.singlesample_rbo

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit 9a6c58b2f7)
2022-03-10 23:24:00 +00:00
Alyssa Rosenzweig
7e57cfd1f7 panfrost: Fix set_sampler_views for big GL
Roughly use the freedreno logic to handle all the extra things that will
come up in our Piglit sooner than later.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13203>
(cherry picked from commit 304851422a)
2022-03-10 23:23:59 +00:00
Icecream95
2e061263c7 panfrost: Fix ubo_mask calculation
BITSET_MASK returns ~0 when given an input of zero, when we need it to
return 0 instead.

Fixes shaders with only sysvals but no UBOs when push constants are
disabled.

This breaks when 31 or 32 UBOs are used, but PAN_MAX_CONST_BUFFERS is
currently set to 16.

Fixes: c246af0dd8 ("panfrost: Only upload UBOs when needed")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit 9d4441c71a)
2022-03-10 23:23:59 +00:00
Icecream95
26d8573cd2 pan/bi: Make disassembler build reproducibly
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit 42caddcf6b)
2022-03-10 23:23:59 +00:00
Icecream95
215ee9b85d panfrost: Re-emit descriptors after resource shadowing
This could be made slightly more efficient by only setting the dirty
state that is needed, but eventually you reach a point where it's
cheaper to re-emit everything than work out what can or can't be kept.

Fixes rendering issues in Duckstation.

Fixes: cd2c1ef9da ("panfrost: Dirty track textures/samplers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit d6c431c2e3)
2022-03-10 23:23:59 +00:00
Icecream95
8770ff5655 panfrost: Set dirty state in set_shader_buffers
Otherwise the pointer (which is uploaded as a sysval) won't be updated
when a new SSBO is bound.

Fixes: c34b760b9f ("panfrost: Dirty track constant buffers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit b164ee0d7b)
2022-03-10 23:23:59 +00:00
Icecream95
65021851cb pan/bi: Check dependencies of both destinations of instructions
TEXC can have two destinations; the value for neither of them can be
used in the same bundle, so extend the code to check for this to
iterate over both destinations.

Fixes artefacts in the game "LIMBO".

Fixes: a303076c1a ("pan/bi: Add bi_instr_schedulable predicate")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit cb8c47b15e)
2022-03-10 23:23:59 +00:00
Icecream95
c627a2d201 panfrost: Set PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION
Fixes arb-provoking-vertex-render Piglit test.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15250>
(cherry picked from commit d54efebf04)
2022-03-10 23:23:59 +00:00
Mike Blumenkrantz
d178bc8195 gallivm: avoid division by zero when computing cube face
this is illegal and produces NaNs which blow up the sample instr

cc: mesa-stable

fixes (llvmpipe and zink):
KHR-GL45.incomplete_texture_access.sampler
dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_both
dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_both
dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_vertex
dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_both
dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_fragment
dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_vertex

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15246>
(cherry picked from commit c82dcdf598)
2022-03-10 23:23:59 +00:00
Rhys Perry
418c6ba164 radv: include adjust_frag_coord_z in key
Fixes potential pipeline caching bug.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15175>
(cherry picked from commit feb7e30e2d)
[Eric: the disable_aniso_single_level part of the original commit was
dropped in the backport as it didn't apply]
2022-03-10 23:23:59 +00:00
Marek Olšák
1fe2b1c76b radeonsi: fix an assertion failure with register shadowing
The problem is that dirty_states must be 0 for any state that is NULL
in "queued". This code was flagging dirty_states for such states because
it was only looking at "emitted". It should have been looking at "queued".

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15209>
(cherry picked from commit a02dd17cb3)
2022-03-10 23:23:59 +00:00
Samuel Pitoiset
7bd9a72762 radv: disable DCC for Fable Anniversary, Dragons Dogma, GTA IV and more
Also Starcraft 2 and The Force Unleashed II.

These games are known to be affected by the feedback loop issue. We will
fix this properly soon but as a hotfix disabling DCC should be enough.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4424
Cc: mesa-stable
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/15203>
(cherry picked from commit 4380916b76)
2022-03-10 23:23:59 +00:00
Samuel Pitoiset
513aac74cf radv,drirc: move RADV workarounds to 00-radv-defaults.conf
Because we have to maintain two different packages of Mesa, one
specific to RADV and another one for RadeonSI and such, it's a bit
annoying to have to synchronize the drirc entries. Currently, only our
Mesa package installs 00-mesa-defaults.conf which means we have to
backport the drirc RADV changes.

This splits 00-mesa-defaults.conf in two to move the drirc RADV entries
to src/amd/vulkan/00-radv-defaults.conf. Meson will install the file
only if RADV is built.

There is still a caveat for common drirc workarounds like for WSI but
they are rare enough and we could still duplicate them if needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15152>
(cherry picked from commit 53ca85ac2a)
2022-03-10 23:23:58 +00:00
Jonathan Gray
df8cd7d8a4 radv: use MAJOR_IN_SYSMACROS for sysmacros.h include
fixes build on OpenBSD
../src/amd/vulkan/radv_device.c:35:10: fatal error: 'sys/sysmacros.h' file not found

Fixes: 7aaa54feb5 ("radv: implement VK_EXT_physical_device_drm")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13448>
(cherry picked from commit f0398180a5)
2022-03-10 23:23:58 +00:00
Timur Kristóf
4d16399ebf ac/nir/ngg: Fix mixed up primitive ID after culling.
When NGG culling is enabled, make sure that the correct
primitive ID is exported by each lane.

Fixes: e97f0463a8 "ac/nir: Implement NGG deferred attribute culling in NIR."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6050
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15055>
(cherry picked from commit 3759a16d8a)
2022-03-10 23:23:58 +00:00
Marek Olšák
2872f75219 amd: add a workaround for an SQ perf counter bug
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15098>
(cherry picked from commit 197467c238)
2022-03-10 23:23:58 +00:00
Alyssa Rosenzweig
7e569dd59f panfrost: Push twice as many uniforms
The limit for Bifrost is twice as high as previously thought -- the limit is 64
*slots* of FAU, not 64 words. Each slot is 2 words. We can push twice as much,
saving a considerable number of cycles in some cases.

total instructions in shared programs: 2454260 -> 2431502 (-0.93%)
instructions in affected programs: 845176 -> 822418 (-2.69%)
helped: 3376
HURT: 304
helped stats (abs) min: 1.0 max: 60.0 x̄: 7.92 x̃: 6
helped stats (rel) min: 0.13% max: 45.45% x̄: 4.60% x̃: 4.11%
HURT stats (abs)   min: 1.0 max: 60.0 x̄: 13.06 x̃: 8
HURT stats (rel)   min: 0.16% max: 35.09% x̄: 7.58% x̃: 6.52%
95% mean confidence interval for instructions value: -6.50 -5.87
95% mean confidence interval for instructions %-change: -3.75% -3.43%
Instructions are helped.

total tuples in shared programs: 1963383 -> 1951560 (-0.60%)
tuples in affected programs: 638622 -> 626799 (-1.85%)
helped: 2959
HURT: 573
helped stats (abs) min: 1.0 max: 54.0 x̄: 5.61 x̃: 4
helped stats (rel) min: 0.15% max: 28.57% x̄: 3.61% x̃: 3.12%
HURT stats (abs)   min: 1.0 max: 50.0 x̄: 8.35 x̃: 6
HURT stats (rel)   min: 0.25% max: 27.34% x̄: 6.24% x̃: 4.92%
95% mean confidence interval for tuples value: -3.61 -3.08
95% mean confidence interval for tuples %-change: -2.18% -1.85%
Tuples are helped.

total clauses in shared programs: 387817 -> 365111 (-5.85%)
clauses in affected programs: 135527 -> 112821 (-16.75%)
helped: 3489
HURT: 25
helped stats (abs) min: 1.0 max: 43.0 x̄: 6.52 x̃: 5
helped stats (rel) min: 0.82% max: 58.33% x̄: 17.48% x̃: 15.87%
HURT stats (abs)   min: 1.0 max: 3.0 x̄: 1.56 x̃: 1
HURT stats (rel)   min: 2.94% max: 11.11% x̄: 6.87% x̃: 6.67%
95% mean confidence interval for clauses value: -6.67 -6.26
95% mean confidence interval for clauses %-change: -17.65% -16.96%
Clauses are helped.

total cycles in shared programs: 201842.21 -> 168754.04 (-16.39%)
cycles in affected programs: 84035.50 -> 50947.33 (-39.37%)
helped: 3547
HURT: 136
helped stats (abs) min: 0.041665999999999315 max: 54.0 x̄: 9.33 x̃: 8
helped stats (rel) min: 0.17% max: 80.77% x̄: 36.10% x̃: 36.84%
HURT stats (abs)   min: 0.041665999999999315 max: 1.0 x̄: 0.12 x̃: 0
HURT stats (rel)   min: 0.18% max: 12.24% x̄: 1.18% x̃: 0.61%
95% mean confidence interval for cycles value: -9.26 -8.71
95% mean confidence interval for cycles %-change: -35.34% -34.11%
Cycles are helped.

total arith in shared programs: 74918.46 -> 75022.62 (0.14%)
arith in affected programs: 22471.04 -> 22575.21 (0.46%)
helped: 1571
HURT: 1492
helped stats (abs) min: 0.041665999999999315 max: 1.125 x̄: 0.17 x̃: 0
helped stats (rel) min: 0.17% max: 40.00% x̄: 2.50% x̃: 1.96%
HURT stats (abs)   min: 0.041665999999999315 max: 2.375 x̄: 0.25 x̃: 0
HURT stats (rel)   min: 0.16% max: 100.00% x̄: 5.35% x̃: 2.37%
95% mean confidence interval for arith value: 0.02 0.05
95% mean confidence interval for arith %-change: 1.08% 1.56%
Arith are HURT.

total ldst in shared programs: 174812 -> 137889 (-21.12%)
ldst in affected programs: 81319 -> 44396 (-45.41%)
helped: 3722
HURT: 0
helped stats (abs) min: 1.0 max: 62.0 x̄: 9.92 x̃: 8
helped stats (rel) min: 1.82% max: 100.00% x̄: 47.18% x̃: 43.75%
95% mean confidence interval for ldst value: -10.20 -9.64
95% mean confidence interval for ldst %-change: -47.97% -46.39%
Ldst are helped.

total quadwords in shared programs: 1757124 -> 1714130 (-2.45%)
quadwords in affected programs: 584065 -> 541071 (-7.36%)
helped: 3474
HURT: 173
helped stats (abs) min: 1.0 max: 90.0 x̄: 12.66 x̃: 9
helped stats (rel) min: 0.26% max: 34.18% x̄: 8.78% x̃: 8.33%
HURT stats (abs)   min: 1.0 max: 26.0 x̄: 5.76 x̃: 4
HURT stats (rel)   min: 0.45% max: 20.66% x̄: 4.48% x̃: 2.63%
95% mean confidence interval for quadwords value: -12.21 -11.37
95% mean confidence interval for quadwords %-change: -8.36% -7.95%
Quadwords are helped.

total threads in shared programs: 52898 -> 53142 (0.46%)
threads in affected programs: 262 -> 506 (93.13%)
helped: 250
HURT: 6
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: 0.92 0.99
95% mean confidence interval for threads %-change: 93.69% 99.28%
Threads are helped.

total spills in shared programs: 161 -> 107 (-33.54%)
spills in affected programs: 54 -> 0
helped: 27
HURT: 0

total fills in shared programs: 1386 -> 796 (-42.57%)
fills in affected programs: 590 -> 0
helped: 27
HURT: 0

Fixes: d4dccea0ba ("panfrost: Add UBO push data structure")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15239>
(cherry picked from commit 7bda838c56)
2022-03-10 23:23:58 +00:00
Alyssa Rosenzweig
673f812835 panfrost: Flush resources when shadowing
When we shadow a resource, the backing BO is changed; as such,
existing references to the resource become invalid. So batches accessing the
resource need to be flushed (or otherwise have their references invalidated).

The wrong behaviour change (not flushing) was introduced when we started
tracking resources instead of BOs. The issue manifested as a severe performance
regression in glmark2's -bbuffer test, particular the subdata subtest. The issue
is magnified on slow CPUs; without the fix, the test becomes completely CPU
bound

Relevant glmark2 -bbuffer test from 43fps to 84fps.

Apparently, this causes functional issues too -- this performance-minded change
also fixes a few piglits.

Fixes: cecb889481 ("panfrost: Do tracking of resources, not BOs")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Chris Healy <cphealy@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13502>
(cherry picked from commit 988d5aae74)
2022-03-10 23:23:58 +00:00
Alyssa Rosenzweig
74ff12b0d6 panfrost: Handle NULL samplers
Fixes a NULL dereference in Piglit fp-fragment-position, getting the
test to pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13203>
(cherry picked from commit 5536852d60)
2022-03-10 23:23:58 +00:00
Alyssa Rosenzweig
67e2cd9ec6 panfrost: Handle NULL sampler views
Fixes a NULL dereference in Piglit fp-fragment-position.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13203>
(cherry picked from commit 53ef20f08d)
2022-03-10 23:23:58 +00:00
Alyssa Rosenzweig
3e1d5797ae panfrost: Fix FD resource_get_handle
When handle->type is WINSYS_HANDLE_TYPE_FD, the caller wants a file descriptor
for the BO backing the resource. We previously had two paths for this:

1. If rsrc->scanout is available, we prime the GEM handle from the KMS device
   (rsrc->scanout->handle) to a file descriptor via the KMS device.

2. If rsrc->scanout is not available, we prime the GEM handle from the GPU
   (bo->gem_handle) to a file descriptor via the GPU device.

In both cases, the caller passes in a resource (with BO) and expects out a file
descriptor. There are no direct GEM handles in the function signature; the
caller doesn't care which GEM handle we prime to get the file descriptor. In
principle, both paths produce the same file descriptor for the same BO, since
both GEM handles represent the same underlying resource (viewed from different
devices).

On grounds of redundancy alone, it makes sense to remove the rsrc->scanout path.
Why have a path that only works sometimes, when we have another path that works
always?

In fact, the issues with the rsrc->scanout path are deeper. rsrc->scanout is
populated by renderonly_create_gpu_import_for_resource, which does the
following:

1. Get a file descriptor for the resource by resource_get_handle with
   WINSYS_HANDLE_TYPE_FD
2. Prime the file descriptor to a GEM handle via the KMS device.

Here comes strike number 2: in order to get a file descriptor via the KMS
device, we had to /already/ get a file descriptor via the GPU device. If we go
down the KMS device path, we effectively round trip:

   GPU handle -> fd -> KMS handle -> fd

There is no good reason to do this; if everything works, the fd is the same in
each case. If everything works. If.

The lifetimes of the GPU handle and the KMS handle are not necessarily bound. In
principle, a resource can be created with scanout (constructing a KMS handle).
Then the KMS view can be destroyed (invalidating the GEM handle for the KMS
device), even though the underlying resource is still valid. Notice the GPU
handle is still valid; its lifetime is tied to the resource itself. Then a
caller can ask for the FD for the resource; as the resource is still valid, this
is sensible. Under the scanout path, we try to get the FD by priming the GEM
handle on the KMS device... but that GEM handle is no longer valid, causing the
PRIME ioctl to fail with ENOENT. On the other hand, if we primed the GPU GEM
handle, everything works as expected.

These edge cases are not theoretical; recent versions of Xwayland trigger this
ENOENT, causing issue #5758 on all Panfrost devices. As far as I can tell, no
other kmsro driver has this 'special' kmsro path; the only part of
resource_get_handle that needs special handling for kmsro is getting a KMS
handle.

Let's remove the broken, useless path, fix Xwayland, bring us in line with other
drivers, and delete some code.

Thank you for coming to my ted talk.

Closes: #5758
Fixes: 7da251fc72 ("panfrost: Check in sources for command stream")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-and-tested-by: Jan Palus <jpalus@fastmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: James Jones <jajones@nvidia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Tested-by: Dan Johansen <strit@manjaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15120>
(cherry picked from commit b5734cc1c4)
2022-03-10 23:23:58 +00:00
Xiaohui Gu
293e3692b1 iris: Mark a dirty update when vs_needs_sgvs_element value changed
Add vs_needs_sgvs_element value check when updating vertex
element dirty state in iris_update_compiled_vs to solve
render error of Android game "Genshin Impact".

Signed-off-by: Xiaohui Gu <xiaohui.gu@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15142>
(cherry picked from commit 4d81c60e11)
2022-03-10 23:23:57 +00:00
Dave Airlie
ddcecb54b0 crocus: change the line width workaround for gfx4/5
This fixes piglit line-flat-clip-color and the hud fps counter.

Fixes: 6b7a68b7c2 ("crocus: add missing line smooth bits.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15229>
(cherry picked from commit a10b5d7086)
2022-03-10 23:23:57 +00:00
Lionel Landwerlin
f2ff1142ba intel/fs: fix total_scratch computation
We only have a single prog_data::total_scratch for all shader variants
(SIMD 8, 16, 32). Therefore we should always max the total_scratch on
top of existing variant.

We probably haven't run into that issue before because we compile by
increasing SIMD size and higher SIMD size is more likely to spill. But
for bindless shaders with return shaders, if the last return part
doesn't spill, we completely ignore the previous parts' scratch
computation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15193>
(cherry picked from commit 96c8880900)
2022-03-10 23:23:57 +00:00
Lionel Landwerlin
f4213683da anv: fix fast clear type value with external images
Disable fast clear if not supported by the external modifier.

v2: Set fast_clear value to NONE in case of import/export from/to external

v3: Move logic next to existing acquire/release checks (Nanley)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6056
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15096>
(cherry picked from commit 214092da87)
2022-03-10 23:23:57 +00:00
Connor Abbott
1e233de9e9 ir3/nir: Fix 1d array readonly images
ncoords includes the array index, and the NIR source has the array index
as its last component, so we have to insert the extra y coordinate in
the middle in this case.

Fixes: 0bb0cac ("freedreno/ir3: handle image buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>
(cherry picked from commit 58d72f45e5)
2022-03-10 23:23:57 +00:00
Connor Abbott
3af00d0624 ir3: Don't always set bindless_tex with readonly images
Fixes: 274f381 ("ir3: Plumb through bindless support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>
(cherry picked from commit 21ac044c3e)
2022-03-10 23:23:57 +00:00
Jonathan Gray
63885e7135 util: use correct type in sysctl argument
Fixes build on OpenBSD/macppc powerpc

error: incompatible pointer types passing 'int *' to parameter of type 'size_t *'
    (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]

Fixes: 01bd21eef8 ("gallium: Import Dennis Smit cpu detection code.")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>
(cherry picked from commit 6250a3bc18)
2022-03-10 23:23:57 +00:00
Jonathan Gray
c9afc6a089 util: fix build with clang 10 on mips64
On mips64, the compiler does not allow use of non-zero argument with
__builtin_frame_address(). However, the returned frame address is only
used when PIPE_ARCH_X86 is defined. The compile error can be avoided
by making #ifdef PIPE_ARCH_X86 cover the getting of frame address too.

The argument checking of __builtin_frame_address() has been present
as a debug assert in clang 8. In clang 10, there is a proper runtime
check for the argument. This is why the build has not failed before.

Fixes: dc94a0506f ("gallium: Do not add -Wframe-address option for gcc <= 4.4.")
from Visa Hankala

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>
(cherry picked from commit 0536b69133)
2022-03-10 23:23:57 +00:00
Jonathan Gray
28afbf3840 util/u_atomic: fix build on clang archs without 64-bit atomics
Make this build on clang architectures that don't have 64-bit atomic
instructions.  Clang doesn't allow redeclaration (and therefore
redefinition) of the __sync_* builtins.  Use #pragma redefine_extname
to work around that restriction.  Clang also turns __sync_add_and_fetch
into __sync_fetch_and_add (and __sync_sub_and_fetch into
__sync_fetch_and_sub) in certain cases, so provide these functions as
well.

Fixes: a6a38a038b ("util/u_atomic: provide 64bit atomics where they're missing")
patch from Mark Kettenis

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>
(cherry picked from commit f12c107b03)
2022-03-10 23:23:57 +00:00
Jonathan Gray
e1a35767c1 util: fix util_cpu_detect_once() build on OpenBSD
Correct type for sysctl argument to fix the build.

../src/util/u_cpu_detect.c:631:29: error: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
      sysctl(mib, 2, &ncpu, &len, NULL, 0);
                            ^~~~

Fixes: 5623c75e40 ("util: Fix setting nr_cpus on some BSD variants")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13448>
(cherry picked from commit afece589dc)
2022-03-10 23:23:57 +00:00
Jonathan Gray
237197ee69 util: unbreak non-linux mips64 build
Put linux specific path inside an ifdef.  Unbreaks mips64 build on
OpenBSD and likely other systems without Elf64_auxv_t.

Fixes: 88b234d7a7 ("gallivm: add basic mips64 support and set mcpu to mips64r5 on ls3a4000")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15166>
(cherry picked from commit 7d609431d4)
2022-03-10 23:23:57 +00:00
Erik Faye-Lund
f6a5684750 docs: remove incorrect drivers from extension
This extension isn't wired up in Gallium, so there's just no way a
Gallium driver like Panfrost exposes it.

While there were support in i965 for this for the cancelled Broxton GPU,
thre's no such support in the Iris driver. And since Broxton has been
cancelled, it's unlikely to be wired up any time soon.

Fixes: da23a31726 ("docs/features: Update ASTC entries for Panfrost")
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15145>
(cherry picked from commit 834db3aa8d)
2022-03-10 23:23:56 +00:00
Dave Airlie
6ae28c43dc draw/so: don't use pre clip pos if we have a tes either.
This check for geom shader needed to be expanded for tess support.

dEQP-VK.transform_feedback.simple.depth_clip_control_tese with lvp

Fixes: dacf8f5f5c ("draw: hook up final bits of tessellation")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15128>
(cherry picked from commit b77ef4dd60)
2022-03-10 23:23:56 +00:00
Rhys Perry
0e61e32758 anv: Enable nir_opt_access
This commit will enable pass for searching readonly / writeonly
access when it's missing.

We don't support shaderStorageImageReadWithoutFormat
and the optimization pass causes those shaders to
take the write-only path which does support formatless.

Following games are affected with positive result:
 - Wolfenstein: Youngblood
 - Wolfenstein II: The New Colossus https://gitlab.freedesktop.org/mesa/mesa/-/issues/3138
 - Rage 2 https://gitlab.freedesktop.org/mesa/mesa/-/issues/5791
 - The Surge 2 https://gitlab.freedesktop.org/mesa/mesa/-/issues/5805
 - Metro Exodus https://gitlab.freedesktop.org/mesa/mesa/-/issues/4703
 - DOOM Eternal https://gitlab.freedesktop.org/mesa/mesa/-/issues/4273

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3138,https://gitlab.freedesktop.org/mesa/mesa/-/issues/5791,https://gitlab.freedesktop.org/mesa/mesa/-/issues/4273
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15082>
(cherry picked from commit ded9cb904f)
2022-03-10 23:23:56 +00:00
Danylo Piliaiev
ea8391a890 turnip: Use LATE_Z when there might be depth/stencil feedback loop
Otherwise a shader invocation would read the value which should have
been set AFTER this shader invocation.

Fixes tests:
 dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers
 dEQP-VK.rasterization.rasterization_order_attachment_access.stencil.samples_1.multi_draw_barriers

Fixes: 71595a189a
("tu: Fix feedback loops in sysmem mode")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15106>
(cherry picked from commit dab34bd5c8)
2022-03-10 23:23:56 +00:00
Jason Ekstrand
8d920d52c5 anv: Don't assume depth/stencil attachments have depth
If a secondary command buffer is used and the client provides a
framebuffer and that framebuffer has a stencil-only attchment, we would
try to get the aux usage for the depth component of that attachment and
crash.  Check the aspects of the image before looking at aux usage.
This fixes at least the following SkQP tests on my Tigerlake:

 - vk_circular-clips
 - vk_filterfastbounds
 - vk_innershapes_bw
 - vk_lineclosepath
 - vk_multipicturedraw_rrectclip_simple
 - vk_pathinvfill
 - vk_quadclosepath
 - vk_rrect_clip_bw
 - vk_windowrectangles

Fixes: 0d8b9c529c ("anv: Allow PMA optimization to be enabled in secondary command buffers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15048>
(cherry picked from commit df0e2a1565)
2022-03-10 23:23:56 +00:00
Lionel Landwerlin
38c023e16b anv: fix conditional render for vkCmdDrawIndirectByteCountEXT
We just forgot about conditional render for this entry point.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2be89cbd82 ("anv: Implement vkCmdDrawIndirectByteCountEXT")
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14891>
(cherry picked from commit 93a90fc85d)
2022-03-10 23:23:56 +00:00
Paulo Zanoni
23094f01be iris: fix register spilling on compute shaders on XeHP
XeHP scratch space is handled differently. Commit ae18e1e707
implemented support for it, but handled it differently between render
and compute shaders: it calculates scratch_addr differently and
doesn't pin the buffer on compute. Make it work on compute shaders by
calling pin_scratch_space() from iris_compute_walker(), which fixes
both the address and the pinning.

This commit can be verified by the two-year-old-but-still-unreviewed
Piglit MR 234. You can also verify this by running a very simple
compute shader with INTEL_DEBUG=spill_fs.

References: https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/234
Fixes: ae18e1e707 ("iris: Add support for scratch on XeHP")
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/15070>
(cherry picked from commit d10fd5b7c9)
2022-03-10 23:23:56 +00:00
Eric Engestrom
2d12eb323e .pick_status.json: Mark 3f7da0c584 as denominated 2022-03-10 23:23:56 +00:00
Eric Engestrom
52a36a4595 .pick_status.json: Mark 4ed7329236 as denominated 2022-03-10 23:23:56 +00:00
Eric Engestrom
a9e47e3a55 .pick_status.json: Mark 432700fc61 as denominated 2022-03-10 23:23:56 +00:00
Eric Engestrom
9b043263ad .pick_status.json: Mark a5c7d34fdf as denominated 2022-03-10 23:23:55 +00:00
Eric Engestrom
09fc651529 .pick_status.json: Mark 204ea77b06 as denominated 2022-03-10 23:23:55 +00:00
Eric Engestrom
204c79131b .pick_status.json: Mark 2d1b506acf as denominated 2022-03-10 23:23:55 +00:00
Eric Engestrom
f0e6486d63 .pick_status.json: Mark 3ef093f697 as denominated 2022-03-10 23:23:55 +00:00
Eric Engestrom
9aea0b6145 .pick_status.json: Mark e1964e1dde as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
3d05ecc5ee .pick_status.json: Mark 03a80490a4 as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
e4a341cd2b .pick_status.json: Mark 698ae34844 as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
46ac91508e .pick_status.json: Mark 62b8daa889 as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
bf5ff75f72 .pick_status.json: Mark 0136545d16 as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
b006a020ac .pick_status.json: Mark 7ec0e2b893 as denominated 2022-03-10 21:39:22 +00:00
Eric Engestrom
f2928c57d0 .pick_status.json: Update to 2106c3bab6 2022-03-10 21:39:18 +00:00
Adam Jackson
988762679c meson: Add "amber" option for automatic LTS build configuration
Setting amber to true changes these defaults:

- glvnd defaults to enabled
- the glvnd vendor name is set to "amber"
- the gallium and vulkan drivers are disabled
- prefer-iris defaults to false
- eglQueryString(EGL_VENDOR) returns "Mesa Project (Amber)"

The megadriver for the classic driver set will be installed to a file
name unique from Mesa main. Beyond that no attempt is made to use
filenames different from main - particularly not if glvnd is explicitly
disabled - so you would still need to configure your install paths
appropriately so things don't collide, if you want them to not collide.
But if you have that problem, consider that glvnd already solves it.

This has a quiet dependency on glapi and gbm's library API remaining
stable. gbm you could fix by linking it statically, glapi is a little
harder. I think the right move for glapi is to use glvnd's gldispatch
more directly, but that's not public API at the moment.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10557>
2022-03-06 08:36:14 +00:00
Eric Engestrom
d5ec846bc8 VERSION: bump for 21.3.7 2022-02-23 18:35:29 +00:00
Eric Engestrom
c27743979d docs: add release notes for 21.3.7 2022-02-23 18:19:19 +00:00
Alyssa Rosenzweig
2a96aba42e panvk: Use more reliable assert for UBO pushing
The important thing isn't the number of words pushed, it's that there are no
UBOs required for us to upload. Check that instead.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15090>
(cherry picked from commit 3c1021cd1e)
2022-02-23 17:55:57 +00:00
Marek Olšák
03908ef6d5 ac/surface: add more elements to meta equations because HTILE can use them
according to gfx10SwizzlePattern.h

Fixes: 9fabbf2150 - ac/surface: copy the HTILE equations to the surface

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15098>
(cherry picked from commit 79a7ab642a)
2022-02-23 17:55:57 +00:00
Qiang Yu
a0a15b7400 glx: fix pbuffer refcount init
glXMakeCurrent* may miss release pbuffer if pbuffer is created
with refcount=0. This won't happen when pbuffer had different
GLX id and X pixmap id.

cc: mesa-stable

Fixes: bc8a51a79a ("glx: no need to create extra pixmap for pbuffer")

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14926>
(cherry picked from commit bf09c08e31)
2022-02-23 17:55:57 +00:00
Marcin Ślusarz
483f8a9941 anv: don't set color state when input state was requested
Fixes: 814dc66935 ("anv: Allocate surface states per-subpass")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15081>
(cherry picked from commit 037e98a10c)
2022-02-23 17:55:57 +00:00
Qiang Yu
341a13b89e radeonsi: fix depth stencil multi sample texture blit
This causes the flushed_depth_texture is allocated without
multi sample. So the blit will cause VM fault.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14990>
(cherry picked from commit 80974a5f1e)
2022-02-23 17:55:57 +00:00
Dave Airlie
b07f30270c crocus: fix leak on gen4/5 stencil fallback blit path.
Noticed by Ilia.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15100>
(cherry picked from commit 0f989a840e)
2022-02-23 17:55:57 +00:00
Mike Blumenkrantz
b75deed85a zink: always invalidate streamout counter buffer if not resuming
this otherwise treates begin/end/begin the same as begin/pause/resume

cc: mesa-stable

fixes:
KHR-GL46.texture_view.view_classes
KHR-GL46.transform_feedback.capture_geometry_separate_test
KHR-GL46.transform_feedback.capture_vertex_separate_test
KHR-GL46.transform_feedback.query_geometry_separate_test
KHR-GL46.transform_feedback.query_vertex_separate_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15020>
(cherry picked from commit e8ba9cee27)
2022-02-23 17:55:57 +00:00
Mike Blumenkrantz
f4119bc259 zink: always set VkPipelineMultisampleStateCreateInfo::pSampleMask
by initializing this on context creation, we can ensure that the correct
value is always here

cc: mesa-stable

fixes:
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_only
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage_and_alpha_to_coverage
dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_only

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14974>
(cherry picked from commit 8ff96efcfd)
2022-02-23 17:55:57 +00:00
Lionel Landwerlin
146135feb6 anv/genxml/intel/fs: fix binding shader record entry
Bit is flipped compared to all the other packets.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 705395344d ("intel/fs: Add support for compiling bindless shaders with resume shaders")
Fixes: c3ac9afca3 ("anv: Create and return ray-tracing pipeline SBT handles")
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15078>
(cherry picked from commit 2763a8af5a)
2022-02-23 17:55:57 +00:00
Alyssa Rosenzweig
7e8f25a8f2 pan/bi: Lower swizzles on CSEL.i32/MUX.i32
This is counter-intuitive, but required for correct operation when
CSEL.i32 takes a 1-bit (stored 16-bit) boolean argument. The impedance
mismatch ultimately is between CSEL.b32 (nir's bcsel, nonexistant in the
hardware) and the lowering CSEL.i32. However, a similar problem exists
even with MUX.i32 which lacks a good way of zero/sign-extending
booleans.

Cherry-picked from my Valhall branch though the issue also affects
Bifrost. Fixes piglit shaders@glsl-vs-if-bool on Bifrost.

Unfortunately, shader-db is quite unhappy :-(

The proper fix is to use lower_bool_to_bitsize, but that can't be
backported to mesa-stable.

total instructions in shared programs: 157539 -> 158953 (0.90%)
instructions in affected programs: 55621 -> 57035 (2.54%)
helped: 2
HURT: 259
helped stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2
helped stats (rel) min: 2.11% max: 2.67% x̄: 2.39% x̃: 2.39%
HURT stats (abs)   min: 1.0 max: 40.0 x̄: 5.47 x̃: 2
HURT stats (rel)   min: 0.36% max: 16.13% x̄: 2.55% x̃: 1.59%
95% mean confidence interval for instructions value: 4.44 6.40
95% mean confidence interval for instructions %-change: 2.21% 2.82%
Instructions are HURT.

total tuples in shared programs: 132322 -> 132907 (0.44%)
tuples in affected programs: 31806 -> 32391 (1.84%)
helped: 5
HURT: 152
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.40 x̃: 1
helped stats (rel) min: 0.39% max: 3.03% x̄: 1.70% x̃: 1.61%
HURT stats (abs)   min: 1.0 max: 42.0 x̄: 3.89 x̃: 2
HURT stats (rel)   min: 0.29% max: 18.18% x̄: 2.50% x̃: 1.79%
95% mean confidence interval for tuples value: 2.88 4.58
95% mean confidence interval for tuples %-change: 1.87% 2.85%
Tuples are HURT.

total clauses in shared programs: 28672 -> 28698 (0.09%)
clauses in affected programs: 869 -> 895 (2.99%)
helped: 1
HURT: 24
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 5.88% max: 5.88% x̄: 5.88% x̃: 5.88%
HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.12 x̃: 1
HURT stats (rel)   min: 0.49% max: 33.33% x̄: 8.46% x̃: 3.59%
95% mean confidence interval for clauses value: 0.82 1.26
95% mean confidence interval for clauses %-change: 3.84% 11.93%
Clauses are HURT.

total cycles in shared programs: 15119.04 -> 15137.88 (0.12%)
cycles in affected programs: 922.87 -> 941.71 (2.04%)
helped: 4
HURT: 79
helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.05 x̃: 0
helped stats (rel) min: 0.40% max: 3.17% x̄: 1.57% x̃: 1.35%
HURT stats (abs)   min: 0.041665999999999315 max: 1.75 x̄: 0.24 x̃: 0
HURT stats (rel)   min: 0.30% max: 20.00% x̄: 2.83% x̃: 2.12%
95% mean confidence interval for cycles value: 0.17 0.29
95% mean confidence interval for cycles %-change: 1.86% 3.37%
Cycles are HURT.

total arith in shared programs: 4922.71 -> 4947.71 (0.51%)
arith in affected programs: 1423.79 -> 1448.79 (1.76%)
helped: 5
HURT: 177
helped stats (abs) min: 0.0416669999999999 max: 0.0833330000000001 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.40% max: 3.17% x̄: 1.82% x̃: 1.67%
HURT stats (abs)   min: 0.041665999999999315 max: 1.75 x̄: 0.14 x̃: 0
HURT stats (rel)   min: 0.30% max: 22.22% x̄: 2.50% x̃: 1.52%
95% mean confidence interval for arith value: 0.11 0.17
95% mean confidence interval for arith %-change: 1.86% 2.90%
Arith are HURT.

total quadwords in shared programs: 120605 -> 120956 (0.29%)
quadwords in affected programs: 26535 -> 26886 (1.32%)
helped: 6
HURT: 143
helped stats (abs) min: 1.0 max: 7.0 x̄: 2.83 x̃: 1
helped stats (rel) min: 0.93% max: 6.33% x̄: 2.29% x̃: 1.71%
HURT stats (abs)   min: 1.0 max: 21.0 x̄: 2.57 x̃: 2
HURT stats (rel)   min: 0.34% max: 13.79% x̄: 2.02% x̃: 1.22%
95% mean confidence interval for quadwords value: 1.86 2.86
95% mean confidence interval for quadwords %-change: 1.45% 2.24%
Quadwords are HURT.

total threads in shared programs: 4670 -> 4669 (-0.02%)
threads in affected programs: 2 -> 1 (-50.00%)
helped: 0
HURT: 1

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14576>
(cherry picked from commit 8bd4976d98)
2022-02-23 17:55:57 +00:00
Alyssa Rosenzweig
39e45d52d6 pan/bi: Avoid *FADD.v2f16 hazard in scheduler
Obscure encoding restriction. Fixes crash (assertion fail when instruction
packing) in asphalt9/2659.shader_test on Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15072>
(cherry picked from commit 24d2bdb1e0)
2022-02-23 17:55:56 +00:00
Alyssa Rosenzweig
1c8401d88c pan/bi: Avoid *FADD.v2f16 hazard in optimizer
This is a very obscure encoding restriction in the Bifrost ISA. Unknown if any
real apps or tests hit this, but we still need to get it right sadly.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15072>
(cherry picked from commit 8e0eb592d5)
2022-02-23 17:55:56 +00:00
Ian Romanick
45b0d0817f nir: Add missing dependency on nir_opcodes.py
Commit 38800b38 changed nir_opcodes.py, but that doesn't seem to have
triggered nir_opt_algebraic.py.  The change in 75ef5991 depends on
opt_algebraic lowering 16-bit versions of slt, but if opt_algebraic is
not rebuilt, this may not happen.  This resulted in some people seeing
assertion failures in, for example,
dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_3.step,
due to the backend seeing nir_op_slt that it didn't know how to handle.

v2: Add nir_opcodes.py to nir_algebraic_py so that all the per-driver
algebraic passes pick up the dependency too.  Rename it to
nir_algebraic_depends.  Suggested by Emma.

Closes: #6047
Fixes: d1992255bb ("meson: Add build Intel "anv" vulkan driver")
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15050>
(cherry picked from commit a01b262990)
2022-02-23 17:55:56 +00:00
Lionel Landwerlin
087e2d4d72 nir: fix lower_memcpy
memcpy is divided into chunks that are vec4 sized max. The problem
here happens with a structure of 24 bytes :

  struct {
    float3 a;
    float3 b;
  }

If you memcpy that struct, the lowering will emit 2 load/store, one of
sized 8, next one sized 16. But both end up located at offset 0, so we
effectively drop 2 floats.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a3177cca99 ("nir: Add a lowering pass to lower memcpy")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15049>
(cherry picked from commit 768930a73a)
2022-02-23 17:55:56 +00:00
Dave Airlie
43b52349ec lavapipe: reference gallium fences correctly.
Make sure to take references in all the correct places to get
right lifetimes for these objects and avoid leaks.

Fixes: 94a4982805 ("lavapipe: implement timeline semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15046>
(cherry picked from commit b805d3e6ab)
2022-02-23 17:55:56 +00:00
Thierry Reding
b295aa9997 tegra: Use private reference count for resources
With the recent addition of the shortcuts aiming to avoid atomic
operations, the reference count on resources can become unbalanced
in the Tegra driver since they are wrapped and then proxied to the
Nouveau driver.

Fix this by keeping a private reference count.

Fixes: 7688b8ae98 ("st/mesa: eliminate all atomic ops when setting vertex buffers")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit 108e6eaa83)
2022-02-23 17:55:56 +00:00
Thierry Reding
52e72e52f2 tegra: Use private reference count for sampler views
With the recent addition of the shortcuts aiming to avoid atomic
operations, the reference count on sampler views can become unbalanced
in the Tegra driver since they are wrapped and then proxied to the
Nouveau driver.

Fix this by keeping a private reference count.

Fixes: ef5d427413 ("st/mesa: add a mechanism to bypass atomics when binding sampler views")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit e8ce0a3357)
2022-02-23 17:55:56 +00:00
Timur Kristóf
34b279cdf5 radv: Disable IB2 on compute queues.
The "IB2" indirect buffer command is not supported on compute queues
according to PAL, and it indeed causes GPU hangs when task shaders are
used together with vkCmdExecuteCommands.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15006>
(cherry picked from commit da719792ad)
2022-02-23 17:55:56 +00:00
Connor Abbott
7b99e1d859 ir3/spill: Fix simplify_phi_nodes with multiple loop nesting
Once we simplified a phi node, we never updated the definition it points
to, which meant that it could become out of date if that definition were
also simplified, and we didn't check that when rewriting sources. That
could happen when there are multiple nested loops with phi nodes at the
header.

Fix it by updating the phi's pointer. Since we always update sources
after visiting the definition it points to, when we go to rewrite a
source, if that source points to a simplified phi, the phi's pointer
can't be pointing to a simplified phi because we already visited the phi
earlier in the pass and updated it, or else it's been simplified in the
meantime and this isn't the last pass. This way we don't need to
keep recursing when rewriting sources.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15035>
(cherry picked from commit 3ef858a6f6)
2022-02-23 17:55:56 +00:00
Tapani Pälli
abba5cdf86 mesa/st: always use DXT5 when transcoding ASTC format
This fixes artifacts seen in games when using ASTC transcoding,
we need to use DXT5 for proper alpha channel support.

Number of components is a block specific property, there is no easy
way to see if we will require >1bit alpha support or not, so simply
use DXT5 to have support in place.

Fixes: 91cbe8d855 ("gallium: Add a transcode_astc driconf option")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15029>
(cherry picked from commit d3b4202b63)
2022-02-23 17:55:56 +00:00
Yiwei Zhang
a1c0f9aeb1 venus: properly destroy deferred ahb image before real image creation
Fixes: 19b7b09885 ("venus: prepare image creation helpers for AHB")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15037>
(cherry picked from commit 9dd15295e3)
2022-02-23 17:55:56 +00:00
Emma Anholt
49f5acdc22 i915g: Initialize the rest of the "from_nir" temporary VS struct.
draw looked at the uninitialized XFB state, which should just be zeroed
out since i915 doesn't have XFB.

Fixes: 2b3fc26da8 ("i915g: Switch to using nir-to-tgsi.")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14896>
(cherry picked from commit 780949c62b)
2022-02-23 17:55:55 +00:00
Tapani Pälli
f3cfbbd457 iris: fix a leak on surface states
Cc: mesa-stable
Closes:https://gitlab.freedesktop.org/mesa/mesa/-/issues/6013

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15010>
(cherry picked from commit ecc0041030)
2022-02-23 17:55:55 +00:00
Bas Nieuwenhuizen
4eff8db4ea radv: Fix preamble argument order.
Used the wrong cmdbuffer in the wrong situation. Oops.

Fixes: 915e9178fa ("radv: Split out commandbuffer submission.")
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14574>
(cherry picked from commit 79131b6ee6)
2022-02-23 17:55:55 +00:00
Samuel Pitoiset
df4a2369e5 radv/winsys: fix initializing debug/perftest options if multiple instances
Since the winsys uses refcount, options like RADV_DEBUG_ZERO_VRAM might
have not been initialized if the first instance wasn't created with
application info.

This fixes missing zerovram for vkd3d-proton.

Cc: 21.3 22.0 mesa-stable
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/14978>
(cherry picked from commit aa3405e812)
2022-02-23 17:55:55 +00:00
Jason Ekstrand
7759964bd7 anv: Call vk_command_buffer_finish if create fails
This wasn't much of a problem before because vk_command_buffer_finish()
doesn't do much on an empty command buffer.  However, it's about to be
responsible for managing the pool's list of command buffers so it will
be critical to get this right.

Fixes: c9189f4813 ("anv: Use a common vk_command_buffer structure")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14917>
(cherry picked from commit 7b0e306854)
2022-02-23 17:55:55 +00:00
Ian Romanick
72e5c056ae nir: Produce correct results for atan with NaN
Properly handling NaN adversely affects several hundred shaders in
shader-db (lots of Skia and a few others from various synthetic
benchmarks) and fossil-db (mostly Talos and some Doom 2016).  Only apply
the NaN handling work-around when the shader demands it.

v2: Add comment explaining the 1.0*y_over_x.  Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 2098ae16c8 ("nir/builder: Move nir_atan and nir_atan2 from SPIR-V translator")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 1cb3d1a6ae)
2022-02-23 17:55:55 +00:00
Ian Romanick
bbfcf5b3aa nir: Properly handle various exceptional values in frexp
frexp_sig of ±0, ±Inf, or NaN should just return the input unmodified.

frexp_exp of ±Inf or NaN is undefined, and frexp_exp of ±0 should return
the input unmodified.  This seems to already work.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 23d30f4099 ("spirv,nir: lower frexp_exp/frexp_sig inside a new NIR pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 7d0d9b9fbc)
2022-02-23 17:55:55 +00:00
Ian Romanick
62fc70d62b spirv: Produce correct result for GLSLstd450Tanh with NaN
No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 9f9432d56c ("Revert "spirv: Use a simpler and more correct implementaiton of tanh()"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 93ed87af28)
2022-02-23 17:55:55 +00:00
Ian Romanick
724acc7bd6 spirv: Produce correct result for GLSLstd450Modf with Inf
GLSLstd450ModfStruct too.

No shader-db or fossil-db changes on any Intel platform.

v2: Fix handling 16-bit (and presumably 64-bit) values.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f92a35d831 ("vtn: Fix Modf.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit e442b9d792)
2022-02-23 17:55:55 +00:00
Ian Romanick
062e7ee38c spriv: Produce correct result for GLSLstd450Step with NaN
NOTE: This commit needs "nir: All set-on-comparison opcodes can take all
float types" or regressions will occur in other Vulkan SPIR-V tests.

No shader-db changes on any Intel platform.

NOTE: This commit depends on "nir: All set-on-comparison opcodes can
take all float types".

v2: Fix handling 16-bit (and presumably 64-bit) values.

About 280 shaders in Talos are hurt by a few instructions, and a couple
shaders in Doom 2016 are hurt by a few instructions.

Tiger Lake
Instructions in all programs: 159893290 -> 159895026 (+0.0%)
SENDs in all programs: 6936431 -> 6936431 (+0.0%)
Loops in all programs: 38385 -> 38385 (+0.0%)
Cycles in all programs: 7019260087 -> 7019254134 (-0.0%)
Spills in all programs: 101389 -> 101389 (+0.0%)
Fills in all programs: 131532 -> 131532 (+0.0%)

Ice Lake
Instructions in all programs: 143624235 -> 143625691 (+0.0%)
SENDs in all programs: 6980289 -> 6980289 (+0.0%)
Loops in all programs: 38383 -> 38383 (+0.0%)
Cycles in all programs: 8440083238 -> 8440090702 (+0.0%)
Spills in all programs: 102246 -> 102246 (+0.0%)
Fills in all programs: 131908 -> 131908 (+0.0%)

Skylake
Instructions in all programs: 134185495 -> 134186618 (+0.0%)
SENDs in all programs: 6938790 -> 6938790 (+0.0%)
Loops in all programs: 38356 -> 38356 (+0.0%)
Cycles in all programs: 8222366923 -> 8222365826 (-0.0%)
Spills in all programs: 98821 -> 98821 (+0.0%)
Fills in all programs: 125218 -> 125218 (+0.0%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 1feeee9cf4 ("nir/spirv: Add initial support for GLSL 4.50 builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 75ef5991f5)
2022-02-23 17:55:55 +00:00
Ian Romanick
29fcfb94a1 intel/fs: Don't optimize out 1.0*x and -1.0*x
This (sort of) matches the behavior of nir_opt_algebraic.  This ensures
that subnormal values are properly flushed to zero.

With the aid of "nir/search: Float sources of texture instructions are
float users" and "nir/search: Transitively apply is_only_used_as_float",
there would have been no shader-db regressions on Intel platforms.
However, those caused a significant increase in compile time.  Since the
instruction regressions were so small, I just dropped those commits
rather than improve them.

All Haswell and newer platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20125042 -> 20125094 (<.01%)
instructions in affected programs: 7184 -> 7236 (0.72%)
helped: 0
HURT: 32
HURT stats (abs)   min: 1 max: 4 x̄: 1.62 x̃: 2
HURT stats (rel)   min: 0.11% max: 1.49% x̄: 0.85% x̃: 0.78%
95% mean confidence interval for instructions value: 1.39 1.86
95% mean confidence interval for instructions %-change: 0.74% 0.96%
Instructions are HURT.

total cycles in shared programs: 862745586 -> 862746551 (<.01%)
cycles in affected programs: 109872 -> 110837 (0.88%)
helped: 12
HURT: 23
helped stats (abs) min: 2 max: 774 x̄: 90.83 x̃: 19
helped stats (rel) min: 0.07% max: 25.23% x̄: 3.06% x̃: 0.40%
HURT stats (abs)   min: 2 max: 1106 x̄: 89.35 x̃: 12
HURT stats (rel)   min: 0.08% max: 45.40% x̄: 3.01% x̃: 0.47%
95% mean confidence interval for cycles value: -60.09 115.23
95% mean confidence interval for cycles %-change: -2.21% 4.07%
Inconclusive result (value mean confidence interval includes 0).

All of the shaders hurt are in either UE4 shooter-game or shooter_demo.

Tiger Lake
Instructions in all programs: 159893213 -> 159893290 (+0.0%)
SENDs in all programs: 6936431 -> 6936431 (+0.0%)
Loops in all programs: 38385 -> 38385 (+0.0%)
Cycles in all programs: 7019259514 -> 7019260087 (+0.0%)
Spills in all programs: 101389 -> 101389 (+0.0%)
Fills in all programs: 131532 -> 131532 (+0.0%)

Ice Lake
Instructions in all programs: 143624164 -> 143624235 (+0.0%)
SENDs in all programs: 6980289 -> 6980289 (+0.0%)
Loops in all programs: 38383 -> 38383 (+0.0%)
Cycles in all programs: 8440082767 -> 8440083238 (+0.0%)
Spills in all programs: 102246 -> 102246 (+0.0%)
Fills in all programs: 131908 -> 131908 (+0.0%)

Skylake
Instructions in all programs: 134185424 -> 134185495 (+0.0%)
SENDs in all programs: 6938790 -> 6938790 (+0.0%)
Loops in all programs: 38356 -> 38356 (+0.0%)
Cycles in all programs: 8222366529 -> 8222366923 (+0.0%)
Spills in all programs: 98821 -> 98821 (+0.0%)
Fills in all programs: 125218 -> 125218 (+0.0%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f5dd6dfe01 ("anv: enable VK_KHR_shader_float_controls and SPV_KHR_float_controls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 38a94c82e6)
2022-02-23 17:55:55 +00:00
Ian Romanick
5d74ab48bb nir: All set-on-comparison opcodes can take all float types
Extend 4195a9450b so that the next poor fool doesn't come along and
say, "sge does the right thing for 16-bit sources, but slt gives a NIR
validation failure. What the deuce?"

NOTE: This commit is necessary to prevent regressions in GLSLstd450Step
tests of 16-bit sources at "spriv: Produce correct result for
GLSLstd450Step with NaN".

Fixes: 4195a9450b ("nir: sge operation is defined for floating-point types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
(cherry picked from commit 38800b385c)
2022-02-23 17:55:54 +00:00
Nanley Chery
9b955f0ea4 iris: Don't fast clear with the view format
Fast clear with the resource format instead. This is safe to do because
can_fast_clear_color ensures that the clear color generates the same
pixel with either the view format or the resource format.

On SKL, this prevents us from using an invalid surface state. This platform
doesn't support CCS_E with sRGB formats, but prior to this patch we allowed
fast-clearing with this combination. Piglit's fcc-write-after-clear test
can trigger this.

Fixes: 230952c210 ("iris: Don't support sRGB + Y_TILED_CCS on gen9")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
(cherry picked from commit 6778b3a379)
2022-02-23 17:55:54 +00:00
Mike Blumenkrantz
7fa3eff0ee aux/draw: fix llvm tcs lane vec generation
the idx param for LLVMBuildInsertElement is zero-indexed based on the
value of 'vector_length' (always 4), and the vector length is (obviously)
sized to 'vector_length', so this should be the member of the vec that is being
inserted, not the invocation index

cc: mesa-stable

fixes (zink, but only on my one machine):
KHR-GL46.tessellation_shader.single.max_patch_vertices
KHR-GL46.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_read_write_calls
dEQP-GLES31.functional.tessellation.shader_input_output.barrier
dEQP-GLES31.functional.tessellation.shader_input_output.patch_vertices_5_in_10_out
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_isolines_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_isolines_point_mode_geometry_output_triangles
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_point_mode_geometry_output_lines
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_triangles_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_triangles_point_mode_geometry_output_lines

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14949>
(cherry picked from commit 68c1b50e48)
2022-02-23 17:55:54 +00:00
Ian Romanick
721e8da158 gallivm/nir: Call nir_lower_bool_to_int32 after nir_opt_algebraic_late
All of the opcodes in nir_opt_algebraic_late are the unsized (1-bit)
versions.  If the lowering to int32 happens first, many of the
optimizations and lowerings won't happen.

Of particular importance is the lowering of fisfinite.  If a shader
happens to contain fisfinite of an fp16 value, it will assert later
during compliation.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 78b4e417d4 ("gallivm: handle fisfinite/fisnormal")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14942>
(cherry picked from commit e3cbc328e0)
2022-02-23 17:55:54 +00:00
Qiang Yu
5ea67072ba radeonsi: workaround Specviewperf13 Catia hang on GFX9
The root cause is unknown but PAL always update IA_MULTI_VGT_PARAM
whenever primitive type change.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Singed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14944>
(cherry picked from commit fe560aeb12)
2022-02-23 17:55:54 +00:00
Tapani Pälli
096baed7b9 iris: invalidate L3 read only cache when VF cache is invalidated
When enabling the caching of index,vertex data in the L3 RO Cache
(L3BypassDisable), we need to use L3ReadOnlyCacheInvalidationEnable
to invalidate cache when buffer is modified by CPU/GPU.

Ref: bspec 46314
Fixes: ed8f2c4cbe ("iris: Cache VB/IB in L3$ for Gen12")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14815>
(cherry picked from commit 562f7eef5b)
2022-02-23 17:55:54 +00:00
Tapani Pälli
2ee36d054e anv: invalidate L3 read only cache when VF cache is invalidated
When enabling the caching of index,vertex data in the L3 RO Cache
(L3BypassDisable), we need to use L3ReadOnlyCacheInvalidationEnable
to invalidate cache when buffer is modified by CPU/GPU.

Ref: bspec 46314
Fixes: 6c345ddbe4 ("anv: Cache VB/IB in L3$ for Gfx12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5941
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14815>
(cherry picked from commit 7a6ea04795)
2022-02-23 17:55:54 +00:00
Tapani Pälli
0fb9703d9f intel/genxml: add PIPE_CONTROL field for L3 read only cache invalidation
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14815>
(cherry picked from commit 442628b702)
2022-02-23 17:55:54 +00:00
Dave Airlie
311c25726c lavapipe: fix sampler + sampler view leaks.
The compute sampler views are using a different method
of generation so have to be deleted explicitly.

Fixes: e94fd4cc65 ("lavapipe: rename vallium to lavapipe")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14939>
(cherry picked from commit 2f9089f6de)
2022-02-23 17:55:54 +00:00
Pavel Ondračka
12a51c22cd r300: fix transformation of abs modifiers with negate
It is being overwritten by the memset. Just set the only remaining
member RelAddr explicitly.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@zoho.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14915>
(cherry picked from commit 1f5330de3a)
2022-02-23 17:55:54 +00:00
Mike Blumenkrantz
6a179f897e lavapipe: use util_pack_color_union() for generating clear colors
this enables clamping for packed formats (e.g., RGB10_A2UI) where color
values may exceed the width of the component

cc: mesa-stable

fixes (zink):
KHR-GL45.direct_state_access.renderbuffers_storage*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14911>
(cherry picked from commit 08c2b9d7cb)
2022-02-23 17:55:53 +00:00
Eric Engestrom
66a7f59867 .pick_status.json: Mark b07372312d as denominated 2022-02-23 17:55:53 +00:00
Eric Engestrom
014cab4515 .pick_status.json: Update to dabba7d726 2022-02-23 17:55:46 +00:00
Jonathan Gray
f911daf16d dri: avoid NULL deref of DrawBuffer on flush
The same problem with 17e62a3c23
fixed for i965 with 6bc710d769
exists with other drivers.

With Mesa 21.3.6 on radeon r100 it shows as:
_mesa_is_winsys_fbo (fb=0x0)
radeonFlush
_mesa_make_current
_mesa_free_context_data
radeonDestroyContext
driDestroyContext
dri2_destroy_context
glx_display_free
__glXCloseDisplay
XCloseDisplay

Follow the i965 change and add a NULL test before flush for
radeon, i915 and nouveau.

Fixes: 17e62a3c23 ("mesa: (correctly) flush more in _mesa_make_current")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14989>
2022-02-20 19:13:34 +00:00
Eric Engestrom
fef2cdb0a5 VERSION: bump for 21.3.6 2022-02-09 20:10:39 +00:00
Eric Engestrom
405ce01d78 docs: add release notes for 21.3.6 2022-02-09 20:10:36 +00:00
Lionel Landwerlin
b680bd0656 intel/nir: fix shader call lowering
We're replacing a generic instruction by an intel specific one, we
need to remove the previous instruction.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c5a42e4010 ("intel/fs: fix shader call lowering pass")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13719>
(cherry picked from commit 39f6cd5d79)
2022-02-09 20:07:50 +00:00
Lionel Landwerlin
caf19bcf7b intel/fs: don't set allow_sample_mask for CS intrinsics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 77486db867 ("intel/fs: Disable sample mask predication for scratch stores")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13719>
(cherry picked from commit c89024e446)
2022-02-09 20:07:50 +00:00
Mike Blumenkrantz
f0281839c3 zink: min/max blit region in coverage functions
these regions might not have the coords in the correct order, which will
cause them to fail intersection tests, resulting in clears that are never
applied

cc: mesa-stable

fixes:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_all_buffer_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_color_and_depth_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_color_and_stencil_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_linear_filter_color_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_magnifying_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_minifying_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_missing_buffers_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_nearest_filter_color_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_negative_dimensions_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_negative_height_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_negative_width_blit
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_scissor_blit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14867>
(cherry picked from commit 388f23eabe)
2022-02-09 20:07:50 +00:00
Mike Blumenkrantz
ed869d3eb7 zink: reject invalid draws
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14859>
(cherry picked from commit b656ab75a6)
2022-02-09 20:07:50 +00:00
Mike Blumenkrantz
fa3d049548 zink: fix PIPE_CAP_TGSI_BALLOT export conditional
this requires VK_EXT_shader_subgroup_ballot

cc: mesa-stable

fixes (lavapipe):
KHR-GL46.shader_ballot_tests.ShaderBallotAvailability
KHR-GL46.shader_ballot_tests.ShaderBallotFunctionRead

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14858>
(cherry picked from commit e38c13830f)
2022-02-09 20:07:50 +00:00
Rhys Perry
c185f61e1b radv: fix R_02881C_PA_CL_VS_OUT_CNTL with mixed cull/clip distances
Matches radeonsi.

Seems Vulkan CTS doesn't really test cull distances. Removing
VARYING_SLOT_CULL_DIST0/VARYING_SLOT_CULL_DIST1 variables doesn't break
any of dEQP-VK.clipping.*, except for tests which read the variables in
the fragment shader.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5984
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14882>
(cherry picked from commit 7ddad1b93a)
2022-02-09 20:07:50 +00:00
Dave Airlie
3cbc17121b crocus: find correct relocation target for the bo.
If we have batch a + b, and writing to batch b, causes batch a
to flush, all the bo->index get reset, and we try to submit a -1
to the kernel.

Look the bo index up when creating relocations.

Fixes crash seen in KHR-GL46.compute_shader.pipeline-post-fs
and a trace from Wasteland 3

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14905>
(cherry picked from commit 37c3be6947)
2022-02-09 20:07:50 +00:00
Mike Blumenkrantz
808eec704d zink: add VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT for query binds
required by spec

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14853>
(cherry picked from commit 1e96542390)
2022-02-09 20:07:50 +00:00
Mike Blumenkrantz
58382828c9 llvmpipe: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14835>
(cherry picked from commit f8a9010410)
2022-02-09 20:07:49 +00:00
Mike Blumenkrantz
444e37340d llvmpipe: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
this cap is broken

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUnifor

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14835>
(cherry picked from commit 9a75392cd8)
2022-02-09 20:07:49 +00:00
Mike Blumenkrantz
2ef1287ef7 zink: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
this cap is broken

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUniform

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14835>
(cherry picked from commit 9a38dab2d1)
2022-02-09 20:07:49 +00:00
Rhys Perry
b340c47b69 aco: don't encode src2 for v_writelane_b32_e64
Encoding src2 doesn't cause issues for print_asm() because we have a
workaround there, but it does for RGP and it seems the developers are not
interested in fixing it.

https://github.com/GPUOpen-Tools/radeon_gpu_profiler/issues/61

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14832>
(cherry picked from commit 0447a2303f)
2022-02-09 20:07:49 +00:00
Kenneth Graunke
6bc710d769 i965: Avoid NULL drawbuffer in brw_flush_front
Commit 17e62a3c23 made _mesa_make_current
begin calling ctx->Driver.Flush() in more cases, including when called
during context destruction, after _mesa_free_context_data has set
ctx->DrawBuffer to NULL.  i965's flush hook wasn't prepared for this,
and assumed that ctx->DrawBuffer was non-NULL.  This led to a crash
with the following backtrace:

 #0 0x00007ffff5bf97b5 in _mesa_is_winsys_fbo (fb=0x0)
    at ../../src/mesa/main/fbobject.h:52
 #1 0x00007ffff5bfa359 in brw_flush_front (ctx=0x5555555a4110)
    at ../../src/mesa/drivers/dri/i965/brw_context.c:242
 #2 0x00007ffff5bfa587 in brw_glFlush (ctx=0x5555555a4110,
    gallium_flush_flags=0) at ../../src/mesa/drivers/dri/i965/brw_context.c:301
 #3 0x00007ffff5d46b2b in _mesa_make_current (newCtx=0x0, drawBuffer=0x0,
    readBuffer=0x0) at ../../src/mesa/main/context.c:1616
 #4 0x00007ffff5d46484 in _mesa_free_context_data (ctx=0x5555555a4110,
    destroy_debug_output=true) at ../../src/mesa/main/context.c:1309
 #5 0x00007ffff5bfcb59 in brw_destroy_context (driContextPriv=0x555555590260)
    at ../../src/mesa/drivers/dri/i965/brw_context.c:1301

There is really no point in worrying about front buffer flushing during
the context's destruction when we've already discarded the drawbuffer,
so just add a NULL check in brw_flush_front and skip that work.

Fixes: 17e62a3c23 ("mesa: (correctly) flush more in _mesa_make_current")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5957
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14828>
2022-02-09 20:07:49 +00:00
Samuel Pitoiset
fe18c96c86 radv/winsys: fix missing buffer_make_resident() for the null winsys
With latest Fossilize everything should now be captured correctly
but without this, all Fossilize databases that need
VK_EXT_custom_border_color would just crash.

Cc: mesa-stable
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/14821>
(cherry picked from commit 1cadd19197)
2022-02-09 20:07:49 +00:00
Danylo Piliaiev
2027acff50 ir3: opt_deref in opt loop to remove unnecessary tex casts
Otherwise we may be left with such casts:

 vec1 32 ssa_72 = deref_var &shadow_map (uniform sampler2D)
 vec1 32 ssa_73 = deref_cast (texture2D *)ssa_72 (uniform texture2D)
 vec1 32 ssa_74 = deref_cast (sampler *)ssa_72 (uniform sampler)
 vec1 32 ssa_76 = (float32)tex ssa_73 (texture_deref), ssa_74 (sampler_deref), ssa_75 (coord), ssa_64 (comparator)

And crash in ycbcr lowering since we aren't able to follow deref chain.

Fixes crash in GFXBench Aztec Ruins Vulkan tests.
See issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5945

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14819>
(cherry picked from commit f917c73528)
2022-02-09 20:07:49 +00:00
Connor Abbott
77f9a3ada4 ir3/cp: ir3: Prevent propagating shared regs out of loops harder
We need to check the source of the copy, not the destination. That means
this we need to move this check inside the ifs, where we know that the
source is a copy.

Fixes: 590efd180b ("Prevent propagating shared regs out of loops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14412>
(cherry picked from commit 09731fc79a)
2022-02-09 20:07:49 +00:00
Connor Abbott
5be8602e4d ir3: Fix copy-paste mistakes in ir3_block_remove_physical_predecessor()
Fixes: 2768a35e41 ("ir3: Add pass to remove unreachable blocks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14412>
(cherry picked from commit 53e54898e0)
2022-02-09 20:07:49 +00:00
Mike Blumenkrantz
e5d09f30b9 zink: use SpvScopeDevice over SpvScopeWorkgroup for atomic shader ops
Workgroup is only allowed in compute shaders, and Device should be more
in line with the intended use here

the alternative would be to keep using Workgroup for compute and use Device
otherwise, but this would effectively make atomic ops non-atomic, which seems
like it isn't desirable

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
(cherry picked from commit 6f38ea4ac7)
2022-02-09 20:07:49 +00:00
Mike Blumenkrantz
39e4072ef4 zink: cast image atomic op params/results based on image type
according to spec, these must match the texel pointer type

cc: mesa-stable

fixes (nvidia):
dEQP-GLES31.functional.image_load_store.2d.atomic.exchange_r32f_return_value
dEQP-GLES31.functional.image_load_store.2d_array.atomic.exchange_r32f_return_value
dEQP-GLES31.functional.image_load_store.cube.atomic.exchange_r32f_return_value

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
(cherry picked from commit 2361c52b5e)
2022-02-09 20:07:49 +00:00
Jason Ekstrand
675c2dabd3 vulkan/wsi: Set MUTABLE_FORMAT_BIT in the prime path
Fixes: 4bdf8547f4 "vulkan/wsi: Implement VK_KHR_swapchain_mutable_format"

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
(cherry picked from commit 8299d5f37f)
2022-02-09 20:07:49 +00:00
Georg Lehmann
d594032257 vulkan/wsi/wayland: Fix add_drm_format_modifier aplha/opaqueness.
This had the opposite problem of the shm path. R8G8B8A8 was always support if
either DRM_FORMAT_XBGR8888 or DRM_FORMAT_ABGR8888 was supported, but we need
both.

Fixes: d944136f36 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
(cherry picked from commit cbe4943ae9)
2022-02-09 20:07:49 +00:00
Georg Lehmann
b366fdbe53 vulkan/wsi/wayland: Add modifiers for RGB formats.
These formats get overwritten after the FALLTHROUGH, so no modifers got added
to them at all.

Fixes: 151b65b211 ("vulkan/wsi/wayland: generalize modifier handling")

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
(cherry picked from commit 9843fddfff)
2022-02-09 20:07:49 +00:00
Georg Lehmann
09499c4202 vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.
Fixes: 6b36f35734 ("vulkan/wsi/wl: add wl_shm support for lavapipe.")

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
(cherry picked from commit a881b6ac1f)
2022-02-09 20:07:48 +00:00
Georg Lehmann
6f916ec0c0 vulkan/wsi/wayland: Fix add_wl_shm_format alpha/opaqueness.
We need both the SHM format with alpha and the opaque format to fully support
a vulkan format with alpha. Previously no surface format was reported because
the vulkan formats with aplha were never added as opaque.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5879
Fixes: d944136f36 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
(cherry picked from commit 4ae4e04e18)
2022-02-09 20:07:48 +00:00
Rhys Perry
154ce77176 aco: fix neg(abs(mul(a, b))) if the mul is not VOP3
Previously, is_abs was just ignored if mul_instr->isVOP3()==false.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 93c8ebfa78 ("aco: Initial commit of independent AMD compiler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14773>
(cherry picked from commit 452975f257)
2022-02-09 20:07:48 +00:00
Mike Blumenkrantz
c975c588b1 zink: fix waiting on current batch id
- the current batch id is always 0
- there is always a current batch
- a batch id can only be set at the time of submit

thus when passing 0 to wait on the current batch, the submit must complete
so that there is a batch id, and this must occur before the timeline wait
path or else the timeline wait does nothing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14693>
(cherry picked from commit 3a0888c62f)
2022-02-09 20:07:48 +00:00
Mike Blumenkrantz
494e809469 zink: add vertex shader pipeline bit for generated barrier construction
if the vertex buffer resource has writes, it needs this bit too

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14691>
(cherry picked from commit 95bfb75688)
2022-02-09 20:07:48 +00:00
Mike Blumenkrantz
e2085aeaff zink: clamp tbo creation to maxTexelBufferElements
for sparse buffers, the total buffer size will be huge, so this needs
to only be the limit that the driver can support to avoid crashing
or whatever

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14692>
(cherry picked from commit 27d405dc2f)
2022-02-09 20:07:48 +00:00
Paulo Zanoni
9b50b320d1 iris: implement inter-context busy-tracking
Previously, no buffers were ever marked as EXEC_OBJECT_ASYNC so the
Kernel would ensure dependency tracking for us. After we implemented
explicit busy tracking in commit 89a34cb845, only the external
objects kept relying on the Kernel's implicit tracking and Iris did
inter-batch busy tracking, meaning we lost inter-screen and
inter-context synchronization. This seemed fine to me since, as far as
I understood, it is the duty of the application to synchronize itself
against multiple screens and contexts.

The problem here is that applications were actually relying on the old
behavior where the Kernel guarantees synchronization, so 89a34cb845
can be seen as a regression. This commit addresses the inter-context
synchronization case.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5731
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5812
Fixes: 89a34cb845 ("iris: switch to explicit busy tracking")
Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14783>
2022-02-09 20:07:48 +00:00
Mike Blumenkrantz
adab2e0b7a zink: fix vertex buffer mask computation for null buffers
off by N

affects:
KHR-GL46.texture_cube_map_array.sampling

Fixes: 53aade0ef0 ("zink: fix enabled vertex buffer mask calculation")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14721>
(cherry picked from commit 42ae116ac7)
2022-02-09 20:07:48 +00:00
Caio Oliveira
e3956c3d5c anv: Fix subgroupSupportedStages physical property
Use the proper Vulkan values that can be combined into a bitmask.

Fixes: f40a08d25c ("anv: Don't advertise unsupported shader stages")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14761>
(cherry picked from commit d6c31f05a2)
2022-02-09 20:07:48 +00:00
Emma Anholt
d08330e731 vulkan: Fix leak of error messages
Fixes: 0cad3beb2a ("vulkan/log: Add common vk_error and vk_errorf helpers")
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
(cherry picked from commit bdb8e615d1)
2022-02-09 20:07:48 +00:00
Manas Chaudhary
35444289c5 panvk: Fix pointer corruption in panvk_add_wait_event_syncobjs
nr_in_fences was being incremented to point to an
illegal address

Fixes: 1e23004600 ("panvk: Add vkEvents support")
Cc: mesa-stable
Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14744>
(cherry picked from commit cad053db61)
2022-02-09 20:07:48 +00:00
Nanley Chery
9c0388b7ff anv: Re-enable CCS_E on TGL+
Commit e614789588 ("anv: Also disallow CCS_E for multi-LOD images")
accidentally disabled CCS_E on TGL+ because it checked for
image->vk.mip_levels > 0 instead of image->vk.mip_levels > 1.

Instead of reverting it, we remove the code which disables CCS_E for
mipmapped or arrayed images now that we've sufficiently handled the
clear color issue in other ways.

Fixes: e614789588 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>
(cherry picked from commit 57445adc89)
2022-02-09 20:07:48 +00:00
Nanley Chery
cbb35dbbcc anv: Use ANV_FAST_CLEAR_DEFAULT_VALUE for CCS on TGL+
On TGL, if a block of fragment shader outputs match the surface's clear
color, the HW may convert them to fast-clears (see HSD 14010672564).
This can lead to rendering corruptions if not handled properly. We
restrict the clear color to zero to avoid issues that can occur with:

   - Texture view rendering (including blorp_copy calls)
   - Images with multiple levels or array layers

Fixes: e614789588 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>
(cherry picked from commit c48401404c)
2022-02-09 20:07:47 +00:00
Nanley Chery
d55fed66d9 anv: Disable CCS_E for some 8/16bpp copies on TGL+
CCS_E is currently disabled on TGL+, but we'll enable it soon. We choose
to explicitly disable it for certain copy operations to avoid CTS
failures in the following groups:

- dEQP-VK.drm_format_modifiers.export_import.*
- dEQP-VK.synchronization*

Fixes: e614789588 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>
(cherry picked from commit d68b2db89c)
2022-02-09 20:07:47 +00:00
Yiwei Zhang
a987828e6b tu: VkExternalImageFormatProperties is optional
..even if external image info has valid external handles.

Fixes: 26380b3a9f ("turnip: Add driver skeleton (v2)")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14730>
(cherry picked from commit 96acd0933e)
2022-02-09 20:07:47 +00:00
Mike Blumenkrantz
343f9f52a1 zink: reorder fbfetch flag-setting to avoid null deref
this avoids dereferencing pg->dd which is allocated a few lines later

Fixes: 417477f60e ("zink: always use lazy (non-push) updating for fbfetch descriptors")

fixes (radv):
dEQP-GLES31.functional.blend_equation_advanced.basic.multiply

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14718>
(cherry picked from commit 8747715aec)
2022-02-09 20:07:47 +00:00
Jason Ekstrand
5a106c47d7 anv/pass: Don't set first_subpass_layout for stencil-only attachments
Cc: mesa-stable@lists.freedesktop.org

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13980>
(cherry picked from commit 6612dcc425)
2022-02-09 20:07:47 +00:00
Mike Blumenkrantz
0051b41362 zink: never use SpvOpImageQuerySizeLod for texel buffers
this is illegal

cc: mesa-stable

affects KHR-GL46.texture_buffer.texture_buffer_texture_buffer_range

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14696>
(cherry picked from commit 5e748770b9)
2022-02-09 20:07:47 +00:00
Francisco Jerez
9f974e41b1 intel/fs: Take into account region strides during SIMD lowering decision of SHUFFLE.
This fixes a bug in the handcrafted SIMD lowering done by the SHUFFLE
code generation, which wasn't taking into account the source and
destination region strides while deciding whether it needs to split an
instruction.

v2: Use new element_sz() helper instead of left shift. (Lionel)

Fixes: 90c9f29518 ("i965/fs: Add support for nir_intrinsic_shuffle")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14273>
(cherry picked from commit d1038197f3)
2022-02-09 20:07:47 +00:00
Eric Engestrom
2e255372a6 .pick_status.json: Mark 960e72417f as denominated 2022-02-09 20:07:47 +00:00
Eric Engestrom
f040bf876b .pick_status.json: Mark 15e7750446 as denominated 2022-02-09 20:07:47 +00:00
Eric Engestrom
bf8ee1a24f .pick_status.json: Update to cb781fc350 2022-02-09 20:07:37 +00:00
Charles Baker
7583560305 Revert "zink: handle vertex buffer offset overflows"
This reverts commit 9823b970fb.

From VkPhysicalDeviceLimits [1]:

> maxVertexInputAttributeOffset is the maximum vertex input attribute
offset that can be added to the vertex input binding stride. The offset
member of the VkVertexInputAttributeDescription structure must be
less than or equal to this limit.

The maxVertexInputAttributeOffset is a limit on the offset of a vertex
attribute within a vertex rather than a limit on offsets for vertex
buffer bindings.  The code to bind temporary buffers can be removed.

[1] https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceLimits.html

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14572>
(cherry picked from commit 1b88777e97)
2022-01-26 22:12:51 +00:00
Bas Nieuwenhuizen
cb21190b24 Revert "nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants"
This reverts commit a1af902531.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14532>
(cherry picked from commit d1530a3f3b)
2022-01-26 22:12:51 +00:00
Eric Engestrom
112de3a07a VERSION: bump for 21.3.5 2022-01-26 18:36:23 +00:00
Eric Engestrom
7c4f2f1eb8 docs: add release notes for 21.3.5 2022-01-26 18:36:17 +00:00
Rob Clark
371727f3a7 freedreno/a5xx: Fix clip_mask
The clip_mask needs to also take into account rast->clip_plane_enable

Fixes: 99838513ae ("freedreno/a5xx: Add support for clip distances and use them for userclip.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit 2dfebf3487)
2022-01-26 18:28:31 +00:00
Rob Clark
ea7aac8a3a freedreno/a6xx: Fix clip_mask
The clip_mask needs to also take into account rast->clip_plane_enable

Fixes: f2ae8d116a ("freedreno/a6xx: Implement user clip/cull distances")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit d26cdfac2c)
2022-01-26 18:28:31 +00:00
Rob Clark
a6887c3c4f freedreno: Add FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE
Add a dirty bit for clip_plane_enable changes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit 5e2bd30ea4)
2022-01-26 18:28:31 +00:00
Rob Clark
9c98620378 freedreno: Pass shader cache key instead of shader key
We are going to need to extend the cache key to add state that effects
the program stateobj, but not necessarily the shader itself (ie. so
ir3_shader_key wouldn't be the correct place to add it).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit c190356040)
2022-01-26 18:28:31 +00:00
Rob Clark
935e5fce5e mesa/st: Lowered ucp should still mark rast state dirty
Lowered clip planes should respect the enabled/disabled GL_CLIP_PLANEn
(aka GL_CLIP_DISTANCEn), which means updating the rast state as well.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit 26d591a669)
2022-01-26 18:28:31 +00:00
Kenneth Graunke
12beba1f71 iris: Fix and refactor check for clear color being fully zero
I missed updating this code to check res->aux.clear_color_unknown when
I added it a while back.  While we're here, also refactor this code into
a helper function - I'll want to use it in another place shortly.

Fixes: e83da2d8e3 ("iris: Don't try to CPU read imported clear color BOs")

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
(cherry picked from commit 09072a0803)
2022-01-26 18:28:31 +00:00
Tapani Pälli
102b83d77d mesa: move GetProgramInterfaceiv as a shader_query function
This matches how _mesa_get_program_resourceiv was done and this
makes it possible to skip some validation and shader program lookup
when calling it from glGetProgramiv.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14636>
(cherry picked from commit 1b898d78d8)
2022-01-26 18:28:31 +00:00
Tapani Pälli
36bc6e18a2 mesa: refactor GetProgramiv to use program resource list
This way we make sure glGetActiveUniform and glGetProgramiv
are in sync about active uniform count.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5885
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14589>
(cherry picked from commit 521ede8451)
2022-01-26 18:28:31 +00:00
Alyssa Rosenzweig
fbd47b9d43 panfrost: Only cull polygons
The spec says only polygons, not points/lines, should be culled when
culling is enabled. The hardware does not make this distinction, so we
have to.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
(cherry picked from commit 1e5bb54f59)
2022-01-26 18:28:31 +00:00
Alyssa Rosenzweig
b5ff627603 panfrost: Use u_reduced_prim for primitive checks
Use a Gallium helper that papers over the differences between primitive
types, as required by hardware operation.

[Cc'd to mesa-stable for use in the next commit.]

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
(cherry picked from commit 3f1abda631)
2022-01-26 18:28:31 +00:00
Bas Nieuwenhuizen
f15d2c8d3a util/fossilize_db: Fix double free in error handling.
If the file ptr is not NULL then foz_destroy will also try to destroy it.

Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14671>
(cherry picked from commit 51416b1a12)
2022-01-26 18:28:30 +00:00
Alejandro Piñeiro
2143a663da vulkan: return default string for undefined enum
Instead of a unreachable.

This would avoid an assert on debug builds that uses vkfoo_to_str to
print structure types. This will become more common as some tests will
start to use VK_STRUCTURE_TYPE_MAX_ENUM to mark structures from
unsupported extensions more often.

v2 (Jason):
   * Include enum name on the default message
   * Handle MAX_ENUM as a special case

v3 (Jason):
   * vk_ObjectType_to_ObjectName don't need to use ${enum.name}

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14525>
(cherry picked from commit 821c66e50c)
2022-01-26 18:28:30 +00:00
Charles Baker
83011a9226 zink: Output PackHalf2x16 to uint not float
Fixes InconsistentSpirv validation errors reporting that PackHalf2x16
outputs uint rather than float.

For example the previous code generates the following SPIR-V with
PackHalf2x16 output as a float:

  %2018 = OpExtInst %float %1 PackHalf2x16 %2017
  %2019 = OpBitcast %uint %2018

The new code generates:

  %2018 = OpExtInst %uint %1 PackHalf2x16 %2017
  %2019 = OpBitcast %uint %2018

cc: mesa-stable

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14568>
(cherry picked from commit 985dae7f41)
2022-01-26 18:28:30 +00:00
Pierre-Eric Pelloux-Prayer
f85939fa86 mesa: use less temporaries in build_lighting
Preallocating temporaries can cause "out of temporaries" error.
Switch to on-demand allocation.

Growing temp_in_use would be an alternative, but some drivers
support less than 64 temps (see PIPE_SHADER_CAP_MAX_TEMPS) so
this wouldn't help them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5777
Fixes: 272acbed0e ("mesa: merge STATE_LIGHTPROD parameters")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14590>
(cherry picked from commit 3b4d4c7d84)
2022-01-26 18:28:30 +00:00
Pierre-Eric Pelloux-Prayer
823a047198 driconf: enable vs_position_always_invariant for Dirt Rally
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5648
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14614>
(cherry picked from commit 4e4a2d0f97)
2022-01-26 18:28:30 +00:00
Pavel Ondračka
ec6eaf7adf r300: properly initialize new_vs in r300_draw_init_vertex_shader
Fixes the following valgrind warnings:
 Conditional jump or move depends on uninitialised value(s)
    at 0x5D1298C: draw_pt_so_emit_prepare (draw_pt_so_emit.c:95)
    by 0x5D89FD7: llvm_middle_end_prepare (draw_pt_fetch_shade_pipeline_llvm.c:319)
    by 0x5D13BFF: vsplit_prepare (draw_pt_vsplit.c:229)
    by 0x5D0D5D8: draw_pt_arrays.isra.0 (draw_pt.c:124)
    by 0x5D0DA08: draw_instances (draw_pt.c:484)
    by 0x5D0DEB9: draw_vbo (draw_pt.c:610)
    by 0x5E847D6: r300_swtcl_draw_vbo (r300_render.c:901)
    by 0x5D67125: u_vbuf_draw_vbo (u_vbuf.c:1470)
    by 0x5CFCAD3: cso_multi_draw (cso_context.c:1639)
    by 0x58FEC37: st_draw_gallium (st_draw.c:186)
    by 0x5A486BA: _mesa_draw_arrays.part.0 (draw.c:1323)
    by 0x48B4E27: stub_glDrawArrays (piglit-dispatch-gen.c:12421)
  Uninitialised value was created by a stack allocation
    at 0x5E90D3F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)

 Conditional jump or move depends on uninitialised value(s)
    at 0x5D175D9: draw_create_vertex_shader (draw_vs.c:70)
    by 0x5E90E7A: r300_draw_init_vertex_shader (r300_vs_draw.c:366)
    by 0x5E8751F: r300_create_vs_state (r300_state.c:1950)
    by 0x594453B: st_create_common_variant (st_program.c:888)
    by 0x594720C: st_get_common_variant (st_program.c:973)
    by 0x59484B6: st_precompile_shader_variant (st_program.c:1994)
    by 0x59484B6: st_finalize_program (st_program.c:2056)
    by 0x58F0571: st_program_string_notify (st_cb_program.c:128)
    by 0x5928C9B: st_link_tgsi (st_glsl_to_tgsi.cpp:7514)
    by 0x5904B53: st_link_shader (st_glsl_to_ir.cpp:178)
    by 0x58D3E08: _mesa_glsl_link_shader (link_program.cpp:91)
    by 0x58865C7: link_program (shaderapi.c:1363)
    by 0x58865C7: link_program_error.part.0 (shaderapi.c:1474)
    by 0x48DBC5A: stub_glLinkProgram (piglit-dispatch-gen.c:34426)
  Uninitialised value was created by a stack allocation
    at 0x5E90D4F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)

Based on Filip Gawin's
   r300: set new_vs.type to PIPE_SHADER_IR_TGSI

CC: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14620>
(cherry picked from commit b5b105df96)
2022-01-26 18:28:30 +00:00
Ian Romanick
2c51e96672 intel/fs: Fix gl_FrontFacing optimization on Gfx12+
It's not obvious why the (gl_FrontFacing ? -1.0 : 1.0) case was handled
different for Gfx12+ than for previous generations, and it's not
correct.  It tries to negate the result as an integer, and it does this
before the mask operation that clears the other bits in the value.

When we eventually support dual-SIMD8 dispatch, the other front-facing
bit is in g1.6 at bit 15, so similar code should be possible there.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c92fb60007 ("intel/fs/gen12: Implement gl_FrontFacing on gen12+.")
Closes: #5876
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14625>
(cherry picked from commit 945fb51fb5)
2022-01-26 18:28:30 +00:00
Mike Blumenkrantz
107c8232e0 zink: stop allocating such massive staging regions for buffer maps
this would allocate a new stream uploader for every map if the offset was
large (e.g., all sparse buffer usage), which almost immediately consumes all vram

cc: mesa-stable

fixes KHR-GL46.CommonBugs.CommonBug_SparseBuffersWithCopyOps

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
(cherry picked from commit d83b52928c)
2022-01-26 18:28:30 +00:00
Emma Anholt
089a957bef softpipe: respect !independent_blend_enable for color masks.
blend_buf is the resolved "are we using independent blending?" index, cbuf
is the RT we're drawing to.

Cc: mesa-stable.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
(cherry picked from commit 263faa3dfb)
2022-01-26 18:28:30 +00:00
Stefan Brüns
ec2e78b3ff llvmpipe: Add get_{driver,device}_uuid implementations
Commit 9da15aa3aa ("llvmpipe: enable EXT_memory_object(_fd)") enabled
the extension, but left this unimplemented.

Leaving this unimplemented causes segfaults for anyone trying to retrieve
the UUIDs, as the calling code in the state tracker does not check if the
function is implemented. This affects e.g. current Wine versions.

Set the UUID to all zeros. Although this slightly violates the vulkan
specification (since 1.2.146), the UUIDs have to match the ones from
lavapipe (lvp_get_physical_device_properties_1_1).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5865
Fixes: 9da15aa3aa ("llvmpipe: enable EXT_memory_object(_fd)")
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Dave Airlie airlied@redhat.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14558>
(cherry picked from commit 537a0ee3b7)
2022-01-26 18:28:30 +00:00
Lionel Landwerlin
f7a52a16cf anv: fix missing descriptor copy of bufferview/surfacestate content
When doing copies of descriptors from one set to another, that contain
either a UNIFORM_BUFFER or STORAGE_BUFFER, both the buffer view &
surface state are allocated from the source descriptor. Therefore we
need to copy their content otherwise we could run into lifecycle
issues when the source descriptor is destroyed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14585>
(cherry picked from commit acebea9cf1)
2022-01-26 18:28:30 +00:00
Mike Blumenkrantz
85c655f946 zink: check EXT_image_drm_format_modifier for dmabuf support
probably fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/5836

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14595>
(cherry picked from commit 29cb1c7c13)
2022-01-26 18:28:30 +00:00
Qiang Yu
44bfdb08fb nir: fix nir_tex_instr hash not count is_sparse field
This fixes nir_opt_cse miss replace a non-sparse tex instruction
with a sparse tex instruction and fail the nir_validate_shader().

Fixes: 3a7972f72a ("nir,spirv: add sparse texture fetches")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14362>
(cherry picked from commit 2cee73f0f7)
2022-01-26 18:28:30 +00:00
Rhys Perry
7a579039cc nir/unsigned_upper_bound: don't follow 64-bit f2u32()
Fixes Doom Eternal crash.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 72ac3f6026 ("nir: add nir_unsigned_upper_bound and nir_addition_might_overflow")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14555>
(cherry picked from commit d95a0b52e4)
2022-01-26 18:28:30 +00:00
Alyssa Rosenzweig
c7684b11e2 pan/bi: Schedule around blend shader register clobbering
By software ABI, a blend shader is permitted to clobber registers
R0-R15. The scheduler needs to be aware of this, to avoid moving a write
to one of these registers past the BLEND itself. Otherwise the schedule
is invalid.

This bug affects GLES3.0, but is rare enough in practice that we had
missed it. It requires a fragment shader to write to multiple render
targets with attached blend shaders, and have temporaries register
allocated to R0-R15 that are not read by the blend shader, but are sunk
past the BLEND instruction by the scheduler. Prevents a regression when
switching boolean representations on:

dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_lowp_fragment

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14577>
(cherry picked from commit b8d37eb1bb)
2022-01-26 18:28:29 +00:00
Lepton Wu
448da15129 driconf: Fix unhandled tags in static conf
A rule with executable_regexp tag would match every executable
without this fix and force_glsl_extensions_warn would be always
set to true which breaks some dEQP tests.

Fixes: 5740ac3701 ("xmlconfig: Add static driconfig support")

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14562>
(cherry picked from commit d15021435e)
2022-01-26 18:28:29 +00:00
Lionel Landwerlin
b4fb2974de intel/fs: disable VRS when omask is written
As indicated by
VkPhysicalDeviceFragmentShadingRatePropertiesKHR::fragmentShadingRateWithShaderSampleMask
our implementation will clamp to 1x1 when reading samplemask or
writing to samplemask.

This fixes vkd3d-proton tests test_sample_mask_dxbc & test_sample_mask_dxil

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b6332fc4a8 ("intel/compiler: handle coarse pixel in render target writes descriptors")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14553>
(cherry picked from commit 30a8b8d2df)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
d3226c6e95 zink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
this is invalid since vk memory model isn't used

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14540>
(cherry picked from commit f0eb07f98f)
2022-01-26 18:28:29 +00:00
Carsten Haitzler
e91c5034a7 panfrost: Don't double-free when handling error for unsupported GPU
Setting the screen ro member before we checked gpu id means the error
case leads to a double-free because screen->ro is set and allocated
by parent who hanbdles de-alloc a second time after we destroyed the
screen we just created because ro was set.

Cc: mesa-stable

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14516>
(cherry picked from commit 874f4095c5)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
d0e7882abd util/vbuf: fix buffer translation sizing
the original change here attempted to fix calculating the maximum bound for the
mapped readback buffer by adding the maximum attribute size to the final element
used by readback

the calculation was erroneous, however, because it instead calculated the maximum
offset instead of the size, which would cause a different kind of overrun

Fixes: 3c5b7dca30 ("util/vbuf: fix buffer overrun in attribute conversions")

fixes #5846

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14479>
(cherry picked from commit 596d2ab0ad)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
bb025625e1 aux/trace: copy over stream_output_target_offset method from context
this can't be traced, so don't crash

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14481>
(cherry picked from commit 01709464a4)
2022-01-26 18:28:29 +00:00
Yiwei Zhang
fc8bc2d307 venus: VkExternalImageFormatProperties is optional
It's optional even if VkPhysicalDeviceExternalImageFormatInfo is there.

Fixes: 108f386a61 ("venus: initial support for VkPhysicalDevice commands")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14503>
(cherry picked from commit 17b753459e)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
709fd542be zink: use even more accurate stride values for query result copies
this shouldn't be used at all, but some drivers get it wrong and I don't want
to have to fix every driver

Fixes: 039ed2de94 ("zink: always use type size for query result copy stride")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
(cherry picked from commit d3bb5b5dd1)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
bd8a5ae4d8 Revert "zink: when performing an implicit reset, sync qbos"
this appeared to fix some sort of bug related to preserving qbo data,
but really there shouldn't have been any sort of bug anyway since the qbos
all get read back, and thus the data is already preserved

instead, it just preserved the query id, which overloaded the pools and crashed

This reverts commit 79790e276f.

fixes #5669

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
(cherry picked from commit 2fa1bf60d6)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
48174fea16 zink: skip readback of qbos with no results
this is a no-op and also crashes

Fixes: 93190be1b9 ("zink: rewrite query internals")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
(cherry picked from commit b7a4faea9b)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
f36373e072 zink: fix availability buffer sizing/copying for xfb queries
xfb queries have 2 results, and the availability bit is a 3rd result, so
the buffer size has to be at least that big and the copy offset has to reflect
the number of xfb results in the src offset

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
(cherry picked from commit f8d2770737)
2022-01-26 18:28:29 +00:00
Mike Blumenkrantz
d9b0864420 zink: always set number of timestamp results to 1 for internal qbo
timestamp queries don't accumulate results

Fixes: 93190be1b9 ("zink: rewrite query internals")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>
(cherry picked from commit bf9ac4dfcd)
2022-01-26 18:28:29 +00:00
Eric Engestrom
834af3f195 .pick_status.json: Mark 58a843ab14 as denominated 2022-01-26 18:28:28 +00:00
Eric Engestrom
74cb10a290 .pick_status.json: Mark d1530a3f3b as denominated 2022-01-26 18:28:28 +00:00
Eric Engestrom
fc3c71437e .pick_status.json: Mark 1b88777e97 as denominated 2022-01-26 18:28:28 +00:00
Eric Engestrom
b2ec8bd740 .pick_status.json: Update to 06504fb9e2 2022-01-26 18:28:22 +00:00
Eric Engestrom
bfe18835b5 VERSION: bump for 21.3.4 2022-01-12 21:32:28 +00:00
Eric Engestrom
e03911b27e docs: add release notes for 21.3.4 2022-01-12 21:32:23 +00:00
Ian Romanick
597766f0ab i965: Disable EXT_texture_integer on Gfx4 and Gfx5
st_init_extensions (src/mesa/state_tracker/st_extensions.c) already
enforces the GLSL 1.30 or EXT_gpu_shader4 requirement, so Crocus will
already behave this way on this hardware.

The EXT_texture_integer spec says:

    NV_gpu_program4 or EXT_gpu_shader4 is required.

Without one of these extensions or GLSL 1.30, it is impossible to read
integer values from a texture.  The spec also says:

    This extension does not enforce type consistency for texture
    accesses or between fragment shaders and the corresponding
    framebuffer attachments.  The results of a texture lookup from an
    integer texture are undefined:

      * for fixed-function fragment processing, or

      * for shader texture accesses expecting floating-point return
        values.

    The color components used for per-fragment operations and written
    into a color buffer are undefined:

      * for fixed-function fragment processing with an integer color
        buffer,

      * for fragment shaders that write floating-point color components
        to an integer color buffer, or

      * for fragment shaders that write integer color components to a
        color buffer with floating point or normalized integer
        components.

So it's really a soft requirement, but also kind of rude to expose the
extension without a way to use it properly.

Closes: #4497
CC: mesa-stable
2022-01-12 21:05:14 +00:00
Roman Stratiienko
89ed84a0ba v3dv: Hotfix: Rename remaining V3DV_HAS_SURFACE->V3DV_USE_WSI_PLATFORM
This was somehow missed by me and during review.

Fixes fcfc4ddfcc: ("v3dv: Fix V3DV_HAS_SURFACE preprocessor condition")

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14190>
(cherry picked from commit 2cbbfd23ce)
2022-01-12 20:59:00 +00:00
Pierre-Eric Pelloux-Prayer
2435a8879e radeonsi/gfx10: fix si_texture_get_offset for mipmapped tex
Pitch can be different per-level so adjust stride and offset.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5792
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14454>
(cherry picked from commit 2f8982df0e)
2022-01-12 19:54:27 +00:00
Mike Blumenkrantz
a0ed182744 zink: use device-local heap for sparse backing allocations
backing allocations are real allocations, so they shouldn't be initialized
as sparse containers

Fixes: 40fdb3212c ("zink: add a suballocator")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14394>
(cherry picked from commit b6499dff37)
2022-01-12 19:54:27 +00:00
Lionel Landwerlin
33461292fb intel/dev: fixup chv workaround
We're using the wrong helper to get the subslice total count.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c24ba6cecb ("intel/dev: Handle CHV CS thread weirdness in get_device_info_from_fd")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14492>
(cherry picked from commit d6c0d16791)
2022-01-12 19:54:27 +00:00
Mike Blumenkrantz
24a31011b5 zink: add extra synchronization for buffer descriptor binds
"most" times it isn't necessary to insert any pipeline barriers when binding
descriptors, as GL requires explicit barrier usage which comes through a different
codepath

the exception here is when the following scenario occurs:
* have buffer A
* buffer_subdata is called on A
* discard path is taken || A is not host-visible
* stream uploader is used for host write
* CmdCopyBuffer is used to copy the data back to A
buffer A now has a pending TRANSFER write that must complete before the buffer is
used in a shader, so synchronization is required any time TRANSFER usage is detected
in a bind

there's also going to be more exceptions going forward as more internal usage is added,
so just remove the whole fake-barrier mechanism since it'll become more problematic
going forward

Cc: 21.3 mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14496>
(cherry picked from commit 3e5f4cebe8)
2022-01-12 19:54:27 +00:00
Mike Blumenkrantz
bed4968acc zink: always unset vertex shader variant key data when changing last vertex stage
ensure that vertex key data is always zeroed when changing last stage since it will
be updated before draw anyway and can only cause problems if left alone here

fixes the following caselist:
dEQP-GLES31.functional.shaders.builtin_constants.tessellation_shader.max_tess_evaluation_texture_image_units
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_geometry_output_points
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.25

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14482>
(cherry picked from commit d15ff96da2)
2022-01-12 19:54:27 +00:00
Daniel Schürmann
71cd312c41 aco: validate VOP3P opsel correctly
Before RA, subdword operands must use .xx
After RA, opsel can either be .xx or .yy

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14472>
(cherry picked from commit 4e2b624c10)
2022-01-12 19:54:27 +00:00
Pierre-Eric Pelloux-Prayer
f0595be988 vbo/dlist: add vertices to incomplete primitives
If a primitive is added with missing vertices, this will shift all
the vertices and produce incorrect rendering.

In issue #5786 the app uses GL_LINE_STRIPS with a single vertex.

Adding extra vertices can make the initial estimation for the index
buffer size incorrect, so this buffer can now be growed if needed.

Fixes: ac3d4c7635 ("vbo/dlist: convert LINE_STRIPS to LINES")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5786
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14476>
(cherry picked from commit dcbf2423d2)
2022-01-12 19:54:27 +00:00
Tapani Pälli
4637a3bc2d mesa: free vbo_save_vertex_list store prims
Fixes a leak:
  ==47470== 60 bytes in 1 blocks are definitely lost in loss record 1,790 of 1,904
  ==47470==    at 0x484186F: malloc (vg_replace_malloc.c:381)
  ==47470==    by 0x58EBA6A: compile_vertex_list (vbo_save_api.c:535)
  ==47470==    by 0x58EDABF: wrap_buffers (vbo_save_api.c:1021)
  ==47470==    by 0x58EDF97: upgrade_vertex (vbo_save_api.c:1134)
  ==47470==    by 0x58EE52F: fixup_vertex (vbo_save_api.c:1251)
  ==47470==    by 0x58EFE9E: _save_Normal3f (vbo_attrib_tmp.h:315)

Fixes: 69615d92a0 ("vbo/dlist: realloc prims array instead of free/malloc")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14474>
(cherry picked from commit a5bc8c4be9)
2022-01-12 19:54:27 +00:00
Tapani Pälli
50c247dfdc mesa: free idalloc storage for display lists
Fixes a leak:
  ==46154== 48 bytes in 1 blocks are definitely lost in loss record 1,571 of 1,905
  ==46154==    at 0x48466AF: realloc (vg_replace_malloc.c:1437)
  ==46154==    by 0x5FC98EC: util_idalloc_resize (u_idalloc.c:43)
  ==46154==    by 0x5FC9C16: util_idalloc_alloc_range (u_idalloc.c:125)
  ==46154==    by 0x56FDB9F: _mesa_EndList (dlist.c:13681)

Fixes: b703d7c15f ("dlist: store all dlist in a continuous memory block")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14474>
(cherry picked from commit 6e9cd801a6)
2022-01-12 19:54:27 +00:00
Emma Anholt
c3a733dded nir_to_tgsi: Fix a bug in TXP detection after backend lowering.
TGSI reserves 2 components for the coord in the first operand vector, even
for 1D.  Fixes r600 failure with shadow1d.

Fixes: 390a3fcdc4 ("nir_to_tgsi: Add support for TXP.")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14322>
(cherry picked from commit 3563ae4b2d)
2022-01-12 19:54:26 +00:00
Alyssa Rosenzweig
8c01a6de07 lima,panfrost: Correct pixel vs block mismatches
Different parts of our codebase disagree on whether spatial
coordinates/dimensions are given in pixels or blocks, which differ by a
constant factor for block-compressed formats. This disagreement
manifests as incorrect results accessing block-compressed formats.

To resolve this, define the public tiling routines to take their
coordinates in pixels, and align the relevant code in Panfrost
accordingly.

Fixes rendering glitches in Factorio, as well as a pile of piglits on
Panfrost. It should also fix glTexSubImage() with ETC1 on Lima, but
there are no tests for this in dEQP/Piglit.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> [dEQP/Lima]
Tested-by: Erico Nunes <nunes.erico@gmail.com> [Piglit/Lima]
Reported-by: Icecream95 <ixn@disroot.org>
Closes: #5560
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14370>
(cherry picked from commit b920ace4bc)
2022-01-12 19:54:26 +00:00
Alyssa Rosenzweig
0d427406ce gallium/util: Add pixel->blocks box helper
There is a lot of unit confusion in Gallium due to pixels versus blocks
matching only with uncompressed textures. Add a helper to do a common
pixels->blocks unit conversion required in multiple drivers.

v2: Rename dst->blocks, src->pixels to avoid confusion about the units
to casual readers (Mike).

Note to mesa-stable maintainers: this is marked as Cc: mesa-stable so
the next patch (a set of bug fixes for Lima and Panfrost) can be
backported. It's not a bug fix in its own right, of course.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net> [v1]
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14370>
(cherry picked from commit 26c533f167)
2022-01-12 19:54:26 +00:00
Rhys Perry
a324d79e5e aco: remove pack_half_2x16(a, 0) optimization
This makes the compiler less predictable and should only have a very small
effect on performance.

fossil-db (Vega):
Totals from 2410 (1.79% of 134756) affected shaders:
CodeSize: 6911568 -> 6942840 (+0.45%)

Fixes Horizon Zero Dawn artifacts.

If a shader has:
   a = pack_half_2x16(a, 0) //rtne
   store(pack_half_2x16(0, b) | a) //rtne
   a = unpack_2x16(a).x
It will become:
   store(pack_half_2x16(a, b)) //rtz
   a = unpack_2x16(pack_half_2x16(a, 0)).x //rtne

So a later shader with "unpack_2x16(load()).x" will use "a" rounded to
zero, while the previous shader will use "a" rounded to the nearest even.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2f125908b3 ("radv,aco: lower_pack_half_2x16")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14475>
(cherry picked from commit 60c711833f)
2022-01-12 19:54:26 +00:00
Lucas Stach
eec8afec25 etnaviv: drm: properly handle reviving BOs via a lookup
If a BO is removed from a cache bucket list via a lookup, we must
handle it in the same way as if a allocation from the cache happened:
tell valgrind that the buffer is active again and take a reference
to the etna_device, which the BO had given up while being in the
cache.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14159>
(cherry picked from commit 1b1f8592c0)
2022-01-12 19:54:26 +00:00
Lucas Stach
d33e79e575 etnaviv: drm: fix size limit in etna_cmd_stream_realloc
The intended limit for command stream size is 64KB, as this is what old
kernels can reliably do and what allows for maximum number of queued
streams on newer kernels. However, due to unit confusion with the size
member, which is in dwords, the submitted streams could grow up to
~128KB. Fix this by using the proper limit in dwords.

Flushing due to some limits being exceeded is not an issue, but is
expected with certain workloads, so lower the severity of the message
being emitted in this case to debug level.

Cc: mesa-stable
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/14425>
(cherry picked from commit ccfd5054a4)
2022-01-12 19:54:26 +00:00
Danylo Piliaiev
4781087c26 tu: fix workaround for depth bounds test without depth test
Fixes: bb4db22ff4

("turnip: apply workaround for depth bounds test without depth test")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14390>
(cherry picked from commit fe9c9ec83f)
2022-01-12 19:54:26 +00:00
Lionel Landwerlin
d987419d8a anv: limit compiler valid color outputs using NIR variables
This fixes a test from the vkd3d-proton test_dual_source_blending_dxbc
test which asserts in the backend with :

   brw_fs_visitor.cpp:716: void fs_visitor::emit_fb_writes(): Assertion `!prog_data->dual_src_blend || key->nr_color_regions == 1' failed.

This is because there is 2 color attachments provided by the
renderpass so we initially set nr_color_regions = 2. But once we've
parsed the shader, we can see it's only using one output (with dual
source color blending).

This change looks at the output variables to update the valid output
variables.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14417>
(cherry picked from commit 07bc6b7ed9)
2022-01-12 19:54:26 +00:00
Tapani Pälli
a332907bbc iris: unref syncobjs and free r/w dependencies array for slab entries
Fixes memory leak with dependencies array:

  ==5224== 104 (96 direct, 8 indirect) bytes in 3 blocks are definitely lost in loss record 1,954 of 2,035
  ==5224==    at 0x484178A: malloc (vg_replace_malloc.c:380)
  ==5224==    by 0x484670B: realloc (vg_replace_malloc.c:1437)
  ==5224==    by 0x14DBAB9B: update_bo_syncobjs (iris_batch.c:819)
  ==5224==    by 0x14DBADB8: update_batch_syncobjs (iris_batch.c:898)
  ==5224==    by 0x14DBB3D5: _iris_batch_flush (iris_batch.c:1031)
  ==5224==    by 0x14DB77D0: iris_transfer_map (iris_resource.c:2348)
  ==5224==    by 0x157786FD: u_transfer_helper_transfer_map (u_transfer_helper.c:243)
  ==5224==    by 0x14C479E7: tc_buffer_map (u_threaded_context.c:2252)
  ==5224==    by 0x1434F3F8: pipe_buffer_map_range (u_inlines.h:393)
  ==5224==    by 0x1435094A: _mesa_bufferobj_map_range (bufferobj.c:491)
  ==5224==    by 0x143586D9: map_buffer_range (bufferobj.c:3737)
  ==5224==    by 0x14358DA3: _mesa_MapBuffer (bufferobj.c:3947)

  ==5224== 240 (192 direct, 48 indirect) bytes in 6 blocks are definitely lost in loss record 1,984 of 2,035
  ==5224==    at 0x484178A: malloc (vg_replace_malloc.c:380)
  ==5224==    by 0x484670B: realloc (vg_replace_malloc.c:1437)
  ==5224==    by 0x14DBAB9B: update_bo_syncobjs (iris_batch.c:819)
  ==5224==    by 0x14DBADB8: update_batch_syncobjs (iris_batch.c:898)
  ==5224==    by 0x14DBB3D5: _iris_batch_flush (iris_batch.c:1031)
  ==5224==    by 0x14FF72CC: iris_get_query_result (iris_query.c:631)
  ==5224==    by 0x14C4396A: tc_get_query_result (u_threaded_context.c:880)
  ==5224==    by 0x1458F4F7: get_query_result (st_cb_queryobj.c:273)
  ==5224==    by 0x1458F7EB: st_WaitQuery (st_cb_queryobj.c:352)
  ==5224==    by 0x144EFF66: get_query_object (queryobj.c:742)
  ==5224==    by 0x144F01AE: _mesa_GetQueryObjectuiv (queryobj.c:811)

And leak with syncobjs:

  ==13644== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1,846
  ==13644==    at 0x484186F: malloc (vg_replace_malloc.c:381)
  ==13644==    by 0x639789B: iris_create_syncobj (iris_fence.c:69)
  ==13644==    by 0x63B213A: iris_batch_reset (iris_batch.c:512)
  ==13644==    by 0x63B3637: _iris_batch_flush (iris_batch.c:1056)
  ==13644==    by 0x65EF2BC: iris_get_query_result (iris_query.c:631)
  ==13644==    by 0x623B970: tc_get_query_result (u_threaded_context.c:880)
  ==13644==    by 0x5B874F7: get_query_result (st_cb_queryobj.c:273)
  ==13644==    by 0x5B877EB: st_WaitQuery (st_cb_queryobj.c:352)
  ==13644==    by 0x5AE7F66: get_query_object (queryobj.c:742)
  ==13644==    by 0x5AE8150: _mesa_GetQueryObjectiv (queryobj.c:801)

Fixes: ce2e2296ab ("iris: Suballocate BO using the Gallium pb_slab mechanism")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14387>
(cherry picked from commit b8f0459d6f)
2022-01-12 19:54:26 +00:00
Yiwei Zhang
0db1699eab venus: subtract appended header size in vn_CreatePipelineCache
Use header->header_size to offset cache data as well in case the header
struct extends on a newer driver but the cache data was appended with
an old header.

Fixes: 723f0bf74a ("venus: initial support for module and pipelines")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14463>
(cherry picked from commit 48712b8cc5)
2022-01-12 19:54:26 +00:00
Lionel Landwerlin
886b86f601 anv: don't leave anv_batch fields undefined
Because the extend_cb vfunc is not initialized, there is a risk that
the emission code calls into a random pointer.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14418>
(cherry picked from commit 1d40d53e03)
2022-01-12 19:54:26 +00:00
Connor Abbott
b57693c541 ir3: Bump type mismatch penalty to 3
After some experimentation with computerator, it seems on a618 that
writing a full register and then reading half of it as a half register
requires a delay of 6, the same as the delay for cat5/cat6 sources. The
other direction only has a delay of 5, but just bump it unconditionally
out of an abundance of caution.

Fixes: 890de1a436 ("ir3/delay: Fix full->half and half->full delay")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14246>
(cherry picked from commit 603791bdeb)
2022-01-12 19:54:26 +00:00
Connor Abbott
d761347e05 ir3/ra: Fix logic bug in compress_regs_left
If we're allocating a source then we force is_killed to false, not to
true. Fixes a regression in
dEQP-GLES31.functional.synchronization.in_invocation.image_atomic_write_read
later.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14246>
(cherry picked from commit d371d807eb)
2022-01-12 19:54:25 +00:00
Rohan Garg
7241ec2ee5 intel/fs: OpImageQueryLod does not support arrayed images as an operand
When we lower SPIR-V to NIR for textures in vtn_handle_texture, we only
bump the number of coordinate components when the op is not a lod query.
Update the assert to take this into account.

This fixes:
  - dEQP-VK.robustness.robustness2.bind.template.r32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.r32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.r32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.r32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.r32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.r32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rg32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.bind.template.rgba32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.r32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rg32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32i.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32i.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32ui.dontunroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag
  - dEQP-VK.robustness.robustness2.push.notemplate.rgba32ui.unroll.nonvolatile.sampled_image.no_fmt_qual.null_descriptor.samples_1.cube_array.frag

Fixes: 231337a1 ("intel/fs/xehp: Assert that the compiler is sending all 3 coords for cubemaps.")
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13925>
(cherry picked from commit af13119993)
2022-01-12 19:54:25 +00:00
Bas Nieuwenhuizen
2cd9d700ac radv: Set optimal copy alignment to 1.
I think we set it to 128 for no reason at all. The app is still
required to align to the texel size.

Note that we prefer 4 bytes for non-formatted buffer->buffer copy,
but that isn't in scope for these properties according to the
Vulkan spec.

It also happens to help hide what looks like an application bug at
this point with Baldurs Gate 3.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5509
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14415>
(cherry picked from commit 63101914f8)
2022-01-12 19:54:25 +00:00
Mike Blumenkrantz
08bea100a1 radv: fix xfb query copy param ordering
Fixes: afff9dd0f0 ("radv: Use correct buffer size for query pool result copies.")

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/14422>
(cherry picked from commit 05a5e5a2bc)
2022-01-12 19:54:25 +00:00
Pierre-Eric Pelloux-Prayer
ad5fe81c22 vbo/dlist: fix loopback crash
The original code incorrectly adjusted only when Loopback
was false, while primitives' start value is actually
modified unconditionnally.

Fixes: 3253594268 ("vbo/dlist: rework buffer sizes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5754
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14243>
(cherry picked from commit 7a1d3d3abc)
2022-01-12 19:54:25 +00:00
Pierre-Eric Pelloux-Prayer
72a680be0f radeonsi/gfx8: use the proper dcc clear size
dcc_fast_clear_size is assigned using addrlib's dccFastClearSize, which
is computed using the whole surface size (including layers) so we don't
need to multiply dcc_fast_clear_size by num_layers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4530
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14409>
(cherry picked from commit d84e0096a5)
2022-01-12 19:54:25 +00:00
Lucas Stach
b1d0e4d0a8 etnaviv: initialize vertex attributes on context reset
It seems that at least some GC400 come out of reset with random vertex
attributes enabled and also don't disable them on the write to the first
config register as normal. Enabling all attributes seems to provide the
GPU with the required edge to actually disable the unused attributes on
the next draw.

Cc: mesa-stable
Reported-by: Steven Walter
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/14285>
(cherry picked from commit c1f8bc67e2)
2022-01-12 19:54:25 +00:00
Emma Anholt
9195ddffd7 r300: Fix omod failing to increase the number of channels stored.
In dEQP-GLES2.functional.shaders.operator.geometric.reflect.highp_vec2_fragment
and friends this pass would turn:

  0: DP3 temp[1].x, input[1].yx0_, input[0].wy0_;
  1: MUL temp[2].xy, temp[1].xx__, const[0].xx__;

into

  0: DP3 temp[2].x * 2, input[1].yx0_, input[0].wy0_;
  1: MUL temp[3].xy, temp[2].xy__, input[1].yx__;

Note the attempt to use .y of temp[2].  Just bail when we more dst
channels than src channels, since the rewrite can't generate more channels
for us.  Fixes this subset of tests (which I hadn't included in the xfails
until now since results hadn't quite been stable).

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Filip Gawin <filip.gawin@zoho.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14405>
(cherry picked from commit 105b48c85c)
2022-01-12 19:54:25 +00:00
Michel Zou
f78a30946c zink: fix -Warray-bounds warning
It would seems msvc and mingw dont pack across disparate types so zink_bind_rasterizer_state is too big for int32

string.h:202:10: warning: ‘__builtin___memcpy_chk’ forming offset [4, 7] is out of the bounds [0, 4] of object ‘rast_bits’ with type ‘uint32_t’ {aka ‘unsigned int’} [-Warray-bounds]
  202 |   return __builtin___memcpy_chk(__dst, __src, __n, __mingw_bos(__dst, 0));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gallium/drivers/zink/zink_state.c: In function ‘zink_bind_rasterizer_state’:
../src/gallium/drivers/zink/zink_state.c:586:16: note: ‘rast_bits’ declared here

Fixes: 9c5a2ab6
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12609>
(cherry picked from commit 4ff57e5aba)
2022-01-12 19:54:25 +00:00
Emma Anholt
af943229b1 i915g: Turn off FP16 in the vertex shaders.
This ended up being turned on in gallivm, but since we use nir_to_tgsi on
the VS and TGSI doesn't have FP16, we can't let that happen.

Fixes: f814a2449e ("llvmpipe: enable FP16 and update CL + traces piglit results.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14403>
(cherry picked from commit b9e8936bfb)
2022-01-12 19:54:25 +00:00
satmandu
d2d07f2ba4 Fix compilation on armv7l with gcc 11.2.0
Cc: mesa-stable
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12810>
(cherry picked from commit d27805753f)
2022-01-12 19:54:24 +00:00
Timothy Arceri
20e8f2e121 glsl/glcpp: make sure to expand new token after concatenation
Previously the code was using a hack to change the token type from
INDETIFIER -> OTHER in order to avoid getting in an infinite loop
expanding the tokens. This worked ok until we got to a paste where
the replacement parameters had already had their type changed
to OTHER because the newly created paste token would then
inherit the OTHER type and never get expanded inself.

For example with the follow code:

   #define STEP_ONE() \
	out_Color = vec4(0.0,1.0,0.0,1.0)

   #define GLUE(x,y) x ## _ ## y
   #define EVALUATE(x,y)  GLUE(x,y)
   #define STEP(stepname) EVALUATE(STEP, stepname)()
   #define PERFORM_RAYCASTING_STEP STEP(ONE)

This would get all the way to expanding PERFORM_RAYCASTING_STEP to
STEP_ONE() but because it was created via the paste `x ## _ ## y`
it would never get any further.

To fix this we remove the OTHER hack and instead just track if the
token has already been handled via a bool value `explanding`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5724

Fixes: 28842c2331 ("glcpp: Implement token pasting for non-function-like macros")

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14101>
(cherry picked from commit d2711f9b61)
2022-01-12 19:54:24 +00:00
Pavel Ondračka
90e3310086 r300: Remove broken optimization in rc_transform_KILL
The logic was reversed so this was not only not working but it was
also removing random instructions around. The special IF-KILP-ENDIF
case this optimization was targeting is already transformed to
KILL_IF in the TGSI, so just remove this altogether.

This fixes piglit glsl-fs-discard-04
v2: Update the comment as well

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/343
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@zoho.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14378>
(cherry picked from commit 96ad4f6437)
2022-01-12 19:54:24 +00:00
Alyssa Rosenzweig
6059636619 pan/bi: Fix load_const of 1-bit booleans
For historical reasons, we ingest 1-bit booleans in NIR but expand them
to 16/32-bit booleans in the backend IR. We need to handle this case
when loading boolean constants, extending from 1-bit to 16/32-bit as
required. This issue is masked by effective constant folding for
booleans, but is visible in a shader from Firefox WebRender.

Fixes: 646e03c451 ("pan/bi: Temporarily switch back to 0/~0 bools")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95
Closes: #5797
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14371>
(cherry picked from commit 29d319c767)
2022-01-12 19:54:24 +00:00
Boris Brezillon
a1c1a60630 microsoft/compiler: Fix dxil_nir_create_bare_samplers()
_mesa_hash_table_u64_search() returns the data directly, not an
hash_entry object.

Fixes: 46bc7cf678 ("microsoft/compiler: Rewrite sampler splitting pass to be smarter and handle derefs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
(cherry picked from commit 83280b8e23)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14377>
2022-01-12 19:54:24 +00:00
Emma Anholt
8e21700810 freedreno/afuc: Disable the disassembler on 32-bit builds.
There's an mmap(2 << 32), which armhf can't handle.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5514
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13421>
(cherry picked from commit 80d5e40fd1)
2022-01-12 19:54:24 +00:00
Filip Gawin
1ec2c58de0 r300: fix handling swizzle in transform_source_conflicts
these tests are now passing:
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec2_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec3_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec4_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec2_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec3_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec4_vertex,Fail

Fixes: 1c2c4ddbd1 ("r300g: copy the compiler from r300c")

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14282>
(cherry picked from commit 2ddfb9c256)
2022-01-12 19:54:24 +00:00
Daniel Schürmann
5870889109 aco: don't allow SDWA on VOP3P instructions
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13576>
(cherry picked from commit 1502c22e2c)
2022-01-12 19:54:24 +00:00
Samuel Pitoiset
f9918f603a radv: add drirc radv_disable_htile_layers and enable it for F1 2021
To workaround some flickering issues in the main menu.
See https://github.com/HansKristian-Work/vkd3d-proton/issues/950

Cc: 21.3 mesa-stable
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/14354>
(cherry picked from commit 90994e4db7)
2022-01-12 19:54:24 +00:00
Henry Goffin
8be9711422 intel/compiler/test: Fix build with GCC 7
Without this change, test_fs_scoreboard.cpp does not compile on GCC 7
due to the use of C99 initializers in a C++ source file.

Fixes: c847bfaaf5 ("intel/fs/gen12: Add tests for scoreboard pass")

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14349>
(cherry picked from commit fe617bcca0)
2022-01-12 19:54:24 +00:00
Qiang Yu
bde0b2a496 glapi: should not add alias function to static_data.py
Alias function should not be assigned an offset, otherwise new added
function will get error:

  Exception: entries are not ordered by slots

Fixes: 757bc6d37a ("mesa: Add support for EXT_clear_texture")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14223>
(cherry picked from commit bcaf9704ad)
2022-01-12 19:54:24 +00:00
Dave Airlie
3683757461 crocus: fail resource allocation properly.
Older gens have a limit of 2GB on surfaces, this results in
isl_surf_init_s failing if the surface exceeds that, in this
case this should fail all the way back up the stack.

This fixes some cases of max-texture-size on crocus

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14347>
(cherry picked from commit d8a38edc48)
2022-01-12 19:54:23 +00:00
Dave Airlie
5f32bdee91 intel/genxml/gen4-5: fix more Raster Operation in BLT to be a uint
This has been partly fixed twice before, but looks like some got missed.

Fixes arb_copy_image on gen4 with crocus

Fixes: de625dddee ("intel/genxml: fix raster operation field in blt genxml")

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14345>
(cherry picked from commit a2293e33fd)
2022-01-12 19:54:23 +00:00
Eric Engestrom
2f6c2b1e8e .pick_status.json: Mark 2a0253b9b5 as denominated 2022-01-12 19:54:23 +00:00
Eric Engestrom
2fcf7a368d .pick_status.json: Mark 00bea38242 as denominated 2022-01-12 19:54:23 +00:00
Eric Engestrom
b1f0c1488e .pick_status.json: Update to 8a78706643 2022-01-12 19:54:00 +00:00
Jason Ekstrand
4e143b9c0b Revert "anv: Stop doing too much per-sample shading"
This reverts commit 1f559930b6.  Turns
out, this approach won't work.

Fixes: 1f559930b6 ("anv: Stop doing too much per-sample shading")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14196>
(cherry picked from commit b05d228695)
2022-01-01 18:16:22 +00:00
Eric Engestrom
a65ad66c47 VERSION: bump for 21.3.3 2021-12-29 21:05:19 +00:00
Eric Engestrom
7cdf129351 docs: add release notes for 21.3.3 2021-12-29 21:00:13 +00:00
Bas Nieuwenhuizen
5928a69a71 radv: Skip wait timeline ioctl with 0 handles.
Fixes: 55d8022878 "radv: Add winsys functions for timeline syncobj."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14165>
(cherry picked from commit 20b51cdabe)
2021-12-29 20:56:30 +00:00
Bas Nieuwenhuizen
9c96f43758 radv: Use correct buffer size for query pool result copies.
1. the dst stride may be too small if count=1.
2. the src stride may be too small due to the availability bit.

So lets just compute the size needed explicitly and use it.

Fixes: 90a0556c ("radv: use pool stride when copying single query results")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14242>
(cherry picked from commit afff9dd0f0)
2021-12-29 20:56:29 +00:00
Samuel Pitoiset
3e62c870ea radv: re-apply "Do not access set layout during vkCmdBindDescriptorSets."
Uplay needs this to avoid a crash because it does an use-after-free
of a descriptor set layout. This was initially introduced by Bas to
workaround a similar issue with Baldur's Gate 3, it seems needed again.

Cc: 21.3 mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5789
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/14318>
(cherry picked from commit b775aaff1e)
2021-12-29 20:56:29 +00:00
Emma Anholt
95ad97fcad r300/vs: Fix flow control processing just after an endloop.
We tried to step over the instruction we just generated, except we didn't
always just generate one.  In the sequence_vertex tests, that meant we
skipped processing the next BGNLOOP and then underflowed our stack.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14271>
(cherry picked from commit 658b2ca467)
2021-12-29 20:56:29 +00:00
Emma Anholt
a42ed80f09 r300/vs: Allocate temps we see a use as a source, too.
This is a quick hack for a bunch of the fail in #5766.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14271>
(cherry picked from commit e41a53cd19)
2021-12-29 20:56:29 +00:00
Emma Anholt
a80330e217 r300: Disable loop unrolling on r500.
It's buggy, and we should just trust GLSL or NIR to do unrolling for us.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
(cherry picked from commit e68a9b0339)
2021-12-29 20:56:29 +00:00
Emma Anholt
3ad31d0d88 r300: Also consider ALU condition modifiers for loop DCE.
Since we typically use an ALU op to set the condition modifier for the
IF-BRK-ENDIF, we were particularly likely to remove the increment of the
loop counter!

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
(cherry picked from commit 26b3e2f7cd)
2021-12-29 20:56:29 +00:00
Emma Anholt
7771f16e08 r300: Ensure that immediates have matching negate flags too.
We only have one bit of negate, so we have to make sure that immediate
usage has matching negates on all used channels (or rewrite to do so).

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
(cherry picked from commit d6fed4ab7d)
2021-12-29 20:56:29 +00:00
Emma Anholt
94449816ab r300: Move the instruction filter for r500_transform_IF() to the top.
rc_get_variables() is slow, don't call it if we're going to just exit
immediately anyway.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
(cherry picked from commit 42e8f48be7)
2021-12-29 20:56:29 +00:00
Emma Anholt
d4bbc1261f r300: Fix mis-optimization turning -1 - x into 1 - x.
Cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>
(cherry picked from commit 65e343dda3)
2021-12-29 20:56:29 +00:00
Jesse Natalie
507ec26688 microsoft/compiler: Implement inot
Fixes: cb283616 ("nir/algebraic: Small optimizations for SpvOpFOrdNotEqual and SpvOpFUnordEqual")
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140>
(cherry picked from commit 45354be410)
2021-12-29 20:56:29 +00:00
pal1000
ae068af2e2 swr: Fix MSVC build
Fixes: e002f5a086 ("gallium: change pipe_vertex_element::src_format to uint8_t")
Closes: #5550
Authored-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13908>
2021-12-29 20:56:29 +00:00
Tapani Pälli
7c59c30905 glsl: fix invariant qualifer usage and matching rule for GLSL 4.20
I noticed that GLSL version referenced here was wrong, version 4.20 is
first spec that does not allow invariant keyword for inputs.

v2: fix all comments (Timothy Arceri)

Fixes: f9f462936a ("glsl: Fix invariant matching in GLSL 4.30 and GLSL ES 1.00.")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14241>
(cherry picked from commit ebd1f202ae)
2021-12-29 20:56:29 +00:00
Vinson Lee
4f848d9f2b panfrost: Avoid double unlock.
Fix defect reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: pthread_mutex_unlock unlocks dev->indirect_draw_shaders.lock while it is unlocked.

Fixes: 2e6d94c198 ("panfrost: Add helpers to support indirect draws")
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14262>
(cherry picked from commit 9f8a204645)
2021-12-29 20:56:29 +00:00
Timur Kristóf
11ef52212a aco/optimizer_postRA: Fix applying VCC to branches.
Fixes: a93092d0ed
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14281>
(cherry picked from commit b293299776)
2021-12-29 20:56:29 +00:00
Timur Kristóf
0fb58901f0 aco/optimizer_postRA: Fix combining DPP into VALU.
Fixes: 4ac47ad1cd
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14281>
(cherry picked from commit ce4daa259c)
2021-12-29 20:56:29 +00:00
Daniel Schürmann
6c510c4847 aco/ra: fix get_reg_for_operand() in case of stride mismatches
We have to clear the register file from the previous operand
as otherwise, there might be no space left.

Totals from 5 (0.00% of 134572) affected shaders: (GFX10.3)
CodeSize: 21144 -> 21000 (-0.68%); split: -0.72%, +0.04%
Instrs: 3738 -> 3720 (-0.48%); split: -0.51%, +0.03%
Latency: 517229 -> 516319 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 49068 -> 48902 (-0.34%); split: -0.38%, +0.04%
Copies: 501 -> 483 (-3.59%); split: -3.79%, +0.20%

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14279>
(cherry picked from commit d36a43598c)
2021-12-29 20:56:29 +00:00
Daniel Schürmann
1c44a60ff4 aco/optimizer: fix fneg modifier propagation on VOP3P
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13688>
(cherry picked from commit 193bd740ab)
2021-12-29 20:56:29 +00:00
Francisco Jerez
03f6edd5b7 intel/fs: Add physical fall-through CFG edge for unconditional BREAK instruction.
This adds a missing CFG edge that represents a possible physical
control flow path the EU might take under some conditions which isn't
part of the logical CFG of the program.  This possibility shouldn't
have led to problems on platforms prior to Gfx12, since the missing
control flow edge cannot possibly influence liveness intervals.
However on Gfx12+ it becomes the compiler's responsibility to resolve
data dependencies across instructions, and the missing physical
control flow paths may lead to a WaR data hazard currently not visible
to the software scoreboard pass, which could lead to data corruption.

Worse, the possibility for this path to be taken by the EU increases
on Gfx12+ due to a hardware bug affecting EU fusion -- However the
same physical path can be potentially taken on earlier platforms as
well, so this patch extends the CFG on all platforms for consistency,
even though the lack of this edge shouldn't lead to any functional
issues on platforms earlier than Gfx12.  There are no shader-db
changes on earlier platforms, so there seems to be no disadvantage
from using the same CFG representation as on later platforms.

This issue has ben reported on TGL with the following conformance
test, thanks to Ian for bringing the FULSIM dependency check warning
to my attention:

   dEQP-VK.graphicsfuzz.spv-stable-pillars-volatile-nontemporal-store

Fixes: 4d1959e693 ("intel/cfg: Represent divergent control flow paths caused by non-uniform loop execution.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4940
Reported-by: Tapani Pälli <tapani.palli@intel.com>
Reported-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14248>
(cherry picked from commit e7470a40c5)
2021-12-29 20:56:29 +00:00
Rob Clark
d93b0b4888 freedreno/computerator: Fix @buf header
Order is important in the grammar, the more specific match needs to go
first.

Fixes: ba1c989348 ("freedreno/computerator: pass iova of buffer to const register")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>
(cherry picked from commit d1edc6d9a1)
2021-12-29 20:56:28 +00:00
Rob Clark
63af1b930a freedreno/ir3: Handle instr->address when cloning
Without this, a cloned instruction that takes full regs will trigger an
ir3_validate assert.  This can happen, for ex, if an instruction that
writes p0.x and has a relative src gets cloned in ir3_sched.

Fixes an assert in Genshin Impact with a debug build.

Fixes: 9af795d9b9 ("ir3: Make ir3_instruction::address a normal register")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>
(cherry picked from commit 78c53f4888)
2021-12-29 20:56:28 +00:00
Alyssa Rosenzweig
aade2545a7 panfrost: Fix Secondary Shader field
Off-by-one on the start.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Fixes: 73e80994d5 ("panfrost: Add secondary shader XML fields")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14154>
(cherry picked from commit 8dc1936faa)
2021-12-29 20:56:28 +00:00
Alyssa Rosenzweig
7342fa5ed9 pan/indirect_draw: Don't upload garbage UBO
There should never be a CPU pointer in GPU memory, let's say that...

Fixes: 2e6d94c198 ("panfrost: Add helpers to support indirect draws")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14154>
(cherry picked from commit d696183d4d)
2021-12-29 20:56:28 +00:00
Jason Ekstrand
d8715ff19b vulkan/log: Don't assert on non-client-visible objects
We already have code to deal with non-client-visible objects but we were
asserting if it didn't fall into one of the clearly mappable error
cases.  However, we didn't have a mapping for VK_ERROR_NOT_PERMITTED
which can happen during object creation.  Let's just be sloppy and drop
the assert.  Worst case, the client gets an error with no object.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13341>
(cherry picked from commit 116e23e385)
2021-12-29 20:56:28 +00:00
Eric Engestrom
4d28da1f8e .pick_status.json: Mark d49d092259 as denominated 2021-12-29 20:56:28 +00:00
Eric Engestrom
524fb244bd .pick_status.json: Update to 4942e10890 2021-12-29 20:55:53 +00:00
Eric Engestrom
a06cd045d1 VERSION: bump for 21.3.2 2021-12-17 22:31:25 +00:00
Eric Engestrom
4b6c14cc7a docs: add release notes for 21.3.2 2021-12-17 22:31:13 +00:00
Jason Ekstrand
1b8f73b5c7 radeonsi/nir: Check for VARYING_SLOT_PRIMITIVE_ID not SYSTEM_VALUE
This function is called on load/store_input/output.  It makes no sense
for it to get a SYSTEM_VALUE enum.  This only doesn't explode because
SYSTEM_VALUE_PRIMITIVE_ID happens to be below VARYING_SLOT_VAR0 so it
doesn't interact with any actual varyings.  The next commit is going to
add another system value which will push SYSTEM_VALUE_PRIMITIVE_ID up by
one so it will equal VARYING_SLOT_VAR0 and then the first FS input will
always get smashed to flat which isn't what we want.

Fixes: b59bb9c07a ("radeonsi: force flat for PrimID early in si_nir_scan_shader")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14198>
(cherry picked from commit 732b234ddb)
2021-12-17 22:30:51 +00:00
Lionel Landwerlin
09ead89f6d vulkan: fix missing handling of WSI memory signal
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b996fa8efa ("anv: implement VK_KHR_synchronization2")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5744
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14237>
(cherry picked from commit cdf101455d)
2021-12-17 22:30:50 +00:00
Ian Romanick
fd54eeb897 intel/stub: Silence "initialized field overwritten" warning
src/intel/tools/intel_noop_drm_shim.c:459:36: warning: initialized field overwritten [-Woverride-init]
  459 |    [DRM_I915_GEM_EXECBUFFER2_WR] = i915_ioctl_noop,
      |                                    ^~~~~~~~~~~~~~~

Fixes: 0f4f1d70bf ("intel: add stub_gpu tool")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14218>
(cherry picked from commit 2dc7c24b80)
2021-12-17 22:30:50 +00:00
Michel Zou
c51e26649e meson: correctly detect linker arguments
Fixes: 22673a98 ("meson: Check arguments before adding")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13961>
(cherry picked from commit 631b3fe3e9)
2021-12-17 22:30:50 +00:00
Caio Oliveira
709c5d1492 nir: Initialize nir_register::divergent
Fixes: c7fc44f9eb ("nir/from_ssa: Respect and populate divergence information")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14205>
(cherry picked from commit dcc7b19cae)
2021-12-17 22:30:50 +00:00
Rhys Perry
2198488bbb radv: have the null winsys set more fields
I copied stuff from ac_gpu_info.c until there were no Sienna Cichild or
Polaris10 fossil-db changes between real hardware and RADV_FORCE_FAMILY.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14126>
(cherry picked from commit 451e6c1b32)
2021-12-17 22:30:50 +00:00
Nanley Chery
d6f3d5f546 iris: Free the local cache bucket in bufmgr_destroy
Fixes: 55be94dcab ("iris/bufmgr: Add new set of buckets for local memory.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14012>
(cherry picked from commit f93892c5d3)
2021-12-17 22:30:50 +00:00
Pierre-Eric Pelloux-Prayer
41f9866120 radeonsi: fix fast clear / depth decompression corruption
Insert a flush after a depth decompression pass if the texture
was fast cleared.
This fixes a corruption which seems to only affect gfx10.3 chips.

Ideally we should also clear tex->need_flush_after_depth_decompression
after a flush but there's no easy way for this so this commit will
introduce extra flushes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14089>
(cherry picked from commit 573d645133)
2021-12-17 22:30:50 +00:00
Roman Stratiienko
e5c982b332 v3dv: Fix V3DV_HAS_SURFACE preprocessor condition
Currently V3DV_HAS_SURFACE is always defined.
There is no WSI for Android in mesa3d, therefore WSI related extensions
should not be exposed.

1. Define V3DV_HAS_SURFACE only for platforms which has WSI implemented.
2. Rename V3DV_HAS_SURFACE -> V3DV_USE_WSI_PLATFORM to align naming
with other platforms.

Fixes dEQP-VK.wsi.android.surface#query_protected_capabilities

Fixes: 79e4451430 ("v3dv: move extensions table to v3dv_device")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14144>
(cherry picked from commit fcfc4ddfcc)
2021-12-17 22:30:50 +00:00
Dave Airlie
6b5c69dab1 crocus: cleanup bo exports for external objects
This might have led to a leak in firefox/webrender/webgl scenarios

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14167>
(cherry picked from commit 76da456954)
2021-12-17 22:30:50 +00:00
Mauro Rossi
7dd3b99eab android: add support for classic dri-drivers (v2)
(v1) Changelog:

-Ddri-drivers option is added in MESON_GEN_NINJA
$(foreach ) cycle copies *_dri.so files to /vendor/lib{64}/dri/

(v2) Changelog

Remove unwanted Symlinks created for classic dri drivers
Update the comments describing each step
Rename .symlinks.timestamp to .targets.timestamp
Squash all the changes in one commit to facilitate picking in mesa stable

HowTo:
BoardConfig.mk: BOARD_MESA3D_CLASSIC_DRIVERS defines the list of classic dri drivers
example: BOARD_MESA3D_CLASSIC_DRIVERS := i965

Fixes: 8621bd8d ("android: Add scripts to build using meson")
Cc: "21.3" "21.2" mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13973>
2021-12-17 22:30:50 +00:00
Jason Ekstrand
29fcb94b9e anv: Stop doing too much per-sample shading
We were setting anv_pipeline::sample_shading_enable based on
sampleShadingEnable without looking at minSampleShading.  We would then
pass this value into nir_lower_wpos_center which would add sample_pos to
frag_coord.  Then the back-end compiler picks up on the existence of
sample_pos and forces persample dispatch.  This leads to doing
per-sample dispatch whenever sampleShadingEnable = VK_TRUE regardless of
the value of minSampleShading.  This is almost certainly costing us
perf somewhere.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14022>
(cherry picked from commit 1f559930b6)
2021-12-17 22:30:50 +00:00
Jason Ekstrand
0d8d9dde7b crocus: wm_prog_key::key_alpha_test uses GL enums
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14141>
(cherry picked from commit 4175ed5099)
2021-12-17 22:30:49 +00:00
Danylo Piliaiev
7aca70e17b turnip: Fix operator precedence in address calculation macros for queries
Fixes crash in Oblivion, Skyrim, Crysis running through DXVK on 32b
systems.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5723
Fixes: 937dd76426 "turnip: Implement VK_KHR_performance_query"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14148>
(cherry picked from commit c82d7e3617)
2021-12-17 22:30:49 +00:00
Timur Kristóf
519ea90401 aco: Clean up and fix quad group instructions with WQM.
According to the Vulkan spec chapter 9.25 Helper Invocations,
quad group operations have to be executed by helper invocations.

This commit cleans up the code for quad group instructions by
unifying the code path of quad broadcast with the others, and then
calling emit_wqm just once at the end.

Fixes: 93c8ebfa78
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5570
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13929>
(cherry picked from commit 77db4e27b1)
2021-12-17 22:30:49 +00:00
Ian Romanick
55d80bc20a intel/compiler: Don't predicate a WHILE if there is a CONT
Previously a predicated BREAK that appeared immediately before the WHILE
would get merged into the WHILE.  This doesn't work if other flow
control (e.g., a CONT) can transfer directly to the WHILE.

On Intel platforms, this fixes the CTS test
dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.

No shader-db changes on any Intel platform.

When this commit was first created (over a month before it is going to
land), there were some regressions that were prevented by other commits
in MR !13095.  That does not appear to be the case now, so I don't know
what changed.  Basically, the treatment of discard as a combination of
demote and terminate causes additional continues in some loops, and
those continues trigger this bug.  The other commits from that MR
prevent those continues from being generated in the first place.

All Intel platforms had simlar fossil-db results. (Ice Lake shown)
Instructions in all programs: 144419989 -> 144419995 (+0.0%)
SENDs in all programs: 6947332 -> 6947332 (+0.0%)
Loops in all programs: 38277 -> 38277 (+0.0%)
Spills in all programs: 204075 -> 204075 (+0.0%)
Fills in all programs: 319480 -> 319480 (+0.0%)

A few shaders in Doom 2016 were hurt by one instruction each.  It seems
likely that these shaders would have experienced at least some
mis-rendering.

Closes: #4213
Fixes: d13bcdb3a9 ("i965/fs: Extend predicated break pass to predicate WHILE.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14128>
(cherry picked from commit 4563261ad1)
2021-12-17 22:30:49 +00:00
Roman Stratiienko
69b8f9c6cd v3dv: Fix dEQP-VK.info#instance_extensions test
When mesa3d is built without VK_USE_PLATFORM_DISPLAY_KHR definition,
dEQP test fails:

    dEQP    : Test case 'dEQP-VK.info.instance_extensions'..
    dEQP    :   Fail (Extension VK_KHR_get_display_properties2 is missing
                                                 dependency: VK_KHR_display)
    dEQP    : DONE!

Enable KHR_get_display_properties2 only if VK_USE_PLATFORM_DISPLAY_KHR
is enabled.

Fixes: f884c2e3be ("v3dv: implement VK_KHR_get_display_properties2")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14047>
(cherry picked from commit 72db15913f)
2021-12-17 22:30:49 +00:00
James Jones
0cc65a565c gbm: Don't pass default usage flags on ABIs < 1
Older drivers will not expect any flags from the
GBM front-end when modifiers are in use, and will
likely fail the allocation or handle them
incorrectly as a result. Only specify usage flags
when allocating from a backend with an ABI >= 1,
as that's the ABI version that added support for
specifying usage flags along with modifiers.

Fixes: ad50b47a14 ("gbm: assume USE_SCANOUT in create_with_modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5709
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14049>
(cherry picked from commit c2550d1b7c)
2021-12-17 22:30:49 +00:00
Francisco Jerez
d1f2820154 intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.
This virtual instruction is translated into multiple half float
physical instructions, even though its destination is typically of
integer type, which prevents the software scoreboard pass from
inferring the correct execution pipeline for the virtual instruction
on XeHP+ platforms.  Teach the SWSB lowering pass about this
inconsistency between the IR and physical instruction types.

Fixes among other tests:

dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute

Fixes: d4537770bb ("intel/fs: Add helper functions inferring sync and exec pipeline of an instruction.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5685
Reported-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14002>
(cherry picked from commit de55fd358f)
2021-12-17 22:30:49 +00:00
Alyssa Rosenzweig
898308f148 panfrost: Don't shadow Mesa's fui()
Will fix a compiler error when we #include the Valhall disassembler
header from pandecode.

Fixes: 688827f3c5 ("pan/va: Add disassembler generator")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
(cherry picked from commit 745d7db748)
2021-12-17 22:30:49 +00:00
Jakob Bornecrantz
4b38a272b6 vulkan-device-select: Don't leak drmDevicePtr
ASAN found a leak:

```
Direct leak of 1440 byte(s) in 10 object(s) allocated from:
    #0 0x4a9a92 in calloc (build-Monado-CMake/src/xrt/targets/service/monado-service+0x4a9a92)
    #1 0x7fdf82afed06 in drmDeviceAlloc build-drm/../drm/xf86drm.c:3933:14
    #2 0x7fdf82b00203 in drmProcessPciDevice build-drm/../drm/xf86drm.c:3965:11
    #3 0x7fdf82b00203 in process_device build-drm/../drm/xf86drm.c:4359:16
    #4 0x7fdf82b0485e in drmGetDevice2 build-drm/../drm/xf86drm.c:4528:15
    #5 0x7fdf70751113 in device_select_find_xcb_pci_default ../src/vulkan/device-select-layer/device_select_x11.c:95:13
    #6 0x7fdf70751113 in get_default_device ../src/vulkan/device-select-layer/device_select_layer.c:395:21
    #7 0x7fdf70751113 in device_select_EnumeratePhysicalDevices ../src/vulkan/device-select-layer/device_select_layer.c:456:33
```

Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14068>
(cherry picked from commit 555f93cdcd)
2021-12-17 22:30:49 +00:00
Lionel Landwerlin
26a01fc07a nir/lower_io: include the variable access in the lowered intrinsic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13718>
(cherry picked from commit f98984ad13)
2021-12-17 22:30:49 +00:00
Lionel Landwerlin
b0ce6f5f58 intel/nir: preserve access value when duping intrinsic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6339aba775 ("intel/compiler: Lower SSBO and shared loads/stores in NIR")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13718>
(cherry picked from commit 7661237a31)
2021-12-17 22:30:48 +00:00
Tapani Pälli
0025ef9880 anv: allow VK_IMAGE_LAYOUT_UNDEFINED as final layout
From VK_KHR_synchronization2:
   "Image memory barriers that do not perform an image layout
    transition can be specified by setting oldLayout equal to
    newLayout.

    E.g. the old and new layout can both be set to
    VK_IMAGE_LAYOUT_UNDEFINED, without discarding data in the
    image."

v2: make assert more readable (Lionel Landwerlin)

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14008>
(cherry picked from commit d44d2e823f)
2021-12-17 22:30:48 +00:00
Lionel Landwerlin
04ccbf5fea nir/opt_deref: don't try to cast empty structures
Found while running valgrind :

==3583454== Invalid read of size 4
==3583454==    at 0xF48336: glsl_get_struct_field_offset (nir_types.cpp:84)
==3583454==    by 0xC7CD0D: opt_replace_struct_wrapper_cast (nir_deref.c:1068)
==3583454==    by 0xC7CDD9: opt_deref_cast (nir_deref.c:1087)
==3583454==    by 0xC7DD8E: nir_opt_deref_impl (nir_deref.c:1369)
==3583454==    by 0xC7DF4E: nir_opt_deref (nir_deref.c:1428)
==3583454==    by 0xA63F3C: brw_kernel_from_spirv (brw_kernel.c:325)
==3583454==    by 0xA3BC2C: main (intel_clc.c:481)
==3583454==  Address 0xe4f7e88 is 24 bytes after a block of size 48 in arena "client"

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13952>
(cherry picked from commit 8e568d3f00)
2021-12-17 22:30:48 +00:00
Eric Engestrom
16e281c4aa .pick_status.json: Update to a65285f54b 2021-12-17 22:30:44 +00:00
Eric Engestrom
9da08702b0 VERSION: bump for 21.3.1 2021-12-01 19:04:14 +00:00
Eric Engestrom
ec157bc04d docs: add release notes for 21.3.1 2021-12-01 18:56:57 +00:00
Mauro Rossi
ae3b08fb97 android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)
libLLVM for Android is built without RTTI, but after commit ad86267
mesa inherits meson default RTTI enabled state.

cpp_rtti=false is added to meson options in android/mesa3d_cross.mk

(v2) Add Fixes tag and use spaces instead of tabs for aligning the trailing \

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Fixes: ad862674 ("meson: Don't override built-in cpp_rtti option, error if it's invalid")
Cc: "21.3" "21.2" mesa-stable
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13901>
(cherry picked from commit 1ba231fb75)
2021-12-01 18:55:48 +00:00
Rhys Perry
bf23b3e69a aco: don't create DPP instructions with SGPR operands
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2e6834d4f6 ("aco: combine DPP into VALU before RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13976>
(cherry picked from commit 6afba80534)
2021-12-01 18:55:48 +00:00
Samuel Pitoiset
36659b347c radv: fix resetting the entire vertex input dynamic state
If there is holes, eg. the application firsts set vertex attributes
0 and 1, then vertex attributes 0 and 7, the format of vertex attribute
1 is still the previous one, while it should be FORMAT_INVALID to avoid
a GPU hang.

This fixes a GPU hang with Yuzu.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5627
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13856>
(cherry picked from commit 8f00f19da5)
2021-12-01 18:55:48 +00:00
Mykhailo Skorokhodov
cb5b523922 nir: Fix read depth for predecessors
In some non-trivial cases (the amber script file in the merge
request description) phi instruction has more than 32 elements
in predecessors tree and that isn't recursion, just large tree.
In that case, phis not fully converted into a register or mov,
but successfully removed.

The fix removes the counter and adds container of visited blocks.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3690
Cc: mesa-stable
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13710>
(cherry picked from commit 391569e911)
2021-12-01 18:55:48 +00:00
Rhys Perry
87bab07750 nir/dce: fix DCE of loops with a halt or return instruction in the pre-header
If there is a halt or return instruction right before a loop with a single
continue, we would have taken the fast path intended for loops without
continues.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 71a985d80b ("nir/dce: perform DCE for unlooped instructions in a single pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10284>
(cherry picked from commit 2fe13aa2ad)
2021-12-01 18:55:48 +00:00
Vasily Khoruzhick
ae0988b09c lima: disasm: use last argument as a filename
Otherwise it fails to open a file.

Fixes: 9660427ab7 ("lima: Print usage if --help is any of the arguments.")
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13968>
(cherry picked from commit 711a4ccddb)
2021-12-01 18:55:48 +00:00
Samuel Pitoiset
d36f814171 radv: add a workaround to fix a segfault with Metro Exodus (Linux native)
The game calls vkGetSemaphoreCounterValue() with an invalid semaphore
handle and it crashes. This is an invalid Vulkan usage and it should
be fixed in the game. I reported the issue to the developers.

Workaround this temporarily (hopefully) by ignoring
vkGetSemaphoreCounterValue() if the semaphore is NULL from an internal
RADV layer.

Cc: 21.3 mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5119
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/13956>
(cherry picked from commit 990a8ee5eb)
2021-12-01 18:55:48 +00:00
Erico Nunes
4d5d2a1558 ci: temporarily disable lima CI
The lima board farm will be unavailable for a few days, so disable it
to avoid CI failures.

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/13595>
(cherry picked from commit ee2e14b352)
2021-12-01 18:55:48 +00:00
Lionel Landwerlin
6f2e24f53f util/u_trace: refcount payloads
When cloning a chunk of tracepoints, we cannot just copy the elements
of the traces[] array. We also need the payloads associated with
those.

This change introduces a new u_trace_payloaf_buf object that is
refcounted so that we can easily import traces[] elements and their
payloads from one utrace to another.

v2: use u_vector (Danylo)

v3: Delete outdate comment (Danylo)
    Fix assert (Danylo)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0565c993f9 ("u_trace: helpers for tracing tiling GPUs and re-usable VK cmdbuffers")
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13899>
(cherry picked from commit 14e45cb21e)
2021-12-01 18:55:47 +00:00
Rhys Perry
6f0505d49e spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl
spirv_to_nir sometimes wraps derefs in vec2 or mov instructions as part of
its texture handling. These get in the way of
nir_rematerialize_derefs_in_use_blocks_impl. Running copy propagation
should get rid of the extra move instructions and get us back to intact
deref chains for everything except variable pointer use-cases.

fossil-db (Sienna Cichlid):
Totals from 6 (0.00% of 134572) affected shaders:
CodeSize: 92656 -> 93088 (+0.47%)
Instrs: 17060 -> 17138 (+0.46%)
Latency: 224408 -> 227539 (+1.40%)
InvThroughput: 37402 -> 37924 (+1.40%)
VClause: 408 -> 402 (-1.47%)
Copies: 1065 -> 1107 (+3.94%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5668
Fixes: 14a12b771d ("spirv: Rework our handling of images and samplers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13924>
(cherry picked from commit b425100781)
2021-12-01 18:55:47 +00:00
Thomas H.P. Andersen
7a5cea0ff8 svga: fix bitwise/logical and mixup
The function need_temp_reg_initialization looks suspecious.

It will only ever return true if we get past this if:
if (!(emit->info.indirect_files && (1u << TGSI_FILE_TEMPORARY)) ...

Using the logical && means the intended initialization done
based on the result of this check is not performed.

This code was both introduced and altered in MR 5317.
ccb4ea5a introduces the function.
ba37d408 is a collection of performance improvements and misc
fixes. This altered the if from using bitwise to logical and.

This commit changes it back to bitwise.

Spotted from a compile warning.

Fixes: ba37d408da ("svga: Performance fixes")

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12157>
(cherry picked from commit 64292c0f05)
2021-12-01 18:55:47 +00:00
Roman Stratiienko
0ba31a494d android.mk: Add missing variables to the make target
Android build system may use different internal variables to specify
cflags/cppflags.
Small change in product confguration may force Android to use diffrent
set of variables, therefore we should keep all of them attached to the
make rule's target.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5549
Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13914>
(cherry picked from commit 32ec0fffa6)
2021-12-01 18:55:47 +00:00
Samuel Pitoiset
b1d5657990 radv: fix emitting VBO when vertex input dynamic state is used
In the following scenario:
    CmdBindPipeline()
    CmdBindVertexBuffers()
    CmdSetVertexInput()
    CmdDraw()
    CmdBindVertexBuffers()
    CmdSetVertexInput()
    CmdDraw()

The VBO won't be updated for the second draw because the state is
cleared when the dynamic state is emitted and the pipeline isn't dirty.

Found by inspection.

Cc: 21.3 mesa-stable
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/13855>
(cherry picked from commit aee25471b9)
2021-12-01 18:55:47 +00:00
Rhys Perry
3defc6bc47 aco/spill: use spills_entry instead of spills_exit to kill linear VGPRs
If a predecessor has only spilled constants (no temporaries), spills_exit
will be empty.

fossil-db (Sienna Cichlid):
Totals from 2 (0.00% of 128647) affected shaders:
Latency: 139106 -> 139104 (-0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5633
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13821>
(cherry picked from commit cc2894345f)
2021-12-01 18:55:47 +00:00
Lionel Landwerlin
73f5d5053e intel/fs: fix shader call lowering pass
Now that we removed the intel intrinsic and just use the generic one,
we can skip it in the intel call lowering pass and just deal with it
in the intel rt intrinsic lowering.

v2: rewrite with nir_shader_instructions_pass() (Jason)

v3: handle everything in switch (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 423c47de99 ("nir: drop the btd_resume_intel intrinsic")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12113>
(cherry picked from commit c5a42e4010)
2021-12-01 18:55:47 +00:00
Connor Abbott
d3d950ce4a ir3/lower_pcopy: Fix bug with "illegal" copies and swaps
If the source and destination were within the same full register, like
hr90.x and hr90.y (which both map to r45.x), then we'd perform the
swap/copy with the wrong register. This broke
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.35 once BDA is enabled.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13818>
(cherry picked from commit c98adc56f4)
2021-12-01 18:55:47 +00:00
Connor Abbott
c6bdf7a811 ir3/lower_pcopy: Fix shr.b illegal copy lowering
The immediate shouldn't be half-reg because the other source isn't.
Fixes an assertion failure with
dEQP-VK.ssbo.phys.layout.random.16bit.scalar.35.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13818>
(cherry picked from commit 65da866ad9)
2021-12-01 18:55:47 +00:00
Connor Abbott
11e8af1955 ir3/ra: Consider reg file size when swapping killed sources
Don't swap a 2-component vector of half-regs with a full reg if that
would result in the half regs going outside of the allowable half-reg
space.

Fixes: d4b5d2a020 ("ir3/ra: Use killed sources in register eviction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13818>
(cherry picked from commit 9d88b98b08)
2021-12-01 18:55:47 +00:00
Lionel Landwerlin
f5c31a44a8 anv: don't try to close fd = -1
CID: 1464334

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13879>
(cherry picked from commit 04bd5bb69b)
2021-12-01 18:55:46 +00:00
Qiang Yu
b2e5b6757a glx/dri3: fix glXQueryContext does not return GLX_RENDER_TYPE value
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13772>
(cherry picked from commit cee1dd92bd)
2021-12-01 18:55:46 +00:00
Iago Toral Quiroga
7bde2ce13f broadcom/compiler: don't move ldvary earlier if current instruction has ldunif
If we did, we would have the instruction coming right after ldvary write
to the same implicit destination as ldvary at the same time. We prevent
this when merging instructions, but we should make sure we prevent this
when we move ldvary around for pipelining too.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit 79dee14cc2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13923>
2021-12-01 18:55:46 +00:00
Iago Toral Quiroga
c2d44f5979 broadcom/compiler: fix scoreboard locking checks
According to the spec the hardware locks the scoreboard on the first
or last thread switch (selected via shader state) and any TLB accesses
executed before this are not synchronized by hardware.

This change updates the logic to ensure we respect this requirement
and that we don't assume that the lock is acquired automatically
on the first TLB access, which is not valid at least since V3D 4.1+.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
(cherry picked from commit 7fec4f4135)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13923>
2021-12-01 18:55:46 +00:00
Iago Toral Quiroga
f6504f64e8 broadcom/compiler: don't allow RF writes from signals after thrend
Writes to physical registers are not allowed after thread end. We
were checking this for ALU writes, but we need to check it for
signal writes too.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
(cherry picked from commit bd7584c16b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13923>
2021-12-01 18:55:46 +00:00
Samuel Pitoiset
ec1891bae8 radv: disable HTILE for D32S8 format and mipmaps on GFX10
Stencil texturing with HTILE doesn't work with mipmapping on Navi10-14,
it's a hw bug. RadeonSI and PAL have a workaround too.

This fixes 35 piglit failures with Zink on Navi10.

Cc: 21.3 mesa-stable
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/13814>
(cherry picked from commit 341278f069)
2021-12-01 18:55:46 +00:00
Mike Blumenkrantz
5e31954a2e zink: fail context creation more gracefully
handle some cases where context creation fails earlier than expected

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13844>
(cherry picked from commit a3be30665f)
2021-12-01 18:55:46 +00:00
Mike Blumenkrantz
c2682955ff zink: fix memory availability reporting
this shouldn't report the budgeted available memory, it should return
the total memory, as that's what this api expects

Fixes: ff4ba3d4a7 ("zink: support PIPE_CAP_QUERY_MEMORY_INFO")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13849>
(cherry picked from commit 72a88c77de)
2021-12-01 18:55:46 +00:00
Iván Briano
5d130ac3ff intel/nir: also allow unknown format for getting the size of a storage image
Fixes: fa251cf111 ("intel/nir: allow unknown format in lowering of storage images")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13847>
(cherry picked from commit 0388783a03)
2021-12-01 18:55:46 +00:00
Ian Romanick
236be36989 glsl/nir: Don't build soft float64 when it cannot be used
Fixes: 82d9a37a59 ("glsl/nir: Add a shared helper for building float64 shaders")
Closes: #5556
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13828>
(cherry picked from commit 04f5c543de)
2021-12-01 18:55:46 +00:00
Mike Blumenkrantz
a379268693 zink: always set matching resource export type for dmabuf creation
both of these need to be set if one is

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13799>
(cherry picked from commit 943f6a038d)
2021-12-01 18:55:46 +00:00
Mike Blumenkrantz
6c90e1f8c4 zink: stop using VK_IMAGE_LAYOUT_PREINITIALIZED for dmabuf
this is illegal

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13799>
(cherry picked from commit 11c79a8bd7)
2021-12-01 18:55:45 +00:00
Kenneth Graunke
00638cea40 iris: Tidy code in iris_use_pinned_bo a bit
Now that we aren't short-circuiting most of the code, we should probably
reorganize it a little bit.  Tagged with fixes just so we pull all the
refactors together as one group.

Fixes: b21e916a62 ("iris: Combine iris_use_pinned_bo and add_exec_bo")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13808>
(cherry picked from commit 3b78f17532)
2021-12-01 18:55:45 +00:00
Kenneth Graunke
1b90272e16 iris: Check for cross-batch flushing whenever a buffer is newly written.
We need to perform cross-batch flushing if any batch writes to a BO
while others refer to it.  We checked this case when recording a new
BO in the list which we'd never seen before.  However, we neglected to
handle the case when we already read from a BO, but then began writing
to it.  That new write may provoke a conflict between existing reads
in other batches, so we need to re-check the cross-batch flushing.

Caught by Piglit's copyteximage when forcing blits and copies to use
a new IRIS_BATCH_BLITTER that isn't upstream yet.  But this bug could
be provoked by render/compute work today...we just hadn't noticed it.

Fixes: b21e916a62 ("iris: Combine iris_use_pinned_bo and add_exec_bo")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13808>
(cherry picked from commit 6e90984934)
2021-12-01 18:55:45 +00:00
Kenneth Graunke
a3dd8c974e iris: Make a helper function for cross-batch dependency flushing
This should have no functional change, but it's tagged with Fixes
anyway because it's needed for the bug fix in the next patch.

Fixes: b21e916a62 ("iris: Combine iris_use_pinned_bo and add_exec_bo")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13808>
(cherry picked from commit 76030964a6)
2021-12-01 18:55:45 +00:00
Mike Blumenkrantz
39ad7f930a zink: set suballocator bo size to aligned allocation size
this is the actual memory size

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13824>
(cherry picked from commit 97b92c9c32)
2021-12-01 18:55:45 +00:00
Mike Blumenkrantz
a254750fbd zink: block suballocator caching for swapchain/dmabuf images
these have pNext pointers which makes their memory uncacheable

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13824>
(cherry picked from commit eb6f1d5348)
2021-12-01 18:55:45 +00:00
Eric Engestrom
f4ebf9517f .pick_status.json: Update to 1ba231fb75 2021-12-01 18:55:40 +00:00
Eric Engestrom
4a94b5d22a docs: update sha256sum for 21.3.0 2021-11-17 20:38:39 +00:00
Eric Engestrom
9a33ae9467 VERSION: bump for 21.3.0 2021-11-17 20:16:20 +00:00
Eric Engestrom
9ca91d9bbe docs: add release notes for 21.3.0 2021-11-17 20:15:02 +00:00
Samuel Pitoiset
b7ac49468b nir: fix constant expression of ibitfield_extract
This fixes dEQP-VK.graphicsfuzz.cov-condition-bitfield-extract-integer.

For example, nir_ibitfield_extract(3, 1, 2) should return 1.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13791>
(cherry picked from commit 011ea32585)
2021-11-17 20:06:22 +00:00
Jason Ekstrand
02dc554b21 vulkan/util: Include stdlib.h
It's needed for malloc() which is used by STACK_ARRAY

Fixes: f695171e38 ("vulkan: add common entrypoints for sparse image requirements/properties")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>
(cherry picked from commit 95dee5150a)
2021-11-17 20:06:22 +00:00
Kenneth Graunke
a6c713f8c5 intel/genxml: Fix MI_FLUSH_DW to actually specify the length properly
Fixes: 569afd37f1 ("intel/genxml: Copy gen12.xml to gen125.xml")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13809>
(cherry picked from commit 29025f66fd)
2021-11-17 20:06:22 +00:00
Kenneth Graunke
ca307d8cbf iris: Fix parameters to iris_copy_region in reallocate_resource_inplace
We had accidentally passed <x, y, z, l> instead of <l, x, y, z>.

Fixes: b8ef3271c8 ("iris: Move suballocated resources to a dedicated allocation on export")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13815>
(cherry picked from commit f4004fde26)
2021-11-17 20:06:22 +00:00
Bas Nieuwenhuizen
6e1de95860 radv: Fix memory corruption loading RT pipeline cache entries.
Oops. Forgot to account for the size here.

Fixes: ca2d96db51 ("radv: Add caching for RT pipelines.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13789>
(cherry picked from commit 9494c566c2)
2021-11-17 20:06:22 +00:00
Mike Blumenkrantz
503321ea7d zink: always add VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for 3D images
there's no way to know what an image will be used for, so this bit needs
to always be added

fixes KHR-GL46.packed_pixels.varied_rectangle.compressed_rgb

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13798>
(cherry picked from commit 43c457a6ec)
2021-11-17 20:06:22 +00:00
Rhys Perry
dc7bccdb54 aco: consider pseudo-instructions reading exec in needs_exec_mask()
No matter the format, this should return true if the instruction has an
exec operand.

Otherwise, eliminate_useless_exec_writes_in_block() could remove an exec
write in a block if it's successor begins with:
 s2: %3737:s[8-9] = p_parallelcopy %0:exec
 s2: %0:exec,  s1: %3738:scc = s_wqm_b64 %3737:s[8-9]

Totals from 3 (0.00% of 150170) affected shaders (GFX10.3):
CodeSize: 23184 -> 23204 (+0.09%)
Instrs: 4143 -> 4148 (+0.12%)
Latency: 98379 -> 98382 (+0.00%)
Copies: 172 -> 175 (+1.74%)
Branches: 95 -> 97 (+2.11%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: bc13049747 ("aco: Eliminate useless exec writes in jump threading.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5620
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13776>
(cherry picked from commit d89461208b)
2021-11-17 20:06:22 +00:00
Samuel Pitoiset
565a14d7ed radv: fix a sync issue on GFX9+ by clearing the upload BO fence
If the same cmdbuf is submitted more than once, they were waiting on
the same fence value. Fix this by clearing the value when beginning
a new command buffer.

This might fix spurious GPU hangs, especially on GFX9.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5401
Cc: 21.3 mesa-stable
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/13777>
(cherry picked from commit e94a899c0e)
2021-11-17 20:06:22 +00:00
Timothy Arceri
5275563df4 mesa: fix buffer overrun in SavedObj texture obj array
Fixes: 3be42f9ca1 ("mesa: rewrite glPushAttrib/glPopAttrib to get rid of malloc")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5621

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13773>
(cherry picked from commit 9d9de15a02)
2021-11-17 20:06:21 +00:00
Dave Airlie
f2de11b926 llvmpipe: fix compressed image sizes.
VK CTS just added some new tests to write to a compressed image
from a compute shader, which was overrunning memory.

The image width/height need to be sized according to the block
sizes to avoid overwriting memory.

dEQP-VK.image.sample_texture.*bit_compressed*

Cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13618>
(cherry picked from commit 27903abbb6)
2021-11-17 20:06:21 +00:00
Dave Airlie
90486b44ae llvmpipe: disable 64-bit integer textures.
This fixes some crashes in VK-GL-CTS where it doesn't deal with these.

Cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13617>
(cherry picked from commit 53a8faafc1)
2021-11-17 20:06:21 +00:00
Timur Kristóf
ca3f3318e4 aco: Fix how p_is_helper interacts with optimizations.
p_is_helper doesn't have any operands, so ACO's value numbering and/or
the pre-RA optimizer could incorrectly recognize two such instructions
as the same.

This patch adds exec as an operand to p_is_helper in order to achieve
correct behavior.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5570
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13577>
(cherry picked from commit d80c7f3406)
2021-11-17 20:06:21 +00:00
James Park
9586feff54 aco: Work around MSVC restrict in c99_compat.h
Future LLVM header leads to __declspec(__restrict), which is invalid.
Just undefine the restrict macro to keep __declspec(restrict).

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13505>
(cherry picked from commit e0de7aa4d7)
2021-11-17 20:06:21 +00:00
Alyssa Rosenzweig
ffb3ab4d7a nir/lower_pntc_ytransform: Support PointCoordIsSysval
Pattern match the point coord sysval and support lowering it as well.
This is required to handle flipped framebuffers on Bifrost. However,
what this pass normalizes to is the opposite of the hardware mode we
used on Bifrost before, so we need to swap modes at the same time to
prevent regressions.

Fixes Piglit glsl-fs-pointcoord and glsl-fs-pointcoord_gles2

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13073>
(cherry picked from commit e257344a82)
2021-11-17 20:06:20 +00:00
Lionel Landwerlin
5380104201 anv: fix multiple wait/signal on same binary semaphore
We need to guarantee that when vkQueueSubmit() returns the application
can actually wait on a signaled semaphore/syncobj.

When using a thread to do the submission to i915, this gets a bit
tricky in the following case :

   A syncobj is used both as a wait & signal semaphore and has been
   signaled once already. It contains a fence before entering
   vkQueueSubmit().

   This means we need to reset the syncobj to ensure when we return
   from vkQueueSubmit(), the syncobj contains no stale fence.

   Currently in the Anv, the submission thread is in charge of putting
   the new fence in the syncobj and also picks up the wait fence
   directly from the syncobj. This means we can't reset the syncobj
   from vkQueueSubmit().

The solution to this has been pointed by Bas & Jason :

   In vkQueueSubmit(), clone the wait syncobj fence into a new
   temporary syncobj that will be destroy after submission and use
   this temporary syncobj as a wait fence for i915. This allows us to
   reset the original syncobj in vkQueueSubmit().

   For this to work with wait_before_signal behavior, we also need to
   do a wait-on-materialize on binary semaphores from vkQueueSubmit().
   Otherwise the application thread calling vkQueueSubmit() could race
   the submission thread and pick up the wrong fence when cloing.

v2: Use copy semantic for clone_syncobj_dma_fence() (Jason)
    Do the cloning prior to adding the syncobj to anv_queue_submit so
    that if the cloning fails don't have an invalid syncobj in
    anv_queue_submit (Jason)

v3: Fix another syncobj leak (Jason)

v4: Fix invalid argument order (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4945
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11474>
(cherry picked from commit d2ff2b9e4a)
2021-11-17 20:06:20 +00:00
Emma Anholt
db338002c7 mesa/st: Disable NV_copy_depth_to_color on non-doubles-capable HW.
The previous doubles check
(https://gitlab.freedesktop.org/mesa/mesa/-/issues/3459) checked that you
didn't have full doubles emulation turned on, but we also need to check
that you have doubles at all (emulated or not) or non-GL4 drivers will
fail.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13743>
(cherry picked from commit a68a0c9e1c)
2021-11-17 20:06:20 +00:00
Neil Roberts
fdc6d4dc95 v3d: Update prim_counts when prims generated query in flight without TF
In order to implement GL_PRIMITIVES_GENERATED, v3d allocates a small
resource and adds a command to the job to store the prim counts to it.
However it was only doing this when TF was enabled which meant that if
the query was used with a geometry shader but no TF then the query would
always be zero. This patch makes the driver keep track of how many
PRIMITIVES_GENERATED queries are in flight and then enable writing the
prim count if its more than zero.

Fix dEQP-GLES31.functional.geometry_shading.query.primitives_generated_*

v2: Update CI expectations and references to fixed tests in commit log.
v3: - Add comment that GL_PRIMITIVES_GENERATED query is included because
      OES_geometry_shader, but it is not part of OpenGL ES 3.1. (Iago)
    - Update Fixes to commit introducing geometry shaders. (Iago)

Fixes: a1b7c084 ("v3d: fix primitive queries for geometry shaders")
Signed-off-by: Neil Roberts <nroberts@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13712>
(cherry picked from commit bdaf185889)
2021-11-17 20:06:20 +00:00
Vinson Lee
a728b8a732 virgl: Allocate qdws after virgl_init_context to avoid leak.
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable qdws going out of scope leaks the storage it
points to.

Fixes: 9a7d6a110e ("virgl/drm: explicit context initialization")
Suggested-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13609>
(cherry picked from commit 4a38ed822a)
2021-11-17 20:06:19 +00:00
Caio Oliveira
764e965f37 util/ra: Fix deserialization of register sets
Set ra_class::regset and ra_class::index  when deserializing.

Fixes: 95d41a3525 ("ra: Use struct ra_class in the public API.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13728>
(cherry picked from commit 6eb86efe91)
2021-11-17 20:06:19 +00:00
Eric Engestrom
c0d6fbba8e .pick_status.json: Update to ba6d389fa7 2021-11-17 20:06:04 +00:00
Eric Engestrom
eb2f43553a VERSION: bump for 21.3.0-rc5
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2021-11-10 22:01:41 +00:00
Lionel Landwerlin
a4ba277451 anv: don't forget to add scratch buffer to BO list
We reference the scratch BO using a bindless index in the command
streamer instructions, but we forgot to add them to the BO list.

v2: Make use of pipeline reloc list (Jason)

v3: Don't add NULL BOs to the reloc list (Lionel)

v4: Don't add BOs twice to reloc list when dealing with addresses
    (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: eeeea5cb87 ("anv: Add support for scratch on XeHP")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13544>
(cherry picked from commit 46c37c8600)
2021-11-10 21:58:07 +00:00
Samuel Pitoiset
44b5b83593 radv/sqtt: fix GPU hangs when capturing from the compute queue
S_008D20_FINISH_DONE is a mask of queues and 1 means "wait on the gfx
queue until the value is not 0" which can never happen when the driver
captures from compute. Instead, use the full mask of possible queues.

Cc: 21.3 mesa-stable
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/13694>
(cherry picked from commit 379fab74d2)
2021-11-10 21:58:07 +00:00
Mike Blumenkrantz
3327295498 zink: update gfx pipeline shader module pointer even if the program is unchanged
this is used for pipeline comparisons, so it has to always be accurate

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13727>
(cherry picked from commit 4dfb5818ed)
2021-11-10 21:58:07 +00:00
Mike Blumenkrantz
0f40fdd4d9 zink: be more consistent about applying module hash for gfx pipeline
this was a little spaghetti-ish: the module hash was sometimes being applied
during module update, sometimes in draw during program create, and then also
it was removed when a shader unbind would cause the program to no longer be reachable

now things are more consistent:
* keep removing module hash when program becomes unreachable
* only apply module hash in draw during updates there

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13727>
(cherry picked from commit bfa81c1e8c)
2021-11-10 21:58:07 +00:00
Jason Ekstrand
6108b3c7f2 anv: Also disallow CCS_E for multi-LOD images
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4616
Fixes: e3101c96bb ("anv/image: Disable multi-layer CCS_E on TGL+")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13680>
(cherry picked from commit e614789588)
2021-11-10 21:58:06 +00:00
Bas Nieuwenhuizen
e5b1bee339 util: Add support for clang::fallthrough.
Looks like the __attribute__ version doesn't work for C++ in the
Android build. Only found now because we don't enable
-Wimplicit-fallthrough by default project wide for C++. Only
ACO enables it.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13164>
(cherry picked from commit aad80e47d8)
2021-11-10 21:58:06 +00:00
Emma Anholt
766c57480b freedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.
Fixes a crash in some desktop GL testcases in piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
(cherry picked from commit 7b578c1249)
2021-11-10 21:58:06 +00:00
Bas Nieuwenhuizen
7970a4a9a8 meson: Check arguments before adding.
-static-libstdc++ doesn't exist on the Android NDK, casuing all
later has_argument calls to return false even though the compiler
supports that argument.

Fixes: 3aee462781 "meson: add windows compiler checks and libraries"
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13164>
(cherry picked from commit 22673a980f)
2021-11-10 21:58:06 +00:00
Samuel Pitoiset
b726997029 radv: do not expose buffer features for depth/stencil formats
The Vulkan spec got clarified recently and it's invalid (hw can support
it though). Fixes new CTS dEQP-VK.api.buffer.invalid_buffer_features.*.

Cc: 21.3 mesa-stable
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/13701>
(cherry picked from commit ca7c748f45)
2021-11-10 21:58:06 +00:00
Jesse Natalie
b5ebe0ec36 d3d12: Fix Linux fence wait return value
zero is for success, nonzero is failure.

Fixes: 0b60d6a2 ("d3d12: Support Linux eventfds for fences")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12268>
(cherry picked from commit accd8326c5)
2021-11-10 21:58:05 +00:00
Jason Ekstrand
6bbf2110db anv: Fix FlushMappedMemoryRanges for odd mmap offsets
When the client calls vkMapMemory(), we have to align the requested
offset down to the nearest page or else the map will fail.  On platforms
where we have DRM_IOCTL_I915_GEM_MMAP_OFFSET, we always map the whole
buffer.  In either case, the original map may start before the requested
offset and we need to take that into account when we clflush.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13610>
(cherry picked from commit 90ac06e502)
2021-11-10 21:58:05 +00:00
Connor Abbott
e426a9e586 ir3/spill: Mark root as non-spillable after inserting
We have to mark the root as non-spillable in case the interval is the
child of some other interval, but we can't know whether it's the child
of some other interval until it's been inserted. Move the setting of
cant_spill below the insertion. This prevents us from using a bogus
parent value.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13650>
(cherry picked from commit db566904ba)
2021-11-10 21:58:05 +00:00
Eric Engestrom
caf9593d4b meson: drop duplicate addition of surfaceless & drm to the list of platforms
This is already done on lines 475-480, resulting in them appearing twice
in the summary.

Fixes: 47946855f1 ("meson: allow egl_native_platform to be specified")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13278>
(cherry picked from commit 9ad375bdcd)
2021-11-10 21:58:05 +00:00
Pierre-Eric Pelloux-Prayer
7fd2714ddb radeonsi/sqtt: fix shader stage values
shader_stages_mask and others expect MESA_SHADER_* based values,
not PIPE_SHADER_*...

Without this the fragment shader wouldn't appear in the "Pipelines"
pane of RGP.

Fixes: c276bde34a ("radeonsi/sqtt: export shader code to RGP")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13696>
(cherry picked from commit 3de072aaec)
2021-11-10 21:58:05 +00:00
Lionel Landwerlin
49a49fd20c intel: remove 2 preproduction pci-id for ADLS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d399c3e861 ("intel/dev: Add device info for ADL-S")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13476>
(cherry picked from commit 3b1a5b8f2b)
2021-11-10 21:58:04 +00:00
Marek Olšák
bdc8f04620 driconf: disallow 10-bit pbuffers for viewperf2020/maya due to X errors
Cc: 21.2 21.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13472>
(cherry picked from commit 10ee261c38)
2021-11-10 21:58:04 +00:00
Mike Blumenkrantz
1ae6279081 aux/trace: fix vertex state tracing
Fixes: e8cad57aa7 ("gallium/trace: add pipe_vertex_state support")

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13582>
(cherry picked from commit f579401099)
2021-11-10 21:58:04 +00:00
Kostiantyn Lazukin
4fd4c41c9e util/u_trace: Replace Flag with IntEnum to support python3.5
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5586

Fixes: cefaa73909

Signed-off-by: Kostiantyn Lazukin <kostiantyn.lazukin@globallogic.com>

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13643>
(cherry picked from commit 78b613db23)
2021-11-10 21:58:04 +00:00
Lionel Landwerlin
03ee3a9dd0 intel/devinfo: fix wrong offset computation
A bit difficult to find what commit introduced the issue because of
all the renaming, but it was my bug :)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit 349bfb7275)
2021-11-10 21:58:04 +00:00
Lionel Landwerlin
198f6463ee intel/perf: fix perf equation subslice mask generation for gfx12+
v2: Fix comment change (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit 67619d8153)
2021-11-10 21:58:04 +00:00
Lionel Landwerlin
f4fe896423 intel/dev: fix subslice/eu total computations with some fused configurations
When a device has its first slice/subslice fused off, we can't use the
number of slices/subslices to iterate the mask array.

v2: Fix spelling (Marcin)
    Use size_t for iterator (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Matt Roper <matthew.d.roper@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5601
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit a543a94404)
2021-11-10 21:58:03 +00:00
Lionel Landwerlin
8b4c231932 intel/dev: reuse internal functions to set mask
Rather than having 2 paths to set the slice/subslice/eu masks, reuse
the other internal functions. This simplifies finding bugs within this
code :

  * If we have i915 query topology support, update_from_topology() is
    called.

  * If we don't have query topology support but we have getparam for
    slice/subslice/EU, we generate a topology data and call
    update_from_topology()

  * If we have no kernel support to query any kind of topology, we
    generate the values return by the kernel for slice/subslice/EU and
    call update_from_masks() which in turns calls
    update_from_topology()

v2: Fixup typo (Adam)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit e10c641f00)
2021-11-10 21:58:03 +00:00
Lionel Landwerlin
546a870459 intel/dev: don't forget to set max_eu_per_subslice in generated topology
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit d7c6a90c26)
2021-11-10 21:58:02 +00:00
Lionel Landwerlin
84140c8792 intel/dev: fix HSW GT3 number of subslices in slice1
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit d1db5d562a)
2021-11-10 21:58:02 +00:00
Pierre-Eric Pelloux-Prayer
20f076e6b7 mesa: always call _mesa_update_pixel
10c75ae4 moved handling of this state to the functions that
depend on ctx->_ImageTransferState.

So we can't depend on _NEW_PIXEL being set to call this function,
since it'll be always clear earlier by _mesa_update_state_locked.

Example sequence that would trigger the issue:
  glPixelTransferi(...)
  glClear(...)
  glTexSubImage2D(...) <-- won't use the new value set by
                           glPixelTransferi because glClear caused
                           _NEW_PIXEL to be cleared.

_NEW_PIXEL itself is kept because st_update_pixel_transfer depends
on it.

Fixes: 10c75ae4 ("mesa: move _mesa_update_pixel out of _mesa_update_state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5273
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13596>
(cherry picked from commit 1ee3fbd703)
2021-11-10 21:58:02 +00:00
orbea
2f542d2fba build: add sha1_h for lp_texture.c
../mesa-9999/src/gallium/drivers/llvmpipe/lp_texture.c:55:10: fatal error: git_sha1.h: No such file or directory

Fixes: 1608a815e3 ("llvmpipe: add support for EXT_memory_object(_fd)")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: orbea <orbea@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13665>
(cherry picked from commit 0a6f079afe)
2021-11-10 21:58:01 +00:00
Mike Blumenkrantz
e7164ad154 zink: rework cached fbfetch descriptor fallback
this ended up being a little trickier than I thought; lazy
descriptors don't use dynamic ubo types for the push set,
which means drivers that (correctly) assert dynamic offset existence
explode because the descriptor template will never work with the
push set

the better, though slightly more annoying, option here is to use the
lazy manager's faster descriptor allocation and lesser complexity to
quickly grab a push set, then tweak the existing cached codepath slightly
in order to update a raw vkdescriptorset

Fixes: 417477f60e ("zink: always use lazy (non-push) updating for fbfetch descriptors")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677>
(cherry picked from commit 8c37cd8860)
2021-11-10 21:58:01 +00:00
Emma Anholt
2075a86ba2 freedreno/ir3: Fix off-by-one in prefetch safety assert.
This looks like just a typo, we allow up to == 0xf in the lowering pass.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>
(cherry picked from commit 34739cb6e2)
2021-11-10 21:58:00 +00:00
Emma Anholt
7a23cf05a4 freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.
Since we're casting to unorm, the linear filtering will give bad results.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>
(cherry picked from commit 0e4fcda7e0)
2021-11-10 21:58:00 +00:00
Emma Anholt
5b0ab532d4 freedreno/a6xx: Fix partial z/s clears with sysmem.
We have to set 8c01 to say "leave these channels alone" when
clearing/storing just Z or S of z24s8.  Fixes the bypass path for
KHR-GLES3.packed_depth_stencil.verify_read_pixels.depth24_stencil8.

Cc: mesa-stable
Fixes: #5592
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>
(cherry picked from commit f0f5b8d47c)
2021-11-10 21:58:00 +00:00
Emma Anholt
8b46e23ef2 freedreno: Fix gmem invalidating the depth or stencil of packed d/s.
The gmem store stores both depth and stencil for z24s8.  So, if we're
doing a write (clear or draw) to one or the other of the channels, we need
the other one restored as well.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13649>
(cherry picked from commit 29093bc42d)
2021-11-10 21:57:59 +00:00
Alejandro Piñeiro
4286b1ebed v3dv/pipeline: don't clone the nir shader at pipeline_state_create_binning
At that point we didn't call all the v3dv lowerings. So the reference
nir shader used to call the v3d compiler could be different.

Note that at that point the nir shader is only available for internal
shaders (like gs multiview).

This specifically affected multiview tests that wrote gl_PointSize, as
the nir shader for the geometry shader were wrongly exposing
per_vertex_point_size as false, as we were basing our check on the
nir_shader_info, and that was gathered calling nir_shader_gather_info
at pipeline_lower_nir.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13325>
(cherry picked from commit 19894bec1f)
2021-11-10 21:57:59 +00:00
Alyssa Rosenzweig
3fc4ccde2d mesa: Require MRT support for GL3/ES3
OpenGL 3.0 requires the driver can draw to 8 simultaneous render
targets. Similarly, OpenGL ES 3.0 requires the driver can draw to 4
simultaneous render targets. Fix the version computation logic to take
this into account.

On Mali T720, we support ~all features of OpenGL ES 3.1 except we only
support a single render target. Mali T720 should advertise OpenGL 2.1
and OpenGL ES 2.0 only. With the previous logic, it incorrectly
advertised OpenGL ES 3.1.

v2: Lie about the minimum for GL 3.0 to make freedreno a3xx happy. Add
Emma's reviewed-by.

v3: Update the Mali T720 CI expectations. There are tests that pass on
GLES3 but not GLES2. Unclear if these are dEQP bugs or Mesa bugs, lima
hits the same issues. Add them to the known fails

Note to mesa-stable maintainers: this downgrades the OpenGL version
advertised on Mali T720. As such, this patch should apply to the
unreleased 21.3 (Eric) but should NOT be backported to any released Mesa
versions (21.2 or older should NOT have this patch). This is a bit of a
compromise; Emma agreed with this plan on IRC.

Reported-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net> [v2]
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> [v2]
Cc: 21.3 mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13455>
(cherry picked from commit 861a35b3bc)
2021-11-10 21:57:59 +00:00
Tomeu Vizoso
82fbb4bae8 ci: Let manual LAVA jobs have a longer timeout than others
So far only LAVA jobs make use of it, but I guess baremetal could be
extended to have these timeouts as well.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13441>
(cherry picked from commit 83a0bb007f)
2021-11-10 21:57:59 +00:00
Tomeu Vizoso
8ed29c36eb ci: Add support for lazor Chromebooks
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13441>
(cherry picked from commit dedc149307)
2021-11-10 21:57:59 +00:00
Guilherme Gallo
3ca9c9c2d9 ci: Update linux kernel to v5.15
* Update Kconfig for x86_64 and ARM64. Follow the dependency tree of the
  kernel modules to make sure that the intended configurations are being
  set. Check scripts/merge_config.sh output as well to see if there is
  a requested Kconfig not being considered.

For a630 devices:
* Use kernel version with a6xx workaround for frequency scaling
* Enable CONFIG_QCOM_LMH targeting a630 slowness on new kernel

---- Out of tree patches used ----

For a360 device:
* Revert a commit which remove slpi_region from msm8996:
  8b0031f8bda2 ("Revert "arm64: msm8996: fix memory region overlap"")

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13089>
(cherry picked from commit 7fea3c6f14)
2021-11-10 21:57:58 +00:00
Emma Anholt
4ed9a049a1 ci: Enable testing radeonsi's libva using libva-util unit tests.
We've noticed issues with these tests when uprevving Mesa in Chrome OS.
This CI catches some existing failures, and some debug-build assertion
failures as well.

To do this, uprev deqp-runner for its new gtest-runner command.  This
runner is not as efficient as I would hope, due to some expensive code in
gtest.  I've reported the issue to gtest and it should be easily fixable,
but for now it at least means we get to use the same baseline/skip/flake
handling we have from deqp and piglit runners.

I also fixed build-libdrm for our rootfses to not throw away libdrm's
share directory, which was causing a bunch of test-time spam from radeon's
libdrm when trying to look up its marketing name tables (not that big of a
deal for deqp-runner, but really noisy for piglit and libva-utils which
make gallium screens approximatly per-test).

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13419>
(cherry picked from commit 8fb850651c)
2021-11-10 21:57:58 +00:00
Emma Anholt
7952aef95e ci/piglit-runner: Merge piglit-driver-*.txt files into driver-*.txt.
The test names are definitely unique (deqp has specific prefixes, piglit
uses '@' as a separator instead of '.'), so we can just have a single file
regardless of test type.  Merges the two groups of xfails together so you
can't mix up which file to edit (I certainly have), and so that we don't
need to introduce yet another set of files when we add gtest for libva.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
(cherry picked from commit bfbc41a9fa)
2021-11-10 21:57:58 +00:00
Emma Anholt
a8c7745109 ci/deqp-runner: Rename the deqp-drivername-*.txt files to drivername-*.txt
We have two testsuites with the same format for fails/flakes/skips files,
and test names that are definitely unique.  As I'm about to add a third
testsuite (gtest for libva-utils), so let's have just one file each for
fails/flakes/skips instead of one per type of testsuite.  This starts the
move with just the bulk rename of deqp.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
(cherry picked from commit 38dff02bfb)
2021-11-10 21:57:57 +00:00
Emma Anholt
c8b1a34daf ci/piglit-runner: Fix funny indentation of the piglit-runner command.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit bd81a23620)
2021-11-10 21:57:57 +00:00
Emma Anholt
f7206f1cde ci/deqp-runner: Move more non-suite logic under the non-suite 'if'.
Changing these variables won't do anything for you otherwise.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 440f207a1f)
2021-11-10 21:57:57 +00:00
Emma Anholt
0a246ea9f1 ci/deqp-runner: Don't start GPU hang detection for making junit results.
It's just CPU-side post-processing, not running tests.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 92748e40ef)
2021-11-10 21:57:57 +00:00
Emma Anholt
3744fd7ba8 ci/deqp-runner: Drop LD_LIBRARY_PATH=/usr/local for libkms workaround.
deqp hasn't been linking against that in quite some time.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 61ca900b69)
2021-11-10 21:57:57 +00:00
Emma Anholt
cacf726669 ci/deqp-runner: Move remaining asan runs to --env LD_PRELOAD=
This should improve their reliability and speed a little by getting
deqp-runner off of asan.  This removes the last jobs setting
TEST_LD_PRELOAD, so remove passing that variable around from other
scripts.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 899174c210)
2021-11-10 21:57:57 +00:00
Emma Anholt
61c78021b3 ci/deqp-runner: Drop silly CSV env vars.
One was unused, the other was used once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 37c690ad1a)
2021-11-10 21:57:56 +00:00
Emma Anholt
f5e4a3ee15 ci/deqp-runner: Use new deqp-runner's built-in renderer/version checks.
This is prettier in the log files, less shell code, and for non-suite mode
adds checking that the driver has the right git sha1.  Also, no need for
suites to have a DEQP_VER to say which dEQP we should run for the renderer
check.

The version checks can help us make sure that GL version exposed doesn't
accidentally regress, and the ".*git" checks that we're using a git
version of Mesa rather than something that snuck in through distro
packages.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit b978688df6)
2021-11-10 21:57:56 +00:00
Emma Anholt
3edcd42bea ci/deqp-runner: Simplify the --jobs argument setup.
We can use the general "how parallel should we go on this runner?" env var
and save a bunch of massaging env var names.  Fixes how PIGLIT_PARALLEL
looked like it was useful but actually wasn't passed through to HW
runners.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 9ddfd297e0)
2021-11-10 21:57:56 +00:00
Emma Anholt
c9fd70a573 ci/deqp-runner: Drop SUMMARY_LIMIT env var.
Nobody uses it any more, and you could just put it in DEQP_OPTIONS.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit 59f3a8e6b4)
2021-11-10 21:57:56 +00:00
Mike Blumenkrantz
2fd37402de aux/primconvert: handle singular incomplete restarts
if no restart indices are found, this draw must be discarded to avoid
crashing later on

Fixes: 583070748c ("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13630>
(cherry picked from commit bc345281ab)
2021-11-10 21:57:55 +00:00
Marek Olšák
5ac869f56c radeonsi: fix a typo preventing a fast depth-stencil clear
Fixes: 9defe8aca9 - radeonsi: implement fast Z/S clears using clear_buffer on HTILE

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>
(cherry picked from commit 74adf22a0a)
2021-11-10 21:57:55 +00:00
Marek Olšák
01009ce54a radeonsi: fix 2 issues with depth_cleared_level_mask
- Unset depth_cleared_level_mask for non-clear blits. Set the flag after
  the clear, so that we don't have to check blitter_running.
- Set depth_cleared_level_mask only when we set depth_clear_value.

Fixes: ff8a930cf7 - radeonsi: add _once suffix to depth_cleared_level_mask

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>
(cherry picked from commit 5d3aea49b8)
2021-11-10 21:57:55 +00:00
Mike Blumenkrantz
6789fa1600 zink: clamp PIPE_SHADER_CAP_MAX_INPUTS for xfb
vertex shader stages that can produce xfb must have
their input size clamped to the compiler define MAX_VARYING
to successfully be able to export an xfb output for each input

fixes KHR-GL46.geometry_shader.limits.max_input_components

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13632>
(cherry picked from commit 5d1b81d8ac)
2021-11-10 21:57:55 +00:00
Pierre-Eric Pelloux-Prayer
c88f0087e6 vbo/dlist: free copied.buffer if no vertices were copied
Other parts of the code asserts that copied.buffer is NULL if there are
no vertices to copy.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>
(cherry picked from commit 9b09655a58)
2021-11-10 21:57:54 +00:00
Pierre-Eric Pelloux-Prayer
b99dc621ec ac/surface: don't validate DCC settings if DCC isn't possible
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>
(cherry picked from commit dbf602a6b3)
2021-11-10 21:57:54 +00:00
Pierre-Eric Pelloux-Prayer
ced465b4e0 radeonsi/sdma: fix bogus assert
src can use dcc even for non sdma v5 variants because si_decompress_dcc
is called in si_sdma_copy_image.

Fixes: 46c95047bd ("radeonsi: implement si_sdma_copy_image for gfx7+")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>
(cherry picked from commit d86d602ed0)
2021-11-10 21:57:54 +00:00
Pierre-Eric Pelloux-Prayer
65f82f8b2d radeonsi: treat nir_intrinsic_load_constant as a VMEM operation
This is used by variable indexing of constant arrays, to build
code like this:

   s_add_u32 s6, s6, const_data@rel32@lo+4
   s_addc_u32 s7, s7, const_data@rel32@hi+12
   [...]
   global_load_dword v4, v4, s[6:7

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5118
Fixes: 8288882965 ("radeonsi: set MEM_ORDERED optimally")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>
(cherry picked from commit dc56301f78)
2021-11-10 21:57:53 +00:00
Mike Blumenkrantz
bab79aec38 zink: always use lazy (non-push) updating for fbfetch descriptors
fbfetch descriptors are uncacheable due to having mixed descriptor types
in the same set, so this needs to always use lazy updating to avoid
exploding the cache and crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13654>
(cherry picked from commit 417477f60e)
2021-11-10 21:57:53 +00:00
Mike Blumenkrantz
f03f1b58a4 zink: set fbfetch state on lazy batch data when enabling it
this avoids creating new descriptor pools on every update

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13654>
(cherry picked from commit 2c54ad8f3d)
2021-11-10 21:57:53 +00:00
Mike Blumenkrantz
93aa5eb0a1 build: add sha1_h to llvmpipe build
cc: mesa-stable

fixes #5588

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13658>
(cherry picked from commit 7c8fee6049)
2021-11-10 21:57:53 +00:00
Mike Blumenkrantz
9687c4dfa2 zink: add queue locking
sparse binds have to be processed synchronously with cmdbuf recording to
avoid resource object desync in the vk driver, which means they have to be
done in the driver thread instead of the flush thread. this necessitates
adding locking for the queue since there is now a case when submissions occur
in a different thread

fixes illegal multithread usage in KHR-GL46.CommonBugs.CommonBug_SparseBuffersWithCopyOps

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13597>
(cherry picked from commit 3137ff4709)
2021-11-10 21:57:52 +00:00
Eric Engestrom
d251318ea5 .pick_status.json: Update to 549924d53e 2021-11-10 21:54:48 +00:00
Eric Engestrom
15751fbdf7 VERSION: bump for 21.3.0-rc4
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2021-11-03 20:17:22 +00:00
Danylo Piliaiev
d3efbf9c64 tu: fix rast state allocation size on a6xx gen4
A few regs were added without changing the size of draw state.

Fixes: 4e05338d99 ("turnip: Rast updates for a6xx gen4")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13644>
(cherry picked from commit 79fcd63bd6)
2021-11-03 20:15:50 +00:00
Mike Blumenkrantz
1146a8ef50 zink: reject all storage multisampling if the feature is unsupported
this also enables removing a stupid conditional

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13631>
(cherry picked from commit 675519f1d0)
2021-11-03 20:15:50 +00:00
Mike Blumenkrantz
371a73a602 zink: add SpvCapabilityStorageImageMultisample for multisampled storage images
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13631>
(cherry picked from commit aacdc6eb44)
2021-11-03 20:15:50 +00:00
Mike Blumenkrantz
2daf26c7e1 zink: stop double printing validation messages
VVL already prints its messages using configurable settings. there's no
reason for zink to unconditionally repeat them immediately after

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13633>
(cherry picked from commit ac2af149f1)
2021-11-03 20:15:50 +00:00
Jesse Natalie
d5228dcd84 util/hash_table: Clear special 0/1 entries for u64 hash table too
Fixes: e532a47f ("util/hash_table: do not leak u64 struct key")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13390>
(cherry picked from commit ffd4157b1c)
2021-11-03 20:15:50 +00:00
Dave Airlie
d901368b1b vulkan/wsi: set correct bits for host allocations/exports for images.
Lavapipe was hitting asserts in this area due to incorrect bits being
specified.

Set the handle type depending on the sw flag, and set a correct handle
type for the memory host ptrs.

v2: add image export struct to image creation (Jason)

Fixes: 895d3399f7 ("lavapipe: add support for KHR_external_memory_fd")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13615>
(cherry picked from commit a8725ec3dc)
2021-11-03 20:15:50 +00:00
Bas Nieuwenhuizen
4a471ea160 radv: Disable coherent L2 optimization on cards with noncoherent L2.
With high likelihood we are forgetting to set the noncoherent bits
somewhere but I don't have the HW to debug. To avoid user pain
disable this optimization on these GPUs.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5505
Fixes: fd8210f27e ("radv: Try to do a better job of dealing with L2 coherent images.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13620>
(cherry picked from commit d66514aacc)
2021-11-03 20:15:50 +00:00
Vadym Shovkoplias
bca13e8fc8 intel/fs: Fix a cmod prop bug when cmod is set to inst that doesn't support it
Fixes dEQP-VK.reconvergence.*nesting* tests.

There are cases when cmod is set to an instruction that cannot have
conditional modifier. E.g. following:

 find_live_channel(32) vgrf166:UD,  NoMask
 cmp.z.f0.0(32) null:D, vgrf166+0.0<0>:D, 0d

is optimized to:

 find_live_channel.z.f0.0(32) vgrf166:UD,  NoMask

v2:
 - Add unit test to check cmod is not set to 'find_live_channel' (Matt Turner)
 - Update flag_subreg when conditonal_mod is updated (Ian Romanick)

Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5431
Fixes: 32b7ba66b0 ("intel/compiler: fix cmod propagation optimisations")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13268>
(cherry picked from commit 2dbb66997e)
2021-11-03 20:15:49 +00:00
Jason Ekstrand
3e826c339c lavapipe: Don't wrap errors returned from vk_device_init in vk_error
vk_device_init already calls vk_error so this is redundant.  Also, it
makes vk_error grumpy to see a VK_ERROR_FEATURE_NOT_PRESENT on an
instance rather than a physical device.

Fixes: 47adb11143 ("lavapipe: Switch to the new vk_error helpers")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13619>
(cherry picked from commit 79f57f6893)
2021-11-03 20:15:49 +00:00
Mike Blumenkrantz
2b4ae31cec zink: force float dest types on some alu results
these aren't exact matches in spirv, so set the expected result type
to float where necessary

cc: mesa-stable

fixes #5567

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
(cherry picked from commit 73af67883d)
2021-11-03 20:15:49 +00:00
Mike Blumenkrantz
23ad2decbb zink: add more int/float types to cast switching in ntv
these come from opcode results, which are not always 32bit

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
(cherry picked from commit c73f5a0082)
2021-11-03 20:15:49 +00:00
Mike Blumenkrantz
a78bb23c0e zink: explicitly enable VK_EXT_shader_subgroup_ballot
this is needed when not creating 1.2 contexts

cc: mesa-stable

ref #5567

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
(cherry picked from commit 69501ff458)
2021-11-03 20:15:49 +00:00
Mike Blumenkrantz
7495998ce2 zink: clamp max buffer sizes to smallest buffer heap size
the max driver limit for these is irrelevant if there isn't enough memory
to allocate a buffer of that size

KHR-GL46.texture_buffer.texture_buffer_max_size

cc: mesa-stable

fixes #5568

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13584>
(cherry picked from commit ccfe36fffa)
2021-11-03 20:15:49 +00:00
Mike Blumenkrantz
ce3598d34b zink: error when trying to allocate a bo larger than heap size
this is illegal and would fail anyway

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13584>
(cherry picked from commit fd2b47281f)
2021-11-03 20:15:48 +00:00
Mike Blumenkrantz
ff163eeb64 zink: don't clamp 2D_ARRAY surfaces to 2D
another thing that used to be needed but now isn't

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>
(cherry picked from commit aa5e544644)
2021-11-03 20:15:48 +00:00
Mike Blumenkrantz
9b5b2e2d80 zink: don't clamp cube array surfacess to cubes
this was probably necessary for some other reason that has since been fixed,
and instead now just creates validation spam

cc: mesa-stable

fixes #5566

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>
(cherry picked from commit 8d2280f533)
2021-11-03 20:15:48 +00:00
Dave Airlie
2209023f6e lavapipe: drop EXT_acquire_xlib_display
This has a requirement on the display extensions.

VK-GL-CTS: dEQP-VK.info.instance_extensions

Fixes: 1d574d4860 ("lavapipe: remove display extension support")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13616>
(cherry picked from commit 75dc302340)
2021-11-03 20:15:48 +00:00
Mike Blumenkrantz
2b89108e48 zink: flag renderpass change when toggling fbfetch
ensure the input attachment gets updated

fixes running
KHR-GL46.blend_equation_advanced.blend_all.GL_MULTIPLY_KHR_all_qualifier
after
KHR-GL46.blend_equation_advanced.BlendEquationSeparate

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13598>
(cherry picked from commit 6239adebbc)
2021-11-03 20:15:48 +00:00
Jordan Justen
f4698f6105 Revert "iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13"
Round and round we go :)

In the "drm/i915/adlp/fb: Remove CCS FB stride restrictions" series,
https://lists.freedesktop.org/archives/intel-gfx/2021-October/281768.html,
it now appears that kernel can allow these modifiers to work with
adl-p.

This reverts commit d4174f5f05.

Fixes: d4174f5f05 ("iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13565>
(cherry picked from commit 2d041d5f1e)
2021-11-03 20:15:48 +00:00
Mike Blumenkrantz
6b6f321e28 zink: inject LOD for sampler version of OpImageQuerySize
this is required by spec

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13585>
(cherry picked from commit e8f18385e0)
2021-11-03 20:15:47 +00:00
Mike Blumenkrantz
3f46f53781 zink: be more permissive for injecting LOD into texture() instructions
there's other variants of implicit lod sampling, and none of them are valid
outside fragment stage

Fixes: 3ad06b6949 ("zink: always use explicit lod for texture() when legal in non-fragment stages")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13585>
(cherry picked from commit 87fbb0eab0)
2021-11-03 20:15:47 +00:00
Marek Olšák
1640e3e2e9 radeonsi: print the border color error message only once
Cc: 21.2 21.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13590>
(cherry picked from commit 8bfa146b80)
2021-11-03 20:15:46 +00:00
Marek Olšák
ed5c8bb1d2 radeonsi: enable shader culling for indirect draws
It was mistakenly disabled, decreasing performance a lot.

Only valid for Mesa 21.3.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: 21.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539>
(cherry picked from commit 98f696c972)
2021-11-03 20:15:46 +00:00
Greg V
b255dbcdd9 util: make util_get_process_exec_path work on FreeBSD w/o procfs
sysctl is the correct way of getting the current executable's path.
procfs is not mounted by default.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598>
(cherry picked from commit 98dbd01a96)
2021-11-03 20:15:45 +00:00
Kenneth Graunke
00fcc6c6ae iris: Fix MOCS for buffer copies
We were passing a MOCS of 0, which is uncached.  Yikes.

Fixes: c5b22441f1 ("iris: Fix buffer -> buffer copy_region")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
(cherry picked from commit d8cb76211c)
2021-11-03 20:15:45 +00:00
Danylo Piliaiev
8c90f6ca3d ir3/ra: Check register file upper bound when updating preferred_reg
Otherwise we could get invalid reg in get_reg()

Would fix many dEQP-VK.ssbo.phys.layout.*

Fixes: 0ffcb19b9d "ir3: Rewrite register allocation"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13546>
(cherry picked from commit aa264ded94)
2021-11-03 20:15:44 +00:00
Mike Blumenkrantz
a3ba864e7f zink: always use explicit lod for texture() when legal in non-fragment stages
implicit lod is something else entirely

fixes #5566

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13563>
(cherry picked from commit 3ad06b6949)
2021-11-03 20:15:44 +00:00
Mike Blumenkrantz
88da00b28b zink: set aspectMask for renderpass2 VkAttachmentReference2 structs
this is otherwise just garbage

fixes #5569

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13561>
(cherry picked from commit 4d9fc17ae8)
2021-11-03 20:15:44 +00:00
Mike Blumenkrantz
d57b43827a zink: use align64 for allocation sizes
avoid 32bit sint overflows

fixes #5568

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13560>
(cherry picked from commit c4a513d978)
2021-11-03 20:15:44 +00:00
Mike Blumenkrantz
d8b39ba136 zink: add better handling for CUBE_COMPATIBLE bit
this check was illegal because the usage bits weren't yet populated,
so add another check after usage bits are determined to figure out if
CUBE_COMPATIBLE can be applied

additionally, checking sample counts was never needed since the spec
prohibits CUBE_COMPATIBLE use with multisampling

zink DEBUG: ERR: 'Validation Error: [ VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x991b3105 | vkGetPhysicalDeviceImageFormatProperties: value of usage must not be 0. The Vulkan spec states: usage must not be 0 (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask)'

Fixes: 71494c4874 ("zink: only mark resources as cube-compatible if supported")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12580>
(cherry picked from commit 2de6beaa12)
2021-11-03 20:15:43 +00:00
Eric Engestrom
42d1e477a8 .pick_status.json: Update to c356f3cfce 2021-11-03 20:15:28 +00:00
Eric Engestrom
bb9bdc4b73 VERSION: bump for 21.3.0-rc3
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2021-10-27 19:58:10 +01:00
Thomas Wagner
f199962c4d util: use anonymous file for memory fd creation
The original implementation in os_memory_fd.c always uses memfds.
Replace this by using the already existing os_create_anonymous_file in
order to support older systems or systems without memfd.

Fixes: 1166ee9caf ("gallium: add utility and interface for memory fd allocations")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13331>
(cherry picked from commit 4856586ac6)
2021-10-27 19:58:10 +01:00
Bas Nieuwenhuizen
bf2e533688 radv: Add bufferDeviceAddressMultiDevice support.
We don't support multiple devices so this is a nop. However, Baldurs Gate 3 enables
this and with the new more complete checks this causes device creation to fail.

Fixes: 2e5718c957 ("vulkan: provide common functions to check device features")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5509
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13482>
(cherry picked from commit 1fe375e7cf)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
627659b6af nir/lower_samplers_as_deref: rewrite more image intrinsics
"I think we want to lower them."

-Jason "And I do know how the pass works" Ekstrand

fixes #5540

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13489>
(cherry picked from commit b0c40bc905)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
b4506d1cc2 zink: more accurately update samplemask for fs shader keys
the fs samplemask needs to be updated on framebuffer rebind and on
fs bind to ensure that the key gets updated in time for the pipeline
change

fixes #5559

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13531>
(cherry picked from commit c9ce151ff9)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
852c6bb9d2 zink: fix gl_SampleMaskIn spirv generation
the uint[1] -> uint dance is only relevant on the first load, so move
the variable type shuffling inside the create block to avoid breaking successive
loads

fixes #5543

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13488>
(cherry picked from commit 8899f6a198)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
59b59c586b zink: don't add dynamic vertex pipeline states if no attribs are used
adding the states requires that vertex attribs be bound, but it's illegal
to bind 0 attribs

cc: mesa-stable

fixes #5558

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13519>
(cherry picked from commit 90228a80ea)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
8cb060c374 zink: stop exporting PIPE_SHADER_CAP_FP16_DERIVATIVES
spirv doesn't support this

fixes #5561

cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13530>
(cherry picked from commit c13da98929)
2021-10-27 19:58:10 +01:00
Michael Tang
25b007d7a9 microsoft/spirv_to_dxil: turn sysvals into input varyings
Fixes: b47090c5b3 ("spirv: Always declare FragCoord as a sysval")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13276>
(cherry picked from commit 3094524621)
2021-10-27 19:58:10 +01:00
Lionel Landwerlin
a82babccd1 anv: fix push constant lowering with bindless shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9fa1cdfe7f ("intel/rt: Implement push constants as global memory reads")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13529>
(cherry picked from commit a6031cd9bd)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
e4dc69796e zink: don't check rebind count outside of buffer/image rebind function
zink_resource_has_binds() only checks descriptor binds, and this doesn't
include streamout or fb bindings, so call these functions from the specific
rebind points to ensure those cases are also checked

fixes #5541

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13490>
(cherry picked from commit 0a6f5ec942)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
737c9a7dcf zink: only reset zink_resource::so_valid on buffer rebind
otherwise this is going to randomly modify some image properties

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13490>
(cherry picked from commit 1a68f2eb8f)
2021-10-27 19:58:10 +01:00
Mike Blumenkrantz
7264cc5cd4 zink: don't break early when applying fb clears
a resource can be bound to multiple fb attachments, each with
its own clear, so ensure that all of these are applied

fixes #5542

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13491>
(cherry picked from commit dabe477b4f)
2021-10-27 19:58:09 +01:00
Mike Blumenkrantz
4d88c19510 zink: detect prim type more accurately for tess/gs lines
u_reduced_prim() can't determine the output primitive when vs isn't the
last vertex stage, so store this from the appropriate shader info and use
it when it's available

fixes #5547

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13487>
(cherry picked from commit 2a91e83b7f)
2021-10-27 19:58:09 +01:00
Lionel Landwerlin
b6f0a4c11d vulkan/wsi/wayland: don't expose surface formats not fully supported
Depending on whether an application creates a swapchain with
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR or not, we might use 2
different formats with the compositor.

This change makes sure that we support all the underlying formats
before exposing the corresponding VkFormat to the application.

v2: Don't forget get_formats2() (Ivan)

v3: Replace formats with availability boolean (Simon)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 151b65b211 ("vulkan/wsi/wayland: generalize modifier handling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5522
Reviewed-by: Ivan Briano <ivan.briano@intel.com> (v2)
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13453>
(cherry picked from commit d944136f36)
2021-10-27 19:58:09 +01:00
Boris Brezillon
a63104a7d8 vulkan: Fix entrypoint generation when compiling for x86 with MSVC
When compiling for x86 with MSVC, Vulkan API entry points follow the
__stdcall convention (VKAPI_CALL maps to __stdcall), which uses the
following name mangling:

   _<function_name>@<arguments_size>

Fix the vk_entrypoint_stub()/alternatename definitions accordingly.

Fixes: 6d44b21d4f ("vulkan: Fix weak symbol emulation when compiling with MSVC")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13516>
(cherry picked from commit 1813bb5917)
2021-10-27 19:58:08 +01:00
Samuel Pitoiset
734011012f aco: only load streamout buffers if streamout is enabled
The streamout_config SGPR is used to determine if streamout is enabled.

This fixes a GPU hang with various transform feedback tests:
 - dEQP-GLES3.functional.transform_feedback.*
 - KHR-GL46.transform_feedback.api_errors_test
 - KHR-GL46.draw_indirect.basic-draw*-xfbPaused
 - KHR-GL46.geometry_shader.api.draw_calls_while_tf_is_paused

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13514>
(cherry picked from commit dc74285d32)
2021-10-27 19:58:08 +01:00
Samuel Pitoiset
2ac3a3b5e9 radv: fix build errors with Android
Fixes: 49c3a88fad ("radv: implement VK_KHR_format_feature_flags2")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5518
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/13450>
(cherry picked from commit 4765edb4e0)
2021-10-27 19:58:08 +01:00
Alyssa Rosenzweig
40eb47924e panfrost: Enable AFBC on v7
The bugs blocking this have been resolved, so flip on AFBC again and get
moar fps.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>
(cherry picked from commit 2526f6f229)
2021-10-27 19:58:08 +01:00
Alyssa Rosenzweig
e97caaf452 panfrost: Decompress for incompatible AFBC formats
AFBC is keyed to the format. Depending on the hardware, we'll get an
Invalid Data Fault or a GPU timeout if we attempt to sample from an
AFBC-compressed RGBA8 texture as R32F (for example).

Fixes Piglit ./bin/arb_texture_view-rendering-formats_gles3 with AFBC.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>
(cherry picked from commit 789601a189)
2021-10-27 19:58:08 +01:00
Alyssa Rosenzweig
1b87d41d73 panfrost: Add internal afbc_formats
We need to know the internal (physical) formats used for AFBC of a given
logical format, in order to check format compatibility and determine if
we need to decompress AFBC for conformance.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>
(cherry picked from commit 93c9123c31)
2021-10-27 19:58:07 +01:00
Alyssa Rosenzweig
14f88aaca3 panfrost: Workaround ISSUE_TSIX_2033
According to mali_kbase, all Bifrost and Valhall GPUs are affected by
issue TSIX_2033. This hardware bug breaks the INTERSECT frame shader
mode when forcing clean_tile_writes. What does that mean?

The hardware considers a tile "clean" if it has been cleared but not
drawn to. Setting clean_tile_write forces the hardware to write back
such "clean" tiles to main memory.

Bifrost hardware supports frame shaders, which insert a rectangle into
every tile according to a configured rule. Frame shaders are used in
Panfrost to implement tile reloads (i.e. LOAD_OP_LOAD). Two modes are
relevant to the current discussion: ALWAYS, which always inserts a frame
shader, and INTERSECT, which tries to only insert where there is
geometry. Normally, we use INTERSECT for tile reloads as it is more
efficient than ALWAYS-- it allows us to skip reloads of tiles that are
discarded and never written back to memory.

From a software perspective, Panfrost's current logic is correct: if we
clear, we set clean_tile_writes, else we use an INTERSECT frame shader.
There is no software interaction between the two.

Unfortunately, there is a hardware interaction. The hardware forces
clean_tile_writes in certain circumstances when AFBC is used.
Ordinarily, this is a hardware implementation detail and invisible to
software. Unfortunately, this implicit clean tile write is enough to
trigger the hardware bug when using INTERSECT. As such, we need to
detect this case and use ALWAYS instead of INTERSECT for correct
results.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13205>
(cherry picked from commit 342ed4909f)
2021-10-27 19:58:06 +01:00
Alyssa Rosenzweig
fd3f846f4f panfrost: Fix gl_FragColor lowering
The gl_FragColor lowering in the fragment shader depends on the number
of render targets, which can change every set_framebuffer_state.
set_framebuffer_state thus needs to force a rebind of the fragment
shader.

Fixes a regression in Piglit fbo-drawbuffers-none gl_FragColor -auto
-fbo from enabling AFBC on Mali G52.

Fixes: 28ac4d1e00 ("panfrost: Call nir_lower_fragcolor based on key")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13498>
(cherry picked from commit e0335ad888)
2021-10-27 19:58:06 +01:00
Alyssa Rosenzweig
ddcf4a13f2 panfrost,panvk: Use dev->has_afbc instead of quirks
This uses the new property for AFBC we've added. The AFBC quirk is
applied only to v4, and we only set dev->has_afbc on v5+ so this is not
a regression. It now respects the hardware-specific AFBC disable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13497>
(cherry picked from commit 68a7fafe2a)
2021-10-27 19:58:04 +01:00
Alyssa Rosenzweig
f97f9253b6 panfrost: Detect implementations support AFBC
AFBC is an optional feature on Bifrost. If it is missing, a bit will be
set in the poorly named AFBC_FEATURES register. Check this so we can act
appropriately.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13497>
(cherry picked from commit 3e168b97cc)
2021-10-27 19:58:03 +01:00
Marek Olšák
2569f415f2 st/mesa: don't crash when draw indirect buffer has no storage
Fixes: 22f6624ed3 - gallium: separate indirect stuff from pipe_draw_info

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13471>
(cherry picked from commit 520300ad22)
2021-10-27 19:58:03 +01:00
Tapani Pälli
03b36e3efb iris: clear bos_written when resetting a batch
This fixes dEQP-EGL.functional.sharing.gles2.multithread.* tests that
are hitting: "iris: Failed to submit batchbuffer: Invalid argument"
error.

v2: clear on reset rather than clear 'on-the-fly' (Kenneth Graunke)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5537
Fixes: e4c3d3efc7 ("iris: Defer construction of the validation (exec_object2) list")
Signed-off-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/13464>
(cherry picked from commit 1465ec8cf3)
2021-10-27 19:58:03 +01:00
Samuel Pitoiset
61244fad74 radv: re-emit prolog inputs when the nontrivial divisors state changed
If the application first uses nontrivial divisors, the driver emits
the vertex shader VA to the upload BO rather than directly via the
user SGPRs locations. But, if the vertex input dynamic state changes,
the driver might select a different VS prolog that no longer needs
nontrivial divisors.

In this case, the driver needs to re-emit the prolog inputs because
otherwise the VS prolog will jump to the PC that is emitted via the
user SGPR locations, and the previous one was somewhere in the
upload BO...

This fixes a GPU hang with Bioshock and Zink.

Fixes: d9c7a17542 ("radv: enable VK_EXT_vertex_input_dynamic_state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13377>
(cherry picked from commit b6a69dbb40)
2021-10-27 19:58:03 +01:00
Iago Toral Quiroga
664cc248b3 broadcom/compiler: fix assert that current instruction must be in current block
This was not considering the possibility that the driver has called
nir_before_block() or nir_after_block() to update the cursor, in which
case the cursor link points to the instruction list header and not
to an actual instruction.

Fixes incorrect debug-assert crash in:
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy

Fixes: 265515fa62 ("broadcom/compiler: check instruction belongs to current block")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13467>
(cherry picked from commit 1561d0126a)
2021-10-27 19:57:59 +01:00
Samuel Pitoiset
fa24bfb914 aco: fix loading 64-bit inputs with fragment shaders
Fixes a bunch of 64-bit IO tests with piglit and Zink.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13454>
(cherry picked from commit 996e81fb70)
2021-10-27 19:57:59 +01:00
Vinson Lee
d9cdad377d radv: Fix memory leak on error path.
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable prolog going out of scope leaks the storage it points to

Fixes: 80841196b2 ("radv: implement dynamic vertex input state using vertex shader prologs")
Suggested-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13402>
(cherry picked from commit 670fd8123b)
2021-10-27 19:57:55 +01:00
Mike Blumenkrantz
ebf218158c zink: move last of lazy descriptor state updating back to lazy-only code
hybrid mode is controlled by the caching manager, so state tracking is irrelevant

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit dfd0f5dbfd)
2021-10-27 19:57:55 +01:00
Mike Blumenkrantz
d558fe4c75 zink: add an early return for zink_descriptors_update_lazy_masked()
no point in generating pools/sets that won't be used here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit 140d3ea8c6)
2021-10-27 19:57:55 +01:00
Mike Blumenkrantz
25a09a9879 zink: move push descriptor updating into lazy-only codepath
this was a bit confusing to read, and I originally left it in the hybrid
path to enable fallbacks to push descriptors in hybrid mode. the problem with
that idea is that it's impossible: the constant buffer set is the one set
that will never, ever trigger a fallback, so leaving it there just leaves
room for error and confusion

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit 7c840f5103)
2021-10-27 19:57:54 +01:00
Mike Blumenkrantz
af0c678a3c zink: don't update lazy descriptor states in hybrid mode
I'm not 100% sure how, but this breaks tomb raider

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit b140d58b1f)
2021-10-27 19:57:54 +01:00
Mike Blumenkrantz
b68088b110 zink: assert compute descriptor key is valid before hashing it
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit 75e51138b1)
2021-10-27 19:57:54 +01:00
Mike Blumenkrantz
b829dc1a3a zink: clear descriptor refs on buffer replacement
the bo here can only ever be destroyed before it gets reused, so prune
it from the descriptor cache immediately

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit 497ce3c38a)
2021-10-27 19:57:54 +01:00
Eric Engestrom
bb763eee16 .pick_status.json: Update to 4856586ac6 2021-10-27 19:57:31 +01:00
Eric Engestrom
7976828ae3 VERSION: bump for 21.3.0-rc2
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2021-10-20 20:48:17 +01:00
Mike Blumenkrantz
f8b5444a09 zink: rescue surfaces/bufferviews for cache hits during deletion
this is a wild race condition, but it's possible for these to get their
final unref, enter their destructor, and then get a cache hit while waiting
on the lock to remove themselves from the cache

in such a scenario, a second, normal check of the refcount will suffice,
as the increment is atomic, and the value will otherwise be zero

fixes crashes in basemark

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13442>
(cherry picked from commit 86b3d8c66c)
2021-10-20 20:40:59 +01:00
Mykhailo Skorokhodov
f1b779361c Revert "iris: add tile cache flush to iris_copy_region"
This reverts commit 27534a49cf

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12979>
(cherry picked from commit 5afce85f2b)
2021-10-20 20:40:59 +01:00
Mykhailo Skorokhodov
d797e98b6f iris: Add missed tile flush flag
Without adding `PIPE_CONTROL_TILE_CACHE_FLUSH` into `iris_emit_pipe_control`
gen12+ (UHD 750 in my case) has issues with textures.

Related-to: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5029
Fixes: c85ea824('iris: reduce redundant tile cache flushes')

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12979>
(cherry picked from commit 0523607ebb)
2021-10-20 20:40:59 +01:00
Marek Olšák
9aaf29b938 mesa: fix crashes in the no_error path of glUniform
Fixes: bd2662bfa1 - mesa: add KHR_no_error support to glUniform*() functions

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13417>
(cherry picked from commit 03186773a6)
2021-10-20 20:40:59 +01:00
Samuel Pitoiset
97a30b2d21 aco: fix emitting stream outputs when the first component isn't zero
Fixes a bunch of XFB piglit tests with Zink.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13437>
(cherry picked from commit 572a902566)
2021-10-20 20:40:59 +01:00
Samuel Pitoiset
1771a7da08 aco: fix invalid IR generated for b2f64 when the dest is a VGPR
Fixes few 64-bit piglit tests with Zink.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13435>
(cherry picked from commit e3cbb0eb6a)
2021-10-20 20:40:59 +01:00
Samuel Pitoiset
5532c4267f radv: do not remove PSIZ for streamout shaders
It might still be read later from the streamout buffer.

Fixes a regression with
ext_transform_feedback-builtin-varyings gl_PointSize and Zink.

Fixes: 92e1981a80 ("radv: Remove PSIZ output when it isn't needed.")
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/13413>
(cherry picked from commit 19c91a120d)
2021-10-20 20:40:59 +01:00
Jan Beich
80305d7c2e meson: disable -Werror=thread-safety on FreeBSD
Annotated <pthread.h> exposes too many errors in Mesa that are
non-trivial to fix and keep working without FreeBSD CI.

Fixes: 0d5fe24c9b ("macros: Add thread-safety annotation macros")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9168>
(cherry picked from commit 60b7c3a0f4)
2021-10-20 20:40:59 +01:00
Mike Blumenkrantz
356cac1c29 zink: fully zero surface creation struct
gotta get those holes for caching

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13410>
(cherry picked from commit e66558985a)
2021-10-20 20:40:59 +01:00
Mike Blumenkrantz
b28da95fa4 zink: add a read barrier for indirect dispatch
using the draw stage here doesn't make much sense, but that's what the
spec says, so let's git er done

fixes dEQP-GL45.functional.compute.indirect_dispatch* on radv

Cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13381>
(cherry picked from commit a2789fde0c)
2021-10-20 20:40:58 +01:00
Mike Blumenkrantz
28261505d6 zink: use static array for detecting VK_TIME_DOMAIN_DEVICE_EXT
there's only a few possible values for this, so just use a static array
to avoid leaking

Fixes: 039078fe97 ("zink: slight refactor of load_device_extensions()")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13360>
(cherry picked from commit 11dd9e4ee4)
2021-10-20 20:40:58 +01:00
Witold Baryluk
b67308a449 zink: Fully initialize VkBufferViewCreateInfo for hashing
Makes hashing achieve higher hit rate, and valgrind happier.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13371>
(cherry picked from commit ae525da0e4)
2021-10-20 20:40:58 +01:00
Marcin Ślusarz
2d6c11843d intel: fix INTEL_DEBUG environment variable on 32-bit systems
INTEL_DEBUG is defined (since 4015e1876a) as:

 #define INTEL_DEBUG __builtin_expect(intel_debug, 0)

which unfortunately chops off upper 32 bits from intel_debug
on platforms where sizeof(long) != sizeof(uint64_t) because
__builtin_expect is defined only for the long type.

Fix this by changing the definition of INTEL_DEBUG to be function-like
macro with "flags" argument. New definition returns 0 or 1 when
any of the flags match.

Most of the changes in this commit were generated using:
for c in `git grep INTEL_DEBUG | grep "&" | grep -v i915 | awk -F: '{print $1}' | sort | uniq`; do
    perl -pi -e "s/INTEL_DEBUG & ([A-Z0-9a-z_]+)/INTEL_DBG(\1)/" $c
    perl -pi -e "s/INTEL_DEBUG & (\([A-Z0-9_ |]+\))/INTEL_DBG\1/" $c
done
but it didn't handle all cases and required minor cleanups (like removal
of round brackets which were not needed anymore).

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13334>
(cherry picked from commit d05f7b4a2c)
2021-10-20 20:40:58 +01:00
Neha Bhende
ca1c300ecd st: Fix 64-bit vertex attrib index for TGSI path
Patch 77c2b022a0 removed lowering of 64-bit vertex attribs to 32bits.
This has thrown TGSI translation off the guard for 64bit attrib.
This lead to fail/crash of 1000+ piglit tests.

This patch basically fixes 64 bit attrib index for TGSI shader by adding placeholder
for second part of a double attribute.
It fixes all regressed piglit tests.

A big help from Charmaine to fix this regression
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>

Fixes: 77c2b022a0 ("st/mesa: remove lowering of 64-bit vertex attribs to 32 bits")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13363>
(cherry picked from commit be6d584de4)
2021-10-20 20:40:58 +01:00
Samuel Pitoiset
ed1db8e8ca radv: fix OpImageQuerySamples with non-zero descriptor set
The descriptor set was always 0 because it wasn't gathered by the
shader info pass.

This fixes CPU crashes with
arb_shader_texture_image_samples-builtin-image and Zink.

Cc: 21.3 mesa-stable
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/13411>
(cherry picked from commit 5b797bd485)
2021-10-20 20:40:58 +01:00
Pierre-Eric Pelloux-Prayer
4504abe511 radeonsi: use viewport offset in quant_mode determination
Instead of only using the viewport extent.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5344
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13382>
(cherry picked from commit 234c69f600)
2021-10-20 20:40:58 +01:00
Vinson Lee
d19e28c139 anv: Fix assertion.
Fix defect reported by Coverity Scan.

Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
assign_where_compare_meant: use of "=" where "==" may have been intended

Fixes: 35315c68a5 ("anv: Use the common wrapper for GetPhysicalDeviceFormatProperties")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13395>
(cherry picked from commit 9eb010ee1e)
2021-10-20 20:40:58 +01:00
Samuel Pitoiset
983cccf757 radv: fix removing PSIZ when it's not emitted by the last VGT stage
This dereferences a NULL pointer and crash many tests with Zink.

Fixes: 92e1981a80 ("radv: Remove PSIZ output when it isn't needed.")
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/13378>
(cherry picked from commit 61be0bd34b)
2021-10-20 20:40:58 +01:00
Karol Herbst
7456331987 spirv: Don't add 0.5 to array indicies for OpImageSampleExplicitLod
This fixes CLs 1.2 1Darray and 2Darray images.

Fixes: 589d918a4f
       ("spirv: Add 0.5 to integer coordinates for OpImageSampleExplicitLod")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13401>
(cherry picked from commit f6ecd284e5)
2021-10-20 20:40:58 +01:00
Dave Airlie
bac2dd958a llvmpipe: fix userptr for texture resources.
This is needed for CL image hostptr support, but it's possible
it could hit these paths from GL/Vulkan

Fixes: 9a57dceeb7 ("llvmpipe: add support for user memory pointers")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13375>
(cherry picked from commit 17a565e0cf)
2021-10-20 20:40:58 +01:00
Alyssa Rosenzweig
121f0528a7 panfrost: Don't allow rendering/texturing 48-bit
Matches freedreno. Fixes crashes in Piglit arb_texture_view.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13394>
(cherry picked from commit d31ca63527)
2021-10-20 20:40:58 +01:00
Derek Foreman
3c0c2465f3 egl/wayland: Properly clear stale buffers on resize
The following chain of events results in an incorrectly sized buffer
persisting beyond its useful lifetime, and causing visual artifacts.

buffer is attached at size A
window is resized to size B
rendering takes place for size B
window is resized back to size A
swapbuffers with damage is called

In this scenario, update_buffers fails to recognize that the surface it's
about to commit is a different size than it has rendered. The
attached_width and attached_height are set incorrectly, and periodic
flickering is observed.

Instead, we set a boolean flag at time of resize and use this at the time
we latch the window dimensions as surface dimensions to decide whether to
discard stale buffers.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13270>
(cherry picked from commit 28d12716e8)
2021-10-20 20:40:58 +01:00
Mike Blumenkrantz
118131c071 aux/pb: more correctly check number of reclaims
the increment needs to happen before the comparison here

Fixes: 3d6c8829f5 ("aux/pb: add a tolerance for reclaim failure")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13388>
(cherry picked from commit fe2674dd52)
2021-10-20 20:40:57 +01:00
Mike Blumenkrantz
b7942e3134 aux/pb: add a tolerance for reclaim failure
originally, a slab attempts to reclaim a single bo. there are two outcomes
to this which can occur:
* the bo is reclaimed
* the bo is not reclaimed

if the bo is reclaimed, great.

if the bo is not reclaimed, it remains at the head of the list until it can
be reclaimed. this means that any bo with a "long" work queue which makes it
into a slab will effectively kill the entire slab. in a benchmarking scenario,
this can occur in rapid succession, and every slab will get 1-2 suballocations
before it reaches a bo that blocks long enough for a new slab to be needed.

the inevitable result of this scenario is that all memory is depleted almost instantly,
all because pb assumes that if the first bo in the reclaim list isn't ready, none of them
can be ready

for drivers like radeonsi, this happens to be a fine assumption

for drivers like zink, this is entirely not workable and explodes the gpu

Cc: mesa-stable

Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13345>
(cherry picked from commit 3d6c8829f5)
2021-10-20 20:40:57 +01:00
Samuel Pitoiset
7cddbaab2d aco: do not return an empty string when disassembly is not supported
Fixes dEQP-VK.pipeline.executable_properties.* on GFX6-7 when
clrxdisasm isn't found. Other generations are also affected if RADV
is built without LLVM.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13333>
(cherry picked from commit aac4e1f822)
2021-10-20 20:40:57 +01:00
Marcin Ślusarz
2dcee84ce3 iris: fix scratch address patching for TESS_EVAL stage
Scratch patching code in iris_upload_dirty_render_state (see MERGE_SCRATCH_ADDR
calls) assumes that in all shader stages derived_data field stores 3DSTATE_XS
packet first.

This is not true for TESS_EVAL (DS), so we end up patching 3DSTATE_TE
instead of 3DSTATE_DS leading to DWordLength becoming 11 instead of 9
(9 == 3DSTATE_DS.DWordLength, 2 == 3DSTATE_TE.DWordLength, and 9|2 == 11),
and hardware hanging on the next instruction.

Fix this by reversing the order of packets for TESS_EVAL stage.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5499

Fixes: 4256f7ed58 ("iris: Fill out scratch base address dynamically")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13358>
(cherry picked from commit 5387522bd0)
2021-10-20 20:40:57 +01:00
Maniraj D
9b68854c2e egl: set TSD as NULL after deinit
When eglReleaseThread() is called from application's
destructor (API with __attribute__((destructor))),
it crashes due to invalid memory access.

In this case, _egl_TLS is freed in the flow of
_eglAtExit() as below but _egl_TLS is not set to NULL.

    _eglDestroyThreadInfo
        _eglFiniTSD
            _eglAtExit
                _run_exit_handlers
                    exit

Later when the eglReleaseThread is called from
application's destructor, it ends-up accessing
the freed _egl_TLS pointer.

    eglReleaseThread -> in libEGL_mesa
        eglReleaseThread -> in libEGL(glvnd)
            destructor() -> App's destructor

To resolve the invalid access, setting the _egl_TLS
pointer as NULL after freeing it.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5466
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13302>
(cherry picked from commit 796c9ab3fd)
2021-10-20 20:40:57 +01:00
Jason Ekstrand
071ce0bbc7 i965: Emit a NULL surface for buffer textures with no buffer
This is a preexisting bug but it was uncovered by 231653ea35
("intel/isl: Add a max_buffer_size limit to isl_device") which added an
assert(num_elements > 0) for typed buffers.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13351>
(cherry picked from commit 393fda2d34)
2021-10-20 20:40:57 +01:00
Witold Baryluk
8876a87565 zink: Do not access just freed zink_batch_state
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13370>
(cherry picked from commit 4d777631b5)
2021-10-20 20:40:57 +01:00
Yiwei Zhang
9c7e483a1c dri_interface: remove gl header
Only gl typedefs are used. So just remove the header and update the
types to the underlying types.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13387>
(cherry picked from commit 2d58e31f10)
2021-10-20 20:40:57 +01:00
Yiwei Zhang
0969e1247c dri_interface: remove obsolete interfaces
Below are removed:
__DRI_FRAME_TRACKING
__DRI_TEX_OFFSET
__DRI_GET_DRAWABLE_INFO

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13387>
(cherry picked from commit e19d9046db)
2021-10-20 20:40:57 +01:00
Clayton Craft
3f61f84fe3 anv: don't advertise vk conformance on GPUs that aren't conformant
This sets the conformance version to 0.0.0.0 for GPUs that have
incomplete support for vulkan, so that it's easier to check if vulkan is
fully supported by a GPU at runtime for applications/libraries.

    $ vulkaninfo|grep conf
    MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
        conformanceVersion = 0.0.0.0

Signed-off-by: Clayton Craft <clayton@craftyguy.net>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13275>
(cherry picked from commit b2ef7e6d6b)
2021-10-20 20:40:57 +01:00
Jason Ekstrand
5c3159e088 vulkan/log: Tweak our handling of a couple error enums
VK_ERROR_INITIALIZATION_FAILED can happen as part of device creation and
isn't really an instance error in that case.
VK_ERROR_EXTENSION_NOT_PRESENT, on the other hand, is always an instance
thing and we should handle it as such.

Fixes: 0cad3beb2a ("vulkan/log: Add common vk_error and vk_errorf helpers")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13341>
(cherry picked from commit 071437d29d)
2021-10-20 20:40:57 +01:00
Boris Brezillon
45a9fd6acb vulkan: Set unused entrypoints to vk_entrypoint_stub when compiling with MSVC
If we don't do that we hit the assert(entry[i] != NULL) added by commit
6d44b21d4f ("vulkan: Fix weak symbol emulation when compiling with MSVC").

Fixes: 6d44b21d4f ("vulkan: Fix weak symbol emulation when compiling with MSVC")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13355>
(cherry picked from commit fd46749234)
2021-10-20 20:40:57 +01:00
Bas Nieuwenhuizen
81fe3260e0 radv: Fix modifier property query.
radv_get_modifier_flags read the format properties, doesn't write any. Setting
the central format properties based on the drm format properties doesn't make
any sense.

Fixes: 5dee0d9da9 "radv: switch to VK_FORMAT_FEATURE_2_XXX/VkFormatProperties3KHR"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5498
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13357>
(cherry picked from commit b4aa5a3fdd)
2021-10-20 20:40:57 +01:00
Boris Brezillon
70cd17bbf1 vulkan: Fix weak symbol emulation when compiling with MSVC
Mapping unimplemented entrypoints to a global function pointer variable
initialized to NULL is a bit cumbersome, and actually led to a bug
in the vk_xxx_dispatch_table_from_entrypoints() template: the !override
case didn't have the right check on the source table entries. Instead of
fixing that case, let's simplify the logic by creating a stub function
and making the alternatename pragma point to this stub. This way we get
rid of all those uneeded xxx_Null symbols/variables and simplify the
tests in vk_xxxx_dispatch_table_from_entrypoints().

Cc: mesa-stable
Fixes: 98c622a96e ("vulkan: Update dispatch table gen for Windows")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13348>
(cherry picked from commit 6d44b21d4f)
2021-10-20 20:40:57 +01:00
Ian Romanick
2b77d8afa7 nir/loop_unroll: Always unroll loops that iterate at most once
Two carchase compute shaders (shader-db) and two Fallout 4 fragment
shaders (fossil-db) were helped.  Based on the NIR of the shaders, all
four had structures like

    for (i = 0; i < 1; i++) {
        ...

	for (...) {
            ...
	}
    }

All HSW+ platforms had similar results. (Ice Lake shown)
total loops in shared programs: 6033 -> 6031 (-0.03%)
loops in affected programs: 4 -> 2 (-50.00%)
helped: 2
HURT: 0

All Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 143692018 -> 143692006 (-0.0%)
SENDs in all programs: 6947154 -> 6947154 (+0.0%)
Loops in all programs: 38285 -> 38283 (-0.0%)
Cycles in all programs: 8434822225 -> 8434476815 (-0.0%)
Spills in all programs: 191665 -> 191665 (+0.0%)
Fills in all programs: 298822 -> 298822 (+0.0%)

In the presense of loop unrolling like this, the change in cycles is not
accurate.

v2: Rearrange the logic in the if-condition to read a little better.
Suggested by Tim.

Closes: #5089
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit ae99ea6f4d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13366>
2021-10-20 20:40:57 +01:00
Eric Engestrom
f774768d17 .pick_status.json: Mark 7a2e40df5e as denominated 2021-10-20 20:40:57 +01:00
Eric Engestrom
1cf264d89d .pick_status.json: Update to 86b3d8c66c 2021-10-20 20:40:41 +01:00
Eric Engestrom
2dc6aa567f VERSION: bump for 21.3.0-rc1
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2021-10-13 20:59:03 +01:00
678 changed files with 69485 additions and 10352 deletions

View File

@@ -5,7 +5,8 @@ variables:
set -o xtrace
/usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash -
set +o xtrace
MINIO_HOST: minio-packet.freedesktop.org
CI_JOB_JWT_FILE: /minio_jwt
MINIO_HOST: s3.freedesktop.org
# per-pipeline artifact storage on MinIO
PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
# per-job artifact storage on MinIO
@@ -16,9 +17,24 @@ variables:
# running on a particular CI farm (ie. for outages, etc):
FD_FARM: "online"
default:
before_script:
- echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
- echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
- unset CI_JOB_JWT
- echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
after_script:
- >
set +x
test -e "${CI_JOB_JWT_FILE}" &&
export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
rm "${CI_JOB_JWT_FILE}"
include:
- project: 'freedesktop/ci-templates'
ref: 79c325922670137e8f0a4dc5f6f097e0eb57c1af
ref: ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
file:
- '/templates/ci-fairy.yml'
- project: 'freedesktop/ci-templates'
@@ -26,22 +42,7 @@ include:
file:
- '/templates/debian.yml'
- '/templates/fedora.yml'
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
- local: '.gitlab-ci/test-source-dep.yml'
- local: 'src/amd/ci/gitlab-ci.yml'
- local: 'src/broadcom/ci/gitlab-ci.yml'
- local: 'src/etnaviv/ci/gitlab-ci.yml'
- local: 'src/freedreno/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/iris/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/radeonsi/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
- local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
- local: 'src/panfrost/ci/gitlab-ci.yml'
stages:
- sanity
@@ -49,14 +50,6 @@ stages:
- git-archive
- build-x86_64
- build-misc
- amd
- intel
- arm
- broadcom
- freedreno
- etnaviv
- software-renderer
- layered-backends
- deploy
# Generic rule to not run the job during scheduled pipelines
@@ -102,7 +95,7 @@ stages:
- .ci-run-policy
script:
- apk --no-cache add graphviz doxygen
- pip3 install "sphinx<4.0" breathe mako sphinx_rtd_theme
- pip3 install sphinx breathe mako sphinx_rtd_theme
- docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
- sphinx-build -W -b html docs public
@@ -290,7 +283,7 @@ debian/x86_build-base:
- .fdo.container-build@debian
- .container
variables:
MESA_IMAGE_TAG: &debian-x86_build-base "2021-07-26-python"
MESA_IMAGE_TAG: &debian-x86_build-base "2022-11-22-wayland"
.use-debian/x86_build-base:
extends:
@@ -376,7 +369,7 @@ debian/android_build:
extends:
- .use-debian/x86_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build "2021-07-02-bump-libdrm"
MESA_IMAGE_TAG: &debian-android_build "2021-10-26-static-libstdcxx"
.use-debian/android_build:
extends:
@@ -388,36 +381,6 @@ debian/android_build:
needs:
- debian/android_build
# Debian 11 based x86 test image base
debian/x86_test-base:
extends: debian/x86_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_test-base "2021-09-28-deqp-runner"
.use-debian/x86_test-base:
extends:
- .fdo.container-build@debian
- .use-base-image
variables:
MESA_BASE_IMAGE: "debian/x86_test-base"
MESA_BASE_TAG: *debian-x86_test-base
needs:
- debian/x86_test-base
# Debian 11 based x86 test image for GL
debian/x86_test-gl:
extends: .use-debian/x86_test-base
variables:
FDO_DISTRIBUTION_EXEC: 'env KERNEL_URL=${KERNEL_URL} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
KERNEL_URL: &kernel-rootfs-url "https://gitlab.freedesktop.org/gfx-ci/linux/-/archive/v5.13-rc5-for-mesa-ci-2bb5d9ffd79c/linux-v5.13-rc5-for-mesa-ci-2bb5d9ffd79c.tar.bz2"
MESA_IMAGE_TAG: &debian-x86_test-gl "2021-2021-10-07-piglit"
# Debian 11 based x86 test image for VK
debian/x86_test-vk:
extends: .use-debian/x86_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_test-vk "2021-2021-10-07-piglit"
# Debian 11 based ARM build image
debian/arm_build:
extends:
@@ -426,7 +389,7 @@ debian/arm_build:
tags:
- aarch64
variables:
MESA_IMAGE_TAG: &debian-arm_build "2021-07-26-python"
MESA_IMAGE_TAG: &debian-arm_build "2022-11-16-ci-fairy"
.use-debian/arm_build:
extends:
@@ -446,7 +409,7 @@ fedora/x86_build:
- .container
variables:
FDO_DISTRIBUTION_VERSION: 34
MESA_IMAGE_TAG: &fedora-x86_build "2021-07-08-bump-libdrm"
MESA_IMAGE_TAG: &fedora-x86_build "2022-11-22-wayland"
.use-fedora/x86_build:
extends:
@@ -458,124 +421,6 @@ fedora/x86_build:
- fedora/x86_build
.kernel+rootfs:
extends:
- .ci-run-policy
stage: container
variables:
GIT_STRATEGY: fetch
KERNEL_URL: *kernel-rootfs-url
MESA_ROOTFS_TAG: &kernel-rootfs "2021-10-07-piglit"
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
script:
- .gitlab-ci/container/lava_build.sh
kernel+rootfs_amd64:
extends:
- .use-debian/x86_build-base
- .kernel+rootfs
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
kernel+rootfs_arm64:
extends:
- .use-debian/arm_build
- .kernel+rootfs
tags:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
kernel+rootfs_armhf:
extends:
- kernel+rootfs_arm64
variables:
DEBIAN_ARCH: "armhf"
# Cannot use anchors defined here from included files, so use extends: instead
.use-kernel+rootfs-arm:
variables:
DISTRIBUTION_TAG: *distribution-tag-arm
MESA_ROOTFS_TAG: *kernel-rootfs
.use-kernel+rootfs-amd64:
variables:
DISTRIBUTION_TAG: *distribution-tag-amd64
MESA_ROOTFS_TAG: *kernel-rootfs
# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing
debian/arm_test:
extends:
- .fdo.container-build@debian
- .container
# Don't want the .container rules
- .ci-run-policy
needs:
- kernel+rootfs_arm64
- kernel+rootfs_armhf
variables:
FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARM_BUILD_TAG: *debian-arm_build
MESA_IMAGE_TAG: &debian-arm_test "2021-09-17-deqp"
MESA_ROOTFS_TAG: *kernel-rootfs
.use-debian/arm_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_ARM_BUILD_TAG: *debian-arm_build
MESA_IMAGE_PATH: "debian/arm_test"
MESA_IMAGE_TAG: *debian-arm_test
MESA_ROOTFS_TAG: *kernel-rootfs
needs:
- debian/arm_test
# Native Windows docker builds
#
# Unlike the above Linux-based builds - including MinGW builds which
# cross-compile for Windows - which use the freedesktop ci-templates, we
# cannot use the same scheme here. As Windows lacks support for
# Docker-in-Docker, and Podman does not run natively on Windows, we have
# to open-code much of the same ourselves.
#
# This is achieved by first running in a native Windows shell instance
# (host PowerShell) in the container stage to build and push the image,
# then in the build stage by executing inside Docker.
.windows-docker-vs2019:
extends:
- .set-image
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
MESA_IMAGE_PATH: "windows/x64_build"
MESA_IMAGE_TAG: "2021-06-24-zink-msvc"
MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
windows_build_vs2019:
extends:
- .container
- .windows-docker-vs2019
stage: container
variables:
GIT_STRATEGY: fetch # we do actually need the full repository though
timeout: 2h 30m # LLVM + piglit takes ages
tags:
- windows
- shell
- "1809"
- mesa
script:
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE
.use-windows_build_vs2019:
extends: .windows-docker-vs2019
image: "$MESA_IMAGE"
needs:
- windows_build_vs2019
# Git archive
make git archive:
@@ -594,9 +439,7 @@ make git archive:
# compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
# login with the JWT token
- ci-fairy minio login $CI_JOB_JWT
- ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
# Sanity checks of MR settings and commit logs
@@ -643,23 +486,13 @@ sanity:
CCACHE_DIR: /cache/mesa/ccache
# Use ccache transparently, and print stats before/after
before_script:
- !reference [default, before_script]
- export PATH="/usr/lib/ccache:$PATH"
- export CCACHE_BASEDIR="$PWD"
- ccache --show-stats
after_script:
- ccache --show-stats
.build-windows:
extends: .build-common
tags:
- windows
- docker
- "1809"
- mesa
cache:
key: ${CI_JOB_NAME}
paths:
- subprojects/packagecache
- !reference [default, after_script]
.meson-build:
extends:
@@ -671,62 +504,6 @@ sanity:
script:
- .gitlab-ci/meson/build.sh
debian-testing:
extends:
- .meson-build
- .ci-deqp-artifacts
variables:
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D platforms=x11
GALLIUM_ST: >
-D dri3=enabled
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,iris,i915"
VULKAN_DRIVERS: "swrast,amd"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D valgrind=false
MINIO_ARTIFACT_NAME: mesa-amd64
script:
- .gitlab-ci/meson/build.sh
- .gitlab-ci/prepare-artifacts.sh
debian-testing-asan:
extends:
- debian-testing
variables:
C_ARGS: >
-Wno-error=stringop-truncation
EXTRA_OPTION: >
-D b_sanitize=address
-D valgrind=false
MINIO_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
debian-clover-testing:
extends:
- .meson-build
- .ci-deqp-artifacts
variables:
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=disabled
-D egl=disabled
-D gbm=disabled
GALLIUM_ST: >
-D gallium-opencl=icd
-D opencl-spirv=true
GALLIUM_DRIVERS: "swrast"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D valgrind=false
script:
- .gitlab-ci/meson/build.sh
- .gitlab-ci/prepare-artifacts.sh
debian-gallium:
extends: .meson-build
variables:
@@ -825,7 +602,6 @@ fedora-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D vulkan-device-select-layer=true
LLVM_VERSION: ""
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel"
@@ -1017,42 +793,6 @@ debian-clang:
CC: clang
CXX: clang++
windows-vs2019:
extends:
- .build-windows
- .use-windows_build_vs2019
- .windows-build-rules
stage: build-misc
script:
- . .\.gitlab-ci\windows\mesa_build.ps1
artifacts:
paths:
- _build/meson-logs/*.txt
- _install/
test-d3d12-windows:
extends:
- .build-windows
- .use-windows_build_vs2019
- .windows-test-rules
stage: layered-backends
dependencies:
- windows-vs2019
needs:
- windows-vs2019
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
GALLIUM_DRIVER: d3d12
PIGLIT_PROFILE: quick_gl
PIGLIT_TESTS: -x nv_copy_depth_to_color -x repeat-wait -x arb_timer_query@timestamp-get
script:
- . _install/piglit_run.ps1
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
paths:
- summary/
debian-clover:
extends: .meson-build
variables:
@@ -1140,211 +880,3 @@ debian-ppc64el:
CROSS: ppc64el
GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
VULKAN_DRIVERS: "amd,swrast"
debian-mingw32-x86_64:
extends: .meson-build
stage: build-misc
variables:
UNWIND: "disabled"
C_ARGS: >
-Wno-error=format
-Wno-error=format-extra-args
CPP_ARGS: $C_ARGS
DRI_DRIVERS: ""
GALLIUM_DRIVERS: "swrast"
EXTRA_OPTION: >
-Dllvm=disabled
-Dzlib=disabled
-Dosmesa=true
--cross-file=.gitlab-ci/x86_64-w64-mingw32
.test:
extends:
- .ci-run-policy
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
before_script:
# Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
- rm -rf install
- tar -xf artifacts/install.tar
- LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
artifacts:
when: always
name: "mesa_${CI_JOB_NAME}"
paths:
- results/
.use-debian/x86_test-gl:
extends:
- .test
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_test-base
MESA_IMAGE_PATH: "debian/x86_test-gl"
MESA_IMAGE_TAG: *debian-x86_test-gl
needs:
- debian/x86_test-gl
.test-gl:
extends:
- .use-debian/x86_test-gl
needs:
- debian/x86_test-gl
- debian-testing
.test-vk:
extends:
- .test
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_test-base
MESA_IMAGE_PATH: "debian/x86_test-vk"
MESA_IMAGE_TAG: *debian-x86_test-vk
needs:
- debian-testing
- debian/x86_test-vk
.test-cl:
extends:
- .use-debian/x86_test-gl
needs:
- debian/x86_test-gl
- debian-clover-testing
.vkd3d-proton-test:
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
paths:
- results/vkd3d-proton.log
script:
- ./install/vkd3d-proton/run.sh
.piglit-test:
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
paths:
- results/summary/
- results/*.txt
variables:
PIGLIT_NO_WINDOW: 1
script:
- install/piglit/run.sh
.piglit-traces-test:
extends:
- .piglit-test
cache:
key: ${CI_JOB_NAME}
paths:
- replayer-db/
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
reports:
junit: results/junit.xml
variables:
PIGLIT_PROFILES: replay
PIGLIT_REPLAY_UPLOAD_TO_MINIO: 1
PIGLIT_REPLAY_EXTRA_ARGS: --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_host=minio-packet.freedesktop.org --minio_bucket=mesa-tracie-public --role-session-name=${CI_PROJECT_PATH}:${CI_JOB_ID} --jwt=${CI_JOB_JWT}
PIGLIT_JUNIT_RESULTS: 1
.deqp-test:
script:
- ./install/deqp-runner.sh
artifacts:
exclude:
- results/*.shader_cache
reports:
junit: results/junit.xml
.deqp-test-vk:
extends:
- .deqp-test
variables:
DEQP_VER: vk
.fossilize-test:
script:
- ./install/fossilize-runner.sh
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
paths:
- results/
# Rules for tests that should not be present in MRs or the main
# project's pipeline (don't block marge or report red on
# mesa/mesa main) but should be present on pipelines in personal
# branches (so you can opt in to running the flaky test when you want
# to).
.test-manual:
rules:
- *ignore_scheduled_pipelines
- if: *is-forked-branch
changes:
*all_paths
when: manual
- when: never
variables:
GIT_STRATEGY: none
# The above .test-manual rules doesn't allow the jobs to be available for MRs
# but we should have an option to have manual jobs in MRs as well.
.test-manual-mr:
rules:
- *ignore_scheduled_pipelines
- if: *is-forked-branch-or-pre-merge-not-for-marge
changes:
*all_paths
when: manual
- when: never
variables:
GIT_STRATEGY: none
.baremetal-test:
extends:
- .ci-run-policy
- .test
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: test
before_script:
# Use this instead of gitlab's artifacts download because it hits packet.net
# instead of fd.o. Set FDO_HTTP_CACHE_URI to an http cache for your test lab to
# improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for
# setup).
- wget ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.gz -S --progress=dot:giga -O- | tar -xz
artifacts:
when: always
name: "mesa_${CI_JOB_NAME}"
paths:
- results/
- serial*.txt
exclude:
- results/*.shader_cache
reports:
junit: results/junit.xml
.baremetal-test-armhf:
extends:
- .baremetal-test
variables:
MINIO_ARTIFACT_NAME: mesa-armhf
.baremetal-arm64-asan-test:
variables:
TEST_LD_PRELOAD: libasan.so.6
MINIO_ARTIFACT_NAME: mesa-arm64-asan
needs:
- debian/arm_test
- job: debian-arm64-asan
artifacts: false
.baremetal-deqp-test:
variables:
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
DEQP_PARALLEL: 0 # Default to number of CPUs

View File

@@ -6,5 +6,9 @@
# reliable to be run in parallel with other tests due to CPU-side timing.
dEQP-GLES[0-9]*.functional.flush_finish.*
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4575
dEQP-VK.wsi.display.get_display_plane_capabilities
# piglit: WGL is Windows-only
wgl@.*
# These are sensitive to CPU timing, and would need to be run in isolation
# on the system rather than in parallel with other tests.
glx@glx_arb_sync_control@timing.*

View File

@@ -10,7 +10,7 @@ EXIT=0
# Run reset tests without parallelism:
if ! env \
DEQP_RESULTS_DIR=results/reset \
DEQP_PARALLEL=1 \
FDO_CI_CONCURRENT=1 \
DEQP_CASELIST_FILTER='.*reset.*' \
/install/deqp-runner.sh; then
EXIT=1

View File

@@ -16,7 +16,8 @@ set +x
chmod +x $rootfs_dst/set-job-env-vars.sh
echo "Variables passed through:"
cat $rootfs_dst/set-job-env-vars.sh
echo "export CI_JOB_JWT=${CI_JOB_JWT@Q}" >> $rootfs_dst/set-job-env-vars.sh
mkdir -p "$(dirname "$rootfs_dst/${CI_JOB_JWT_FILE}")"
cp "${CI_JOB_JWT_FILE}" "$rootfs_dst/${CI_JOB_JWT_FILE}"
set -x
# Add the Mesa drivers we built, and make a consistent symlink to them.

View File

@@ -8,6 +8,7 @@ for var in \
CI_COMMIT_TITLE \
CI_JOB_ID \
CI_JOB_URL \
CI_JOB_JWT_FILE \
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
CI_MERGE_REQUEST_TITLE \
CI_NODE_INDEX \
@@ -26,7 +27,6 @@ for var in \
DEQP_EXPECTED_RENDERER \
DEQP_FRACTION \
DEQP_HEIGHT \
DEQP_PARALLEL \
DEQP_RESULTS_DIR \
DEQP_RUNNER_OPTIONS \
DEQP_SUITE \
@@ -42,6 +42,12 @@ for var in \
FD_MESA_DEBUG \
FLAKES_CHANNEL \
GPU_VERSION \
GTEST \
GTEST_FAILS \
GTEST_FRACTION \
GTEST_RESULTS_DIR \
GTEST_RUNNER_OPTIONS \
GTEST_SKIPS \
HWCI_FREQ_MAX \
HWCI_KERNEL_MODULES \
HWCI_START_XORG \
@@ -75,7 +81,6 @@ for var in \
PIGLIT_RESULTS \
PIGLIT_TESTS \
PIPELINE_ARTIFACTS_BASE \
TEST_LD_PRELOAD \
TU_DEBUG \
VK_CPU \
VK_DRIVER \

View File

@@ -71,8 +71,7 @@ fi
MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)
if [ -n "$MINIO" ]; then
tar -czf results.tar.gz results/;
ci-fairy minio login "$CI_JOB_JWT";
ci-fairy minio cp results.tar.gz minio://"$MINIO"/results.tar.gz;
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.gz https://"$MINIO_RESULTS_UPLOAD"/results.tar.gz;
fi
echo "hwci: mesa: $RESULT"

View File

@@ -16,7 +16,6 @@ CONFIG_DRM_LIMA=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_MSM=y
CONFIG_DRM_I2C_ADV7511=y
CONFIG_DRM_I2C_ADV7533=y
CONFIG_PWM_CROS_EC=y
CONFIG_BACKLIGHT_PWM=y
@@ -32,6 +31,10 @@ CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
# MSM platform bits
# For CONFIG_QCOM_LMH
CONFIG_OF=y
CONFIG_QCOM_RPMHPD=y
CONFIG_QCOM_RPMPD=y
CONFIG_SDM_GPUCC_845=y
@@ -45,9 +48,11 @@ CONFIG_I2C_QCOM_GENI=y
CONFIG_SPI_QCOM_GENI=y
CONFIG_PHY_QCOM_QUSB2=y
CONFIG_PHY_QCOM_QMP=y
CONFIG_QCOM_LLCC=y
CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_CLK_APCC_MSM8996=y
CONFIG_QCOM_LLCC=y
CONFIG_QCOM_LMH=y
CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_WDT=y
CONFIG_POWER_RESET_QCOM_PON=y
CONFIG_RTC_DRV_PM8XXX=y
CONFIG_INTERCONNECT=y
@@ -56,8 +61,9 @@ CONFIG_INTERCONNECT_QCOM_SDM845=y
CONFIG_INTERCONNECT_QCOM_MSM8916=y
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
CONFIG_INTERCONNECT_QCOM_SC7180=y
CONFIG_QCOM_WDT=y
CONFIG_CRYPTO_DEV_QCOM_RNG=y
CONFIG_SC_DISPCC_7180=y
CONFIG_SC_GPUCC_7180=y
# db410c ethernet
CONFIG_USB_RTL8152=y
@@ -142,7 +148,9 @@ CONFIG_DRM_MESON=y
CONFIG_DRM_MEDIATEK=y
CONFIG_PWM_MEDIATEK=y
CONFIG_DRM_MEDIATEK_HDMI=y
CONFIG_GNSS=y
CONFIG_GNSS_MTK_SERIAL=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_MTK=y
CONFIG_MTK_DEVAPC=y
CONFIG_PWM_MTK_DISP=y

View File

@@ -4,6 +4,6 @@ set -ex
cargo install --locked deqp-runner \
-j ${FDO_CI_CONCURRENT:-4} \
--version 0.9.0 \
--version 0.10.0 \
--root /usr/local \
$EXTRA_CARGO_ARGS

View File

@@ -5,6 +5,11 @@ set -ex
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit
git checkout 7d7dd2688c214e1b3c00f37226500cbec4a58efb
# TODO: Remove the following patch when piglit commit got past
# 1cd716180cfb6ef0c1fc54702460ef49e5115791
git apply $OLDPWD/.gitlab-ci/piglit/build-piglit_backport-s3-migration.diff
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
ninja $PIGLIT_BUILD_TARGETS

View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -ex
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
git clone \
https://github.com/intel/libva-utils.git \
-b 2.13.0 \
--depth 1 \
/va-utils
pushd /va-utils
meson build -D tests=true -Dprefix=/va $EXTRA_MESON_ARGS
ninja -C build install
popd
rm -rf /va-utils

View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -ex
export LIBWAYLAND_VERSION="1.18.0"
export WAYLAND_PROTOCOLS_VERSION="1.24"
git clone https://gitlab.freedesktop.org/wayland/wayland
cd wayland
git checkout "$LIBWAYLAND_VERSION"
meson -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build
ninja -C _build install
cd ..
rm -rf wayland
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
cd wayland-protocols
git checkout "$WAYLAND_PROTOCOLS_VERSION"
meson _build
ninja -C _build install
cd ..
rm -rf wayland-protocols

View File

@@ -17,7 +17,7 @@ cat >$cross_file <<EOF
[binaries]
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
c_ld = 'lld'
cpp_ld = 'lld'
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'

View File

@@ -8,6 +8,8 @@ elif [ $DEBIAN_ARCH = amd64 ]; then
ARCH_PACKAGES="firmware-amd-graphics
libelf1
libllvm11
libva2
libva-drm2
"
fi
@@ -69,7 +71,7 @@ apt-get -y install --no-install-recommends \
# Needed for ci-fairy, this revision is able to upload files to
# MinIO and doesn't depend on git
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@0f1abc24c043e63894085a6bd12f14263e8b29eb
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
apt-get purge -y \
$INSTALL_CI_FAIRY_PACKAGES

View File

@@ -57,7 +57,7 @@ apt-get -y install \
apt-get install -y --no-remove -t buster \
android-sdk-ext4-utils
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@6f5af7e5574509726c79109e3c147cee95e81366
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
arch=armhf
. .gitlab-ci/container/cross_build.sh

View File

@@ -63,7 +63,6 @@ apt-get install -y --no-remove \
python3-requests \
qemu-user \
valgrind \
wayland-protocols \
wget \
wine64 \
x11proto-dri2-dev \
@@ -73,7 +72,7 @@ apt-get install -y --no-remove \
zlib1g-dev
# Needed for ci-fairy, this revision is able to upload files to MinIO
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@6f5af7e5574509726c79109e3c147cee95e81366
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
############### Uninstall ephemeral packages

View File

@@ -67,10 +67,8 @@ chmod +x /usr/local/bin/x86_64-w64-mingw32-pkg-config
# dependencies where we want a specific version
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
export XORGMACROS_VERSION=util-macros-1.19.0
export LIBWAYLAND_VERSION=wayland-1.18.0
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
@@ -79,11 +77,7 @@ rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-libdrm.sh
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
rm -rf $LIBWAYLAND_VERSION
. .gitlab-ci/container/build-wayland.sh
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1

View File

@@ -59,7 +59,7 @@ apt-get install -y --no-install-recommends \
# Needed for ci-fairy, this revision is able to upload files to MinIO
# and doesn't depend on git
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@0f1abc24c043e63894085a6bd12f14263e8b29eb
pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
############### Build dEQP runner
. .gitlab-ci/container/build-deqp-runner.sh

View File

@@ -22,6 +22,7 @@ STABLE_EPHEMERAL=" \
libcap-dev \
libclang-cpp11-dev \
libelf-dev \
libexpat1-dev \
libfdt-dev \
libgbm-dev \
libgles2-mesa-dev \
@@ -31,7 +32,6 @@ STABLE_EPHEMERAL=" \
libudev-dev \
libvulkan-dev \
libwaffle-dev \
libwayland-dev \
libx11-xcb-dev \
libxcb-dri2-0-dev \
libxext-dev \
@@ -45,7 +45,6 @@ STABLE_EPHEMERAL=" \
patch \
pkg-config \
python3-distutils \
wayland-protocols \
wget \
xz-utils \
"
@@ -86,6 +85,10 @@ mkdir -p /lava-files/
. .gitlab-ci/container/build-libdrm.sh
############### Build Wayland
. .gitlab-ci/container/build-wayland.sh
############### Build libclc
. .gitlab-ci/container/build-libclc.sh

View File

@@ -13,6 +13,7 @@ STABLE_EPHEMERAL=" \
g++-mingw-w64-i686-posix \
g++-mingw-w64-x86-64-posix \
glslang-tools \
libexpat1-dev \
libgbm-dev \
libgles2-mesa-dev \
liblz4-dev \
@@ -20,7 +21,6 @@ STABLE_EPHEMERAL=" \
libudev-dev \
libvulkan-dev \
libwaffle-dev \
libwayland-dev \
libx11-xcb-dev \
libxcb-ewmh-dev \
libxcb-keysyms1-dev \
@@ -124,6 +124,10 @@ wine \
. .gitlab-ci/container/build-libdrm.sh
############### Build Wayland
. .gitlab-ci/container/build-wayland.sh
############### Build parallel-deqp-runner's hang-detection tool
. .gitlab-ci/container/build-hang-detection.sh

View File

@@ -40,9 +40,6 @@ dnf install -y --setopt=install_weak_deps=False \
"pkgconfig(pciaccess)" \
"pkgconfig(vdpau)" \
"pkgconfig(vulkan)" \
"pkgconfig(wayland-egl-backend)" \
"pkgconfig(wayland-protocols)" \
"pkgconfig(wayland-scanner)" \
"pkgconfig(x11)" \
"pkgconfig(x11-xcb)" \
"pkgconfig(xcb)" \
@@ -74,10 +71,8 @@ dnf install -y --setopt=install_weak_deps=False \
# dependencies where we want a specific version
export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
export XORGMACROS_VERSION=util-macros-1.19.0
export LIBWAYLAND_VERSION=wayland-1.18.0
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
@@ -86,11 +81,7 @@ rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-libdrm.sh
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
rm -rf $LIBWAYLAND_VERSION
. .gitlab-ci/container/build-wayland.sh
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1

View File

@@ -17,6 +17,16 @@ check_minio()
check_minio "${FDO_UPSTREAM_REPO}"
check_minio "${CI_PROJECT_PATH}"
# This script is arguably the longest one when if it comes to this line
# Let's make some sanity checks, before failing miserably after waiting a long time
ci-fairy s3cp --help >/dev/null 2>&1 ||
(
ERRCODE=$?
set +x
echo "ci-fairy must have s3cp support. Please update ci-templates package."
exit $ERRCODE
)
. .gitlab-ci/container/container_pre_build.sh
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
@@ -34,6 +44,7 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/apq8096-db820c.dtb"
DEVICE_TREES+=" arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb"
DEVICE_TREES+=" arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb"
DEVICE_TREES+=" arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-limozeen-nots.dtb"
KERNEL_IMAGE_NAME="Image"
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
GCC_ARCH="arm-linux-gnueabihf"
@@ -50,6 +61,7 @@ else
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
DEVICE_TREES=""
KERNEL_IMAGE_NAME="bzImage"
ARCH_PACKAGES="libva-dev"
fi
# Determine if we're in a cross build.
@@ -71,6 +83,7 @@ fi
apt-get update
apt-get install -y --no-remove \
${ARCH_PACKAGES} \
automake \
bc \
cmake \
@@ -129,8 +142,7 @@ rm -rf /apitrace
############### Build dEQP runner
. .gitlab-ci/container/build-deqp-runner.sh
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin
mv /usr/local/bin/deqp-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
mv /usr/local/bin/piglit-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
mv /usr/local/bin/*-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
############### Build dEQP
@@ -143,6 +155,11 @@ mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
PIGLIT_OPTS="-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh
mv /piglit /lava-files/rootfs-${DEBIAN_ARCH}/.
############### Build libva tests
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
. .gitlab-ci/container/build-va-tools.sh
mv /va/bin/* /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/
fi
############### Build libdrm
EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
@@ -179,6 +196,8 @@ rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
# created.
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH
find /libdrm/ -name lib\*\.so\* | xargs cp -t /lava-files/rootfs-${DEBIAN_ARCH}/usr/lib/$GCC_ARCH/.
mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/
cp -Rp /libdrm/share /lava-files/rootfs-${DEBIAN_ARCH}/libdrm/share
rm -rf /libdrm
@@ -196,7 +215,6 @@ popd
. .gitlab-ci/container/container_post_build.sh
############### Upload the files!
ci-fairy minio login $CI_JOB_JWT
FILES_TO_UPLOAD="lava-rootfs.tgz \
$KERNEL_IMAGE_NAME"
@@ -205,9 +223,9 @@ if [[ -n $DEVICE_TREES ]]; then
fi
for f in $FILES_TO_UPLOAD; do
ci-fairy minio cp /lava-files/$f \
minio://${MINIO_PATH}/$f
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/$f \
https://${MINIO_PATH}/$f
done
touch /lava-files/done
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/done https://${MINIO_PATH}/done

View File

@@ -1,6 +1,11 @@
CONFIG_LOCALVERSION_AUTO=y
CONFIG_DEBUG_KERNEL=y
CONFIG_PWM=y
CONFIG_PM_DEVFREQ=y
CONFIG_OF=y
CONFIG_CROS_EC=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
CONFIG_BLK_DEV_INITRD=n
@@ -57,7 +62,7 @@ CONFIG_X86_AMD_FREQ_SENSITIVITY=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_AMD=y
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_USERPTR=y
CONFIG_DRM_AMD_ACP=n
CONFIG_ACPI_WMI=y

View File

@@ -2,30 +2,8 @@
set -ex
DEQP_WIDTH=${DEQP_WIDTH:-256}
DEQP_HEIGHT=${DEQP_HEIGHT:-256}
DEQP_CONFIG=${DEQP_CONFIG:-rgba8888d24s8ms0}
DEQP_VARIANT=${DEQP_VARIANT:-master}
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-width=$DEQP_WIDTH --deqp-surface-height=$DEQP_HEIGHT"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=$DEQP_CONFIG"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
if [ -z "$DEQP_VER" ]; then
echo 'DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run'
exit 1
fi
if [ "$DEQP_VER" = "vk" ]; then
if [ -z "$VK_DRIVER" ]; then
echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
exit 1
fi
fi
if [ -z "$GPU_VERSION" ]; then
echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in .gitlab-ci/deqp-gpu-version-*.txt)'
echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in .gitlab-ci/gpu-version-*.txt)'
exit 1
fi
@@ -36,35 +14,48 @@ export LD_LIBRARY_PATH=`pwd`/install/lib/
export EGL_PLATFORM=surfaceless
export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-`uname -m`}.json
# the runner was failing to look for libkms in /usr/local/lib for some reason
# I never figured out.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
RESULTS=`pwd`/${DEQP_RESULTS_DIR:-results}
mkdir -p $RESULTS
HANG_DETECTION_CMD=""
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-$DEQP_VARIANT.txt
DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
HANG_DETECTION_CMD="/parallel-deqp-runner/build/bin/hang-detection"
elif [ "$DEQP_VER" = "gles2" -o "$DEQP_VER" = "gles3" -o "$DEQP_VER" = "gles31" -o "$DEQP_VER" = "egl" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER
SUITE=dEQP
elif [ "$DEQP_VER" = "gles2-khr" -o "$DEQP_VER" = "gles3-khr" -o "$DEQP_VER" = "gles31-khr" -o "$DEQP_VER" = "gles32-khr" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/external/openglcts/modules/glcts
SUITE=dEQP
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/external/openglcts/modules/glcts
SUITE=KHR
fi
if [ -z "$DEQP_SUITE" ]; then
if [ -z "$DEQP_VER" ]; then
echo 'DEQP_SUITE must be set to the name of your deqp-gpu_version.toml, or DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run'
exit 1
fi
DEQP_WIDTH=${DEQP_WIDTH:-256}
DEQP_HEIGHT=${DEQP_HEIGHT:-256}
DEQP_CONFIG=${DEQP_CONFIG:-rgba8888d24s8ms0}
DEQP_VARIANT=${DEQP_VARIANT:-master}
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-width=$DEQP_WIDTH --deqp-surface-height=$DEQP_HEIGHT"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=$DEQP_CONFIG"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
if [ "$DEQP_VER" = "vk" -a -z "$VK_DRIVER" ]; then
echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
exit 1
fi
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-$DEQP_VARIANT.txt
DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
HANG_DETECTION_CMD="/parallel-deqp-runner/build/bin/hang-detection"
elif [ "$DEQP_VER" = "gles2" -o "$DEQP_VER" = "gles3" -o "$DEQP_VER" = "gles31" -o "$DEQP_VER" = "egl" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER
elif [ "$DEQP_VER" = "gles2-khr" -o "$DEQP_VER" = "gles3-khr" -o "$DEQP_VER" = "gles31-khr" -o "$DEQP_VER" = "gles32-khr" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/external/openglcts/modules/glcts
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
DEQP=/deqp/external/openglcts/modules/glcts
fi
cp $MUSTPASS /tmp/case-list.txt
# If the caselist is too long to run in a reasonable amount of time, let the job
@@ -94,80 +85,32 @@ if [ -z "$DEQP_SUITE" ]; then
fi
fi
if [ -e "$INSTALL/deqp-$GPU_VERSION-fails.txt" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --baseline $INSTALL/deqp-$GPU_VERSION-fails.txt"
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
touch $INSTALL/deqp-$GPU_VERSION-flakes.txt
touch $INSTALL/$GPU_VERSION-flakes.txt
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/deqp-$VK_DRIVER-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/deqp-$VK_DRIVER-skips.txt"
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/$VK_DRIVER-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$VK_DRIVER-skips.txt"
fi
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/deqp-$GALLIUM_DRIVER-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/deqp-$GALLIUM_DRIVER-skips.txt"
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GALLIUM_DRIVER-skips.txt"
fi
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/deqp-$DRIVER_NAME-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/deqp-$DRIVER_NAME-skips.txt"
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$DRIVER_NAME-skips.txt"
fi
if [ -e "$INSTALL/deqp-$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/deqp-$GPU_VERSION-skips.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
fi
set +e
if [ -n "$DEQP_PARALLEL" ]; then
JOB="--jobs $DEQP_PARALLEL"
elif [ -n "$FDO_CI_CONCURRENT" ]; then
JOB="--jobs $FDO_CI_CONCURRENT"
else
JOB="--jobs 4"
fi
parse_renderer() {
RENDERER=`grep -A1 TestCaseResult.\*info.renderer $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'`
VERSION=`grep -A1 TestCaseResult.\*info.version $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'`
echo "Renderer: $RENDERER"
echo "Version: $VERSION "
if ! echo $RENDERER | grep -q $DEQP_EXPECTED_RENDERER; then
echo "Expected GL_RENDERER $DEQP_EXPECTED_RENDERER"
exit 1
fi
}
check_renderer() {
if echo $DEQP_VER | grep -q egl; then
return
fi
echo "Capturing renderer info for GLES driver sanity checks"
# If you're having trouble loading your driver, uncommenting this may help
# debug.
# export EGL_LOG_LEVEL=debug
VERSION=`echo $DEQP_VER | cut -d '-' -f1 | tr '[a-z]' '[A-Z]'`
export LD_PRELOAD=$TEST_LD_PRELOAD
$DEQP $DEQP_OPTIONS --deqp-case=$SUITE-$VERSION.info.\* --deqp-log-filename=$RESULTS/deqp-info.qpa
export LD_PRELOAD=
parse_renderer
}
check_vk_device_name() {
echo "Capturing device info for VK driver sanity checks"
export LD_PRELOAD=$TEST_LD_PRELOAD
$DEQP $DEQP_OPTIONS --deqp-case=dEQP-VK.info.device --deqp-log-filename=$RESULTS/deqp-info.qpa
export LD_PRELOAD=
DEVICENAME=`grep deviceName $RESULTS/deqp-info.qpa | sed 's|deviceName: ||g'`
echo "deviceName: $DEVICENAME"
if ! echo $DEVICENAME | grep -q "$DEQP_EXPECTED_RENDERER"; then
echo "Expected deviceName $DEQP_EXPECTED_RENDERER"
exit 1
fi
}
report_load() {
echo "System load: $(cut -d' ' -f1-3 < /proc/loadavg)"
echo "# of CPU cores: $(cat /proc/cpuinfo | grep processor | wc -l)"
@@ -196,28 +139,23 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
sleep 1
fi
if [ $DEQP_VER = vk ]; then
quiet check_vk_device_name
else
quiet check_renderer
fi
RESULTS_CSV=$RESULTS/results.csv
FAILURES_CSV=$RESULTS/failures.csv
export LD_PRELOAD=$TEST_LD_PRELOAD
if [ -z "$DEQP_SUITE" ]; then
if [ -n "$DEQP_EXPECTED_RENDERER" ]; then
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --renderer-check "$DEQP_EXPECTED_RENDERER""
fi
if [ $DEQP_VER != vk -a $DEQP_VER != egl ]; then
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --version-check `cat $INSTALL/VERSION | sed 's/[() ]/./g'`"
fi
deqp-runner \
run \
--deqp $DEQP \
--output $RESULTS \
--caselist /tmp/case-list.txt \
--skips $INSTALL/deqp-all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/deqp-$GPU_VERSION-flakes.txt \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
$JOB \
$SUMMARY_LIMIT \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS \
-- \
$DEQP_OPTIONS
@@ -226,19 +164,17 @@ else
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS \
--skips $INSTALL/deqp-all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/deqp-$GPU_VERSION-flakes.txt \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--fraction-start $CI_NODE_INDEX \
--fraction $CI_NODE_TOTAL \
$JOB \
$SUMMARY_LIMIT \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS
fi
DEQP_EXITCODE=$?
export LD_PRELOAD=
quiet report_load
# Remove all but the first 50 individual XML files uploaded as artifacts, to
@@ -253,8 +189,8 @@ find $RESULTS -name \*.xml \
-exec cp /deqp/testlog.css /deqp/testlog.xsl "$RESULTS/" ";" \
-quit
$HANG_DETECTION_CMD deqp-runner junit \
--testsuite $DEQP_VER \
deqp-runner junit \
--testsuite dEQP \
--results $RESULTS/failures.csv \
--output $RESULTS/junit.xml \
--limit 50 \
@@ -265,8 +201,8 @@ if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS_CSV \
--known-flakes $INSTALL/deqp-$GPU_VERSION-flakes.txt \
--results $RESULTS/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
--job "$CI_JOB_ID" \

View File

@@ -0,0 +1,70 @@
#!/bin/sh
set -ex
INSTALL=`pwd`/install
# Set up the driver environment.
export LD_LIBRARY_PATH=`pwd`/install/lib/
export LIBVA_DRIVERS_PATH=`pwd`/install/lib/dri/
# libva spams driver open info by default, and that happens per testcase.
export LIBVA_MESSAGING_LEVEL=1
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
GTEST_RUNNER_OPTIONS="$GTEST_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
touch $INSTALL/$GPU_VERSION-flakes.txt
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GALLIUM_DRIVER-skips.txt"
fi
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$DRIVER_NAME-skips.txt"
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GPU_VERSION-skips.txt"
fi
set +e
gtest-runner \
run \
--gtest $GTEST \
--output ${GTEST_RESULTS_DIR:-results} \
--jobs ${FDO_CI_CONCURRENT:-4} \
$GTEST_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((${CI_NODE_TOTAL:-1} * ${GTEST_FRACTION:-1})) \
--env "LD_PRELOAD=$TEST_LD_PRELOAD" \
$GTEST_RUNNER_OPTIONS
GTEST_EXITCODE=$?
deqp-runner junit \
--testsuite gtest \
--results $RESULTS/failures.csv \
--output $RESULTS/junit.xml \
--limit 50 \
--template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml"
# Report the flakes to the IRC channel for monitoring (if configured):
if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
--job "$CI_JOB_ID" \
--url "$CI_JOB_URL" \
--branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
--branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}"
fi
exit $GTEST_EXITCODE

View File

@@ -1,120 +0,0 @@
.lava-test:
extends:
- .ci-run-policy
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
DEQP_PARALLEL: 6 # should be replaced by per-machine definitions
DEQP_VER: gles2
# proxy used to cache data locally
FDO_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
# base system generated by the container build job, shared between many pipelines
BASE_SYSTEM_HOST_PREFIX: "${MINIO_HOST}/mesa-lava"
BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${ARCH}"
BASE_SYSTEM_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}"
# per-job build artifacts
MESA_BUILD_PATH: "${PIPELINE_ARTIFACTS_BASE}/mesa-${ARCH}.tar.gz"
JOB_ROOTFS_OVERLAY_PATH: "${JOB_ARTIFACTS_BASE}/job-rootfs-overlay.tar.gz"
JOB_RESULTS_PATH: "${JOB_ARTIFACTS_BASE}/results.tar.gz"
PIGLIT_NO_WINDOW: 1
VISIBILITY_GROUP: "Collabora+fdo"
script:
- ./artifacts/lava/lava-submit.sh
artifacts:
name: "mesa_${CI_JOB_NAME}"
when: always
paths:
- results/
exclude:
- results/*.shader_cache
after_script:
- wget -q "https://${JOB_RESULTS_PATH}" -O- | tar -xz
.lava-test:armhf:
variables:
ARCH: armhf
KERNEL_IMAGE_NAME: zImage
KERNEL_IMAGE_TYPE: "zimage"
BOOT_METHOD: u-boot
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
extends:
- .use-debian/arm_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_armhf
- .use-debian/x86_build
- .lava-test
- .use-kernel+rootfs-arm
needs:
- kernel+rootfs_armhf
- debian/x86_build
- debian-armhf
.lava-test:arm64:
variables:
ARCH: arm64
KERNEL_IMAGE_NAME: Image
KERNEL_IMAGE_TYPE: "image"
BOOT_METHOD: u-boot
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
extends:
- .use-debian/arm_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_arm64
- .use-debian/x86_build
- .lava-test
- .use-kernel+rootfs-arm
dependencies:
- debian-arm64
needs:
- kernel+rootfs_arm64
- debian/x86_build
- debian-arm64
.lava-test:amd64:
variables:
ARCH: amd64
KERNEL_IMAGE_NAME: bzImage
KERNEL_IMAGE_TYPE: "zimage"
BOOT_METHOD: u-boot
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
extends:
- .use-debian/x86_build-base # for same $MESA_ARTIFACTS_BASE_TAG as in kernel+rootfs_amd64
- .use-debian/x86_build
- .lava-test
- .use-kernel+rootfs-amd64
needs:
- kernel+rootfs_amd64
- debian-testing
.lava-traces-base:
variables:
HWCI_TEST_SCRIPT: "/install/piglit/run.sh"
artifacts:
reports:
junit: results/junit.xml
.lava-piglit:
variables:
PIGLIT_REPLAY_DEVICE_NAME: "gl-${GPU_VERSION}"
PIGLIT_RESULTS: "${GPU_VERSION}-${PIGLIT_PROFILES}"
HWCI_TEST_SCRIPT: "/install/piglit/piglit-runner.sh"
.lava-piglit-traces:amd64:
extends:
- .lava-test:amd64
- .lava-piglit
- .lava-traces-base
.lava-piglit-traces:armhf:
extends:
- .lava-test:armhf
- .lava-piglit
- .lava-traces-base
.lava-piglit-traces:arm64:
extends:
- .lava-test:arm64
- .lava-piglit
- .lava-traces-base
.lava-piglit:amd64:
extends:
- .lava-test:amd64
- .lava-piglit

View File

@@ -22,8 +22,7 @@ cp artifacts/ci-common/init-*.sh results/job-rootfs-overlay/
artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
ci-fairy minio login "${CI_JOB_JWT}"
ci-fairy minio cp job-rootfs-overlay.tar.gz "minio://${JOB_ROOTFS_OVERLAY_PATH}"
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
touch results/lava.log
tail -f results/lava.log &
@@ -34,11 +33,11 @@ artifacts/lava/lava_job_submitter.py \
--mesa-build-url "${FDO_HTTP_CACHE_URI:-}https://${MESA_BUILD_PATH}" \
--job-rootfs-overlay-url "${FDO_HTTP_CACHE_URI:-}https://${JOB_ROOTFS_OVERLAY_PATH}" \
--job-artifacts-base ${JOB_ARTIFACTS_BASE} \
--job-timeout ${JOB_TIMEOUT:-30} \
--first-stage-init artifacts/ci-common/init-stage1.sh \
--ci-project-dir ${CI_PROJECT_DIR} \
--device-type ${DEVICE_TYPE} \
--dtb ${DTB} \
--jwt "${CI_JOB_JWT}" \
--kernel-image-name ${KERNEL_IMAGE_NAME} \
--kernel-image-type "${KERNEL_IMAGE_TYPE}" \
--boot-method ${BOOT_METHOD} \

View File

@@ -71,7 +71,7 @@ def generate_lava_yaml(args):
},
'timeouts': {
'job': {
'minutes': 30
'minutes': args.job_timeout
}
},
}
@@ -111,7 +111,7 @@ def generate_lava_yaml(args):
# skeleton test definition: only declaring each job as a single 'test'
# since LAVA's test parsing is not useful to us
test = {
'timeout': { 'minutes': 30 },
'timeout': { 'minutes': args.job_timeout },
'failure_retry': 1,
'definitions': [ {
'name': 'mesa',
@@ -146,9 +146,6 @@ def generate_lava_yaml(args):
'mkdir -p {}'.format(args.ci_project_dir),
'wget -S --progress=dot:giga -O- {} | tar -xz -C {}'.format(args.mesa_build_url, args.ci_project_dir),
'wget -S --progress=dot:giga -O- {} | tar -xz -C /'.format(args.job_rootfs_overlay_url),
'set +x',
'export CI_JOB_JWT="{}"'.format(args.jwt),
'set -x',
'exec /init-stage2.sh',
]
test['definitions'][0]['repository']['run']['steps'] = init_lines
@@ -286,7 +283,6 @@ def main(args):
if args.dump_yaml:
censored_args = args
censored_args.jwt = "jwt-hidden"
print(generate_lava_yaml(censored_args))
if args.validate_only:
@@ -332,6 +328,7 @@ if __name__ == '__main__':
parser.add_argument("--mesa-build-url")
parser.add_argument("--job-rootfs-overlay-url")
parser.add_argument("--job-artifacts-base")
parser.add_argument("--job-timeout", type=int)
parser.add_argument("--first-stage-init")
parser.add_argument("--ci-project-dir")
parser.add_argument("--device-type")
@@ -340,7 +337,6 @@ if __name__ == '__main__':
parser.add_argument("--kernel-image-type", nargs='?', default="")
parser.add_argument("--boot-method")
parser.add_argument("--lava-tags", nargs='?', default="")
parser.add_argument("--jwt")
parser.add_argument("--validate-only", action='store_true')
parser.add_argument("--dump-yaml", action='store_true')
parser.add_argument("--visibility-group")

View File

@@ -0,0 +1,83 @@
diff --git a/framework/replay/download_utils.py b/framework/replay/download_utils.py
index bc0225c6c..c9c6b5096 100644
--- a/framework/replay/download_utils.py
+++ b/framework/replay/download_utils.py
@@ -1,6 +1,6 @@
# coding=utf-8
#
-# Copyright (c) 2020 Collabora Ltd
+# Copyright © 2020, 2022 Collabora Ltd
# Copyright © 2020 Valve Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -33,11 +33,11 @@ from os import path
from time import time
from email.utils import formatdate
from requests.utils import requote_uri
+from urllib.parse import urlparse
from framework import core, exceptions
from framework.replay.options import OPTIONS
-
__all__ = ['ensure_file']
minio_credentials = None
@@ -87,7 +87,6 @@ def get_minio_credentials(url):
def get_authorization_headers(url, resource):
minio_key, minio_secret, minio_token = get_minio_credentials(url)
- content_type = 'application/octet-stream'
date = formatdate(timeval=None, localtime=False, usegmt=True)
to_sign = "GET\n\n\n%s\nx-amz-security-token:%s\n/%s/%s" % (date,
minio_token,
@@ -101,6 +100,16 @@ def get_authorization_headers(url, resource):
'x-amz-security-token': minio_token}
return headers
+def get_jwt_authorization_headers(url, resource):
+ date = formatdate(timeval=None, localtime=False, usegmt=True)
+ jwt = OPTIONS.download['jwt']
+ host = urlparse(url).netloc
+
+ headers = {'Host': host,
+ 'Date': date,
+ 'Authorization': 'Bearer %s' % (jwt)}
+ return headers
+
def ensure_file(file_path):
destination_file_path = path.join(OPTIONS.db_path, file_path)
if OPTIONS.download['url'] is None:
@@ -123,7 +132,9 @@ def ensure_file(file_path):
assert OPTIONS.download['minio_bucket']
assert OPTIONS.download['role_session_name']
assert OPTIONS.download['jwt']
- headers = get_authorization_headers(url, file_path)
+ headers = get_minio_authorization_headers(url, file_path)
+ elif OPTIONS.download['jwt']:
+ headers = get_jwt_authorization_headers(url, file_path)
else:
headers = None
diff --git a/unittests/framework/replay/test_download_utils.py b/unittests/framework/replay/test_download_utils.py
index 0f1102722..abd438c20 100644
--- a/unittests/framework/replay/test_download_utils.py
+++ b/unittests/framework/replay/test_download_utils.py
@@ -141,3 +141,17 @@ class TestDownloadUtils(object):
get_request = requests_mock.request_history[1]
assert(get_request.method == 'GET')
assert(requests_mock.request_history[1].headers['Authorization'].startswith('AWS Key'))
+
+ def test_jwt_authorization(self, requests_mock):
+ """download_utils.ensure_file: Check we send the authentication headers to the server"""
+ # reset minio_host from previous tests
+ OPTIONS.download['minio_host'] = ''
+ OPTIONS.download['jwt'] = 'jwt'
+
+ assert not self.trace_file.check()
+ download_utils.ensure_file(self.trace_path)
+ TestDownloadUtils.check_same_file(self.trace_file, "remote")
+
+ get_request = requests_mock.request_history[0]
+ assert(get_request.method == 'GET')
+ assert(requests_mock.request_history[0].headers['Authorization'].startswith('Bearer'))

View File

@@ -1,6 +0,0 @@
# WGL is Windows-only
wgl@.*
# These are sensitive to CPU timing, and would need to be run in isolation
# on the system rather than in parallel with other tests.
glx@glx_arb_sync_control@timing.*

View File

@@ -3,7 +3,7 @@
set -ex
if [ -z "$GPU_VERSION" ]; then
echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in your ci/piglit-gpu-version-*.txt)'
echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in your ci/gpu-version-*.txt)'
exit 1
fi
@@ -28,59 +28,45 @@ if [ -n "$CI_NODE_INDEX" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction-start ${CI_NODE_INDEX}"
fi
if [ -e "$INSTALL/piglit-$GPU_VERSION-fails.txt" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --baseline $INSTALL/piglit-$GPU_VERSION-fails.txt"
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
touch $INSTALL/piglit-$GPU_VERSION-flakes.txt
touch $INSTALL/$GPU_VERSION-flakes.txt
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/piglit-$VK_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/piglit-$VK_DRIVER-skips.txt"
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/$VK_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$VK_DRIVER-skips.txt"
fi
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/piglit-$GALLIUM_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/piglit-$GALLIUM_DRIVER-skips.txt"
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GALLIUM_DRIVER-skips.txt"
fi
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/piglit-$DRIVER_NAME-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/piglit-$DRIVER_NAME-skips.txt"
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$DRIVER_NAME-skips.txt"
fi
if [ -e "$INSTALL/piglit-$GPU_VERSION-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/piglit-$GPU_VERSION-skips.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
fi
set +e
if [ -n "$PIGLIT_PARALLEL" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --jobs $PIGLIT_PARALLEL"
elif [ -n "$FDO_CI_CONCURRENT" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --jobs $FDO_CI_CONCURRENT"
else
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --jobs 4"
fi
RESULTS_CSV=$RESULTS/results.csv
FAILURES_CSV=$RESULTS/failures.csv
export LD_PRELOAD=$TEST_LD_PRELOAD
piglit-runner \
run \
--piglit-folder /piglit \
--output $RESULTS \
--skips $INSTALL/piglit/piglit-all-skips.txt $PIGLIT_SKIPS \
--flakes $INSTALL/piglit-$GPU_VERSION-flakes.txt \
--profile $PIGLIT_PROFILES \
--process-isolation \
$PIGLIT_RUNNER_OPTIONS \
-v -v
piglit-runner \
run \
--piglit-folder /piglit \
--output $RESULTS \
--jobs ${FDO_CI_CONCURRENT:-4} \
--skips $INSTALL/all-skips.txt $PIGLIT_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--profile $PIGLIT_PROFILES \
--process-isolation \
$PIGLIT_RUNNER_OPTIONS \
-v -v
PIGLIT_EXITCODE=$?
export LD_PRELOAD=
deqp-runner junit \
--testsuite $PIGLIT_PROFILES \
--results $RESULTS/failures.csv \
@@ -93,8 +79,8 @@ if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS_CSV \
--known-flakes $INSTALL/piglit-$GPU_VERSION-flakes.txt \
--results $RESULTS/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
--job "$CI_JOB_ID" \

View File

@@ -3,7 +3,7 @@
set -ex
INSTALL=$(realpath -s "$PWD"/install)
MINIO_ARGS="--credentials=/tmp/.minio_credentials"
MINIO_ARGS="--credentials=/tmp/.minio_credentials --token-file=${CI_JOB_JWT_FILE}"
RESULTS=$(realpath -s "$PWD"/results)
mkdir -p "$RESULTS"
@@ -162,8 +162,8 @@ replay_minio_upload_images() {
__DESTINATION_FILE_PATH="$__MINIO_TRACES_PREFIX/${line##*-}"
fi
ci-fairy minio cp $MINIO_ARGS "$RESULTS/$__PREFIX/$line" \
"minio://${__MINIO_PATH}/${__DESTINATION_FILE_PATH}"
ci-fairy s3cp $MINIO_ARGS "$RESULTS/$__PREFIX/$line" \
"https://${__MINIO_PATH}/${__DESTINATION_FILE_PATH}"
done
}
@@ -200,11 +200,6 @@ fi
FAILURE_MESSAGE=$(printf "%s" "Unexpected change in results:")
if [ "x$PIGLIT_PROFILES" = "xreplay" ] \
&& [ ${PIGLIT_REPLAY_UPLOAD_TO_MINIO:-0} -eq 1 ]; then
ci-fairy minio login $MINIO_ARGS $CI_JOB_JWT
fi
eval $RUN_CMD
if [ $? -ne 0 ]; then

View File

@@ -31,12 +31,11 @@ cp -Rp .gitlab-ci/piglit install/
cp -Rp .gitlab-ci/fossils.yml install/
cp -Rp .gitlab-ci/fossils install/
cp -Rp .gitlab-ci/fossilize-runner.sh install/
cp -Rp .gitlab-ci/deqp-runner.sh install/
cp -Rp .gitlab-ci/crosvm-runner.sh install/
cp -Rp .gitlab-ci/crosvm-init.sh install/
cp -Rp .gitlab-ci/deqp-*.txt install/
cp -Rp .gitlab-ci/*.txt install/
cp -Rp .gitlab-ci/report-flakes.py install/
cp -Rp .gitlab-ci/vkd3d-proton install/
cp -Rp .gitlab-ci/*-runner.sh install/
find . -path \*/ci/\*.txt \
-o -path \*/ci/\*.toml \
-o -path \*/ci/\*traces\*.yml \
@@ -53,6 +52,5 @@ if [ -n "$MINIO_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz"
gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME}
ci-fairy minio login $CI_JOB_JWT
ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${MINIO_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
fi

View File

@@ -398,6 +398,25 @@
when: on_success
- when: never
.radeonsi-vaapi-rules:
stage: amd
rules:
- *ignore_scheduled_pipelines
- changes:
*mesa_core_file_list
when: on_success
- changes:
*gallium_core_file_list
when: on_success
- changes:
*radeonsi_file_list
when: on_success
- changes: &radeon_vcn_file_list
- src/gallium/frontends/va/**/*
- src/gallium/drivers/radeon/**/*
when: on_success
- when: never
.i915g-rules:
stage: intel
rules:

46298
.pick_status.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
21.3.0-devel
21.3.9

View File

@@ -88,11 +88,12 @@ MESON_GEN_NINJA := \
-Ddri-search-path=/vendor/$(MESA3D_LIB_DIR)/dri \
-Dplatforms=android \
-Dplatform-sdk-version=$(PLATFORM_SDK_VERSION) \
-Ddri-drivers= \
-Ddri-drivers=$(subst $(space),$(comma),$(BOARD_MESA3D_CLASSIC_DRIVERS)) \
-Dgallium-drivers=$(subst $(space),$(comma),$(BOARD_MESA3D_GALLIUM_DRIVERS)) \
-Dvulkan-drivers=$(subst $(space),$(comma),$(subst radeon,amd,$(BOARD_MESA3D_VULKAN_DRIVERS))) \
-Dgbm=enabled \
-Degl=enabled \
-Dcpp_rtti=false \
MESON_BUILD := PATH=/usr/bin:/bin:/sbin:$$PATH ninja -C $(MESON_OUT_DIR)/build
@@ -128,7 +129,6 @@ $(MESON_GEN_FILES_TARGET): PRIVATE_C_INCLUDES := $(my_c_includes)
$(MESON_GEN_FILES_TARGET): PRIVATE_IMPORTED_INCLUDES := $(imported_includes)
$(MESON_GEN_FILES_TARGET): PRIVATE_LDFLAGS := $(my_ldflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_LDLIBS := $(my_ldlibs)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TIDY_CHECKS := $(my_tidy_checks)
$(MESON_GEN_FILES_TARGET): PRIVATE_TIDY_FLAGS := $(my_tidy_flags)
$(MESON_GEN_FILES_TARGET): PRIVATE_ARFLAGS := $(my_arflags)
@@ -139,6 +139,11 @@ $(MESON_GEN_FILES_TARGET): PRIVATE_ALL_OBJECTS := $(strip $(all_objects))
$(MESON_GEN_FILES_TARGET): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_LIBCRT_BUILTINS := $(my_target_libcrt_builtins)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_LIBATOMIC := $(my_target_libatomic)
$(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_CRTBEGIN_SO_O := $(my_target_crtbegin_so_o)
@@ -284,13 +289,17 @@ endef
$(foreach driver,$(BOARD_MESA3D_VULKAN_DRIVERS), $(eval $(call vulkan_target,$(driver))))
$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.symlinks.timestamp: MESA3D_GALLIUM_DRI_DIR:=$(MESA3D_GALLIUM_DRI_DIR)
$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.symlinks.timestamp: $(MESON_OUT_DIR)/install/.install.timestamp
# Create Symlinks
$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.targets.timestamp: MESA3D_GALLIUM_DRI_DIR:=$(MESA3D_GALLIUM_DRI_DIR)
$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.targets.timestamp: $(MESON_OUT_DIR)/install/.install.timestamp
mkdir -p $(dir $@)
# Create Symlinks for gallium and kmsro drivers
ls -1 $(MESA3D_GALLIUM_DRI_DIR)/ | PATH=/usr/bin:$$PATH xargs -I{} ln -s -f libgallium_dri.so $(dir $@)/{}
# Remove unwanted Symlinks created for classic dri drivers
$(foreach d,$(BOARD_MESA3D_CLASSIC_DRIVERS), rm $(dir $@)/$(d)_dri.so;)
# Copy classic dri drivers
$(foreach d,$(BOARD_MESA3D_CLASSIC_DRIVERS), cp $(MESA3D_GALLIUM_DRI_DIR)/$(d)_dri.so $(dir $@)/$(d)_dri.so;)
touch $@
$($(M_TARGET_PREFIX)MESA3D_GALLIUM_DRI_BIN): $(TARGET_OUT_VENDOR)/$(MESA3D_LIB_DIR)/dri/.symlinks.timestamp
$($(M_TARGET_PREFIX)MESA3D_GALLIUM_DRI_BIN): $(TARGET_OUT_VENDOR)/$(MESA3D_LIB_DIR)/dri/.targets.timestamp
echo "Build $@"
touch $@

View File

@@ -153,12 +153,12 @@ Enable the site and restart nginx:
sudo service nginx restart
# First download will hit the internet
wget http://localhost/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
# Second download should be cached.
wget http://localhost/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
Now, set ``download-url`` in your ``traces-*.yml`` entry to something like
``http://10.42.0.1:8888/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public``
``http://10.42.0.1:8888/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public``
and you should have cached downloads for traces. Add it to
``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you
can use it for cached artifact downloads instead of going all the way to

View File

@@ -74,7 +74,7 @@ release = 'latest'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.

View File

@@ -129,11 +129,17 @@ supported:
OpenGL 4.1
^^^^^^^^^^
For OpenGL 4.1 support, the following additional ``VkPhysicalDeviceLimits``
are required:
For OpenGL 4.1 support, the following additional requirements needs to be
supported:
* ``maxImageDimension2D`` ≥ 16384
* ``maxViewports`` ≥ 16
* ``VkPhysicalDeviceFeatures``:
* ``multiViewport``
* ``VkPhysicalDeviceLimits``
* ``maxImageDimension2D`` ≥ 16384
* ``maxViewports`` ≥ 16
OpenGL 4.2
^^^^^^^^^^
@@ -177,7 +183,6 @@ supported:
* ``VkPhysicalDeviceFeatures``:
* ``robustBufferAccess``
* ``multiViewport``
* Formats requiring ``VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT``:

View File

@@ -331,7 +331,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_texture_norm16 DONE (freedreno, i965, r600, radeonsi, nvc0i, softpipe, zink)
GL_EXT_texture_sRGB_R8 DONE (all drivers that support GLES 3.0+)
GL_KHR_blend_equation_advanced_coherent DONE (i965/gen9+, panfrost)
GL_KHR_texture_compression_astc_hdr DONE (i965/bxt, panfrost)
GL_KHR_texture_compression_astc_hdr DONE (core only)
GL_KHR_texture_compression_astc_sliced_3d DONE (i965/gen9+, r600, radeonsi, panfrost, softpipe, swr, zink, lima)
GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+)
GL_OES_EGL_image DONE (all drivers)

View File

@@ -1,9 +1,3 @@
21.2,2021-10-13,21.2.4,Dylan Baker,
,2021-10-27,21.2.5,Dylan Baker,
,2021-11-10,21.2.6,Dylan Baker,
,2021-11-24,21.2.7,Dylan Baker,
,2021-12-08,21.2.8,Dylan Baker,Last planned 21.2.x release.
21.3,2021-10-13,21.3.0-rc1,Eric Engestrom,
,2021-10-20,21.3.0-rc2,Eric Engestrom,
,2021-10-27,21.3.0-rc3,Eric Engestrom,
,2021-11-03,21.3.0-rc4,Eric Engestrom,
22.0,2022-03-23,22.0.1,Dylan Baker
,2022-04-06,22.0.2,Dylan Baker
,2022-04-20,22.0.3,Dylan Baker,This is the last planned release of the 22.0.x series.
1 21.2 22.0,2022-03-23,22.0.1,Dylan Baker 2021-10-13 21.2.4 Dylan Baker
2 ,2022-04-06,22.0.2,Dylan Baker 2021-10-27 21.2.5 Dylan Baker
3 ,2022-04-20,22.0.3,Dylan Baker,This is the last planned release of the 22.0.x series. 2021-11-10 21.2.6 Dylan Baker
2021-11-24 21.2.7 Dylan Baker
2021-12-08 21.2.8 Dylan Baker Last planned 21.2.x release.
21.3 2021-10-13 21.3.0-rc1 Eric Engestrom
2021-10-20 21.3.0-rc2 Eric Engestrom
2021-10-27 21.3.0-rc3 Eric Engestrom
2021-11-03 21.3.0-rc4 Eric Engestrom

View File

@@ -3,6 +3,27 @@ Release Notes
The release notes summarize what's new or changed in each Mesa release.
- :doc:`21.3.9 release notes <relnotes/21.3.9>`
- :doc:`22.0.5 release notes <relnotes/22.0.5>`
- :doc:`22.1.1 release notes <relnotes/22.1.1>`
- :doc:`22.0.4 release notes <relnotes/22.0.4>`
- :doc:`22.1.0 release notes <relnotes/22.1.0>`
- :doc:`22.0.3 release notes <relnotes/22.0.3>`
- :doc:`22.0.2 release notes <relnotes/22.0.2>`
- :doc:`22.0.1 release notes <relnotes/22.0.1>`
- :doc:`21.3.8 release notes <relnotes/21.3.8>`
- :doc:`22.0.0 release notes <relnotes/22.0.0>`
- :doc:`21.3.7 release notes <relnotes/21.3.7>`
- :doc:`21.3.6 release notes <relnotes/21.3.6>`
- :doc:`21.3.5 release notes <relnotes/21.3.5>`
- :doc:`21.3.4 release notes <relnotes/21.3.4>`
- :doc:`21.3.3 release notes <relnotes/21.3.3>`
- :doc:`21.3.2 release notes <relnotes/21.3.2>`
- :doc:`21.3.1 release notes <relnotes/21.3.1>`
- :doc:`21.2.6 release notes <relnotes/21.2.6>`
- :doc:`21.3.0 release notes <relnotes/21.3.0>`
- :doc:`21.2.5 release notes <relnotes/21.2.5>`
- :doc:`21.2.4 release notes <relnotes/21.2.4>`
- :doc:`21.2.3 release notes <relnotes/21.2.3>`
- :doc:`21.2.2 release notes <relnotes/21.2.2>`
- :doc:`21.1.8 release notes <relnotes/21.1.8>`
@@ -345,6 +366,27 @@ release notes, or in the `old docs`_.
:maxdepth: 1
:hidden:
relnotes/21.3.9
relnotes/22.0.5
relnotes/22.1.1
relnotes/22.0.4
relnotes/22.1.0
relnotes/22.0.3
relnotes/22.0.2
relnotes/22.0.1
relnotes/21.3.8
relnotes/22.0.0
relnotes/21.3.7
relnotes/21.3.6
relnotes/21.3.5
relnotes/21.3.4
relnotes/21.3.3
relnotes/21.3.2
relnotes/21.3.1
relnotes/21.2.6
relnotes/21.3.0
relnotes/21.2.5
relnotes/21.2.4
relnotes/21.2.3
relnotes/21.2.2
relnotes/21.1.8

147
docs/relnotes/21.2.4.rst Normal file
View File

@@ -0,0 +1,147 @@
Mesa 21.2.4 Release Notes / 2021-10-14
======================================
Mesa 21.2.4 is a bug fix release which fixes bugs found since the 21.2.3 release.
Mesa 21.2.4 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.2.4 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- RADV: Rendering issues in Resident Evil 2 with NGGC
- crocus: Incorrect stride when used through prime
- anv: descriptorBindingUniformBufferUpdateAfterBind feature is not supported
Changes
-------
Alyssa Rosenzweig (3):
- panfrost: Move special_varying to compiler definitions
- panfrost: Fix off-by-one in varying count assert
- panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER
Bas Nieuwenhuizen (2):
- amd/common: Add fallback for misreported clocks for RGP.
- radv: Handle copying zero queries.
Chia-I Wu (1):
- radv: plug leaks in radv_device_init_accel_struct_build_state
Connor Abbott (1):
- ir3: Use source in ir3_output_conv_src_type()
Dave Airlie (7):
- crocus/query: don't loop on ready status after gpu hang.
- device_select: close dri3 fd after using it.
- crocus: Honor scanout requirement from DRI
- crocus/gen5: reemit shaders on gen5 after new program cache bo.
- crocus/gen5: add dirty flags for urb fences.
- crocus/gen6: don't reemit the svbi when debugging
- gallivm/format: clamp SINT conversion rather than truncate.
Dylan Baker (7):
- docs" Add SHA256 sum for mesa 21.2.3
- .pick_status.json: Update to fb8f532ea1bbd9c959e0f59c652347e435a71f91
- .pick_status.json: Update to d2543658ef6fe0ad59af217a09a931d3b6174a43
- .pick_status.json: Update to 729991e09cd28550001ae63710ab929d95b115bc
- .pick_status.json: Update to 3a18963b0876af2aa0d60dd9917e69d409ce4d6e
- .pick_status.json: Update to ced950e42f4a95ef410e63c2d26a2119e0c3c40b
- .pick_status.json: Update to 783f8f728ce8e77885adbc7b2c12c39c3e3e5198
Emma Anholt (2):
- gallium/dri: Make YUV formats we're going to emulate external-only.
- i915g: Check for the scanout-layout conditions before setting level info.
Filip Gawin (1):
- r300: implement forgotten tgsi's cases of textures
Gert Wollny (1):
- mesa: signal driver when buffer is bound to different texture format
Icecream95 (1):
- pan/mdg: Use the correct swizzle for condition moves
Jason Ekstrand (1):
- vulkan/shader_module: Fix the lifetime of temporary shader modules
Kai Wasserbäch (2):
- gallivm: add new wrapper around Module::setOverrideStackAlignment()
- gallivm: fix FTBFS on i386 with LLVM >= 13, StackAlignmentOverride is gone
Lionel Landwerlin (3):
- anv: enable UBO indexing
- anv: add missing transition handling bits
- spirv: deal with null pointers
Marek Olšák (2):
- radeonsi: add back a workaround for DCC MSAA on gfx9 due to conformance issues
- ac/surface: don't overwrite DCC settings for imported buffers
Pavel Asyutchenko (1):
- llvmpipe: fix crash when doing FB fetch + gl_FragDepth write in one shader
Qiang Yu (1):
- loader/dri3: fix swap out of order when changing swap interval
Rob Clark (1):
- freedreno/drm: Move pipe unref after fence removal
Samuel Pitoiset (2):
- radv: fix adjusting the frag coord when RADV_FORCE_VRS is enabled
- aco: fix load_barycentric_at_{offset,sample}
Timur Kristóf (3):
- aco: Fix small primitive precision.
- aco: Fix determining whether any culling is enabled.
- ac/nir/cull: Accept NaN and +/- Inf in face culling.
Vasily Khoruzhick (1):
- lima: split_load_input: don't split unaligned vec2
Vinson Lee (1):
- pps: Avoid duplicate elements in with_datasources array.

138
docs/relnotes/21.2.5.rst Normal file
View File

@@ -0,0 +1,138 @@
Mesa 21.2.5 Release Notes / 2021-10-28
======================================
Mesa 21.2.5 is a bug fix release which fixes bugs found since the 21.2.4 release.
Mesa 21.2.5 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.2.5 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- RADV: Resident Evil Village needs invariantgeom when NGG culling is enabled
- [radeonsi] Euro Truck Simulator 2: broken mimimap
- [regression][bisected] Launching Valheim OpenGL game leads to GPU Hang
- Android Meson build regression: hardware/system information apps crash on Raspberry Pi 4
- anv: dEQP-VK.graphicsfuzz.cov-multiple-one-iteration-loops-global-counter-write-matrices fails
Changes
-------
Alyssa Rosenzweig (4):
- panfrost: Detect implementations support AFBC
- panfrost,panvk: Use dev->has_afbc instead of quirks
- panfrost: Fix gl_FragColor lowering
- panfrost: Add internal afbc_formats
Boris Brezillon (3):
- vulkan: Fix weak symbol emulation when compiling with MSVC
- vulkan: Set unused entrypoints to vk_entrypoint_stub when compiling with MSVC
- vulkan: Fix entrypoint generation when compiling for x86 with MSVC
Daniel Schürmann (1):
- driconf: set vk_x11_strict_image_count for Wolfenstein: Youngblood
Dylan Baker (7):
- docs: add sha256 sum for 21.2.4 release
- .pick_status.json: Update to 1c0eb7aa78bac4494dbff0c502a8c09e23a4c123
- .pick_status.json: Update to d43f89f17a8259c842016fa559fa33c1c6279105
- .pick_status.json: Update to be6d584de43966ee58bf1fcac156ebf8040081d1
- .pick_status.json: Update to 39f25945311e1385a54ddd17f71f9f6023d97256
- .pick_status.json: Update to dc74285d32df9c09eb896bc4571066402d32d10b
- .pick_status.json: Update to 16f838576cf29e26f1af198ac93a0fb3a3cfad8f
Emma Anholt (1):
- radeonsi: Fix leak of screen->perfcounters.
Ian Romanick (1):
- nir/loop_unroll: Always unroll loops that iterate at most once
Jan Beich (1):
- meson: disable -Werror=thread-safety on FreeBSD
Jason Ekstrand (2):
- i965: Emit a NULL surface for buffer textures with no buffer
- nir/algebraic: Lower fisfinite
Karol Herbst (1):
- spirv: Don't add 0.5 to array indicies for OpImageSampleExplicitLod
Lionel Landwerlin (2):
- isl: only bump the min row pitch for display when not specified
- anv: fix push constant lowering with bindless shaders
Maniraj D (1):
- egl: set TSD as NULL after deinit
Marcin Ślusarz (2):
- iris: fix scratch address patching for TESS_EVAL stage
- intel: fix INTEL_DEBUG environment variable on 32-bit systems
Marek Olšák (2):
- mesa: fix crashes in the no_error path of glUniform
- st/mesa: don't crash when draw indirect buffer has no storage
Mike Blumenkrantz (6):
- aux/pb: add a tolerance for reclaim failure
- aux/pb: more correctly check number of reclaims
- zink: fully zero surface creation struct
- zink: don't break early when applying fb clears
- zink: fix gl_SampleMaskIn spirv generation
- nir/lower_samplers_as_deref: rewrite more image intrinsics
Mykhailo Skorokhodov (1):
- iris: Add missed tile flush flag
Nanley Chery (1):
- iris: Tile cache flush for depth before fast clear
Pierre-Eric Pelloux-Prayer (1):
- radeonsi: use viewport offset in quant_mode determination
Tapani Pälli (1):
- anv: use vk_object_zalloc for wsi fences created
Timur Kristóf (1):
- drirc: Apply radv_invariant_geom workaround to Resident Evil Village.

161
docs/relnotes/21.2.6.rst Normal file
View File

@@ -0,0 +1,161 @@
Mesa 21.2.6 Release Notes / 2021-11-24
======================================
Mesa 21.2.6 is a bug fix release which fixes bugs found since the 21.2.5 release.
Mesa 21.2.6 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.2.6 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- NIR validation failed after nir_copy_prop
- lima: Corrupted Android-12 UI on Allwinner A64
- RADV/ACO: Rendering glitches in Forza Horizon 5 windshields
- dEQP-GLES31.*imulextended* compiling fp64 glsl 4.00 shader
- Regression/Bisected: Crash in Godot games when steam overlay enabled
- RADV: IsHelperInvocationEXT query is not considered volatile in ACO
- Final Fantasy V (Old version): Random text characters are not displayed
- Diagonal rendering artifacts in Tomb Raider
- [hsw][bisected][regression] dEQP-VK.reconvergence.*nesting* failures
Changes
-------
Connor Abbott (2):
- ir3/lower_pcopy: Fix shr.b illegal copy lowering
- ir3/lower_pcopy: Fix bug with "illegal" copies and swaps
Danylo Piliaiev (1):
- ir3/ra: Check register file upper bound when updating preferred_reg
Dave Airlie (2):
- llvmpipe: disable 64-bit integer textures.
- llvmpipe: fix compressed image sizes.
Dylan Baker (9):
- docs: add sha256 sums for 21.2.5
- .pick_status.json: Update to 8bfa146b8056d5dded6fdd2c4d8524aa0c438058
- .pick_status.json: Update to 79f57f68930ce4fcf59bdca82357e19b4f3d62e6
- .pick_status.json: Update to c356f3cfce9459dc1341b6a2a0fd5336a9bdcc3c
- .pick_status.json: Mark a large number of zink patches as denominated
- .pick_status.json: Update to 78b613db23c10dc257247d99d8b2b1ef6c96bebb
- .pick_status.json: Update to 09bb4dbe60b1bb233c5c0102446ffbc142a29246
- .pick_status.json: Update to e0de7aa4d7717bbd79bbc5bfc660f941f680402b
- .pick_status.json: Update to f8009d3db25512b5dc62d0272c979fb79f8c7075
Eric Engestrom (1):
- meson: drop duplicate addition of surfaceless & drm to the list of platforms
Greg V (1):
- util: make util_get_process_exec_path work on FreeBSD w/o procfs
Ian Romanick (1):
- glsl/nir: Don't build soft float64 when it cannot be used
Jason Ekstrand (1):
- anv: Fix FlushMappedMemoryRanges for odd mmap offsets
Jesse Natalie (2):
- util/hash_table: Clear special 0/1 entries for u64 hash table too
- d3d12: Fix Linux fence wait return value
Kenneth Graunke (1):
- iris: Fix MOCS for buffer copies
Lionel Landwerlin (6):
- intel/dev: fix HSW GT3 number of subslices in slice1
- intel/dev: don't forget to set max_eu_per_subslice in generated topology
- intel/perf: fix perf equation subslice mask generation for gfx12+
- intel/devinfo: fix wrong offset computation
- intel: remove 2 preproduction pci-id for ADLS
- intel/fs: fix shader call lowering pass
Liviu Prodea (1):
- aco: Work around MSVC restrict in c99_compat.h
Marek Olšák (4):
- radeonsi: print the border color error message only once
- radeonsi: fix 2 issues with depth_cleared_level_mask
- radeonsi: fix a typo preventing a fast depth-stencil clear
- driconf: disallow 10-bit pbuffers for viewperf2020/maya due to X errors
Mike Blumenkrantz (10):
- zink: add better handling for CUBE_COMPATIBLE bit
- zink: always use explicit lod for texture() when legal in non-fragment stages
- zink: be more permissive for injecting LOD into texture() instructions
- zink: inject LOD for sampler version of OpImageQuerySize
- zink: don't clamp cube array surfacess to cubes
- zink: don't clamp 2D_ARRAY surfaces to 2D
- zink: add more int/float types to cast switching in ntv
- zink: force float dest types on some alu results
- aux/primconvert: handle singular incomplete restarts
- zink: clamp PIPE_SHADER_CAP_MAX_INPUTS for xfb
Pierre-Eric Pelloux-Prayer (3):
- radeonsi: treat nir_intrinsic_load_constant as a VMEM operation
- ac/surface: don't validate DCC settings if DCC isn't possible
- mesa: always call _mesa_update_pixel
Rhys Perry (2):
- aco/spill: use spills_entry instead of spills_exit to kill linear VGPRs
- spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl
Roman Stratiienko (1):
- android.mk: Add missing variables to the make target
Thomas H.P. Andersen (1):
- svga: fix bitwise/logical and mixup
Timothy Arceri (1):
- mesa: fix buffer overrun in SavedObj texture obj array
Timur Kristóf (1):
- aco: Fix how p_is_helper interacts with optimizations.
Vadym Shovkoplias (1):
- intel/fs: Fix a cmod prop bug when cmod is set to inst that doesn't support it

4398
docs/relnotes/21.3.0.rst Normal file

File diff suppressed because it is too large Load Diff

132
docs/relnotes/21.3.1.rst Normal file
View File

@@ -0,0 +1,132 @@
Mesa 21.3.1 Release Notes / 2021-12-01
======================================
Mesa 21.3.1 is a bug fix release which fixes bugs found since the 21.3.0 release.
Mesa 21.3.1 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.1 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- GPU Crash in Yuzu 6600xt 5.15
- [spirv-fuzz] lower_trivial_continues_block: Assertion \`!first_instr || instr_is_continue(first_instr)' failed.
- [RADV] Crash in Metro Exodus in Caspain chapter and Sam's Story
- NIR validation failed after nir_copy_prop
- lima: Corrupted Android-12 UI on Allwinner A64
- RADV/ACO: Rendering glitches in Forza Horizon 5 windshields
- dEQP-GLES31.*imulextended* compiling fp64 glsl 4.00 shader
Changes
-------
Connor Abbott (3):
- ir3/ra: Consider reg file size when swapping killed sources
- ir3/lower_pcopy: Fix shr.b illegal copy lowering
- ir3/lower_pcopy: Fix bug with "illegal" copies and swaps
Eric Engestrom (2):
- docs: update sha256sum for 21.3.0
- .pick_status.json: Update to 1ba231fb75be5bffd806cbd09ac285d1f8f15e3d
Erico Nunes (1):
- ci: temporarily disable lima CI
Iago Toral Quiroga (3):
- broadcom/compiler: don't allow RF writes from signals after thrend
- broadcom/compiler: fix scoreboard locking checks
- broadcom/compiler: don't move ldvary earlier if current instruction has ldunif
Ian Romanick (1):
- glsl/nir: Don't build soft float64 when it cannot be used
Iván Briano (1):
- intel/nir: also allow unknown format for getting the size of a storage image
Kenneth Graunke (3):
- iris: Make a helper function for cross-batch dependency flushing
- iris: Check for cross-batch flushing whenever a buffer is newly written.
- iris: Tidy code in iris_use_pinned_bo a bit
Lionel Landwerlin (3):
- anv: don't try to close fd = -1
- intel/fs: fix shader call lowering pass
- util/u_trace: refcount payloads
Mauro Rossi (1):
- android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)
Mike Blumenkrantz (6):
- zink: block suballocator caching for swapchain/dmabuf images
- zink: set suballocator bo size to aligned allocation size
- zink: stop using VK_IMAGE_LAYOUT_PREINITIALIZED for dmabuf
- zink: always set matching resource export type for dmabuf creation
- zink: fix memory availability reporting
- zink: fail context creation more gracefully
Mykhailo Skorokhodov (1):
- nir: Fix read depth for predecessors
Qiang Yu (1):
- glx/dri3: fix glXQueryContext does not return GLX_RENDER_TYPE value
Rhys Perry (4):
- aco/spill: use spills_entry instead of spills_exit to kill linear VGPRs
- spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl
- nir/dce: fix DCE of loops with a halt or return instruction in the pre-header
- aco: don't create DPP instructions with SGPR operands
Roman Stratiienko (1):
- android.mk: Add missing variables to the make target
Samuel Pitoiset (4):
- radv: disable HTILE for D32S8 format and mipmaps on GFX10
- radv: fix emitting VBO when vertex input dynamic state is used
- radv: add a workaround to fix a segfault with Metro Exodus (Linux native)
- radv: fix resetting the entire vertex input dynamic state
Thomas H.P. Andersen (1):
- svga: fix bitwise/logical and mixup
Vasily Khoruzhick (1):
- lima: disasm: use last argument as a filename

126
docs/relnotes/21.3.2.rst Normal file
View File

@@ -0,0 +1,126 @@
Mesa 21.3.2 Release Notes / 2021-12-17
======================================
Mesa 21.3.2 is a bug fix release which fixes bugs found since the 21.3.1 release.
Mesa 21.3.2 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.2 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- Flickering and blackscreen on Mpv and Clapper (and also low performance on glxgears)
- DXVK SIGBUS with Turnip on Poco F1 at loading to open world.
- RADV: IsHelperInvocationEXT query is not considered volatile in ACO
- [GraphicsFuzz] dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional
- [bisected] Mesa 21.3.x breaks GBM with NVIDIA closed source driver 495.44
- [DG2] dEQP-GL[45|ES31].functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute fail
Changes
-------
Alyssa Rosenzweig (1):
- panfrost: Don't shadow Mesa's fui()
Caio Oliveira (1):
- nir: Initialize nir_register::divergent
Danylo Piliaiev (1):
- turnip: Fix operator precedence in address calculation macros for queries
Dave Airlie (1):
- crocus: cleanup bo exports for external objects
Eric Engestrom (1):
- .pick_status.json: Update to a65285f54be6d756a8a558f638c18bb4f075222c
Francisco Jerez (1):
- intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.
Ian Romanick (2):
- intel/compiler: Don't predicate a WHILE if there is a CONT
- intel/stub: Silence "initialized field overwritten" warning
Jakob Bornecrantz (1):
- vulkan-device-select: Don't leak drmDevicePtr
James Jones (1):
- gbm: Don't pass default usage flags on ABIs < 1
Jason Ekstrand (3):
- crocus: wm_prog_key::key_alpha_test uses GL enums
- anv: Stop doing too much per-sample shading
- radeonsi/nir: Check for VARYING_SLOT_PRIMITIVE_ID not SYSTEM_VALUE
Lionel Landwerlin (4):
- nir/opt_deref: don't try to cast empty structures
- intel/nir: preserve access value when duping intrinsic
- nir/lower_io: include the variable access in the lowered intrinsic
- vulkan: fix missing handling of WSI memory signal
Mauro Rossi (1):
- android: add support for classic dri-drivers (v2)
Michel Zou (1):
- meson: correctly detect linker arguments
Nanley Chery (1):
- iris: Free the local cache bucket in bufmgr_destroy
Pierre-Eric Pelloux-Prayer (1):
- radeonsi: fix fast clear / depth decompression corruption
Rhys Perry (1):
- radv: have the null winsys set more fields
Roman Stratiienko (2):
- v3dv: Fix dEQP-VK.info#instance_extensions test
- v3dv: Fix V3DV_HAS_SURFACE preprocessor condition
Tapani Pälli (1):
- anv: allow VK_IMAGE_LAYOUT_UNDEFINED as final layout
Timur Kristóf (1):
- aco: Clean up and fix quad group instructions with WQM.

108
docs/relnotes/21.3.3.rst Normal file
View File

@@ -0,0 +1,108 @@
Mesa 21.3.3 Release Notes / 2021-12-29
======================================
Mesa 21.3.3 is a bug fix release which fixes bugs found since the 21.3.2 release.
Mesa 21.3.3 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.3 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- Assassin's Creed Syndicate crashes with Mesa 21.3.0+ ACO
- [21.3 regression] swr: Build failure with MSVC
- anv: dEQP-VK.graphicsfuzz.spv-stable-pillars-volatile-nontemporal-store fails
Changes
-------
Alyssa Rosenzweig (2):
- pan/indirect_draw: Don't upload garbage UBO
- panfrost: Fix Secondary Shader field
Bas Nieuwenhuizen (2):
- radv: Use correct buffer size for query pool result copies.
- radv: Skip wait timeline ioctl with 0 handles.
Daniel Schürmann (2):
- aco/optimizer: fix fneg modifier propagation on VOP3P
- aco/ra: fix get_reg_for_operand() in case of stride mismatches
Emma Anholt (7):
- r300: Fix mis-optimization turning -1 - x into 1 - x.
- r300: Move the instruction filter for r500_transform_IF() to the top.
- r300: Ensure that immediates have matching negate flags too.
- r300: Also consider ALU condition modifiers for loop DCE.
- r300: Disable loop unrolling on r500.
- r300/vs: Allocate temps we see a use as a source, too.
- r300/vs: Fix flow control processing just after an endloop.
Eric Engestrom (2):
- .pick_status.json: Update to 4942e108909bbe0f53ec5fd52a3c7ae14c60abe6
- .pick_status.json: Mark d49d092259829ad9e33d0d9fc8eef9759d9fe56e as denominated
Francisco Jerez (1):
- intel/fs: Add physical fall-through CFG edge for unconditional BREAK instruction.
Jason Ekstrand (1):
- vulkan/log: Don't assert on non-client-visible objects
Jesse Natalie (1):
- microsoft/compiler: Implement inot
Liviu Prodea (1):
- swr: Fix MSVC build
Rob Clark (2):
- freedreno/ir3: Handle instr->address when cloning
- freedreno/computerator: Fix @buf header
Samuel Pitoiset (1):
- radv: re-apply "Do not access set layout during vkCmdBindDescriptorSets."
Tapani Pälli (1):
- glsl: fix invariant qualifer usage and matching rule for GLSL 4.20
Timur Kristóf (2):
- aco/optimizer_postRA: Fix combining DPP into VALU.
- aco/optimizer_postRA: Fix applying VCC to branches.
Vinson Lee (1):
- panfrost: Avoid double unlock.

181
docs/relnotes/21.3.4.rst Normal file
View File

@@ -0,0 +1,181 @@
Mesa 21.3.4 Release Notes / 2022-01-12
======================================
Mesa 21.3.4 is a bug fix release which fixes bugs found since the 21.3.3 release.
Mesa 21.3.4 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.4 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- i965: gen5 exposes EXT_texture_integer incorrectly
- [radeonsi, regression, bisected]: Rendering issues with Factorio
- mesa >= 21.x (with llvmpipe) will break the game JVGS
- Panfrost - RK3399 - FACTORIO - glitches everywhere
- Baldurs Gate 3 (Patch 6) - ribbon-like artifacts on textures
- Game Starsector crashes under certain circumstances with mesa 21.3.+
- FreeSpace models incorrectly rendered on Polaris cards, causing system freeze
- Incomplete evaluation of nested DEFINE macros
- [r300g, bisected] piglit glsl-fs-discard-04 fails
- Panfrost G52 Firefox terrible glitches on youtube playback
Changes
-------
Alyssa Rosenzweig (3):
- pan/bi: Fix load_const of 1-bit booleans
- gallium/util: Add pixel->blocks box helper
- lima,panfrost: Correct pixel vs block mismatches
Bas Nieuwenhuizen (1):
- radv: Set optimal copy alignment to 1.
Boris Brezillon (1):
- microsoft/compiler: Fix dxil_nir_create_bare_samplers()
Connor Abbott (2):
- ir3/ra: Fix logic bug in compress_regs_left
- ir3: Bump type mismatch penalty to 3
Daniel Schürmann (2):
- aco: don't allow SDWA on VOP3P instructions
- aco: validate VOP3P opsel correctly
Danylo Piliaiev (1):
- tu: fix workaround for depth bounds test without depth test
Dave Airlie (2):
- intel/genxml/gen4-5: fix more Raster Operation in BLT to be a uint
- crocus: fail resource allocation properly.
Emma Anholt (4):
- freedreno/afuc: Disable the disassembler on 32-bit builds.
- i915g: Turn off FP16 in the vertex shaders.
- r300: Fix omod failing to increase the number of channels stored.
- nir_to_tgsi: Fix a bug in TXP detection after backend lowering.
Eric Engestrom (3):
- .pick_status.json: Update to 8a78706643ecad8a1f303cc9358873abc29978b4
- .pick_status.json: Mark 00bea38242d97e7ace1954f1bc7d32cbf0ce3ee0 as denominated
- .pick_status.json: Mark 2a0253b9b5d21c7571555abe3a1d851468a18740 as denominated
Filip Gawin (1):
- r300: fix handling swizzle in transform_source_conflicts
Henry Goffin (1):
- intel/compiler/test: Fix build with GCC 7
Ian Romanick (1):
- i965: Disable EXT_texture_integer on Gfx4 and Gfx5
Jason Ekstrand (1):
- Revert "anv: Stop doing too much per-sample shading"
Lionel Landwerlin (3):
- anv: don't leave anv_batch fields undefined
- anv: limit compiler valid color outputs using NIR variables
- intel/dev: fixup chv workaround
Lucas Stach (3):
- etnaviv: initialize vertex attributes on context reset
- etnaviv: drm: fix size limit in etna_cmd_stream_realloc
- etnaviv: drm: properly handle reviving BOs via a lookup
Michel Zou (1):
- zink: fix -Warray-bounds warning
Mike Blumenkrantz (4):
- radv: fix xfb query copy param ordering
- zink: always unset vertex shader variant key data when changing last vertex stage
- zink: add extra synchronization for buffer descriptor binds
- zink: use device-local heap for sparse backing allocations
Pavel Ondračka (1):
- r300: Remove broken optimization in rc_transform_KILL
Pierre-Eric Pelloux-Prayer (4):
- radeonsi/gfx8: use the proper dcc clear size
- vbo/dlist: fix loopback crash
- vbo/dlist: add vertices to incomplete primitives
- radeonsi/gfx10: fix si_texture_get_offset for mipmapped tex
Qiang Yu (1):
- glapi: should not add alias function to static_data.py
Rhys Perry (1):
- aco: remove pack_half_2x16(a, 0) optimization
Rohan Garg (1):
- intel/fs: OpImageQueryLod does not support arrayed images as an operand
Roman Stratiienko (1):
- v3dv: Hotfix: Rename remaining V3DV_HAS_SURFACE->V3DV_USE_WSI_PLATFORM
Samuel Pitoiset (1):
- radv: add drirc radv_disable_htile_layers and enable it for F1 2021
Tapani Pälli (3):
- iris: unref syncobjs and free r/w dependencies array for slab entries
- mesa: free idalloc storage for display lists
- mesa: free vbo_save_vertex_list store prims
Timothy Arceri (1):
- glsl/glcpp: make sure to expand new token after concatenation
Yiwei Zhang (1):
- venus: subtract appended header size in vn_CreatePipelineCache
satmandu (1):
- Fix compilation on armv7l with gcc 11.2.0

143
docs/relnotes/21.3.5.rst Normal file
View File

@@ -0,0 +1,143 @@
Mesa 21.3.5 Release Notes / 2022-01-26
======================================
Mesa 21.3.5 is a bug fix release which fixes bugs found since the 21.3.4 release.
Mesa 21.3.5 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.5 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- glGetActiveUniform failing with GL_INVALID_VALUE for no reason
- CopelliaSim crashes on adding vision sensor to a scene on Ubuntu 20+, runs fine on Ubuntu 18.04
- Dirt Rally: Flickering glitches on certain foliage going from Mesa 21.2.5 to 21.3.0
- FrontFacing input is broken on Intel/Vulkan
- llvmpipe: Unimplemented get_driver_uuid/get_device_uuid causes segfaults in e.g. Wine
Changes
-------
Alejandro Piñeiro (1):
- vulkan: return default string for undefined enum
Alyssa Rosenzweig (3):
- pan/bi: Schedule around blend shader register clobbering
- panfrost: Use u_reduced_prim for primitive checks
- panfrost: Only cull polygons
Bas Nieuwenhuizen (1):
- util/fossilize_db: Fix double free in error handling.
Carsten Haitzler (1):
- panfrost: Don't double-free when handling error for unsupported GPU
Charles Baker (1):
- zink: Output PackHalf2x16 to uint not float
Emma Anholt (1):
- softpipe: respect !independent_blend_enable for color masks.
Eric Engestrom (4):
- .pick_status.json: Update to 06504fb9e2382e43b889fd6ca642bb785b544d4d
- .pick_status.json: Mark 1b88777e97f635612c560a2f00d349ea271581b1 as denominated
- .pick_status.json: Mark d1530a3f3b1625baa42e84cba9844b6eb4ac76ce as denominated
- .pick_status.json: Mark 58a843ab14e0eecf044a35154da72cdf7ab6f15a as denominated
Ian Romanick (1):
- intel/fs: Fix gl_FrontFacing optimization on Gfx12+
Kenneth Graunke (1):
- iris: Fix and refactor check for clear color being fully zero
Lepton Wu (1):
- driconf: Fix unhandled tags in static conf
Lionel Landwerlin (2):
- intel/fs: disable VRS when omask is written
- anv: fix missing descriptor copy of bufferview/surfacestate content
Mike Blumenkrantz (10):
- zink: always set number of timestamp results to 1 for internal qbo
- zink: fix availability buffer sizing/copying for xfb queries
- zink: skip readback of qbos with no results
- Revert "zink: when performing an implicit reset, sync qbos"
- zink: use even more accurate stride values for query result copies
- aux/trace: copy over stream_output_target_offset method from context
- util/vbuf: fix buffer translation sizing
- zink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
- zink: check EXT_image_drm_format_modifier for dmabuf support
- zink: stop allocating such massive staging regions for buffer maps
Pavel Ondračka (1):
- r300: properly initialize new_vs in r300_draw_init_vertex_shader
Pierre-Eric Pelloux-Prayer (2):
- driconf: enable vs_position_always_invariant for Dirt Rally
- mesa: use less temporaries in build_lighting
Qiang Yu (1):
- nir: fix nir_tex_instr hash not count is_sparse field
Rhys Perry (1):
- nir/unsigned_upper_bound: don't follow 64-bit f2u32()
Rob Clark (5):
- mesa/st: Lowered ucp should still mark rast state dirty
- freedreno: Pass shader cache key instead of shader key
- freedreno: Add FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE
- freedreno/a6xx: Fix clip_mask
- freedreno/a5xx: Fix clip_mask
Stefan Brüns (1):
- llvmpipe: Add get_{driver,device}_uuid implementations
Tapani Pälli (2):
- mesa: refactor GetProgramiv to use program resource list
- mesa: move GetProgramInterfaceiv as a shader_query function
Yiwei Zhang (1):
- venus: VkExternalImageFormatProperties is optional

149
docs/relnotes/21.3.6.rst Normal file
View File

@@ -0,0 +1,149 @@
Mesa 21.3.6 Release Notes / 2022-02-09
======================================
Mesa 21.3.6 is a bug fix release which fixes bugs found since the 21.3.5 release.
Mesa 21.3.6 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.6 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- radv: CullDistance fail
- i965: Segmentation fault during glinfo context destruction, regression in 21.3.x
- Vulkan Wayland WSI returns empty surface formats
- [REGRESSION][BISECTED] iris: Qutebrowser/QtWebEngine sporadically flashes the window in white
- Flickering Intel Uhd 620 Graphics
- Broken Terraria & Glitches in Forza Horizon 4
Changes
-------
Bas Nieuwenhuizen (1):
- Revert "nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants"
Caio Oliveira (1):
- anv: Fix subgroupSupportedStages physical property
Charles Baker (1):
- Revert "zink: handle vertex buffer offset overflows"
Connor Abbott (2):
- ir3: Fix copy-paste mistakes in ir3_block_remove_physical_predecessor()
- ir3/cp: ir3: Prevent propagating shared regs out of loops harder
Danylo Piliaiev (1):
- ir3: opt_deref in opt loop to remove unnecessary tex casts
Dave Airlie (1):
- crocus: find correct relocation target for the bo.
Emma Anholt (1):
- vulkan: Fix leak of error messages
Eric Engestrom (3):
- .pick_status.json: Update to cb781fc350108584116280fc597c695d2f476c68
- .pick_status.json: Mark 15e77504461a30038a054c87cc53a694171c9cf4 as denominated
- .pick_status.json: Mark 960e72417f3e8885699cf384f690853e14ba44da as denominated
Francisco Jerez (1):
- intel/fs: Take into account region strides during SIMD lowering decision of SHUFFLE.
Georg Lehmann (4):
- vulkan/wsi/wayland: Fix add_wl_shm_format alpha/opaqueness.
- vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.
- vulkan/wsi/wayland: Add modifiers for RGB formats.
- vulkan/wsi/wayland: Fix add_drm_format_modifier aplha/opaqueness.
Jason Ekstrand (2):
- anv/pass: Don't set first_subpass_layout for stencil-only attachments
- vulkan/wsi: Set MUTABLE_FORMAT_BIT in the prime path
Kenneth Graunke (1):
- i965: Avoid NULL drawbuffer in brw_flush_front
Lionel Landwerlin (2):
- intel/fs: don't set allow_sample_mask for CS intrinsics
- intel/nir: fix shader call lowering
Manas Chaudhary (1):
- panvk: Fix pointer corruption in panvk_add_wait_event_syncobjs
Mike Blumenkrantz (15):
- zink: never use SpvOpImageQuerySizeLod for texel buffers
- zink: reorder fbfetch flag-setting to avoid null deref
- zink: fix vertex buffer mask computation for null buffers
- zink: clamp tbo creation to maxTexelBufferElements
- zink: add vertex shader pipeline bit for generated barrier construction
- zink: fix waiting on current batch id
- zink: cast image atomic op params/results based on image type
- zink: use SpvScopeDevice over SpvScopeWorkgroup for atomic shader ops
- zink: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
- llvmpipe: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
- llvmpipe: ci updates
- zink: add VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT for query binds
- zink: fix PIPE_CAP_TGSI_BALLOT export conditional
- zink: reject invalid draws
- zink: min/max blit region in coverage functions
Nanley Chery (3):
- anv: Disable CCS_E for some 8/16bpp copies on TGL+
- anv: Use ANV_FAST_CLEAR_DEFAULT_VALUE for CCS on TGL+
- anv: Re-enable CCS_E on TGL+
Paulo Zanoni (1):
- iris: implement inter-context busy-tracking
Rhys Perry (3):
- aco: fix neg(abs(mul(a, b))) if the mul is not VOP3
- aco: don't encode src2 for v_writelane_b32_e64
- radv: fix R_02881C_PA_CL_VS_OUT_CNTL with mixed cull/clip distances
Samuel Pitoiset (1):
- radv/winsys: fix missing buffer_make_resident() for the null winsys
Yiwei Zhang (1):
- tu: VkExternalImageFormatProperties is optional

148
docs/relnotes/21.3.7.rst Normal file
View File

@@ -0,0 +1,148 @@
Mesa 21.3.7 Release Notes / 2022-02-23
======================================
Mesa 21.3.7 is a bug fix release which fixes bugs found since the 21.3.6 release.
Mesa 21.3.7 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.7 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- lavapipe: dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_3.step fails
- ANV: Bad output from TransformFeedback . Regression from Mesa 21. Something to do with VB+XFB -> VB+XFB dependency?
Changes
-------
Alyssa Rosenzweig (4):
- pan/bi: Avoid \*FADD.v2f16 hazard in optimizer
- pan/bi: Avoid \*FADD.v2f16 hazard in scheduler
- pan/bi: Lower swizzles on CSEL.i32/MUX.i32
- panvk: Use more reliable assert for UBO pushing
Bas Nieuwenhuizen (1):
- radv: Fix preamble argument order.
Connor Abbott (1):
- ir3/spill: Fix simplify_phi_nodes with multiple loop nesting
Dave Airlie (3):
- lavapipe: fix sampler + sampler view leaks.
- lavapipe: reference gallium fences correctly.
- crocus: fix leak on gen4/5 stencil fallback blit path.
Emma Anholt (1):
- i915g: Initialize the rest of the "from_nir" temporary VS struct.
Eric Engestrom (2):
- .pick_status.json: Update to dabba7d7263be6ffb6f3676465e92c65952fa824
- .pick_status.json: Mark b07372312d7053f2ef5c858ceb1fbf9ade5e7c52 as denominated
Ian Romanick (9):
- gallivm/nir: Call nir_lower_bool_to_int32 after nir_opt_algebraic_late
- nir: All set-on-comparison opcodes can take all float types
- intel/fs: Don't optimize out 1.0*x and -1.0*x
- spriv: Produce correct result for GLSLstd450Step with NaN
- spirv: Produce correct result for GLSLstd450Modf with Inf
- spirv: Produce correct result for GLSLstd450Tanh with NaN
- nir: Properly handle various exceptional values in frexp
- nir: Produce correct results for atan with NaN
- nir: Add missing dependency on nir_opcodes.py
Jason Ekstrand (1):
- anv: Call vk_command_buffer_finish if create fails
Jonathan Gray (1):
- dri: avoid NULL deref of DrawBuffer on flush
Lionel Landwerlin (2):
- nir: fix lower_memcpy
- anv/genxml/intel/fs: fix binding shader record entry
Marcin Ślusarz (1):
- anv: don't set color state when input state was requested
Marek Olšák (1):
- ac/surface: add more elements to meta equations because HTILE can use them
Mike Blumenkrantz (4):
- lavapipe: use util_pack_color_union() for generating clear colors
- aux/draw: fix llvm tcs lane vec generation
- zink: always set VkPipelineMultisampleStateCreateInfo::pSampleMask
- zink: always invalidate streamout counter buffer if not resuming
Nanley Chery (1):
- iris: Don't fast clear with the view format
Pavel Ondračka (1):
- r300: fix transformation of abs modifiers with negate
Qiang Yu (3):
- radeonsi: workaround Specviewperf13 Catia hang on GFX9
- radeonsi: fix depth stencil multi sample texture blit
- glx: fix pbuffer refcount init
Samuel Pitoiset (1):
- radv/winsys: fix initializing debug/perftest options if multiple instances
Tapani Pälli (5):
- intel/genxml: add PIPE_CONTROL field for L3 read only cache invalidation
- anv: invalidate L3 read only cache when VF cache is invalidated
- iris: invalidate L3 read only cache when VF cache is invalidated
- iris: fix a leak on surface states
- mesa/st: always use DXT5 when transcoding ASTC format
Thierry Reding (2):
- tegra: Use private reference count for sampler views
- tegra: Use private reference count for resources
Timur Kristóf (1):
- radv: Disable IB2 on compute queues.
Yiwei Zhang (1):
- venus: properly destroy deferred ahb image before real image creation

183
docs/relnotes/21.3.8.rst Normal file
View File

@@ -0,0 +1,183 @@
Mesa 21.3.8 Release Notes / 2022-03-18
======================================
Mesa 21.3.8 is a bug fix release which fixes bugs found since the 21.3.7 release.
Mesa 21.3.8 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.8 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- freedreno: deqp cts fails
- radeonsi dEQP-GLES3.functional.buffer.map.write.explicit_flush.* flake crashes
- Square Artifacts Dragons Dogma
- radv: When using VS+PS only, primitive ID is mixed up after NGG culling
- Redraw freeze after upgrade to Xwayland 21.1.3
- anv doesn't always resolve aux buffers with private bindings on transition to external queue
- [ANV] Rendering corruption in DOOM Eternal
Changes
-------
Adam Jackson (1):
- meson: Add "amber" option for automatic LTS build configuration
Alyssa Rosenzweig (6):
- panfrost: Fix FD resource_get_handle
- panfrost: Handle NULL sampler views
- panfrost: Handle NULL samplers
- panfrost: Flush resources when shadowing
- panfrost: Push twice as many uniforms
- panfrost: Fix set_sampler_views for big GL
Connor Abbott (4):
- ir3: Don't always set bindless_tex with readonly images
- ir3/nir: Fix 1d array readonly images
- ir3/ra: Sanitize parallel copy flags better
- util/bitset: Fix off-by-one in __bitset_set_range
Danylo Piliaiev (1):
- turnip: Use LATE_Z when there might be depth/stencil feedback loop
Dave Airlie (5):
- draw/so: don't use pre clip pos if we have a tes either.
- crocus: change the line width workaround for gfx4/5
- gallivm/nir: extract a valid texture index according to exec_mask.
- zink: workaround depth texture mode alpha.
- lavapipe: remove broken workaround for zink depth texturing.
Eric Engestrom (14):
- .pick_status.json: Update to 2106c3bab6bdea736c468fb1866fd0f372cc0baa
- .pick_status.json: Mark 7ec0e2b89351e6e56cb112e00e6c68c6bbc6faea as denominated
- .pick_status.json: Mark 0136545d169adb75e4f9f6b4de38eef0817c1241 as denominated
- .pick_status.json: Mark 62b8daa889daefb2f191a63f370541bf2b807e88 as denominated
- .pick_status.json: Mark 698ae34844b7199b8acc3b4d74a9cad3b903bdef as denominated
- .pick_status.json: Mark 03a80490a47b0b616566c6f56581560694976b1a as denominated
- .pick_status.json: Mark e1964e1dde7bf44ceeaf3fa8b3869e791af4a369 as denominated
- .pick_status.json: Mark 3ef093f697ad9027ba514c7a4a6a10b7bd95bd47 as denominated
- .pick_status.json: Mark 2d1b506acfe55165511a2bb83acb013353e531ab as denominated
- .pick_status.json: Mark 204ea77b0674fb611155bd3ba2e6169cc8646b3f as denominated
- .pick_status.json: Mark a5c7d34fdf8403b0115d5eead7ca67027e93efc7 as denominated
- .pick_status.json: Mark 432700fc61a33e0c040d47d9b7bd8cfe970d35cc as denominated
- .pick_status.json: Mark 4ed7329236a576b6b6f615787bb722b960f32c6b as denominated
- .pick_status.json: Mark 3f7da0c58447979976eb2928625b1f93154f6c57 as denominated
Erik Faye-Lund (2):
- docs: remove incorrect drivers from extension
- docs: fixup zink gl 4.3 requirements
Icecream95 (6):
- panfrost: Set PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION
- pan/bi: Check dependencies of both destinations of instructions
- panfrost: Set dirty state in set_shader_buffers
- panfrost: Re-emit descriptors after resource shadowing
- pan/bi: Make disassembler build reproducibly
- panfrost: Fix ubo_mask calculation
Jason Ekstrand (2):
- anv: Don't assume depth/stencil attachments have depth
- lavapipe: Reset the free_cmd_buffers list in TrimCommandPool
Jonathan Gray (6):
- util: unbreak non-linux mips64 build
- util: fix util_cpu_detect_once() build on OpenBSD
- util/u_atomic: fix build on clang archs without 64-bit atomics
- util: fix build with clang 10 on mips64
- util: use correct type in sysctl argument
- radv: use MAJOR_IN_SYSMACROS for sysmacros.h include
Lionel Landwerlin (3):
- anv: fix conditional render for vkCmdDrawIndirectByteCountEXT
- anv: fix fast clear type value with external images
- intel/fs: fix total_scratch computation
Marek Olšák (2):
- amd: add a workaround for an SQ perf counter bug
- radeonsi: fix an assertion failure with register shadowing
Mike Blumenkrantz (16):
- gallivm: avoid division by zero when computing cube face
- zink: always update shader variants when rebinding a gfx program
- zink: use a fence for pipeline cache update jobs
- zink: wait on program cache fences before destroying programs
- zink: fix descriptor cache pointer array allocation
- zink: mark fbfetch push sets as non-cached
- zink: stop leaking descriptor sets
- zink: invalidate non-punted recycled descriptor sets that are not valid
- zink: fix 64bit float shader ops
- llvmpipe: fix debug print iterating in set_framebuffer_state
- llvmpipe: clamp surface clear geometry
- lavapipe: update multisample state after blend state
- aux/trace: rzalloc the context struct
- zink: lower dmod on AMD hardware
- lavapipe: skip format checks for EXTENDED_USAGE
- lavapipe: run nir_opt_copy_prop_vars during optimization loop
Paulo Zanoni (1):
- iris: fix register spilling on compute shaders on XeHP
Pierre-Eric Pelloux-Prayer (3):
- radeonsi: change rounding mode to round to even
- util/slab: add slab_zalloc
- gallium/tc: zero alloc transfers
Rhys Perry (2):
- anv: Enable nir_opt_access
- radv: include adjust_frag_coord_z in key
Rob Clark (1):
- mesa: Fix discard_framebuffer for fbo vs winsys
Samuel Pitoiset (2):
- radv,drirc: move RADV workarounds to 00-radv-defaults.conf
- radv: disable DCC for Fable Anniversary, Dragons Dogma, GTA IV and more
Timur Kristóf (1):
- ac/nir/ngg: Fix mixed up primitive ID after culling.
Xiaohui Gu (1):
- iris: Mark a dirty update when vs_needs_sgvs_element value changed

119
docs/relnotes/21.3.9.rst Normal file
View File

@@ -0,0 +1,119 @@
Mesa 21.3.9 Release Notes / 2022-06-08
======================================
Mesa 21.3.9 is a bug fix release which fixes bugs found since the 21.3.8 release.
Mesa 21.3.9 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 21.3.9 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
91fe6f20339884e37a7c47bfba42fb1cd397512c9ed5ad423de369f047cd8b5c mesa-21.3.9.tar.xz
New features
------------
- None
Bug fixes
---------
- [regression][bisected] MSVC: Build failure in libmesa_util when targeting x86 32-bit
- A crash in radeonsi driver
Changes
-------
Alyssa Rosenzweig (2):
- panfrost: Emulate GL_CLAMP on Bifrost
- pan/bi: Handle non-2D arrays
Dave Airlie (2):
- crocus: don't map scanout buffers as write-back
- intel/perf: use a function to do common allocations
Emma Anholt (2):
- vulkan: Make sure we've loaded our connectors when querying plane props.
- intel/perf: Move some static blocks of C code out of the python script.
Eric Engestrom (3):
- .pick_status.json: Update to 05d687723530ed3c5c9f7d0addb3b047138613a3
- .pick_status.json: Update to fc381fa1e341bc9cf71f53a915dc47926a3f621f
- Revert "glx: Fix build errors with --enable-mangling (v2)"
Erik Faye-Lund (1):
- Revert "ci: downgrade sphinx to v3.x"
Georg Lehmann (1):
- radv: Don't hash ycbcr sampler base object.
Ian Romanick (1):
- intel/fs: Force destination types on DP4A instructions
Icecream95 (2):
- panfrost: Don't initialise the trampolines array
- panfrost: Optimise recalculation of max sampler view
Jason Ekstrand (1):
- anv: Allow MSAA resolve with different numbers of planes
Jonathan Gray (1):
- util: fix msvc build
Lionel Landwerlin (4):
- anv: fix variable shadowing
- anv: zero-out anv_batch_bo
- anv: emit timestamp & availability using the same part of CS
- anv: flush tile cache with query copy command
Matt Turner (8):
- intel/perf: Don't print leading space from desc_units()
- intel/perf: Deduplicate perf counters
- intel/perf: Use a function to initialize perf counters
- intel/perf: Use slimmer intel_perf_query_counter_data struct
- intel/perf: Store indices to strings rather than pointers
- intel/perf: Mark intel_perf_counter_* enums as PACKED
- intel/perf: Fix mistake in description string
- intel/perf: Destination array calculation into function
Mike Blumenkrantz (9):
- llvmpipe: fix occlusion queries with early depth test
- anv: fix xfb usage with rasterizer discard
- anv: fix CmdSetColorWriteEnableEXT for maximum rts
- anv: fix some dynamic rasterization discard cases in pipeline construction
- lavapipe: always clone shader nir for shader states
- gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray
- zink: flag sample locations for re-set on batch flush
- zink: force-add usage when adding last-ref tracking
- zink: only update usage on buffer rebind if rebinds occurred
Pierre-Eric Pelloux-Prayer (1):
- radeonsi: don't clear framebuffer.state before dcc decomp

4381
docs/relnotes/22.0.0.rst Normal file

File diff suppressed because it is too large Load Diff

168
docs/relnotes/22.0.1.rst Normal file
View File

@@ -0,0 +1,168 @@
Mesa 22.0.1 Release Notes / 2022-03-29
======================================
Mesa 22.0.1 is a bug fix release which fixes bugs found since the 22.0.0 release.
Mesa 22.0.1 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.0.1 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- freedreno: crash in PUBG
- [regression][bisected] MSVC: Build failure in libmesa_util when targeting x86 32-bit
- A crash in radeonsi driver
- freedreno: deqp cts fails
Changes
-------
Alyssa Rosenzweig (4):
- panfrost: Emulate GL_CLAMP on Bifrost
- pan/bi: Handle non-2D arrays
- panfrost: Fix primitive restart with 32-bit indices
- pan/bi: Don't analyze helper reqs in !frag shaders
Anuj Phogat (1):
- anv, iris: Add Wa_16011411144 for DG2
Connor Abbott (3):
- ir3/ra: Sanitize parallel copy flags better
- util/bitset: Fix off-by-one in __bitset_set_range
- ir3/lower_spill: Fix corner case with oob offsets
Dave Airlie (3):
- zink: workaround depth texture mode alpha.
- lavapipe: remove broken workaround for zink depth texturing.
- crocus: don't map scanout buffers as write-back
Dylan Baker (17):
- docs: add release notes for 22.0.0
- .pick_status.json: Update to cc4f0e804e6feee17a657d052f4f2ee32ebe53d0
- ci: Fixup some lvp expected passes
- .pick_status.json: Update to d5870c45ae82c091e72f1258920aa54974e19a36
- .pick_status.json: Update to dc247e5d4319b644e373534495cc75f41bc7bcd2
- .pick_status.json: Mark dd9b8881e0ad84ab1e74d972a8233f5c03e7b37a as denominated
- .pick_status.json: Mark 5dbbc0f0a824e4addffeb115631a9c5bcb426c29 as denominated
- .pick_status.json: Update to acbb0d86f71c950e29df70e357ae08e5ca903a49
- .pick_status.json: Update
- pick/ui: Fix mypy issue
- pick/core: drop the main_sha field
- pick/core: Add proper type annotation for update_commits callback
- pick/core: Add a method for updating commits
- pick/core: Add a MANUAL_RESOLUTION resolution
- pick/ui: correctly handle MANUAL_RESOLUTION
- core: don't pass the ui back into commit.apply
- .pick_status.json: Update to 8991e646411b73c1e03278267c80758e921f2352
Erik Faye-Lund (1):
- docs: fixup zink gl 4.3 requirements
Gert Wollny (1):
- virgl: Fix texture transfers by using a staging resource
Icecream95 (1):
- panfrost: Don't initialise the trampolines array
Jason Ekstrand (3):
- lavapipe: Reset the free_cmd_buffers list in TrimCommandPool
- anv: Allow MSAA resolve with different numbers of planes
- spirv: Properly mangle generic pointers
Jonathan Gray (1):
- util: fix msvc build
Kenneth Graunke (1):
- iris: Fix MOCS for copy regions
Lionel Landwerlin (2):
- anv: emit timestamp & availability using the same part of CS
- anv: flush tile cache with query copy command
Marek Olšák (1):
- amd: add support for gfx1036 and gfx1037 chips
Mike Blumenkrantz (23):
- llvmpipe: fix debug print iterating in set_framebuffer_state
- lavapipe: clamp clear attachments rects
- llvmpipe: clamp surface clear geometry
- zink: map R8G8B8X8_SRGB -> R8G8B8A8_SRGB
- lavapipe: update multisample state after blend state
- lavapipe: fix pipeline creation for blend and zs states
- aux/trace: rzalloc the context struct
- zink: lower dmod on AMD hardware
- zink: use 64bit mask for xfb analysis
- zink: store the correct number of components for xfb packing outputs
- zink: correctly set xfb packed output offsets
- lavapipe: use the correct value for dynamic render resolve attachment indexing
- lavapipe: skip format checks for EXTENDED_USAGE
- lavapipe: run nir_opt_copy_prop_vars during optimization loop
- anv: fix xfb usage with rasterizer discard
- anv: fix CmdSetColorWriteEnableEXT for maximum rts
- anv: fix some dynamic rasterization discard cases in pipeline construction
- lavapipe: always clone shader nir for shader states
- gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray
- llvmpipe: fix occlusion queries with early depth test
- zink: force-add usage when adding last-ref tracking
- zink: only update usage on buffer rebind if rebinds occurred
- nir/lower_is_helper_invocation: create load_helper_invocation instr with bitsize=1
Pierre-Eric Pelloux-Prayer (2):
- util/slab: add slab_zalloc
- radeonsi: don't clear framebuffer.state before dcc decomp
Rob Clark (2):
- mesa: Fix discard_framebuffer for fbo vs winsys
- freedreno/ir3: Don't try re-swapping cat3 srcs
Sagar Ghuge (2):
- intel/fs: Add Wa_22013689345
- intel/fs: Add Wa_14014435656
Samuel Pitoiset (1):
- radv: add reference counting for descriptor set layouts
Stefan Dirsch (1):
- meson: restore private requires to libdrm in dri.pc file

293
docs/relnotes/22.0.2.rst Normal file
View File

@@ -0,0 +1,293 @@
Mesa 22.0.2 Release Notes / 2022-04-21
======================================
Mesa 22.0.2 is a bug fix release which fixes bugs found since the 22.0.1 release.
Mesa 22.0.2 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.0.2 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- Vulkan::Calling vkWaitForFences Timeout
- Intel (CHT) - Uplink text rendering bugged out in Mesa 22.0
- gen9atom gpu hang on dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1
- bad memory managment on panfrost RK3399 - cannot alocate more ram - fury unleashed
- [Intel, Iris] Broken rendering in Ryujinx on Tigerlake
- intel: integer_mad_hi / integer_mad_sat / integer_mul_hi produce invalid results
- Textures colors distortion in "Black Geyser: Couriers of Darkness" with radeonsi
- ShaderStorageBlocksWriteAccess not set for spir-v shaders?
- radeonsi dEQP-GLES3.functional.buffer.map.write.explicit_flush.* flake crashes
- radv: nir validation error with invalid array access
- Intel Iris Xe Geometry Flickering/Assets Disappearing
- Rendering artifacts when playing Outer Wilds [Reproducible with latest ANV driver built from main]
- Vulkan wsi leaks vk_sync object on every wsi_AcquireNextImageKHR call
- [bisected] panfrost(RK3399/T860): Emulationstation: broken, black or missing menus with v22.0.0
- Plasma/KDE settings menus disappear on daily build
- Square Artifacts Dragons Dogma
- r300: Anmesia the dark descent corruption
- Error compiling with LLVM-git/15
Changes
-------
Alexey Bozhenko (1):
- spirv: fix OpBranchConditional when both branches are the same
Alyssa Rosenzweig (1):
- panfrost: Process scissor state earlier
Benjamin Cheng (1):
- vulkan/queue: Destroy wait temps if they are skipped
Boris Brezillon (1):
- lavapipe: Don't use VK_OUTARRAY_MAKE()/vk_outarray_append()
Caio Oliveira (2):
- intel/fs: Initialize the sample mask in flags register when using demote
- intel/fs: Fix IsHelperInvocation for the case no discard/demote are used
Cristian Ciocaltea (1):
- ci: Avoid altering EXTRA_CARGO_ARGS environment variable
Daniel Schürmann (1):
- aco/optimizer: fix call to can_use_opsel() in apply_insert()
Danylo Piliaiev (3):
- turnip: Fix the lack of WFM before indirect draws
- turnip: enable has_ccu_flush_bug workaround for a660
- turnip: Correctly store separate stencil in gmem store
Dave Airlie (6):
- radv: use flush vgt streamout like PAL does.
- gallivm/sample: detect if rho is inf or nan and flush to zero.
- llvmpipe: fix nr_sampler_view in key creation.
- draw: handle tess eval shader when getting num outputs
- u_blitter/stencil: take dstbox x/y into accounts for dst fb width
- util/stencil: fix stencil fallback blit shader texture types.
Dylan Baker (20):
- docs: add sah256 sum for mesa 22.0.1
- .pick_status.json: Update to 5a459b8f6b0b59814865bc5869a868269f8f7ebf
- pick/core: have update_commits return the commit list
- bin/auto-pick: Add a script that automates applying commits
- .pick_status.json: Mark 3ef093f697ad9027ba514c7a4a6a10b7bd95bd47 as denominated
- core: don't pass the ui back into commit.apply
- .pick_status.json: Update to 33c800bf913771ddadb5bd632df46582f4d1c9f3
- .pick_status.json: Update to 837f781c9a4f909ac1ee0b3b8331af87301b5fc3
- .pick_status.json: Update to 7478b00c7cc7f7ec8cbe224ce600362f7fdb9411
- .pick_status.json: Update to c7eaf0306876df53d3608ae3bf67afc272dcdf20
- .pick_status.json: Mark 94706601fa2f52605d6e488f30fad9a0e2440612 as denominated
- .pick_status.json: Mark 174d086e8c818db4522731e845bd259e2baa8830 as denominated
- .pick_status.json: Mark 8b71118aa066ab125b7440912ed1e14da79c9451 as backported
- .pick_status.json: Mark 4e30da7874e6586c7ac94cd34560c782d0f9678d as backported
- .pick_status.json: Mark 7da211e24fe14d8b107461bdfcb3b8d67212f88a as backported
- .pick_status.json: Mark 8294d454245d4318befac7c8915e55db3d47cefd as backported
- .pick_status.json: Update to e509598470c000498c3e1328e012142d9047e292
- .pick_status.json: Mark 2b688942c1b1f5ca4f3e4d33231579149aeb8fdb as denominated
- .pick_status.json: Mark dd783d7144932d79ef761810d46e45c3df7148cf as denominated
- .pick_status.json: Update to 9f44a264623461c98368185b023d99446676e039
Emma Anholt (13):
- r600: Update the PS state before checking for cb_misc update.
- r600: Fix ordering of SSBO loads versus texturing.
- r600: Add a workaround and explanation for shadowcubearray TG4.
- vulkan: Make sure we've loaded our connectors when querying plane props.
- st/glsl-to-tgsi: Fix handling of csel(bool, vec, vec).
- r600: Disable SB in the presence of indirection on temp arrays.
- r600: Disable SB when INTERP_SAMPLE is used.
- r600: Implement memoryBarrier() in the non-SFN path.
- nir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.
- nir_to_tgsi: Fix the address reg mapping for images and SSBOs to match G-T-T.
- turnip: Stop allocating unused pvtmem space in the pipeline CS.
- nir: Add lowering for fround_even on r300.
- nouveau/nir: Fix the inverted sense of usesSampleMaskIn.
Erik Faye-Lund (3):
- vbo/dlist: do not try to pad an empty draw
- d3d12: fix return-code without dxcompiler.dll
- vulkan: explicitly cast object-type enum
Francisco Jerez (1):
- intel/perf: Fix OA report accumulation on Gfx12+.
Georg Lehmann (7):
- nir/fold_16bit_sampler_conversions: Don't fold dest upcasts.
- radv: Add a vkCmdBuildAccelerationStructuresIndirectKHR stub.
- radv: Add more RT pipeline stubs.
- radv: Don't hash ycbcr sampler base object.
- nir/fold_16bit_sampler_conversions: Fix dest type mismatches.
- nir/fold_16bit_sampler_conversions: Fix src type mismatches.
- radv: Enable global bo list if 1.2 features are used.
Ian Romanick (3):
- intel/compiler: Fix sample_d messages on DG2
- intel/fs: Force destination types on DP4A instructions
- nir: intel/compiler: Lower TXD on array surfaces on DG2+
Icecream95 (1):
- panfrost: Stop overallocating compressed textures
Jason Ekstrand (7):
- v3dv/queue: Rework multisync_free
- nir: Dont set coord_components on txs
- lavapipe: Use VK_OUTARRAY for GetPhysicalDeviceQueueFamilyProperties[2]
- anv: Disallow blending on swizzled formats
- nir/lower_int64: Fix [iu]mul_high handling
- iris: Don't leak scratch BOs
- nir/opcodes: fisfinite32 should return bool32
Jordan Justen (1):
- intel/dev: Add device info for RPL-P
Kai Wasserbäch (2):
- fix(FTBFS): clover: work around removal of PointerType::getElementType()
- fix(clover): FTBFS: Added missing include for ConstantInt for LLVM 15
Kenneth Graunke (2):
- intel/compiler: Call inst->resize_sources before setting the sources
- iris: Add pre-draw flushing for stream output targets
Lionel Landwerlin (9):
- anv: fix variable shadowing
- anv: zero-out anv_batch_bo
- anv: implement EXT_tooling_info
- iris: don't synchronize BO for batch decoding
- anv: disable preemption on 3DPRIMITIVE on gfx12
- anv: fix dynamic sample locations on Gen7/7.5
- blorp: disable depth bounds
- intel: fix URB programming for GT1s
- anv: allow getting the address of the beginning of the batch
Marcin Ślusarz (3):
- anv: fix push constant lowering for task/mesh
- anv: invalidate all metadata in anv_nir_lower_ubo_loads
- intel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader
Michael Olbrich (1):
- crocus: export GEM handle with RDWR access rights
Mike Blumenkrantz (29):
- draw: fix gs vertex stream counting
- radv: fix CmdSetColorWriteEnableEXT(attachmentCount==MAX_RTS)
- draw: fix nonzero stream primitives generated queries
- lavapipe: enforce monotonic timeline incrementing
- zink: force push descriptors cache update if hashing detects changes
- llvmpipe: handle sampling from 2d views of 3d images
- zink: unset resource layout+access when doing storage setup
- zink: adds refs to user index buffers when tc is not active
- zink: handle 0 ubos and 0 ssbos in pipeline layout
- zink: create pipeline layout if only bindless descriptor set is used
- zink: fix xfb analysis variable finding for arrays
- zink: track internal conditional render state
- zink: flag sample locations for re-set on batch flush
- lavapipe: fix typo in set_event execution
- mesa/st: add special casing for pointsize constant updating during validate
- intel/isl: fix 2d view of 3d textures
- zink: fix max geometry input component advertising
- nir/lower_tex: avoid adding invalid LOD to RECT textures
- zink: use the calculated last struct member idx for ssbo size in ntv
- zink: avoid creating ssbo variable types with multiple runtime arrays
- nir/lower_tex: fix rect queries with lower_rect set
- mesa/st: set normalized coords for RECT samplers if rects are unsupported
- zink: reject resource creation if format features don't match attachment
- zink: unconditionally set line width on rasterizer state change
- zink: support restart with PIPE_PRIM_LINES_ADJACENCY if ext is available
- zink: handle device-local unsynchronized maps
- util/draw: fix map size of indirect buffer in util_draw_indirect_read
- util/draw: handle draw_count=0 when reading indirect parameters
- util/draw: fix indirect draw count readback
Pavel Ondračka (1):
- r300: respect output_semantic_index when writing colors
Pierre-Eric Pelloux-Prayer (6):
- glsl/nir/linker: update shader_storage_blocks_write_access for SPIR-V
- gallium/u_threaded: late alloc cpu_storage
- gallium/tc: warn if an app is incompatible with cpu_storage
- gallium/tc: zero alloc transfers
- glsl/nir/linker: fix shader_storage_blocks_write_access
- drirc: enable radeonsi_zerovram for Black Geyser
Qiang Yu (1):
- nir/linker: disable varying from uniform lowering by default
Rohan Garg (1):
- iris: set a default EDSC flag
Samuel Pitoiset (8):
- radv,drirc: move RADV workarounds to 00-radv-defaults.conf
- radv: disable DCC for Fable Anniversary, Dragons Dogma, GTA IV and more
- radv: enable radv_disable_aniso_single_level for DXVK/vkd3d
- radv: fix cleaning the image view for CmdCopyImageToBuffer()
- radv: save/restore the stencil write mask during internal driver operations
- radv: suspend/resume queries during internal driver operations
- radv: save/restore the stencil reference during internal driver operations
- radv: fix initializing pipeline_key::topology for GFX9 and older
Sviatoslav Peleshko (1):
- mesa: flush bitmap caches when changing scissors or window rects state
Timothy Arceri (1):
- glsl: fix needs_lowering() call in varying packing pass
Timur Kristóf (4):
- aco: Fix VOP2 instruction format in visit_tex.
- nir: Handle out of bounds access in nir_vectorize_tess_levels.
- radv: Fix gs_vgpr_comp_cnt for NGG VS without passthrough mode.
- radv: Use correct buffer offset for conditional rendering.

201
docs/relnotes/22.0.3.rst Normal file
View File

@@ -0,0 +1,201 @@
Mesa 22.0.3 Release Notes / 2022-05-04
======================================
Mesa 22.0.3 is a bug fix release which fixes bugs found since the 22.0.2 release.
Mesa 22.0.3 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.0.3 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- freedreno: fragile location packing can break cull/clip distance
- turnip: dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp16.generated_args.* failures
- piglit ext_image_dma_buf_import.ext_image_dma_buf_import* regression
- piglit ext_image_dma_buf_import.ext_image_dma_buf_import* regression
- Grid Autosport via proton/vulkan: glitches on the grass on amdgpu, fine on amdgpu-pro
- [Bisected] r600: Big performance regression on some games
- Huge amount of anon_inode:sync_file file descriptor created
- anv regressions from commit 57445adc891 "anv: Re-enable CCS_E on TGL+"
- NIR validation failed after nir_opt_if
- intel: integer_mad_hi / integer_mad_sat / integer_mul_hi produce invalid results
- Aperture Desk Job rendering artifacts Intel TGL
- intel: integer_sub_sat produces stack corruption / OpISubBorrow compilation issue
- r300/rv530: "Black rendering" of Baldur's Gate Dark Alliance in Xbox emulator CXBX-R under wine with Gallium Nine and RADEON_DEBUG=use_tgsi
- radv/aco: xfb bug
- Occasional flicker corruption in Rage 2, e.g. after loading, with ACO on RX 5700 XT
- RADV: Quake 2 RTX v1.6.0 Corrupted Graphics
- '../src/amd/common/ac_surface.c:1575: void ac_copy_dcc_equation(const struct radeon_info \*, ADDR2_COMPUTE_DCCINFO_OUTPUT \*, struct gfx9_meta_equation \*): assertion "dcc->equation.gfx9.num_bits <= ARRAY_SIZE(equation->u.gfx9.bit)" failed'
Changes
-------
Chia-I Wu (1):
- util: Keep quiet NaNs quiet when converting to half float.
Dave Airlie (2):
- llvmpipe: add user memory resources to the debug global list.
- vulkan/wsi: keep allocate queue families in image, just don't fill them
Dylan Baker (21):
- docs: Add sha256sums for 22.0.2
- .pick_status.json: Update to 5e84335fb578f03938468bb8ac0029f68349d330
- .pick_status.json: Update to a6a4bf0f1eae36cb68d5c67653ac013fe0fbde8a
- .pick_status.json: Update to ef9d97ec1f9d9834db3066b5a7ec67ce6d4ecd86
- .pick_status.json: Update to f17d3a125126dd7e0f1c2072545976cec1eeb1c8
- .pick_status.json: Update to 1dc697942af7254798f83583f5788e1abf136d27
- .pick_status.json: Mark d5870c45ae82c091e72f1258920aa54974e19a36 as denominated
- .pick_status.json: Mark f348103fce4484b891a58bf3147b71e3a3558135 as denominated
- .pick_status.json: Mark a4f502de3228ec37dfcaa38225077ec3709d74ea as denominated
- .pick_status.json: Mark 1d250b7b959d2a206280e4f83db05780a83e0927 as denominated
- .pick_status.json: Mark 4eca6e3e5d2b9426d6357e9af1514a0c942638f0 as denominated
- .pick_status.json: Mark 3dcb80da9d6d34e567680ef7fecd24aab4537e8a as denominated
- .pick_status.json: Mark dd078d13cb6b445ad02087a3e80433ef053b7490 as denominated
- .pick_status.json: Mark bbdf22ce136a7f02a8bd6c7e646d12a7e10db18d as denominated
- .pick_status.json: Mark 8806f444a5c005d20cd4ec4ed42e508ffd9cb1da as denominated
- .pick_status.json: Mark 373c8001d6615d70d112c7526ea4f4953257b6b9 as denominated
- .pick_status.json: Mark a056cbc691843861da417b5bcea9f871fdceeb19 as denominated
- .pick_status.json: Mark fc5edf9b68159288baa22c055e471de958812312 as denominated
- .pick_status.json: Mark e509598470c000498c3e1328e012142d9047e292 as denominated
- .pick_status.json: Update to 53a94fbdd57acbbe2bc745901cbfeca968e25273
- .pick_status.json: Update to 2505afc430c6b151e7e4243503953ba0b0a2c842
Erik Faye-Lund (3):
- meson: remove unused defines
- gallium/xlib: fix stale comment
- mesa: add missing error-path
Filip Gawin (1):
- r300: Print warning when stubbing derivatives
Gert Wollny (1):
- r600: Allow eight bit, three channel formats for vertex buffers
Icecream95 (1):
- panfrost: Fix pack_32_2x16 implementation
Iván Briano (1):
- vulkan/wsi/wayland: Fix double free on error condition
Jason Ekstrand (4):
- util/set: Respect found in search_or_add_pre_hashed
- nir: Lower all bit sizes of usub_borrow
- vulkan: Set signals[i].stageMask = ALL_COMMANDS for QueueSubmit2 wrapping
- spirv: Handle Op*MulExtended for non-32-bit types
Jordan Justen (3):
- vulkan/wsi/x11: Use atomic_int with sent_image_count
- iris: Fix assertion meant to only target the clear-color stride
- iris: Fix assertion meant to only target the clear-color stride
Juan A. Suarez Romero (1):
- mesa: unref syncobj after wait_sync
Konstantin Seurer (2):
- radv: Fix barriers with cp dma
- radv: Fix lowering ignore_ray_intersection
Lionel Landwerlin (6):
- nir/divergence: handle load_global_block_intel
- intel: fixup number of threads per EU on XeHP
- anv: fix acceleration structure descriptor template writes
- anv: skip acceleration structure in binding table emission
- anv: fix clflush usage on utrace copy batch
- anv: fix invalid utrace memcpy l3 config on gfx < 11
Marek Olšák (3):
- nir: fix an uninitialized variable valgrind warning in nir_group_loads
- ac/surface: fix an addrlib race condition on gfx9
- winsys/amdgpu: fix a mutex deadlock when we fail to create pipe_screen
Mike Blumenkrantz (10):
- wgl: support GL 4.6
- zink: fix tcs control barriers for use without vk memory model
- zink: fix semantics mask for compute control barriers
- zink: add synchronization for buffer clears
- mesa/st: clamp GL_RENDERBUFFER to GL_TEXTURE_2D for sparse queries
- glsl/nir: set new_style_shadow for sparse tex ops as necessary
- zink: fix group memory barrier emission
- vulkan: bump layer api versions to current vk header version
- llvmpipe: disable compute statistics queries if queries are disabled
- llvmpipe: disable statistic queries during draw if queries are disabled
Nanley Chery (2):
- Revert "anv: Disable CCS_E for some 8/16bpp copies on TGL+"
- iris: Return a 64B stride for clear color plane
Paulo Zanoni (1):
- iris: fix race condition during busy tracking
Pavel Ondračka (1):
- r300: set PIPE_BIND_CONSTANT_BUFFER for const_uploader
Pierre-Eric Pelloux-Prayer (1):
- ac/surface: adjust gfx9.pitch[*] based on surf->blk_w
Samuel Pitoiset (6):
- radv: only apply enable_mrt_output_nan_fixup for 32-bit float MRTs
- aco: fix load_barycentric_at_{sample,offset} on GFX6-7
- nir: fix marking XFB varyings as always active IO
- nir: mark XFB varyings as unmoveable to prevent them to be remapped
- radv: fix handling divisor == 0 with dynamic vertex input state
- radv: enable radv_disable_sinking_load_input_fs for Grid Autosport
Sviatoslav Peleshko (1):
- anv: workaround apps that assume full subgroups without specifying it
Tapani Pälli (1):
- isl: disable mcs (and mcs+ccs) for color msaa on DG2
Timothy Arceri (1):
- nir: fix sorting before assigning varying driver locations
Yevhenii Kolesnikov (1):
- nir: Remove single-source phis before opt_if_loop_last_continue

152
docs/relnotes/22.0.4.rst Normal file
View File

@@ -0,0 +1,152 @@
Mesa 22.0.4 Release Notes / 2022-05-19
======================================
Mesa 22.0.4 is a bug fix release which fixes bugs found since the 22.0.3 release.
Mesa 22.0.4 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.0.4 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- turnip: gfxbench mh3.1 offscreen crash with ANGLE
- [radv] DCC causes artifacts in Senran Kagura Shinovi Versus
- Radeon RX 5700XT crash when using prusa-slicer
- clover: Assertion \`NumContainedTys && "Attempting to get element type of opaque pointer"' failed
Changes
-------
Alyssa Rosenzweig (1):
- nir: Don't set writes_memory for reading XFB
Chia-I Wu (1):
- anv: advertise rectangularLines only for Gen10+
Danylo Piliaiev (3):
- tu: Fix indices of drm_msm_gem_submit_cmd when filling them
- tu: Do not flush ccu in clear/blits during renderpass
- pps: Open writable renderer node in DrmDevice::create
Dylan Baker (17):
- docs: Add sh256sum for mesa 20.0.3
- .pick_status.json: Update to 7f91e8fad94dd34f83c6a124dbbe5d210be7715f
- .pick_status.json: Update to 14b1ed1ce105d42652f70e2fd13c90fc4f2e7ffc
- .pick_status.json: Mark 69e6417e19793043e4bb3cd500cfcf377bce4c03 as denominated
- .pick_status.json: Mark c025cb9ee9d79ebfb66a577556e04deecfe012ed as denominated
- .pick_status.json: Mark 6317f88b044501354a052064478d5b43dfe41809 as denominated
- .pick_status.json: Mark 5ff3fa5912778adb8117fa26bfe4786b583e741b as denominated
- .pick_status.json: Mark 9a412c10b7a96adf71c9a2ca44a0abca75de1c49 as denominated
- .pick_status.json: Mark 0e49ef5c9f2ec34567613226ad498edca28bce88 as denominated
- .pick_status.json: Mark ae369e9f6d4f2c826f1f2a748c32a14f9d5f1f54 as denominated
- .pick_status.json: Update to 14b1ed1ce105d42652f70e2fd13c90fc4f2e7ffc
- .pick_status.json: Mark 8c1d9c7b744b2e5b40fd42cfd51256b16deea6a8 as denominated
- .pick_status.json: Mark f1d1371e512e32d03f7f54d873020e589ee67d47 as denominated
- .pick_status.json: Update to 57293dee2b11ba7e52052edc4d0437f08db19144
- .pick_status.json: Update to 5c90eb1c53f46e86717c6bf4d5253dd23c4dac1f
- .pick_status.json: Mark 5a3aee78cbb70918b413cdd40dffcae7c9e97d8c as denominated
- ci: Some panfrost tests are unexpectedly passing.
Georg Lehmann (1):
- nir/opt_algebraic: Fix mask in shift by constant combining.
Icecream95 (6):
- nir/lower_tex: Copy more fields in lower_tex_to_txd and friends
- pan/mdg: Keep min_bound at 16 when alignment requires it
- pan/mdg: Use MAX2 to set min_alignment
- pan/mdg: Fix mask usage when filling before a spill
- pan/mdg: Return the instruction from mir_insert_instruction_*_scheduled
- pan/mdg: Fix multiple spilt writes in the same bundle
Jason Ekstrand (4):
- vulkan/wsi: Set the right stage flags for semaphore waits
- gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers
- nir/cf: Return a cursor from nir_cf_extract as well
- nir: Preserve metadata if remove_dead_derefs makes no progress
Lionel Landwerlin (4):
- nir/cf: return cursor after insertion of cf_list
- nir/lower_shader_calls: don't use nop instructions as cursors
- nir/lower_shader_calls: don't insert code after break/continue
- nir/lower_shader_calls: put inserted instructions into a dummy block
Marcin Ślusarz (2):
- anv: update task/mesh distribution with the recommended values
- anv: disable streamout before emitting mesh shading state
Marek Olšák (2):
- ac/llvm: set the correct cache policy for sparse buffer loads
- radeonsi: fix a crash when failing to create a context
Mike Blumenkrantz (14):
- util/blitter: fix sampler restore with 0 saved samplers
- st/draw_feedback: set constant buffer stride
- llvmpipe: always set ssbo data pointers for draw
- gallivm: fix oob txf swizzling
- zink: fix up sparse texture sampling for shadow samplers
- zink: clamp out min_lod operands for explicit lod ops
- zink: fix sparse binding for arrayed textures
- zink: fix sparse texture depth calcs for arrayed textures
- zink: remove refs from shader images
- zink: reuse local res pointer in set_shader_images
- zink: simplify dumb update flagging in set_shader_images
- zink: read shader image r/w usage from incoming data struct
- zink: copy incoming shader image struct after doing updates
- zink: stop leaking shader image surfaces
Pavel Ondračka (1):
- r300: guard for unsigned underflow when unrolling loops
Pierre-Eric Pelloux-Prayer (2):
- radeonsi: don't use wave32 for GE on gfx10 if culling is used
- amd: fix ac_build_mbcnt_add in wave32 mode
Rhys Perry (1):
- aco/ra: fix vgpr_limit
Samuel Pitoiset (3):
- radv: re-emit dynamic line stipple state if the primitive topology changed
- radv: disable instance packing to fix pipeline query stats
- radv: disable DCC for Senra Kagura Shinovi Versus
Thomas Debesse (1):
- gallium/clover: pass -no-opaque-pointers to Clang

139
docs/relnotes/22.0.5.rst Normal file
View File

@@ -0,0 +1,139 @@
Mesa 22.0.5 Release Notes / 2022-06-01
======================================
Mesa 22.0.5 is a bug fix release which fixes bugs found since the 22.0.4 release.
Mesa 22.0.5 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.0.5 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- nir_lower_phis_to_regs_block: Assertion \`src->src.is_ssa' failed.
- Build failure on sparc
- Signal 6 (Aborted) when opening GTK3 applications
- radv: Conditional rendering on compute queue
- anv: line failure
- panfrost midgard - major issues with MelonDS emulator - not able to trace properly too
- Nheko misrendering on RK3399 (Mali T860)
Changes
-------
Daniel Schürmann (1):
- aco: fix spilling of phis without temp operands
Dave Airlie (2):
- meson: add build-id to pipe libraries
- lavapipe: fix depth bias offset flag enables.
Dylan Baker (6):
- docs: add sha256sum to 22.0.4 notes
- .pick_status.json: Update to 95d4e5435bf63239105a50370ebbbbdeb7fed2f8
- .pick_status.json: Update to ee2278de654853f1d6107e6ef6fc8537a668866e
- .pick_status.json: Update to 9773ed1dc74b98019640d909cdc2b5d6cffae85a
- .pick_status.json: Update to 5067a26f4432ae5e9690e70ef2498ea24798593e
- .pick_status.json: Update to 1c63a0beafefccec599ddbe355ec5a8b61df6438
Erik Faye-Lund (4):
- editorconfig: remove scons-ism
- editorconfig: remove html-rule
- editorconfig: remove m4-rule
- editorconfig: remove pl-rule
Filip Gawin (1):
- r300: keep negation if w is an inline constant
Hans-Kristian Arntzen (1):
- radv: Fix RTPSO hashing of pGroups.
Icecream95 (5):
- panfrost: Copy blend constant into variant even when reusing it
- nir: Add store_combined_output_pan BASE back
- pan/bi: Read base for combined stores
- pan/mdg: Read base for combined stores
- panfrost: Only write depth / stencil once if MRT is used
Jason Ekstrand (6):
- intel/fs: Copy color_outputs_valid into wm_prog_data
- anv: Drop alpha_to_coverage from the NULL FS optimization
- anv: Handle the null FS optimization after compiling shaders
- anv: Don't disable the fragment shader if XFB is enabled
- nir: Handle register sources in lower_phis_to_regs_block
- glsl/nir: Stop leaking varyings_info
Matt Turner (1):
- mesa: Drop dead #include "sparc/sparc.h"
Michael Skorokhodov (1):
- anv: Update line range
Mike Blumenkrantz (13):
- spirv: fix barrier scope assert
- zink: only reject non-blittable resource creation if it has no other binds
- zink: add extra validation for resource creation
- zink: remove input attachment usage when pruning surface usage
- zink: add extended usage and retry if resource creation fails
- zink: fix surface/bufferview cache comparisons
- zink: force render target usage for sampler-only resources
- zink: fix non-dynamic vertex stride update flagging
- turnip: fix assert for max xfb outputs
- zink: require draw params ext/cap in ntv if drawid is used
- zink: emit spirv cap for subgroup vote ops
- zink: drop wideLines requirement
- zink: drop largePoints requirement
Pierre-Eric Pelloux-Prayer (2):
- glx: set max values for pbuffer width / height
- radeonsi: don't use sel->nir in si_check_blend_dst_sampler_noop
Qiang Yu (1):
- radeonsi: lower nir_intrinsic_sparse_residency_code_and
Rhys Perry (1):
- aco: fix p_constaddr with a non-zero offset
Samuel Pitoiset (1):
- radv: fix writing buffer markers with non-zero memory offset
Timur Kristóf (1):
- radv: Implement conditional rendering for async compute queue.

3562
docs/relnotes/22.1.0.rst Normal file

File diff suppressed because it is too large Load Diff

168
docs/relnotes/22.1.1.rst Normal file
View File

@@ -0,0 +1,168 @@
Mesa 22.1.1 Release Notes / 2022-06-01
======================================
Mesa 22.1.1 is a bug fix release which fixes bugs found since the 22.1.0 release.
Mesa 22.1.1 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 22.1.1 implements the Vulkan 1.2 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA256 checksum
---------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- nir_lower_phis_to_regs_block: Assertion \`src->src.is_ssa' failed.
- Build failure on sparc
- Signal 6 (Aborted) when opening GTK3 applications
- radv: Conditional rendering on compute queue
- anv: line failure
- panfrost midgard - major issues with MelonDS emulator - not able to trace properly too
- Nheko misrendering on RK3399 (Mali T860)
Changes
-------
Alyssa Rosenzweig (1):
- pan/bi: Fix mov and pack_32_2x16
Boris Brezillon (1):
- dzn: Use the vk_sync_binary abstraction
Charmaine Lee (1):
- gallium/util: Increase the debug_flush map depth to 64
Daniel Schürmann (1):
- aco: fix spilling of phis without temp operands
Dave Airlie (2):
- lavapipe: fix depth bias offset flag enables.
- llvmpipe: flush resources for kms swrast path.
Dylan Baker (8):
- docs: add release notes for 22.1.0
- VERSION: bump for 22.1.0 final
- relnotes: Add sha256sum and fix minor formatting issues
- .pick_status.json: Update to 8b13ee75ba9f27ceac6b6180ca05d321caa13612
- .pick_status.json: Update to 95d4e5435bf63239105a50370ebbbbdeb7fed2f8
- .pick_status.json: Update to ee2278de654853f1d6107e6ef6fc8537a668866e
- .pick_status.json: Update to 9773ed1dc74b98019640d909cdc2b5d6cffae85a
- .pick_status.json: Update to 5067a26f4432ae5e9690e70ef2498ea24798593e
Erik Faye-Lund (4):
- editorconfig: remove scons-ism
- editorconfig: remove html-rule
- editorconfig: remove m4-rule
- editorconfig: remove pl-rule
Filip Gawin (1):
- r300: keep negation if w is an inline constant
Hans-Kristian Arntzen (1):
- radv: Fix RTPSO hashing of pGroups.
Icecream95 (5):
- panfrost: Copy blend constant into variant even when reusing it
- nir: Add store_combined_output_pan BASE back
- pan/bi: Read base for combined stores
- pan/mdg: Read base for combined stores
- panfrost: Only write depth / stencil once if MRT is used
Jason Ekstrand (8):
- radv: Add a sqtt entrypoint for CmdBindVertexBuffers2
- intel/fs: Copy color_outputs_valid into wm_prog_data
- anv: Drop alpha_to_coverage from the NULL FS optimization
- anv: Handle the null FS optimization after compiling shaders
- anv: Don't disable the fragment shader if XFB is enabled
- nir: Handle register sources in lower_phis_to_regs_block
- glsl/nir: Stop leaking varyings_info
- nir: Mark negative re-distribution on fadd as imprecise
Konstantin Seurer (1):
- radv: Fix handling of primitiveOffset
Matt Turner (1):
- mesa: Drop dead #include "sparc/sparc.h"
Michael Skorokhodov (1):
- anv: Update line range
Mike Blumenkrantz (10):
- turnip: fix assert for max xfb outputs
- zink: use a zink_render_pass_pipeline_state bit for fbfetch
- zink: add renderpass bits for color/depth r/w
- zink: only warn once for SRGB fb without KHR_swapchain_mutable_format
- zink: require draw params ext/cap in ntv if drawid is used
- zink: emit spirv cap for subgroup vote ops
- st/pbo_compute: use different calc for non-3d compute buffer sizing
- zink: make swapchain kill message more descriptive
- zink: drop wideLines requirement
- zink: drop largePoints requirement
Pierre-Eric Pelloux-Prayer (1):
- radeonsi: don't use sel->nir in si_check_blend_dst_sampler_noop
Qiang Yu (1):
- radeonsi: lower nir_intrinsic_sparse_residency_code_and
Rhys Perry (2):
- aco: fix p_constaddr with a non-zero offset
- aco/ra: fix usage of invalidated iterator
Samuel Pitoiset (1):
- radv: fix writing buffer markers with non-zero memory offset
Timur Kristóf (2):
- radv: Implement conditional rendering for async compute queue.
- radv: Disable predication for supass clear and image clears.
Yogesh Mohan Marimuthu (1):
- vulkan/wsi: fix extra free if buffer_blit_queue
Zack Rusin (4):
- svga: Don't try to build x86/x64 assembly on different arch's
- svga: finish readbacks before mapping resources
- svga: Use direct maps when GB objects are present
- svga: Add support for SVGAv3

View File

@@ -1,23 +0,0 @@
VK_EXT_color_write_enable on lavapipe
GL_ARB_texture_filter_anisotropic in llvmpipe
Anisotropic texture filtering in lavapipe
VK_EXT_shader_atomic_float2 on Intel and RADV.
VK_EXT_vertex_input_dynamic_state on RADV.
VK_KHR_timeline_semaphore on lavapipe
VK_EXT_external_memory_host on lavapipe
GL_AMD_pinned_memory on llvmpipe
GL 4.5 compatibility on llvmpipe
VK_EXT_primitive_topology_list_restart on RADV and lavapipe.
ES 3.2 on zink
VK_KHR_depth_stencil_resolve on lavapipe
VK_KHR_shader_integer_dot_product on RADV.
OpenGL FP16 support on llvmpipe
VK_KHR_shader_float16_int8 on lavapipe
VK_KHR_shader_subgroup_extended_types on lavapipe
VK_KHR_spirv_1_4 on lavapipe
Experimental raytracing support on RADV
VK_KHR_synchronization2 on Intel
NGG shader based culling is now enabled by default on GFX10.3 on RADV.
VK_KHR_maintenance4 on RADV
VK_KHR_format_feature_flags2 on RADV.
EGL_EXT_present_opaque on wayland

View File

@@ -48,8 +48,6 @@ typedef unsigned int drm_drawable_t;
typedef struct drm_clip_rect drm_clip_rect_t;
#endif
#include <GL/gl.h>
#include <stdint.h>
/**
@@ -153,32 +151,6 @@ struct __DRIswapControlExtensionRec {
unsigned int (*getSwapInterval)(__DRIdrawable *drawable);
};
/**
* Used by drivers that implement the GLX_MESA_swap_frame_usage extension.
*/
#define __DRI_FRAME_TRACKING "DRI_FrameTracking"
#define __DRI_FRAME_TRACKING_VERSION 1
struct __DRIframeTrackingExtensionRec {
__DRIextension base;
/**
* Enable or disable frame usage tracking.
*
* \since Internal API version 20030317.
*/
int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
/**
* Retrieve frame usage information.
*
* \since Internal API version 20030317.
*/
int (*queryFrameTracking)(__DRIdrawable *drawable,
int64_t * sbc, int64_t * missedFrames,
float * lastMissedUsage, float * usage);
};
/**
* Used by drivers that implement the GLX_SGI_video_sync extension.
*/
@@ -205,24 +177,6 @@ struct __DRImediaStreamCounterExtensionRec {
int64_t *msc);
};
#define __DRI_TEX_OFFSET "DRI_TexOffset"
#define __DRI_TEX_OFFSET_VERSION 1
struct __DRItexOffsetExtensionRec {
__DRIextension base;
/**
* Method to override base texture image with a driver specific 'offset'.
* The depth passed in allows e.g. to ignore the alpha channel of texture
* images where the non-alpha components don't occupy a whole texel.
*
* For GLX_EXT_texture_from_pixmap with AIGLX.
*/
void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
unsigned long long offset, GLint depth, GLuint pitch);
};
/* Valid values for format in the setTexBuffer2 function below. These
* values match the GLX tokens for compatibility reasons, but we
* define them here since the DRI interface can't depend on GLX. */
@@ -243,7 +197,7 @@ struct __DRItexBufferExtensionRec {
* setTexBuffer2 in version 2 of this interface
*/
void (*setTexBuffer)(__DRIcontext *pDRICtx,
GLint target,
int target,
__DRIdrawable *pDraw);
/**
@@ -255,8 +209,8 @@ struct __DRItexBufferExtensionRec {
* \since 2
*/
void (*setTexBuffer2)(__DRIcontext *pDRICtx,
GLint target,
GLint format,
int target,
int format,
__DRIdrawable *pDraw);
/**
* Method to release texture buffer in case some special platform
@@ -267,7 +221,7 @@ struct __DRItexBufferExtensionRec {
* \since 3
*/
void (*releaseTexBuffer)(__DRIcontext *pDRICtx,
GLint target,
int target,
__DRIdrawable *pDraw);
};
@@ -410,8 +364,8 @@ struct __DRI2fenceExtensionRec {
* \param flags a combination of __DRI2_FENCE_FLAG_xxx flags
* \param timeout the timeout in ns or __DRI2_FENCE_TIMEOUT_INFINITE
*/
GLboolean (*client_wait_sync)(__DRIcontext *ctx, void *fence,
unsigned flags, uint64_t timeout);
unsigned char (*client_wait_sync)(__DRIcontext *ctx, void *fence,
unsigned flags, uint64_t timeout);
/**
* This function enqueues a wait command into the command stream of
@@ -549,28 +503,6 @@ typedef struct __DRIdamageExtensionRec __DRIdamageExtension;
typedef struct __DRIloaderExtensionRec __DRIloaderExtension;
typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension;
/**
* Callback to getDrawableInfo protocol
*/
#define __DRI_GET_DRAWABLE_INFO "DRI_GetDrawableInfo"
#define __DRI_GET_DRAWABLE_INFO_VERSION 1
struct __DRIgetDrawableInfoExtensionRec {
__DRIextension base;
/**
* This function is used to get information about the position, size, and
* clip rects of a drawable.
*/
GLboolean (* getDrawableInfo) ( __DRIdrawable *drawable,
unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, drm_clip_rect_t ** pClipRects,
int * backX, int * backY,
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects,
void *loaderPrivate);
};
/**
* Callback to get system time for media stream counter extensions.
*/
@@ -591,7 +523,7 @@ struct __DRIsystemTimeExtensionRec {
* the rate of the "media stream counter". In practical terms, this is
* the frame refresh rate of the display.
*/
GLboolean (*getMSCRate)(__DRIdrawable *draw,
unsigned char (*getMSCRate)(__DRIdrawable *draw,
int32_t * numerator, int32_t * denominator,
void *loaderPrivate);
};
@@ -622,7 +554,7 @@ struct __DRIdamageExtensionRec {
void (*reportDamage)(__DRIdrawable *draw,
int x, int y,
drm_clip_rect_t *rects, int num_rects,
GLboolean front_buffer,
unsigned char front_buffer,
void *loaderPrivate);
};
@@ -721,9 +653,9 @@ struct __DRIswrastLoaderExtensionRec {
*
* \since 6
*/
GLboolean (*getImageShm2)(__DRIdrawable *readable,
int x, int y, int width, int height,
int shmid, void *loaderPrivate);
unsigned char (*getImageShm2)(__DRIdrawable *readable,
int x, int y, int width, int height,
int shmid, void *loaderPrivate);
};
/**
@@ -1509,7 +1441,7 @@ struct __DRIimageExtensionRec {
unsigned int use,
void *loaderPrivate);
GLboolean (*queryImage)(__DRIimage *image, int attrib, int *value);
unsigned char (*queryImage)(__DRIimage *image, int attrib, int *value);
/**
* The new __DRIimage will share the content with the old one, see dup(2).
@@ -1521,7 +1453,7 @@ struct __DRIimageExtensionRec {
*
* \since 2
*/
GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
unsigned char (*validateUsage)(__DRIimage *image, unsigned int use);
/**
* Unlike createImageFromName __DRI_IMAGE_FORMAT is not used but instead
@@ -1702,8 +1634,8 @@ struct __DRIimageExtensionRec {
*
* \since 15
*/
GLboolean (*queryDmaBufFormats)(__DRIscreen *screen, int max,
int *formats, int *count);
unsigned char (*queryDmaBufFormats)(__DRIscreen *screen, int max,
int *formats, int *count);
/*
* dmabuf format modifier query for a given format to support
@@ -1724,10 +1656,10 @@ struct __DRIimageExtensionRec {
*
* \since 15
*/
GLboolean (*queryDmaBufModifiers)(__DRIscreen *screen, int fourcc,
int max, uint64_t *modifiers,
unsigned int *external_only,
int *count);
unsigned char (*queryDmaBufModifiers)(__DRIscreen *screen, int fourcc,
int max, uint64_t *modifiers,
unsigned int *external_only,
int *count);
/**
* dmabuf format modifier attribute query for a given format and modifier.
@@ -1743,9 +1675,11 @@ struct __DRIimageExtensionRec {
*
* \since 16
*/
GLboolean (*queryDmaBufFormatModifierAttribs)(__DRIscreen *screen,
uint32_t fourcc, uint64_t modifier,
int attrib, uint64_t *value);
unsigned char (*queryDmaBufFormatModifierAttribs)(__DRIscreen *screen,
uint32_t fourcc,
uint64_t modifier,
int attrib,
uint64_t *value);
/**
* Create a DRI image from the given renderbuffer.
@@ -1839,7 +1773,7 @@ struct __DRIimageLookupExtensionRec {
*
* \since 2
*/
GLboolean (*validateEGLImage)(void *image, void *loaderPrivate);
unsigned char (*validateEGLImage)(void *image, void *loaderPrivate);
/**
* Lookup EGLImage after validateEGLImage(). No lock in this function.
@@ -2201,7 +2135,7 @@ struct __DRIbackgroundCallableExtensionRec {
* the context was created. This can be used by the loader to identify
* which context any callbacks are associated with.
*/
GLboolean (*isThreadSafe)(void *loaderPrivate);
unsigned char (*isThreadSafe)(void *loaderPrivate);
};
/**

View File

@@ -14,8 +14,6 @@ CHIPSET(0x4690, adl_gt1, "ADL-S GT1", "Intel(R) Graphics")
CHIPSET(0x4691, adl_gt1, "ADL-S GT1", "Intel(R) Graphics")
CHIPSET(0x4692, adl_gt1, "ADL-S GT1", "Intel(R) Graphics")
CHIPSET(0x4693, adl_gt05, "ADL-S GT0.5", "Intel(R) Graphics")
CHIPSET(0x4698, adl_gt1, "ADL-S GT1", "Intel(R) Graphics")
CHIPSET(0x4699, adl_gt1, "ADL-S GT1", "Intel(R) Graphics")
CHIPSET(0x4626, adl_gt2, "ADL GT2", "Intel(R) Graphics")
CHIPSET(0x4628, adl_gt2, "ADL GT2", "Intel(R) Graphics")

View File

@@ -39,6 +39,13 @@ if get_option('layout') != 'mirror'
error('`mirror` is the only build directory layout supported')
endif
amber = get_option('amber')
if amber
package_version_suffix=' Amber'
else
package_version_suffix=''
endif
# Arguments for the preprocessor, put these in a separate array from the C and
# C++ (cpp in meson terminology) arguments since they need to be added to the
# default arguments for both C and C++.
@@ -46,13 +53,18 @@ pre_args = [
'-D__STDC_CONSTANT_MACROS',
'-D__STDC_FORMAT_MACROS',
'-D__STDC_LIMIT_MACROS',
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
'-DPACKAGE_VERSION="@0@@1@"'.format(meson.project_version(), package_version_suffix),
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"',
]
c_args = []
cpp_args = []
with_moltenvk_dir = get_option('moltenvk-dir')
if amber
pre_args += '-DAMBER'
endif
with_vulkan_icd_dir = get_option('vulkan-icd-dir')
with_tests = get_option('build-tests')
with_aco_tests = get_option('build-aco-tests')
@@ -199,7 +211,15 @@ with_dri = dri_drivers.length() != 0
gallium_drivers = get_option('gallium-drivers')
if gallium_drivers.contains('auto')
if system_has_kms_drm
if amber
gallium_drivers = []
if with_dri_i915
warning('End user should use i915g. i915 should only be used for regression testing.')
endif
if with_dri_i965
warning('End user should use crocus or iris. i965 should only be used for regression testing.')
endif
elif system_has_kms_drm
# TODO: PPC, Sparc
if ['x86', 'x86_64'].contains(host_machine.cpu_family())
gallium_drivers = [
@@ -262,7 +282,9 @@ endif
_vulkan_drivers = get_option('vulkan-drivers')
if _vulkan_drivers.contains('auto')
if system_has_kms_drm
if host_machine.cpu_family().startswith('x86')
if amber
_vulkan_drivers = []
elif host_machine.cpu_family().startswith('x86')
_vulkan_drivers = ['amd', 'intel', 'swrast']
elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
_vulkan_drivers = ['swrast']
@@ -531,8 +553,22 @@ if with_glx != 'disabled'
endif
endif
with_glvnd = get_option('glvnd')
_glvnd = get_option('glvnd')
if _glvnd == 'true' or _glvnd == 'enabled' or (amber and _glvnd == 'auto')
with_glvnd = true
else
with_glvnd = false
endif
glvnd_vendor_name = get_option('glvnd-vendor-name')
if glvnd_vendor_name == 'auto'
if amber
glvnd_vendor_name = 'amber'
else
glvnd_vendor_name = 'mesa'
endif
endif
if with_glvnd
if with_platform_windows
error('glvnd cannot be used on Windows')
@@ -1124,7 +1160,6 @@ else
'-Werror=incompatible-pointer-types',
'-Werror=int-conversion',
'-Wimplicit-fallthrough',
'-Werror=thread-safety',
'-Wno-missing-field-initializers',
'-Wno-format-truncation',
'-fno-math-errno',
@@ -1136,6 +1171,10 @@ else
if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
_trial += ['-Werror=format', '-Wformat-security']
endif
# FreeBSD annotated <pthread.h> but Mesa isn't ready
if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
_trial += ['-Werror=thread-safety']
endif
foreach a : _trial
if cc.has_argument(a)
c_args += a
@@ -1208,11 +1247,22 @@ if host_machine.system() == 'windows'
endif
else
add_project_link_arguments(
'-Wl,--nxcompat',
'-Wl,--dynamicbase',
'-static-libgcc',
'-static-libstdc++',
language : ['c', 'cpp'],
cc.get_supported_link_arguments(
'-Wl,--nxcompat',
'-Wl,--dynamicbase',
'-static-libgcc',
'-static-libstdc++',
),
language : ['c'],
)
add_project_link_arguments(
cpp.get_supported_link_arguments(
'-Wl,--nxcompat',
'-Wl,--dynamicbase',
'-static-libgcc',
'-static-libstdc++',
),
language : ['cpp'],
)
endif
endif
@@ -2250,10 +2300,6 @@ if with_egl
lines += 'EGL drivers: ' + ' '.join(egl_drivers)
endif
if with_egl or with_any_vk
_platforms += 'surfaceless'
if with_gbm and not with_platform_android
_platforms += 'drm'
endif
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
endif
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')

View File

@@ -302,8 +302,9 @@ option(
)
option(
'glvnd',
type : 'boolean',
value : false,
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
description : 'Enable GLVND support.'
)
option(
@@ -321,7 +322,7 @@ option(
option(
'glvnd-vendor-name',
type : 'string',
value : 'mesa',
value : 'auto',
description : 'Vendor name string to use for glvnd libraries'
)
option(
@@ -457,14 +458,16 @@ option(
)
option(
'prefer-iris',
type : 'boolean',
value : true,
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
description : 'Prefer new Intel iris driver over older i965 driver'
)
option(
'prefer-crocus',
type : 'boolean',
value : false,
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
description : 'Prefer new crocus driver over older i965 driver for gen4-7'
)
option('egl-lib-suffix',
@@ -530,3 +533,9 @@ option(
value : false,
description : 'Build gallium VMware/svga driver with mksGuestStats instrumentation.'
)
option(
'amber',
type : 'boolean',
value : false,
description : 'Configure build for legacy devices (coexist with Mesa >= 22.0)'
)

View File

@@ -1,103 +0,0 @@
.test-radv:
extends:
- .test-vk
- .radv-rules
variables:
VK_DRIVER: radeon
DRIVER_NAME: radv
ACO_DEBUG: validateir,validatera
MESA_VK_IGNORE_CONFORMANCE_WARNING: 1
radv-navy_flounder-vkd3d-proton:
extends:
- .test-radv
- .vkd3d-proton-test
- .test-manual
variables:
VKD3D_PROTON_RESULTS: "navy_flounder"
tags:
- amdgpu:codename:NAVY_FLOUNDER
radv-navy_flounder-traces:
extends:
- .test-radv
- .piglit-traces-test
- .test-manual
variables:
PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-radv.yml"
PIGLIT_REPLAY_DEVICE_NAME: "vk-amd-navy_flounder"
PIGLIT_REPLAY_GFXRECON_REPLAY_EXTRA_ARGS: "-m rebind"
PIGLIT_RESULTS: "radv-navy_flounder-replay"
tags:
- amdgpu:codename:NAVY_FLOUNDER
radv-raven-traces:
extends:
- .test-radv
- .piglit-traces-test
- .test-manual
variables:
PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-radv.yml"
PIGLIT_REPLAY_DEVICE_NAME: "vk-amd-raven"
PIGLIT_RESULTS: "radv-raven-replay"
tags:
- amdgpu:codename:RAVEN
# Can only be triggered manually on personal branches because RADV is the only
# driver that does Vulkan testing at the moment.
radv_polaris10_vkcts:
extends:
- .deqp-test-vk
- .test-radv
- .test-manual
variables:
GPU_VERSION: radv-polaris10-aco
tags:
- polaris10
# Run three jobs in parallel each running 1/30th of the test suite
radv_stoney_vkcts:amd64:
extends:
- .lava-test:amd64
- .radv-rules
parallel: 3
variables:
DEQP_VER: vk
DEQP_FRACTION: 10
DEQP_PARALLEL: 4
DEQP_EXPECTED_RENDERER: STONEY
DEVICE_TYPE: hp-11A-G6-EE-grunt
DTB: ""
GPU_VERSION: radv-stoney-aco
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: ""
HWCI_KERNEL_MODULES: amdgpu
HWCI_FREQ_MAX: "true"
VK_DRIVER: radeon
DRIVER_NAME: radv
tags:
- mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radv-fossils:
extends:
- .fossilize-test
- .test-radv
script:
# Pitcairn (GFX6)
- export RADV_FORCE_FAMILY="pitcairn"
- ./install/fossilize-runner.sh
# Bonaire (GFX7)
- export RADV_FORCE_FAMILY="bonaire"
- ./install/fossilize-runner.sh
# Polaris10 (GFX8)
- export RADV_FORCE_FAMILY="polaris10"
- ./install/fossilize-runner.sh
# Vega10 (GFX9)
- export RADV_FORCE_FAMILY="vega10"
- ./install/fossilize-runner.sh
# Navi10 (GFX10)
- export RADV_FORCE_FAMILY="navi10"
- ./install/fossilize-runner.sh
# Sienna Cichlid (GFX10)
- export RADV_FORCE_FAMILY="sienna_cichlid"
- ./install/fossilize-runner.sh

View File

@@ -1,22 +0,0 @@
traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/"
traces:
- path: KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr
expectations:
- device: vk-amd-navy_flounder
checksum: 03f3a03ca175e8a05c4a2b6cff5c568c
- device: vk-amd-raven
checksum: 45f9a89c7eabdaee5bc52ad4f45e598f
- path: LunarG-VulkanSamples/amd/polaris10/Hologram:-w:640:-h:480.gfxr
expectations:
- device: vk-amd-navy_flounder
checksum: 77c449653e2af0f41272dca8daa9ae30
- device: vk-amd-raven
checksum: 7bc6948ef0388ae6ba368048c0eb6fed
- path: Wicked-Engine/Tests:Cloth_Physics_Test.trace-dxgi
expectations:
- device: vk-amd-navy_flounder
checksum: 09a2bb4296fdff3e15b6127cb66e6f21
- device: vk-amd-raven
checksum: 8515e09da1ea4d949468046af71ca06c

View File

@@ -1080,6 +1080,8 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
}
info->has_3d_cube_border_color_mipmap = info->has_graphics || info->family == CHIP_ARCTURUS;
info->never_stop_sq_perf_counters = info->chip_class == GFX10 ||
info->chip_class == GFX10_3;
info->max_sgpr_alloc = info->family == CHIP_TONGA || info->family == CHIP_ICELAND ? 96 : 104;
if (!info->has_graphics && info->family >= CHIP_ALDEBARAN) {
@@ -1168,6 +1170,7 @@ void ac_print_gpu_info(struct radeon_info *info, FILE *f)
fprintf(f, " has_ls_vgpr_init_bug = %i\n", info->has_ls_vgpr_init_bug);
fprintf(f, " has_32bit_predication = %i\n", info->has_32bit_predication);
fprintf(f, " has_3d_cube_border_color_mipmap = %i\n", info->has_3d_cube_border_color_mipmap);
fprintf(f, " never_stop_sq_perf_counters = %i\n", info->never_stop_sq_perf_counters);
fprintf(f, "Display features:\n");
fprintf(f, " use_display_dcc_unaligned = %u\n", info->use_display_dcc_unaligned);

View File

@@ -83,6 +83,7 @@ struct radeon_info {
bool has_cs_regalloc_hang_bug;
bool has_32bit_predication;
bool has_3d_cube_border_color_mipmap;
bool never_stop_sq_perf_counters;
/* Display features. */
/* There are 2 display DCC codepaths, because display expects unaligned DCC. */

View File

@@ -45,6 +45,7 @@ typedef struct
nir_variable *prim_exp_arg_var;
nir_variable *es_accepted_var;
nir_variable *gs_accepted_var;
nir_variable *gs_vtx_indices_vars[3];
struct u_vector saved_uniforms;
@@ -317,11 +318,16 @@ emit_pack_ngg_prim_exp_arg(nir_builder *b, unsigned num_vertices_per_primitives,
return arg;
}
static nir_ssa_def *
ngg_input_primitive_vertex_index(nir_builder *b, unsigned vertex)
static void
ngg_nogs_init_vertex_indices_vars(nir_builder *b, nir_function_impl *impl, lower_ngg_nogs_state *st)
{
return nir_ubfe(b, nir_build_load_gs_vertex_offset_amd(b, .base = vertex / 2u),
nir_imm_int(b, (vertex & 1u) * 16u), nir_imm_int(b, 16u));
for (unsigned v = 0; v < st->num_vertices_per_primitives; ++v) {
st->gs_vtx_indices_vars[v] = nir_local_variable_create(impl, glsl_uint_type(), "gs_vtx_addr");
nir_ssa_def *vtx = nir_ubfe(b, nir_build_load_gs_vertex_offset_amd(b, .base = v / 2u),
nir_imm_int(b, (v & 1u) * 16u), nir_imm_int(b, 16u));
nir_store_var(b, st->gs_vtx_indices_vars[v], vtx, 0x1);
}
}
static nir_ssa_def *
@@ -333,13 +339,8 @@ emit_ngg_nogs_prim_exp_arg(nir_builder *b, lower_ngg_nogs_state *st)
} else {
nir_ssa_def *vtx_idx[3] = {0};
vtx_idx[0] = ngg_input_primitive_vertex_index(b, 0);
vtx_idx[1] = st->num_vertices_per_primitives >= 2
? ngg_input_primitive_vertex_index(b, 1)
: nir_imm_zero(b, 1, 32);
vtx_idx[2] = st->num_vertices_per_primitives >= 3
? ngg_input_primitive_vertex_index(b, 2)
: nir_imm_zero(b, 1, 32);
for (unsigned v = 0; v < st->num_vertices_per_primitives; ++v)
vtx_idx[v] = nir_load_var(b, st->gs_vtx_indices_vars[v]);
return emit_pack_ngg_prim_exp_arg(b, st->num_vertices_per_primitives, vtx_idx, NULL, st->use_edgeflags);
}
@@ -358,12 +359,20 @@ emit_ngg_nogs_prim_export(nir_builder *b, lower_ngg_nogs_state *st, nir_ssa_def
arg = emit_ngg_nogs_prim_exp_arg(b, st);
if (st->export_prim_id && b->shader->info.stage == MESA_SHADER_VERTEX) {
/* Copy Primitive IDs from GS threads to the LDS address corresponding to the ES thread of the provoking vertex. */
nir_ssa_def *prim_id = nir_build_load_primitive_id(b);
nir_ssa_def *provoking_vtx_idx = ngg_input_primitive_vertex_index(b, st->provoking_vtx_idx);
nir_ssa_def *addr = pervertex_lds_addr(b, provoking_vtx_idx, 4u);
nir_ssa_def *prim_valid = nir_ieq_imm(b, nir_ushr_imm(b, arg, 31), 0);
nir_if *if_prim_valid = nir_push_if(b, prim_valid);
{
/* Copy Primitive IDs from GS threads to the LDS address
* corresponding to the ES thread of the provoking vertex.
* It will be exported as a per-vertex attribute.
*/
nir_ssa_def *prim_id = nir_build_load_primitive_id(b);
nir_ssa_def *provoking_vtx_idx = nir_load_var(b, st->gs_vtx_indices_vars[st->provoking_vtx_idx]);
nir_ssa_def *addr = pervertex_lds_addr(b, provoking_vtx_idx, 4u);
nir_build_store_shared(b, prim_id, addr, .write_mask = 1u, .align_mul = 4u);
nir_build_store_shared(b, prim_id, addr, .write_mask = 1u, .align_mul = 4u);
}
nir_pop_if(b, if_prim_valid);
}
nir_build_export_primitive_amd(b, arg);
@@ -747,6 +756,7 @@ compact_vertices_after_culling(nir_builder *b,
nir_ssa_def *vtx_addr = nir_load_var(b, gs_vtxaddr_vars[v]);
nir_ssa_def *exporter_vtx_idx = nir_build_load_shared(b, 1, 8, vtx_addr, .base = lds_es_exporter_tid, .align_mul = 1u);
exporter_vtx_indices[v] = nir_u2u32(b, exporter_vtx_idx);
nir_store_var(b, nogs_state->gs_vtx_indices_vars[v], exporter_vtx_indices[v], 0x1);
}
nir_ssa_def *prim_exp_arg = emit_pack_ngg_prim_exp_arg(b, 3, exporter_vtx_indices, NULL, nogs_state->use_edgeflags);
@@ -1142,7 +1152,7 @@ add_deferred_attribute_culling(nir_builder *b, nir_cf_list *original_extracted_c
/* Load vertex indices from input VGPRs */
nir_ssa_def *vtx_idx[3] = {0};
for (unsigned vertex = 0; vertex < 3; ++vertex)
vtx_idx[vertex] = ngg_input_primitive_vertex_index(b, vertex);
vtx_idx[vertex] = nir_load_var(b, nogs_state->gs_vtx_indices_vars[vertex]);
nir_ssa_def *vtx_addr[3] = {0};
nir_ssa_def *pos[3][4] = {0};
@@ -1320,6 +1330,8 @@ ac_nir_lower_ngg_nogs(nir_shader *shader,
nir_cf_extract(&extracted, nir_before_cf_list(&impl->body), nir_after_cf_list(&impl->body));
b->cursor = nir_before_cf_list(&impl->body);
ngg_nogs_init_vertex_indices_vars(b, impl, &state);
if (!can_cull) {
/* Allocate export space on wave 0 - confirm to the HW that we want to use all possible space */
nir_if *if_wave_0 = nir_push_if(b, nir_ieq(b, nir_build_load_subgroup_id(b), nir_imm_int(b, 0)));

View File

@@ -2303,7 +2303,9 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib, const struct radeon_
!(surf->flags & (RADEON_SURF_DISABLE_DCC | RADEON_SURF_FORCE_SWIZZLE_MODE |
RADEON_SURF_FORCE_MICRO_TILE_MODE)) &&
(surf->modifier == DRM_FORMAT_MOD_INVALID ||
ac_modifier_has_dcc(surf->modifier))) {
ac_modifier_has_dcc(surf->modifier)) &&
is_dcc_supported_by_DCN(info, config, surf, surf->u.gfx9.color.dcc.rb_aligned,
surf->u.gfx9.color.dcc.pipe_aligned)) {
/* Validate that DCC is enabled if DCN can do it. */
if ((info->use_display_dcc_unaligned || info->use_display_dcc_with_retile_blit) &&
AddrSurfInfoIn.flags.display && surf->bpe == 4) {

View File

@@ -223,7 +223,7 @@ struct gfx9_meta_equation {
* The gfx10 HTILE equation is chip-specific, it requires 64KB_Z_X, and it varies with:
* - number of samples
*/
uint16_t gfx10_bits[60];
uint16_t gfx10_bits[64];
} u;
};

View File

@@ -625,6 +625,10 @@ emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* inst
encoding = 0;
if (instr->opcode == aco_opcode::v_interp_mov_f32) {
encoding = 0x3 & instr->operands[0].constantValue();
} else if (instr->opcode == aco_opcode::v_writelane_b32_e64) {
encoding |= instr->operands[0].physReg() << 0;
encoding |= instr->operands[1].physReg() << 9;
/* Encoding src2 works fine with hardware but breaks some disassemblers. */
} else {
for (unsigned i = 0; i < instr->operands.size(); i++)
encoding |= instr->operands[i].physReg() << (i * 9);

View File

@@ -3038,7 +3038,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
bld.sop2(aco_opcode::s_cselect_b64, Definition(dst), Operand::c32(0x3f800000u),
Operand::zero(), bld.scc(src));
} else if (dst.regClass() == v2) {
Temp one = bld.copy(bld.def(v2), Operand::c32(0x3FF00000u));
Temp one = bld.copy(bld.def(v1), Operand::c32(0x3FF00000u));
Temp upper =
bld.vop2_e64(aco_opcode::v_cndmask_b32, bld.def(v1), Operand::zero(), one, src);
bld.pseudo(aco_opcode::p_create_vector, Definition(dst), Operand::zero(), upper);
@@ -3189,12 +3189,8 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
case nir_op_pack_32_4x8: bld.copy(Definition(dst), get_alu_src(ctx, instr->src[0], 4)); break;
case nir_op_pack_half_2x16_split: {
if (dst.regClass() == v1) {
nir_const_value* val = nir_src_as_const_value(instr->src[1].src);
if (val && val->u32 == 0 && ctx->program->chip_class <= GFX9) {
/* upper bits zero on GFX6-GFX9 */
bld.vop1(aco_opcode::v_cvt_f16_f32, Definition(dst), get_alu_src(ctx, instr->src[0]));
} else if (!ctx->block->fp_mode.care_about_round16_64 ||
ctx->block->fp_mode.round16_64 == fp_round_tz) {
if (!ctx->block->fp_mode.care_about_round16_64 ||
ctx->block->fp_mode.round16_64 == fp_round_tz) {
if (ctx->program->chip_class == GFX8 || ctx->program->chip_class == GFX9)
emit_vop3a_instruction(ctx, instr, aco_opcode::v_cvt_pkrtz_f16_f32_e64, dst);
else
@@ -5284,16 +5280,22 @@ visit_load_input(isel_context* ctx, nir_intrinsic_instr* instr)
}
}
if (instr->dest.ssa.num_components == 1) {
if (instr->dest.ssa.num_components == 1 &&
instr->dest.ssa.bit_size != 64) {
bld.vintrp(aco_opcode::v_interp_mov_f32, Definition(dst), Operand::c32(vertex_id),
bld.m0(prim_mask), idx, component);
} else {
unsigned num_components = instr->dest.ssa.num_components;
if (instr->dest.ssa.bit_size == 64)
num_components *= 2;
aco_ptr<Pseudo_instruction> vec{create_instruction<Pseudo_instruction>(
aco_opcode::p_create_vector, Format::PSEUDO, instr->dest.ssa.num_components, 1)};
for (unsigned i = 0; i < instr->dest.ssa.num_components; i++) {
aco_opcode::p_create_vector, Format::PSEUDO, num_components, 1)};
for (unsigned i = 0; i < num_components; i++) {
unsigned chan_component = (component + i) % 4;
unsigned chan_idx = idx + (component + i) / 4;
vec->operands[i] = bld.vintrp(
aco_opcode::v_interp_mov_f32, bld.def(instr->dest.ssa.bit_size == 16 ? v2b : v1),
Operand::c32(vertex_id), bld.m0(prim_mask), idx, component + i);
Operand::c32(vertex_id), bld.m0(prim_mask), chan_idx, chan_component);
}
vec->definitions[0] = Definition(dst);
bld.insert(std::move(vec));
@@ -8453,146 +8455,106 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
}
break;
}
case nir_intrinsic_quad_broadcast: {
Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
if (!nir_dest_is_divergent(instr->dest)) {
emit_uniform_subgroup(ctx, instr, src);
} else {
Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
unsigned lane = nir_src_as_const_value(instr->src[1])->u32;
uint32_t dpp_ctrl = dpp_quad_perm(lane, lane, lane, lane);
if (instr->dest.ssa.bit_size != 1)
src = as_vgpr(ctx, src);
if (instr->dest.ssa.bit_size == 1) {
assert(src.regClass() == bld.lm);
assert(dst.regClass() == bld.lm);
uint32_t half_mask = 0x11111111u << lane;
Temp mask_tmp = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2),
Operand::c32(half_mask), Operand::c32(half_mask));
Temp tmp = bld.tmp(bld.lm);
bld.sop1(Builder::s_wqm, Definition(tmp),
bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), mask_tmp,
bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), src,
Operand(exec, bld.lm))));
emit_wqm(bld, tmp, dst);
} else if (instr->dest.ssa.bit_size == 8) {
Temp tmp = bld.tmp(v1);
if (ctx->program->chip_class >= GFX8)
emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl), tmp);
else
emit_wqm(bld,
bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, (1 << 15) | dpp_ctrl),
tmp);
bld.pseudo(aco_opcode::p_split_vector, Definition(dst), bld.def(v3b), tmp);
} else if (instr->dest.ssa.bit_size == 16) {
Temp tmp = bld.tmp(v1);
if (ctx->program->chip_class >= GFX8)
emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl), tmp);
else
emit_wqm(bld,
bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, (1 << 15) | dpp_ctrl),
tmp);
bld.pseudo(aco_opcode::p_split_vector, Definition(dst), bld.def(v2b), tmp);
} else if (instr->dest.ssa.bit_size == 32) {
if (ctx->program->chip_class >= GFX8)
emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl), dst);
else
emit_wqm(bld,
bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, (1 << 15) | dpp_ctrl),
dst);
} else if (instr->dest.ssa.bit_size == 64) {
Temp lo = bld.tmp(v1), hi = bld.tmp(v1);
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), src);
if (ctx->program->chip_class >= GFX8) {
lo = emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), lo, dpp_ctrl));
hi = emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), hi, dpp_ctrl));
} else {
lo = emit_wqm(
bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), lo, (1 << 15) | dpp_ctrl));
hi = emit_wqm(
bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), hi, (1 << 15) | dpp_ctrl));
}
bld.pseudo(aco_opcode::p_create_vector, Definition(dst), lo, hi);
emit_split_vector(ctx, dst, 2);
} else {
isel_err(&instr->instr, "Unimplemented NIR instr bit size");
}
}
break;
}
case nir_intrinsic_quad_broadcast:
case nir_intrinsic_quad_swap_horizontal:
case nir_intrinsic_quad_swap_vertical:
case nir_intrinsic_quad_swap_diagonal:
case nir_intrinsic_quad_swizzle_amd: {
Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
if (!nir_dest_is_divergent(instr->dest)) {
emit_uniform_subgroup(ctx, instr, src);
break;
}
/* Quad broadcast lane. */
unsigned lane = 0;
/* Use VALU for the bool instructions that don't have a SALU-only special case. */
bool bool_use_valu = instr->dest.ssa.bit_size == 1;
uint16_t dpp_ctrl = 0;
switch (instr->intrinsic) {
case nir_intrinsic_quad_swap_horizontal: dpp_ctrl = dpp_quad_perm(1, 0, 3, 2); break;
case nir_intrinsic_quad_swap_vertical: dpp_ctrl = dpp_quad_perm(2, 3, 0, 1); break;
case nir_intrinsic_quad_swap_diagonal: dpp_ctrl = dpp_quad_perm(3, 2, 1, 0); break;
case nir_intrinsic_quad_swizzle_amd: dpp_ctrl = nir_intrinsic_swizzle_mask(instr); break;
case nir_intrinsic_quad_broadcast:
lane = nir_src_as_const_value(instr->src[1])->u32;
dpp_ctrl = dpp_quad_perm(lane, lane, lane, lane);
bool_use_valu = false;
break;
default: break;
}
if (ctx->program->chip_class < GFX8)
dpp_ctrl |= (1 << 15);
Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
Temp tmp(dst);
if (instr->dest.ssa.bit_size != 1)
src = as_vgpr(ctx, src);
if (instr->dest.ssa.bit_size == 1) {
assert(src.regClass() == bld.lm);
/* Setup source. */
if (bool_use_valu)
src = bld.vop2_e64(aco_opcode::v_cndmask_b32, bld.def(v1), Operand::zero(),
Operand::c32(-1), src);
else if (instr->dest.ssa.bit_size != 1)
src = as_vgpr(ctx, src);
/* Setup temporary destination. */
if (bool_use_valu)
tmp = bld.tmp(v1);
else if (ctx->program->stage == fragment_fs)
tmp = bld.tmp(dst.regClass());
if (instr->dest.ssa.bit_size == 1 && instr->intrinsic == nir_intrinsic_quad_broadcast) {
/* Special case for quad broadcast using SALU only. */
assert(src.regClass() == bld.lm && tmp.regClass() == bld.lm);
uint32_t half_mask = 0x11111111u << lane;
Operand mask_tmp = bld.lm.bytes() == 4
? Operand::c32(half_mask)
: bld.pseudo(aco_opcode::p_create_vector, bld.def(bld.lm),
Operand::c32(half_mask), Operand::c32(half_mask));
src =
bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), src, Operand(exec, bld.lm));
src = bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), mask_tmp, src);
bld.sop1(Builder::s_wqm, Definition(tmp), src);
} else if (instr->dest.ssa.bit_size <= 32 || bool_use_valu) {
unsigned excess_bytes = bool_use_valu ? 0 : 4 - instr->dest.ssa.bit_size / 8;
Definition def = excess_bytes ? bld.def(v1) : Definition(tmp);
if (ctx->program->chip_class >= GFX8)
src = bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl);
bld.vop1_dpp(aco_opcode::v_mov_b32, def, src, dpp_ctrl);
else
src = bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, dpp_ctrl);
Temp tmp = bld.vopc(aco_opcode::v_cmp_lg_u32, bld.def(bld.lm), Operand::zero(), src);
emit_wqm(bld, tmp, dst);
} else if (instr->dest.ssa.bit_size == 8) {
Temp tmp = bld.tmp(v1);
if (ctx->program->chip_class >= GFX8)
emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl), tmp);
else
emit_wqm(bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, dpp_ctrl), tmp);
bld.pseudo(aco_opcode::p_split_vector, Definition(dst), bld.def(v3b), tmp);
} else if (instr->dest.ssa.bit_size == 16) {
Temp tmp = bld.tmp(v1);
if (ctx->program->chip_class >= GFX8)
emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl), tmp);
else
emit_wqm(bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, dpp_ctrl), tmp);
bld.pseudo(aco_opcode::p_split_vector, Definition(dst), bld.def(v2b), tmp);
} else if (instr->dest.ssa.bit_size == 32) {
Temp tmp;
if (ctx->program->chip_class >= GFX8)
tmp = bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), src, dpp_ctrl);
else
tmp = bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), src, dpp_ctrl);
emit_wqm(bld, tmp, dst);
bld.ds(aco_opcode::ds_swizzle_b32, def, src, (1 << 15) | dpp_ctrl);
if (excess_bytes)
bld.pseudo(aco_opcode::p_split_vector, Definition(tmp),
bld.def(RegClass::get(tmp.type(), excess_bytes)), def.getTemp());
} else if (instr->dest.ssa.bit_size == 64) {
Temp lo = bld.tmp(v1), hi = bld.tmp(v1);
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), src);
if (ctx->program->chip_class >= GFX8) {
lo = emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), lo, dpp_ctrl));
hi = emit_wqm(bld, bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), hi, dpp_ctrl));
lo = bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), lo, dpp_ctrl);
hi = bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), hi, dpp_ctrl);
} else {
lo = emit_wqm(bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), lo, dpp_ctrl));
hi = emit_wqm(bld, bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), hi, dpp_ctrl));
lo = bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), lo, (1 << 15) | dpp_ctrl);
hi = bld.ds(aco_opcode::ds_swizzle_b32, bld.def(v1), hi, (1 << 15) | dpp_ctrl);
}
bld.pseudo(aco_opcode::p_create_vector, Definition(dst), lo, hi);
emit_split_vector(ctx, dst, 2);
bld.pseudo(aco_opcode::p_create_vector, Definition(tmp), lo, hi);
emit_split_vector(ctx, tmp, 2);
} else {
isel_err(&instr->instr, "Unimplemented NIR instr bit size");
isel_err(&instr->instr, "Unimplemented NIR quad group instruction bit size.");
}
if (tmp.id() != dst.id()) {
if (bool_use_valu)
tmp = bld.vopc(aco_opcode::v_cmp_lg_u32, bld.def(bld.lm), Operand::zero(), tmp);
/* Vulkan spec 9.25: Helper invocations must be active for quad group instructions. */
emit_wqm(bld, tmp, dst, true);
}
break;
}
case nir_intrinsic_masked_swizzle_amd: {
@@ -8696,7 +8658,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
/* load_helper() after demote() get lowered to is_helper().
* Otherwise, these two behave the same. */
Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
bld.pseudo(aco_opcode::p_is_helper, Definition(dst));
bld.pseudo(aco_opcode::p_is_helper, Definition(dst), Operand(exec, bld.lm));
ctx->block->kind |= block_kind_needs_lowering;
ctx->program->needs_exact = true;
break;
@@ -11172,7 +11134,7 @@ emit_stream_output(isel_context* ctx, Temp const* so_buffers, Temp const* so_wri
aco_opcode::p_create_vector, Format::PSEUDO, count, 1)};
for (int i = 0; i < count; ++i)
vec->operands[i] =
(ctx->outputs.mask[loc] & 1 << (start + i)) ? Operand(out[start + i]) : Operand::zero();
(ctx->outputs.mask[loc] & 1 << (start + first_comp + i)) ? Operand(out[start + i]) : Operand::zero();
vec->definitions[0] = Definition(write_data);
ctx->block->instructions.emplace_back(std::move(vec));
@@ -11212,17 +11174,6 @@ emit_streamout(isel_context* ctx, unsigned stream)
{
Builder bld(ctx->program, ctx->block);
Temp so_buffers[4];
Temp buf_ptr = convert_pointer_to_64_bit(ctx, get_arg(ctx, ctx->args->streamout_buffers));
for (unsigned i = 0; i < 4; i++) {
unsigned stride = ctx->program->info->so.strides[i];
if (!stride)
continue;
Operand off = bld.copy(bld.def(s1), Operand::c32(i * 16u));
so_buffers[i] = bld.smem(aco_opcode::s_load_dwordx4, bld.def(s4), buf_ptr, off);
}
Temp so_vtx_count =
bld.sop2(aco_opcode::s_bfe_u32, bld.def(s1), bld.def(s1, scc),
get_arg(ctx, ctx->args->ac.streamout_config), Operand::c32(0x70010u));
@@ -11239,13 +11190,18 @@ emit_streamout(isel_context* ctx, unsigned stream)
Temp so_write_index =
bld.vadd32(bld.def(v1), get_arg(ctx, ctx->args->ac.streamout_write_index), tid);
Temp so_buffers[4];
Temp so_write_offset[4];
Temp buf_ptr = convert_pointer_to_64_bit(ctx, get_arg(ctx, ctx->args->streamout_buffers));
for (unsigned i = 0; i < 4; i++) {
unsigned stride = ctx->program->info->so.strides[i];
if (!stride)
continue;
so_buffers[i] = bld.smem(aco_opcode::s_load_dwordx4, bld.def(s4), buf_ptr,
bld.copy(bld.def(s1), Operand::c32(i * 16u)));
if (stride == 1) {
Temp offset = bld.sop2(aco_opcode::s_add_i32, bld.def(s1), bld.def(s1, scc),
get_arg(ctx, ctx->args->ac.streamout_write_index),

Some files were not shown because too many files have changed in this diff Show More