platform/upstream/mesa.git
2 years agocso: add missing parameters into cso_set_vertex_buffers
Marek Olšák [Sun, 24 Oct 2021 07:56:29 +0000 (03:56 -0400)]
cso: add missing parameters into cso_set_vertex_buffers

they will be used later

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

2 years agomesa: add NewVertexBuffers/NewVertexElements flags to indicate state changes
Marek Olšák [Sun, 24 Oct 2021 07:28:53 +0000 (03:28 -0400)]
mesa: add NewVertexBuffers/NewVertexElements flags to indicate state changes

This splits the per-VAO NewArrays flag into NewVertexBuffers and
NewVertexElements, and adds a global NewVertexElements flag to be used
by drivers.

This allows gallium to skip updating vertex elements when only vertex
buffers need to be updated.

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

2 years agomesa: change gl_vertex_array_object::NewArrays to bool
Marek Olšák [Sun, 24 Oct 2021 21:46:09 +0000 (17:46 -0400)]
mesa: change gl_vertex_array_object::NewArrays to bool

the individual bits are never used

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

2 years agost/mesa: use POPCNT in st_update_array if the CPU supports it
Marek Olšák [Sun, 24 Oct 2021 03:25:00 +0000 (23:25 -0400)]
st/mesa: use POPCNT in st_update_array if the CPU supports it

The st_update_array overhead decreases from 8.28% to 7.67% for a viewperf
subtest.

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

2 years agost/mesa: change st_atom_array.c to cpp
Marek Olšák [Sun, 24 Oct 2021 02:53:30 +0000 (22:53 -0400)]
st/mesa: change st_atom_array.c to cpp

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

2 years agoutil: add a util_bitcount variant that selects POPCNT through C++ template arg
Marek Olšák [Sun, 24 Oct 2021 03:23:15 +0000 (23:23 -0400)]
util: add a util_bitcount variant that selects POPCNT through C++ template arg

Moved from radeonsi. st/mesa will use it.

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

2 years agor300: stub derivatives on r300 and r400 hardware
Filip Gawin [Wed, 3 Nov 2021 10:42:18 +0000 (11:42 +0100)]
r300: stub derivatives on r300 and r400 hardware

There are three approaches for problem:
- use dummy shader (current solution)
- use software rendering
- stub

First option always gonna give bad results, second one
gonna be slideshow (r300/r400 at best are running with
old 2 cores cpu), third one can sometimes give graphical
gliches.

IMHO third one is least annoying option.

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

2 years agofreedreno: Fix layered rendering to just Z/S and not color.
Emma Anholt [Wed, 3 Nov 2021 19:00:09 +0000 (12:00 -0700)]
freedreno: Fix layered rendering to just Z/S and not color.

We would try to take the gmem path which can't do layered rendering.

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

2 years agobuild: add sha1_h to llvmpipe build
Mike Blumenkrantz [Wed, 3 Nov 2021 19:53:45 +0000 (15:53 -0400)]
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>

2 years ago.mailmap: Simplify my name
Caio Oliveira [Wed, 3 Nov 2021 17:16:50 +0000 (10:16 -0700)]
.mailmap: Simplify my name

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

2 years agozink: add queue locking
Mike Blumenkrantz [Fri, 29 Oct 2021 15:06:34 +0000 (11:06 -0400)]
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>

2 years agozink: set PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY
Mike Blumenkrantz [Wed, 27 Oct 2021 18:30:38 +0000 (14:30 -0400)]
zink: set PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY

fixes #5557

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13556>

2 years agogallium: add PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY
Mike Blumenkrantz [Wed, 27 Oct 2021 18:28:53 +0000 (14:28 -0400)]
gallium: add PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY

vulkan requires that vertex attribute access be aligned to the size of
a component for the attribute, but GL has no such requirements

the existing alignment caps are unnecessarily restrictive for applying
this limitation, so this cap now pre-calculates the masks for elements
and vertex buffers in vbuf to enable rewriting misaligned buffers

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13556>

2 years agofreedreno/a6xx: Use the fdl buffer view setup for img/ssbo descriptors.
Emma Anholt [Fri, 29 Oct 2021 23:57:02 +0000 (16:57 -0700)]
freedreno/a6xx: Use the fdl buffer view setup for img/ssbo descriptors.

The single-plane descriptor emit helper doesn't strictly need the UBWC
reloc, since imageBuffer can't be UBWC, but it means the function is ready
to be used for non-buffer image descriptors later.

no-hw drawoverhead 1-imageBuffer change throughput 1.95457% +/- 1.44325%
(n=127).

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

2 years agofreedreno/fdl6: Add support for texture swizzles of A/L/I/LA/RGBx.
Emma Anholt [Tue, 19 Oct 2021 17:25:46 +0000 (10:25 -0700)]
freedreno/fdl6: Add support for texture swizzles of A/L/I/LA/RGBx.

To convert freedreno over, we need to support these formats where we remap
R or RG formats to GL compat ones, or RGBA to RGBx.

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

2 years agoturnip: Remove buffer-view cross-check code.
Emma Anholt [Tue, 19 Oct 2021 18:58:07 +0000 (11:58 -0700)]
turnip: Remove buffer-view cross-check code.

Now that I've tested storage.*buffer, I'm confident I've moved the buffer
views correctly.

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

2 years agoturnip: Use the new shared buffer-view descriptor creation function.
Emma Anholt [Tue, 19 Oct 2021 18:46:21 +0000 (11:46 -0700)]
turnip: Use the new shared buffer-view descriptor creation function.

This cross-checks that our descriptors match as I move the code.

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

2 years agofreedreno/fdl6: Add an interface for setting up buffer descriptors.
Emma Anholt [Tue, 19 Oct 2021 18:42:47 +0000 (11:42 -0700)]
freedreno/fdl6: Add an interface for setting up buffer descriptors.

Buffers don't need all the layout stuff that image views do, so it's
easier to have a separate interface for generating them.

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

2 years agofreedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.
Emma Anholt [Mon, 25 Oct 2021 19:57:15 +0000 (12:57 -0700)]
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>

2 years agofreedreno: Fix gmem invalidating the depth or stencil of packed d/s.
Emma Anholt [Wed, 3 Nov 2021 16:19:42 +0000 (09:19 -0700)]
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>

2 years agointel/compiler: Use gl_shader_stage_uses_workgroup() helpers
Caio Oliveira [Tue, 18 May 2021 17:01:49 +0000 (10:01 -0700)]
intel/compiler: Use gl_shader_stage_uses_workgroup() helpers

Instead of checking for MESA_SHADER_COMPUTE (and KERNEL).  Where
appropriate, also use gl_shader_stage_is_compute().

This allows most of the workgroup-related lowering to be applied to
Task and Mesh shaders.  These will be added later and "inherit" from
cs_prog_data structure.

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

2 years agointel/compiler: Make brw_nir_populate_wm_prog_data() static
Caio Oliveira [Mon, 17 May 2021 22:25:26 +0000 (15:25 -0700)]
intel/compiler: Make brw_nir_populate_wm_prog_data() static

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

2 years agoanv: Include viewport size in scissor rectangle
Vadym Shovkoplias [Thu, 28 Oct 2021 13:03:11 +0000 (16:03 +0300)]
anv: Include viewport size in scissor rectangle

Prevent drawing outside the viewport when viewport size
is smaller than framebuffer size.

v2: (Jason Ekstrand)
- re-emit scissor on viewport change
- do the same calculations for other platforms

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5515
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13594>

2 years agoanv: Process FS last when compiling graphics pipeline
Caio Marcelo de Oliveira Filho [Tue, 18 May 2021 18:34:59 +0000 (11:34 -0700)]
anv: Process FS last when compiling graphics pipeline

Enum values for MESA_SHADER_TASK and MESA_SHADER_MESH are larger than
MESA_SHADER_FRAGMENT, so can't rely on the them for ordering anymore.

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/13637>

2 years agoanv: Make shaders array in anv_graphics_pipeline fit Task/Mesh
Caio Marcelo de Oliveira Filho [Tue, 18 May 2021 18:17:30 +0000 (11:17 -0700)]
anv: Make shaders array in anv_graphics_pipeline fit Task/Mesh

We could decouple the locations in the array from the gl_shader_stage
enum values, but for now this is convenient.

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/13637>

2 years agoanv: Get rid of "may be used initialized" warning in anv_QueueSubmit2KHR
Caio Marcelo de Oliveira Filho [Wed, 3 Nov 2021 03:38:33 +0000 (20:38 -0700)]
anv: Get rid of "may be used initialized" warning in anv_QueueSubmit2KHR

The code is correct, but compiler can't see it.  Initialize the value
to NULL and assert on it if the function succeeds.  It both helps the
compiler and make the code slightly more robust.

```
../src/intel/vulkan/anv_queue.c: In function ‘anv_QueueSubmit2KHR’:
../src/intel/vulkan/anv_queue.c:932:16: warning: ‘impl’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  932 |       result = anv_queue_submit_add_timeline_wait(queue, submit,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  933 |                                                   &impl->timeline,
      |                                                   ~~~~~~~~~~~~~~~~
  934 |                                                   value);
      |                                                   ~~~~~~
../src/intel/vulkan/anv_queue.c:899:31: note: ‘impl’ was declared here
  899 |    struct anv_semaphore_impl *impl;
      |                               ^~~~
```

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13638>

2 years agofreedreno/computerator: Support A660 gpu
Danylo Piliaiev [Wed, 3 Nov 2021 10:00:44 +0000 (12:00 +0200)]
freedreno/computerator: Support A660 gpu

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13640>

2 years agotu: fix rast state allocation size on a6xx gen4
Danylo Piliaiev [Wed, 3 Nov 2021 12:05:23 +0000 (14:05 +0200)]
tu: fix rast state allocation size on a6xx gen4

A few regs were added without changing the size of draw state.

Fixes: 4e05338d99abbf2858a0d8444ffc53028fe23051 ("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>

2 years agozink: reject all storage multisampling if the feature is unsupported
Mike Blumenkrantz [Fri, 29 Oct 2021 16:13:43 +0000 (12:13 -0400)]
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>

2 years agozink: add SpvCapabilityStorageImageMultisample for multisampled storage images
Mike Blumenkrantz [Fri, 29 Oct 2021 16:11:14 +0000 (12:11 -0400)]
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>

2 years agobroadcom/compiler: check that sig packing is valid when pipelining ldvary
Iago Toral Quiroga [Wed, 3 Nov 2021 10:14:19 +0000 (11:14 +0100)]
broadcom/compiler: check that sig packing is valid when pipelining ldvary

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13641>

2 years agoglsl/nir: mark samplers inside a block as bindless
Pierre-Eric Pelloux-Prayer [Tue, 19 Oct 2021 16:13:49 +0000 (18:13 +0200)]
glsl/nir: mark samplers inside a block as bindless

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

2 years agomesa: don't reset SamplersValidated if nothing changed
Pierre-Eric Pelloux-Prayer [Tue, 19 Oct 2021 18:50:02 +0000 (20:50 +0200)]
mesa: don't reset SamplersValidated if nothing changed

This could prevent error detection, if a uniform change sets
SamplersValidated to true without calling _mesa_update_shader_textures_used.

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

2 years agoradv: optimize subpass barrier flushes for imageless framebuffers
Samuel Pitoiset [Mon, 11 Oct 2021 14:00:47 +0000 (16:00 +0200)]
radv: optimize subpass barrier flushes for imageless framebuffers

The driver should always know the attachments at this point. This
should reduce the number of L2 cache flushes for imageless framebuffers.

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/13291>

2 years agointel/compiler: Initialize SIMDSelectionTest member error.
Vinson Lee [Sat, 30 Oct 2021 21:30:47 +0000 (14:30 -0700)]
intel/compiler: Initialize SIMDSelectionTest member error.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member error is not initialized
in this constructor nor in any functions that it calls.

Fixes: 7558340ebb6 ("intel/compiler: Add helpers to select SIMD for compute shaders")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13608>

2 years agointel/compiler: Change selected_simd return type to int.
Vinson Lee [Sat, 30 Oct 2021 21:08:36 +0000 (14:08 -0700)]
intel/compiler: Change selected_simd return type to int.

brw_simd_select return type is int.

Fix defect reported by Coverity Scan.

Unsigned compared against 0 (NO_EFFECT)
unsigned_compare: This less-than-zero comparison of an unsigned value is never true. selected_simd < 0U.

Fixes: 7dda0cf2b8e ("intel/compiler: Use SIMD selection helpers for CS")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13606>

2 years agozink: stop double printing validation messages
Mike Blumenkrantz [Mon, 1 Nov 2021 14:58:35 +0000 (10:58 -0400)]
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>

2 years agoci: Uprev VK-GL-CTS to 1.2.7.2, and pull in piglit while I'm here.
Emma Anholt [Mon, 1 Nov 2021 17:49:03 +0000 (10:49 -0700)]
ci: Uprev VK-GL-CTS to 1.2.7.2, and pull in piglit while I'm here.

The VK-GL-CTS fixes some issues for freedreno, and almost all of LVP's
xfails.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13622>

2 years agomicrosoft/compiler: Use textures for SRVs
Jesse Natalie [Fri, 15 Oct 2021 21:56:03 +0000 (14:56 -0700)]
microsoft/compiler: Use textures for SRVs

After running the (renamed) dxil_nir_split_typed_samplers pass, the
shader will have either:
* Textures, which map to D3D SRVs
* Bare samplers, which map to D3D bare samplers
* Images, which map to D3D UAVs

There shouldn't be any remaining samplers with type information

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13390>

2 years agoutil/hash_table: Clear special 0/1 entries for u64 hash table too
Jesse Natalie [Fri, 15 Oct 2021 23:27:17 +0000 (16:27 -0700)]
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>

2 years agodocs: update radv extensions in features.txt
Rhys Perry [Tue, 2 Nov 2021 09:50:29 +0000 (09:50 +0000)]
docs: update radv extensions in features.txt

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13626>

2 years agobroadcom/compiler: make opt passes set current block
Iago Toral Quiroga [Tue, 2 Nov 2021 08:09:07 +0000 (09:09 +0100)]
broadcom/compiler: make opt passes set current block

Typically, optimization passes go through all the blocks in a shader
and make adjustments on the fly, so we always want them to update
the current block or the current block pointer will become outdated.

Also, we don't need to keep track of the previous current block
pointer to restore it, since optimization passes run after we have
completed conversion to VIR, and therefore, anything that comes after
that should always set the current block before emitting code.

Fixes debug assert crashes when running shader-db:
vir.c:1888: try_opt_ldunif: Assertion `found || &c->cur_block->instructions == c->cursor.link' failed

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13625>

2 years agofreedreno/ci: Test Turnip on Adreno 618
Tomeu Vizoso [Tue, 19 Oct 2021 09:14:10 +0000 (11:14 +0200)]
freedreno/ci: Test Turnip on Adreno 618

Collabora has added 7 new lazor Chromebooks which have Adreno 618 GPUs.

Run half of the test suite (plus variants) in pre-merge.

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>

2 years agoci: Let manual LAVA jobs have a longer timeout than others
Tomeu Vizoso [Fri, 22 Oct 2021 14:23:21 +0000 (16:23 +0200)]
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>

2 years agoci: Add support for lazor Chromebooks
Tomeu Vizoso [Tue, 19 Oct 2021 09:36:52 +0000 (11:36 +0200)]
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>

2 years agovirgl: Add driconf tweak to force-enable reading back R8_SRGB textures
Gert Wollny [Wed, 27 Oct 2021 10:12:30 +0000 (12:12 +0200)]
virgl: Add driconf tweak to force-enable reading back R8_SRGB textures

In the menu of CS:GO R8_SRGB textures are uploaded and read back, and
since R8_SRGB can't be read back on GLES, because it is not a rendertarget
format and glGetTexImage and siblings don't exists, we can't default to
enabling reading back this format. This leads to an emulation of the
glGetTexImage calls issued by CS:GO, and this slows down the menus a lot
(below 1 fps on Intel XE hosts).

So add this driconf tweak and enable it for CS:GO to work around the issue.
It can be done safely, because in this case we actually can use the data
that is stored on the host in the backing IOV.

This tweak lets the CS:GO menu run at around 60 FPS when run with virgl
on a Intel XE host when it would run with less than 1 FPS without the tweak.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13572>

2 years agoiris: fix off-by-one error when clearing stale syncobjs
Paulo Zanoni [Sat, 23 Oct 2021 00:17:02 +0000 (17:17 -0700)]
iris: fix off-by-one error when clearing stale syncobjs

This shouldn't fix any real world bugs, except it will now clear more
stale syncobjs than it was previously doing, and actually do what the
comment says it does.

I could not find a real workload where this change would be relevant,
although I didn't try too much. I wrote my own little egl program to
test this.

I spotted this while reading the code when investigating a Piglit
failure [0]. It turns out this part the code was not relvant for the
failure.

[0]: ext_external_objects-vk-image-display-overwrite

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/13536>

2 years agoradv: only enable VK_EXT_display_control for vrcompositor (SteamVR)
Samuel Pitoiset [Mon, 1 Nov 2021 18:29:31 +0000 (19:29 +0100)]
radv: only enable VK_EXT_display_control for vrcompositor (SteamVR)

One CTS test is still failing and the fix isn't upstream yet.

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/13623>

2 years agov3dv: Implement VK_KHR_create_renderpass2
Ella Stanforth [Thu, 28 Oct 2021 08:29:33 +0000 (08:29 +0000)]
v3dv: Implement VK_KHR_create_renderpass2

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13575>

2 years agopanfrost/ci: update piglit tests expectations on G52
Guilherme Gallo [Mon, 1 Nov 2021 23:05:44 +0000 (20:05 -0300)]
panfrost/ci: update piglit tests expectations on G52

Because we aren't running this test on pre-merge, the expectations have
gone out of sync with the code. Sync them again.

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>

2 years agoci/freedreno: Add maxcpus=2 to the kernel cmdline on a530
Guilherme Gallo [Mon, 1 Nov 2021 22:26:02 +0000 (19:26 -0300)]
ci/freedreno: Add maxcpus=2 to the kernel cmdline on a530

It seems that the cpufreq support in a530 is not rock solid yet, as the
device intermittently reboots during the boot process.

Passing `maxcpus=2` to the kernel avoids this issue.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13089>

2 years agoiris/ci: Fix traces for amly and deqp list for whl
Guilherme Gallo [Mon, 1 Nov 2021 21:55:36 +0000 (18:55 -0300)]
iris/ci: Fix traces for amly and deqp list for whl

These are manual jobs, so the expected results got out of date.

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>

2 years agoci: Update linux kernel to v5.15
Guilherme Gallo [Wed, 13 Oct 2021 16:25:08 +0000 (13:25 -0300)]
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>

2 years agoxmlconfig_test: add unit test for executable_regexp
Qiang Yu [Wed, 13 Oct 2021 03:15:22 +0000 (11:15 +0800)]
xmlconfig_test: add unit test for executable_regexp

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13304>

2 years agodrirc: add Mari application workaround
Qiang Yu [Tue, 12 Oct 2021 03:46:28 +0000 (11:46 +0800)]
drirc: add Mari application workaround

To allow using non-constant sampler array index. This prevent
Mari render fail for any scene.

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/13304>

2 years agodriconf: add executable_regexp application attribute
Qiang Yu [Tue, 12 Oct 2021 07:23:27 +0000 (15:23 +0800)]
driconf: add executable_regexp application attribute

For matching executable with variable names like Mari which
append version string to its executable like: Mari4.5v2, Mari4.7v4.

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/13304>

2 years agozink: Remove duplicate variable unsized.
Vinson Lee [Sat, 30 Oct 2021 21:17:10 +0000 (14:17 -0700)]
zink: Remove duplicate variable unsized.

Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In unsized = unsized =
glsl_array_type(glsl_uintN_t_type(bit_size), 0U, bit_size / 8U),
unsized is written twice with the same value.

Fixes: f79a25653b9 ("zink: move all shader bo/sharedmem access to compiler passes")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13607>

2 years agovulkan/wsi: set correct bits for host allocations/exports for images.
Dave Airlie [Sun, 31 Oct 2021 23:21:01 +0000 (09:21 +1000)]
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: 895d3399f7fb ("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>

2 years agoradv: Disable coherent L2 optimization on cards with noncoherent L2.
Bas Nieuwenhuizen [Mon, 1 Nov 2021 15:39:50 +0000 (16:39 +0100)]
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: fd8210f27ed ("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>

2 years agofrontends/va: Return error in vaRenderPicture if decoder is NULL
Lorenz Brun [Wed, 9 Jun 2021 15:41:12 +0000 (17:41 +0200)]
frontends/va: Return error in vaRenderPicture if decoder is NULL

This fixes a crash if a data slice is submitted before the decoder
is initialized. A well-behaved application shouldn't encounter this
but returning an error is still better than crashing the entire
process and the rest of the code is similarly defensive.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11792>

2 years agointel/fs: Fix a cmod prop bug when cmod is set to inst that doesn't support it
Vadym Shovkoplias [Thu, 21 Oct 2021 20:06:29 +0000 (23:06 +0300)]
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: 32b7ba66b01 ("intel/compiler: fix cmod propagation optimisations")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13268>

2 years agoi915g: Improve the explanation for the 1D Y swizzle.
Emma Anholt [Thu, 28 Oct 2021 17:20:01 +0000 (10:20 -0700)]
i915g: Improve the explanation for the 1D Y swizzle.

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

2 years agoi915g: Make sure we consider negates/swizzles on bias/shadow coords.
Emma Anholt [Fri, 1 Oct 2021 04:12:00 +0000 (21:12 -0700)]
i915g: Make sure we consider negates/swizzles on bias/shadow coords.

Caught by imirkin while debugging #4986.

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

2 years agoi915g: Check for negate/swizzle on TGSI_OPCODE_KILL_IF's src.yzw.
Emma Anholt [Fri, 1 Oct 2021 19:26:59 +0000 (12:26 -0700)]
i915g: Check for negate/swizzle on TGSI_OPCODE_KILL_IF's src.yzw.

Caught by imirkin while debugging #4986.

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

2 years agoetnaviv: Switch to the NIR compiler by default.
Emma Anholt [Tue, 26 Oct 2021 23:34:05 +0000 (16:34 -0700)]
etnaviv: Switch to the NIR compiler by default.

This was the conclusion for the next action in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12889, and I
wanted to get moving on it as part of !8044.  I made the change as
mechanical as possible to ease review.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13535>

2 years agoradv: rename radv_shader_variant to radv_shader
Samuel Pitoiset [Wed, 27 Oct 2021 11:20:29 +0000 (13:20 +0200)]
radv: rename radv_shader_variant to radv_shader

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/13548>

2 years agodocs: document RADV_THREAD_TRACE_* envvars
Samuel Pitoiset [Fri, 22 Oct 2021 07:41:56 +0000 (09:41 +0200)]
docs: document RADV_THREAD_TRACE_* envvars

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/13477>

2 years agoradv: stop reporting SQTT/RGP support as experimental
Samuel Pitoiset [Wed, 20 Oct 2021 06:53:07 +0000 (08:53 +0200)]
radv: stop reporting SQTT/RGP support as experimental

It can be considered stable these days. This also now reports the
buffer size and if instruction timing is enabled/disabled.

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/13477>

2 years agoradv: enable SQTT instruction timing by default
Samuel Pitoiset [Fri, 22 Oct 2021 07:31:00 +0000 (09:31 +0200)]
radv: enable SQTT instruction timing by default

It seems stable enough to turn it on by default. This replaces
RADV_THREAD_TRACE_PIPELINE by RADV_THREAD_TRACE_INSTRUCTION_TIMING
which is enabled by default.

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/13477>

2 years agoradv: remove useless checks about GFX7 for SQTT
Samuel Pitoiset [Wed, 20 Oct 2021 08:15:09 +0000 (10:15 +0200)]
radv: remove useless checks about GFX7 for SQTT

It's only enabled on GFX8+.

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/13477>

2 years agoradv: move freeing the trigger SQTT file at a better place
Samuel Pitoiset [Wed, 20 Oct 2021 06:43:01 +0000 (08:43 +0200)]
radv: move freeing the trigger SQTT file at a better place

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/13477>

2 years agoci/etnaviv: add manual piglit testing
Christian Gmeiner [Fri, 1 Oct 2021 10:26:41 +0000 (12:26 +0200)]
ci/etnaviv: add manual piglit testing

Initial work by Christian, polishing by @anholt.  Takes ~21 minutes, and
flakes may not be fully classified yet.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>

2 years agoci/etnaviv: Add some more deqp flakes I've seen in recent runs.
Emma Anholt [Wed, 27 Oct 2021 22:38:30 +0000 (15:38 -0700)]
ci/etnaviv: Add some more deqp flakes I've seen in recent runs.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>

2 years agoci/etnaviv: Fix the dependency for the build artifacts.
Emma Anholt [Thu, 28 Oct 2021 21:59:37 +0000 (14:59 -0700)]
ci/etnaviv: Fix the dependency for the build artifacts.

This is an armhf board, not arm64.  Fixes 404s from trying to pull the
artifacts early.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>

2 years agolavapipe: Don't wrap errors returned from vk_device_init in vk_error
Jason Ekstrand [Mon, 1 Nov 2021 04:23:37 +0000 (23:23 -0500)]
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: 47adb1114376 ("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>

2 years agozink: force float dest types on some alu results
Mike Blumenkrantz [Wed, 27 Oct 2021 20:58:41 +0000 (16:58 -0400)]
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>

2 years agozink: add more int/float types to cast switching in ntv
Mike Blumenkrantz [Wed, 27 Oct 2021 20:58:10 +0000 (16:58 -0400)]
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>

2 years agozink: explicitly enable VK_EXT_shader_subgroup_ballot
Mike Blumenkrantz [Wed, 27 Oct 2021 20:42:32 +0000 (16:42 -0400)]
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>

2 years agozink: clamp max buffer sizes to smallest buffer heap size
Mike Blumenkrantz [Thu, 28 Oct 2021 13:49:03 +0000 (09:49 -0400)]
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>

2 years agozink: error when trying to allocate a bo larger than heap size
Mike Blumenkrantz [Thu, 28 Oct 2021 13:48:15 +0000 (09:48 -0400)]
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>

2 years agozink: don't clamp 2D_ARRAY surfaces to 2D
Mike Blumenkrantz [Thu, 28 Oct 2021 14:31:40 +0000 (10:31 -0400)]
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>

2 years agozink: don't clamp cube array surfacess to cubes
Mike Blumenkrantz [Thu, 28 Oct 2021 14:03:22 +0000 (10:03 -0400)]
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>

2 years agozink: be more spec-compliant for unnormalizedCoordinates samplers
Mike Blumenkrantz [Thu, 28 Oct 2021 15:30:11 +0000 (11:30 -0400)]
zink: be more spec-compliant for unnormalizedCoordinates samplers

the spec prohibits using most stuff with these, but also they probably
are just texelfetch anyway so it doesn't matter

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

2 years agolavapipe: drop EXT_acquire_xlib_display
Dave Airlie [Sun, 31 Oct 2021 23:31:08 +0000 (09:31 +1000)]
lavapipe: drop EXT_acquire_xlib_display

This has a requirement on the display extensions.

VK-GL-CTS: dEQP-VK.info.instance_extensions

Fixes: 1d574d486030 ("lavapipe: remove display extension support")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13616>

2 years agofreedreno/ir3: xfb fix for duplicate outputs
Rob Clark [Sat, 30 Oct 2021 17:51:59 +0000 (10:51 -0700)]
freedreno/ir3: xfb fix for duplicate outputs

We can't rely on regid to be unique, shaders can have multiple varyings
with the same output value.  Normally shader linking deduplicates these,
but we still need to handle the case for xfb.  So use slot instead as
the unique identifier.

Fixes KHR-GLES31.core.gpu_shader5.fma_precision_*

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

2 years agofreedreno/ir3/print: Show end's outidxs
Rob Clark [Sat, 30 Oct 2021 19:29:01 +0000 (12:29 -0700)]
freedreno/ir3/print: Show end's outidxs

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

2 years agozink: flag renderpass change when toggling fbfetch
Mike Blumenkrantz [Fri, 29 Oct 2021 15:35:01 +0000 (11:35 -0400)]
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>

2 years agoRevert "iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13"
Jordan Justen [Wed, 27 Oct 2021 20:46:08 +0000 (13:46 -0700)]
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 d4174f5f052f614a10df2ebc905aec8c4897b057.

Fixes: d4174f5f052 ("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>

2 years agoir3: Don't emit barriers for make_available/make_visible
Connor Abbott [Fri, 29 Oct 2021 17:02:25 +0000 (19:02 +0200)]
ir3: Don't emit barriers for make_available/make_visible

When looking at the output of some CTS tests, I realized that the
barriers vtn currently inserts to emulate coherent memory accesses
were being turned into fences, even though we never needed to do
anything special for coherent accesses before so presumably accesses are
already cache-coherent by default. Ignore make_visible/make_available
semantics to get us back to parity with the old path.

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

2 years agovulkan: Move all the common object code to runtime/
Jason Ekstrand [Fri, 1 Oct 2021 21:45:44 +0000 (16:45 -0500)]
vulkan: Move all the common object code to runtime/

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan: Move trampoline code-gen to its own file
Jason Ekstrand [Fri, 1 Oct 2021 22:26:29 +0000 (17:26 -0500)]
vulkan: Move trampoline code-gen to its own file

This way we sepaprate the raw tables from the code that actively depends
on vk_device and friends.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan: Break entrypoint parsing into its own file
Jason Ekstrand [Fri, 1 Oct 2021 22:43:04 +0000 (17:43 -0500)]
vulkan: Break entrypoint parsing into its own file

Instead of having a bunch of stuff depend on vk_dispatch_table_gen to
get the list of entrypoints, pull that into its own vk_entrypoints file.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan/dispatch_table: EntrypointBase doesn't need to derive from object
Jason Ekstrand [Fri, 29 Oct 2021 17:27:35 +0000 (12:27 -0500)]
vulkan/dispatch_table: EntrypointBase doesn't need to derive from object

We use python3 now and everything derives from object automatically

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan: Drop unnecessary [en]coding comments from python generators
Jason Ekstrand [Fri, 29 Oct 2021 17:31:32 +0000 (12:31 -0500)]
vulkan: Drop unnecessary [en]coding comments from python generators

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan: Rework mako error handling in python generators
Jason Ekstrand [Fri, 29 Oct 2021 17:23:45 +0000 (12:23 -0500)]
vulkan: Rework mako error handling in python generators

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agolavapipe: Use vk_instance_get_proc_addr_unchecked for WSI
Jason Ekstrand [Fri, 1 Oct 2021 22:28:31 +0000 (17:28 -0500)]
lavapipe: Use vk_instance_get_proc_addr_unchecked for WSI

It exists precisely to handle this case without the driver looking up
trampolines itself.  This is nearly identical to what ANV does.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agov3dv: Use vk_instance_get_proc_addr_unchecked for WSI
Jason Ekstrand [Fri, 1 Oct 2021 22:25:40 +0000 (17:25 -0500)]
v3dv: Use vk_instance_get_proc_addr_unchecked for WSI

It exists precisely to handle this case without the driver looking up
trampolines itself.  This is nearly identical to what ANV does.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan/vk_extensions_gen: Stop including vk_object.h
Jason Ekstrand [Fri, 1 Oct 2021 22:07:56 +0000 (17:07 -0500)]
vulkan/vk_extensions_gen: Stop including vk_object.h

All we need from it is vulkan_common.h for VkExtensionProperties.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agovulkan/vk_extensions_gen: Drop support for extra includes
Jason Ekstrand [Fri, 1 Oct 2021 22:04:35 +0000 (17:04 -0500)]
vulkan/vk_extensions_gen: Drop support for extra includes

No one is using this anymore.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>

2 years agoclover: Add constructor for image_rd_argument.
Vinson Lee [Sat, 23 Oct 2021 02:04:21 +0000 (19:04 -0700)]
clover: Add constructor for image_rd_argument.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13500>