platform/upstream/mesa.git
19 months agovulkan/wsi: Allow platform code to define extra dependencies
Boris Brezillon [Wed, 27 Apr 2022 16:03:11 +0000 (18:03 +0200)]
vulkan/wsi: Allow platform code to define extra dependencies

Needed for the windows platform if we want to hook up DXGI swapchains.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Add support for image -> image blits
Boris Brezillon [Wed, 27 Apr 2022 16:25:34 +0000 (18:25 +0200)]
vulkan/wsi: Add support for image -> image blits

The win32 swapchain can be backed by a DXGI swapchain, but such swapchains
are incompatible with STORAGE images (AKA UNORDERED_ACCESS usage in
DXGI). So, we need to allocate an intermediate image that will serve as
a render-target, and copy this image to the WSI image when QueuePresent()
is called. That's pretty similar to what we do for the buffer blit case,
except the image -> buffer copy is replaced by an image -> image copy.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Dissociate the blit context and image configuration steps
Boris Brezillon [Wed, 27 Apr 2022 16:19:40 +0000 (18:19 +0200)]
vulkan/wsi: Dissociate the blit context and image configuration steps

Even if all implementations wsi_configure_buffer_image() will need to
configure the image as well, it feels a bit weird to call
wsi_configure_image() from there, so let's the
wsi_configure_buffer_image() users call wsi_configure_image() too.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Prepare things for image to image blits
Boris Brezillon [Wed, 27 Apr 2022 16:17:06 +0000 (18:17 +0200)]
vulkan/wsi: Prepare things for image to image blits

Right now, the WSI core supports copying WSI images to a linear buffer
for implementations that want the result in this form. This being said,
most of the blit logic can be re-used for image to image copies, and that's
exactly what we'll need if we want to hook-up DXGI swapchains in the
win32 WSI implementation. So let's rename a few fields so we no longer
imply that images are copied to a buffer, and the use_buffer_blit boolean
an enum so we can extend the implementation to support image -> image
copies.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Don't set use_buffer_blit manually in the win32 WSI logic
Boris Brezillon [Wed, 27 Apr 2022 18:07:50 +0000 (20:07 +0200)]
vulkan/wsi: Don't set use_buffer_blit manually in the win32 WSI logic

We can simply pass use_buffer_blit=true to wsi_swapchain_init().

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Simplify wsi_win32_surface_create_swapchain() error path
Boris Brezillon [Thu, 28 Apr 2022 07:03:04 +0000 (00:03 -0700)]
vulkan/wsi: Simplify wsi_win32_surface_create_swapchain() error path

We are about to add more to this function, so let's try to automate
the cleanup steps in the error path. Incrementing image_count as
we add new images to the swapchain allows us to call
wsi_win32_swapchain_destroy() even if not all images were initialized.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agovulkan/wsi: Indent fixes in ws_common_win32.c
Boris Brezillon [Thu, 28 Apr 2022 06:57:35 +0000 (23:57 -0700)]
vulkan/wsi: Indent fixes in ws_common_win32.c

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agomeson: Define VK_USE_PLATFORM_WIN32_KHR for C++
Jesse Natalie [Wed, 16 Nov 2022 15:37:02 +0000 (07:37 -0800)]
meson: Define VK_USE_PLATFORM_WIN32_KHR for C++

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>

19 months agodocs: update new_features.txt for additional work with RADV
Samuel Pitoiset [Tue, 10 Jan 2023 13:01:25 +0000 (14:01 +0100)]
docs: update new_features.txt for additional work with RADV

This release (23.0) contains less features than usual but the last
branchpoint was delayed and we had end of year holidays.

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

19 months agointel/compiler: fine-grained control of dispatch widths
Marcin Ślusarz [Thu, 5 Jan 2023 14:39:28 +0000 (15:39 +0100)]
intel/compiler: fine-grained control of dispatch widths

Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20535>

19 months agoci/venus: re-enable venus-lavapipe
Yiwei Zhang [Tue, 10 Jan 2023 21:12:08 +0000 (13:12 -0800)]
ci/venus: re-enable venus-lavapipe

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19542>

19 months agoci/venus: specify render server path to enable server config
Yiwei Zhang [Sat, 5 Nov 2022 06:58:13 +0000 (23:58 -0700)]
ci/venus: specify render server path to enable server config

The render server path is required by crosvm to enable render server.

v2: updated script to package server binary properly

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com> (v1)
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19542>

19 months agoci: uprev virglrenderer
Yiwei Zhang [Tue, 10 Jan 2023 01:27:06 +0000 (17:27 -0800)]
ci: uprev virglrenderer

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19542>

19 months agoFix incorrect stage reference
Giancarlo Devich [Tue, 10 Jan 2023 23:33:27 +0000 (15:33 -0800)]
Fix incorrect stage reference

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

19 months agod3d12: Unionize shader variables in d3d12_shader_key to reduce size
Giancarlo Devich [Mon, 9 Jan 2023 20:35:08 +0000 (12:35 -0800)]
d3d12: Unionize shader variables in d3d12_shader_key to reduce size

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

19 months agodocs: Add short documentation about RMV tracing variables
Friedrich Vock [Fri, 1 Jul 2022 02:10:04 +0000 (04:10 +0200)]
docs: Add short documentation about RMV tracing variables

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

19 months agoradv: Enable RMV tracing
Friedrich Vock [Mon, 15 Aug 2022 14:25:43 +0000 (16:25 +0200)]
radv: Enable RMV tracing

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

19 months agoradv: Add RMV resource tracking
Friedrich Vock [Wed, 7 Dec 2022 15:11:38 +0000 (16:11 +0100)]
radv: Add RMV resource tracking

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

19 months agoradv: Add RMV tracing layer
Friedrich Vock [Sat, 16 Jul 2022 21:56:57 +0000 (23:56 +0200)]
radv: Add RMV tracing layer

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

19 months agoradv: Add RMV tracing utilities
Friedrich Vock [Sat, 16 Jul 2022 21:52:45 +0000 (23:52 +0200)]
radv: Add RMV tracing utilities

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

19 months agoradv: Use internal allocation helpers for internal allocations
Friedrich Vock [Wed, 7 Dec 2022 12:12:44 +0000 (13:12 +0100)]
radv: Use internal allocation helpers for internal allocations

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

19 months agovulkan: Add RMV file exporter
Friedrich Vock [Sat, 16 Jul 2022 21:42:56 +0000 (23:42 +0200)]
vulkan: Add RMV file exporter

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

19 months agovulkan: Add common RMV tracing infrastructure
Friedrich Vock [Sat, 16 Jul 2022 21:38:30 +0000 (23:38 +0200)]
vulkan: Add common RMV tracing infrastructure

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

19 months agovulkan: Add RMV token definitions
Friedrich Vock [Sat, 16 Jul 2022 21:42:09 +0000 (23:42 +0200)]
vulkan: Add RMV token definitions

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

19 months agozink: set surface->dt when updating swapchain
Mike Blumenkrantz [Tue, 10 Jan 2023 15:51:06 +0000 (10:51 -0500)]
zink: set surface->dt when updating swapchain

this otherwise re-creates swapchain surfaces on every frame and has
a significant perf hit for no reason

cc: mesa-stable

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

19 months agod3d12: Reuse sampler tables inside of a batch
Giancarlo Devich [Tue, 10 Jan 2023 17:35:39 +0000 (09:35 -0800)]
d3d12: Reuse sampler tables inside of a batch

If a shader's sampler state is dirty often, the sampler descriptor heap
can get used up quickly, forcing flushing. If that happens quickly, we
run out of batches and have to wait for batches to finish on the GPU.

When this happens, it is often because the sampler state is switching,
not because it's truly unique. This change hashes and saves sampler
descriptor tables that can be reused in subsequent draws in the same
batch, instead of re-copying the same descriptors and consuming the
heap.

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

19 months agosvga: fix max number of texture cube levels
Charmaine Lee [Tue, 10 Jan 2023 04:46:33 +0000 (20:46 -0800)]
svga: fix max number of texture cube levels

The maximum number of mipmap levels supported for cubemap can be
determined from the maximum 2D texture size. There is no need
to limit the max to 12.

This fixes a regression in creating GL4.1 and up context since
commit 2658d025166c is now explicitly checking for
MaxCubeTextureLevels >= 15 for GL4.1 context.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20600>

19 months agoanv: Print the BO sizes in KB instead of hex bytes.
Emma Anholt [Thu, 5 Jan 2023 21:34:25 +0000 (13:34 -0800)]
anv: Print the BO sizes in KB instead of hex bytes.

We already show the address range, which is most of why I'd think you'd be
looking at hex values.  I find a more human-readable number nice for
debugging, instead of counting zeroes to decide if it's 1.5MB or 96kb.

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

19 months agoanv: Fix the size/aperture space debug printouts to consider _ccs_size.
Emma Anholt [Mon, 9 Jan 2023 17:32:01 +0000 (09:32 -0800)]
anv: Fix the size/aperture space debug printouts to consider _ccs_size.

It's added in at anv_bo_vma_alloc_or_close(), so count it here too.

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

19 months agoanv: Add an aperture space summary to INTEL_DEBUG=submit.
Emma Anholt [Thu, 5 Jan 2023 21:32:04 +0000 (13:32 -0800)]
anv: Add an aperture space summary to INTEL_DEBUG=submit.

Same as on iris, this is nice for tracking at a high level how much memory
is being used.

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

19 months agor300: allow more copy propagation with relative addressing
Pavel Ondračka [Mon, 21 Nov 2022 10:20:28 +0000 (11:20 +0100)]
r300: allow more copy propagation with relative addressing

We are now extremelly careful when copy propagating a mov that uses
relative addressing. The search for readers will trigger abort when it
sees any other instruction using a relative addressing, irrespective of
the actual used registers or whether an address register load was seen.

Additionally, since ntt switch all movs using the relative addressing are
actually used only once right on the next line, and are result of ntt converting

vec4 32 ssa_10 = intrinsic load_ubo_vec4 (ssa_0, ssa_9) (access=0, base=11, component=0)

into

  5: ARL ADDR[0].x, TEMP[0].xxxx
  6: MOV TEMP[2], CONST[0][ADDR[0].x+11]

RV530 shader-db:
total instructions in shared programs: 132966 -> 131904 (-0.80%)
instructions in affected programs: 29896 -> 28834 (-3.55%)
helped: 234
HURT: 2
total temps in shared programs: 16969 -> 16905 (-0.38%)
temps in affected programs: 604 -> 540 (-10.60%)
helped: 68
HURT: 12

Partial fix for: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7723

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20577>

19 months agoaco: Use NSA on GFX11 with more than 5 vaddr registers.
Georg Lehmann [Sat, 17 Dec 2022 11:40:17 +0000 (12:40 +0100)]
aco: Use NSA on GFX11 with more than 5 vaddr registers.

On GFX11 the first 4 vaddr are single registers and the last contains the remaining vector.
image_bvh64_intersect_ray has a special NSA layout.

Foz-DB GFX1100:
Totals from 2763 (2.05% of 134913) affected shaders:
VGPRs: 145884 -> 145056 (-0.57%); split: -1.03%, +0.46%
CodeSize: 18406864 -> 18326136 (-0.44%); split: -0.47%, +0.04%
MaxWaves: 76030 -> 76146 (+0.15%)
Instrs: 3559785 -> 3525287 (-0.97%); split: -0.97%, +0.00%
Latency: 44278460 -> 43303419 (-2.20%); split: -2.33%, +0.13%
InvThroughput: 4966295 -> 4914927 (-1.03%); split: -1.04%, +0.01%
VClause: 51755 -> 51991 (+0.46%); split: -0.05%, +0.50%
SClause: 105241 -> 105267 (+0.02%); split: -0.08%, +0.10%
Copies: 214141 -> 182419 (-14.81%); split: -14.82%, +0.01%
Branches: 69525 -> 69521 (-0.01%)
PreVGPRs: 120910 -> 120256 (-0.54%); split: -0.56%, +0.02%

No changes on Navi21.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20370>

19 months agoaco: Validate GFX11 NSA correctly.
Georg Lehmann [Sat, 17 Dec 2022 11:39:25 +0000 (12:39 +0100)]
aco: Validate GFX11 NSA correctly.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20370>

19 months agoaco: Handle NSA with vectors in get_mimg_nsa_dwords.
Georg Lehmann [Sat, 17 Dec 2022 11:32:49 +0000 (12:32 +0100)]
aco: Handle NSA with vectors in get_mimg_nsa_dwords.

No Foz-DB changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20370>

19 months agomesa: add missing count_scale attributes
Pierre-Eric Pelloux-Prayer [Tue, 10 Jan 2023 09:04:40 +0000 (10:04 +0100)]
mesa: add missing count_scale attributes

The EXT_gpu_program_parameters spec says:

   <params> points to an array of 4*<count> values

for both functions.

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

19 months agomesa: add missing count_scale attribute
Pierre-Eric Pelloux-Prayer [Tue, 10 Jan 2023 09:01:06 +0000 (10:01 +0100)]
mesa: add missing count_scale attribute

The EXT_gpu_program_parameters spec says:

   <params> points to an array of 4*<count> values

Fixes: a4e935f2d70 ("mesa: add EXT_dsa + EXT_gpu_program_parameters functions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7943
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8025
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20603>

19 months agozink: lower stipple + smooth
Erik Faye-Lund [Fri, 2 Dec 2022 12:39:10 +0000 (13:39 +0100)]
zink: lower stipple + smooth

We can use the new functionality in the draw-helper to implement
stippled smooth lines instead of what we currently do, which is aliased
stipping on smooth lines.

Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20134>

19 months agogallium/draw: support lowering stipple + smooth
Erik Faye-Lund [Fri, 2 Dec 2022 12:33:48 +0000 (13:33 +0100)]
gallium/draw: support lowering stipple + smooth

When computing line smoothing, we can also do something similar to
compute the line stippling. This can be useful for some drivers, who
can't easily split the lines before rasterizing them.

This does lead to slightly inaccurate stippling, because the
line-smoothing extends the line-length by a small amount. That leads to
the line-stippling pattern being over-stretched over the line-segment by
a fraction of a pixel in lenght. For short lines, this can be quite a
lot of error.

Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20134>

19 months agoegl: const display & config pointers in eglGetConfigAttrib()
Eric Engestrom [Mon, 8 Nov 2021 15:02:01 +0000 (15:02 +0000)]
egl: const display & config pointers in eglGetConfigAttrib()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20567>

19 months agoegl: inline _eglReportError(), and drop this and all the other unused defines
Eric Engestrom [Mon, 8 Nov 2021 15:01:40 +0000 (15:01 +0000)]
egl: inline _eglReportError(), and drop this and all the other unused defines

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20565>

19 months agoradeonsi: rewrite si_update_ps_colorbuf0_slot to fix crashes and recursions
Marek Olšák [Tue, 13 Dec 2022 19:10:29 +0000 (14:10 -0500)]
radeonsi: rewrite si_update_ps_colorbuf0_slot to fix crashes and recursions

I'm convinced that u_blitter interactions with fbfetch can't be handled
in si_update_ps_colorbuf0_slot alone, so it has to be force-disabled
by si_blitter_begin. Another reason why it has to be disabled for u_blitter
and not ignored is because FBFETCH with MSAA enables sample shading
regardless of context states, and we don't want that for u_blitter.

Also, si_update_ps_colorbuf0_slot now disables FBFETCH explicitly before
its own DCC and CMASK decompression because even though u_blitter can't do
anything (due to blitter_running), si_blitter_end calls it too.

The result is that no recursion can occur thanks to the blitter_running
and suppress_update_ps_colorbuf0_slot flags, and FBFETCH is always
force-disabled before those flags are set, which is the state we want
to be in.

Fixes: bc6d22b9200 ("radeonsi: fix ps_uses_fbfetch value")

Acked-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20318>

19 months agoci/lava: Tweak LAVA jobs timeouts
Guilherme Gallo [Mon, 9 Jan 2023 20:43:38 +0000 (17:43 -0300)]
ci/lava: Tweak LAVA jobs timeouts

The Mesa CI LAVA job submitter was suffering from a bug in the LAVA
software that made their timeouts related to sub-actions unreliable,
such as waiting for the user login prompt automatic response.

The following MR
https://git.lavasoftware.org/lava/lava/-/merge_requests/1900 fixed this
issue. So we can now better control job timeouts granularity, failing
the job faster when there is something weird hanging the boot stage.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20596>

19 months agoci/lava: Update lavacli version
Guilherme Gallo [Mon, 9 Jan 2023 19:46:28 +0000 (16:46 -0300)]
ci/lava: Update lavacli version

- Use new YAML loader derived from ruamel.yaml
- Remove PyYAML dependency from LAVA job submitter package

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20596>

19 months agoci/venus: temporarily disable due to instability
Yiwei Zhang [Tue, 10 Jan 2023 18:58:28 +0000 (10:58 -0800)]
ci/venus: temporarily disable due to instability

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20622>

19 months agoetnaviv: hide TS sharing behind debug option
Lucas Stach [Tue, 10 Jan 2023 11:11:35 +0000 (12:11 +0100)]
etnaviv: hide TS sharing behind debug option

TS sharing isn't fully stable yet. There are some fixes pending, but they
don't take care of all reported issues. Hide TS sharing behind a debug
switch until all the known issues are resolved.

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

19 months agodocs: Add calendar entries for 23.0 release candidates.
Dylan Baker [Tue, 10 Jan 2023 17:59:12 +0000 (09:59 -0800)]
docs: Add calendar entries for 23.0 release candidates.

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

19 months agobroadcom/ci: drop duplicate job definition
Eric Engestrom [Tue, 10 Jan 2023 09:21:33 +0000 (09:21 +0000)]
broadcom/ci: drop duplicate job definition

See line 48 above.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20605>

19 months agoaco/gfx11: increase vgpr_limit to 256
Rhys Perry [Fri, 9 Dec 2022 15:42:44 +0000 (15:42 +0000)]
aco/gfx11: increase vgpr_limit to 256

fossil-db (gfx1100):
Totals from 280 (0.21% of 134574) affected shaders:
MaxWaves: 3124 -> 2846 (-8.90%); split: +3.46%, -12.36%
Instrs: 1139038 -> 1091407 (-4.18%); split: -4.18%, +0.00%
CodeSize: 5809332 -> 5486812 (-5.55%); split: -5.55%, +0.00%
VGPRs: 35004 -> 42864 (+22.45%); split: -1.85%, +24.31%
SpillSGPRs: 1896 -> 1865 (-1.64%); split: -2.37%, +0.74%
SpillVGPRs: 17807 -> 2382 (-86.62%)
Scratch: 2573312 -> 736256 (-71.39%)
Latency: 27470485 -> 17981296 (-34.54%); split: -34.54%, +0.00%
InvThroughput: 5606102 -> 6527051 (+16.43%); split: -4.19%, +20.61%
VClause: 32319 -> 19927 (-38.34%); split: -39.13%, +0.78%
SClause: 15014 -> 14897 (-0.78%); split: -0.95%, +0.17%
Copies: 102977 -> 93511 (-9.19%); split: -9.93%, +0.74%
Branches: 15164 -> 14969 (-1.29%)
PreSGPRs: 19132 -> 19014 (-0.62%)
PreVGPRs: 30494 -> 37460 (+22.84%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251>

19 months agoaco/gfx11: allow true 16-bit instructions to access v128+
Rhys Perry [Fri, 11 Nov 2022 19:58:45 +0000 (19:58 +0000)]
aco/gfx11: allow true 16-bit instructions to access v128+

It looks like the LLVM assembler promotes true 16-bit instructions to VOP3
in this case.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251>

19 months agoaco: disallow SGPRS/constants with interpolation instructions
Rhys Perry [Fri, 11 Nov 2022 19:38:38 +0000 (19:38 +0000)]
aco: disallow SGPRS/constants with interpolation instructions

https://reviews.llvm.org/D137575

The VINTRP format cannot encode anything except VGPRs.

Reading VINTERPInstructions.td, looks like it's the same for GFX11.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251>

19 months agoaco: add more opcodes to can_use_DPP()
Rhys Perry [Wed, 4 Jan 2023 14:53:00 +0000 (14:53 +0000)]
aco: add more opcodes to can_use_DPP()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251>

19 months agoaco: allow Builder::Result to be dereferenced
Rhys Perry [Wed, 4 Jan 2023 14:52:34 +0000 (14:52 +0000)]
aco: allow Builder::Result to be dereferenced

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251>

19 months agoaco/gfx11: fix discard early exit removal optimization
Rhys Perry [Wed, 4 Jan 2023 10:51:24 +0000 (10:51 +0000)]
aco/gfx11: fix discard early exit removal optimization

This optimization never happened because the NULL target was removed in
GFX11.

fossil-db (gfx1100):
Totals from 5439 (4.04% of 134574) affected shaders:
Instrs: 407865 -> 387123 (-5.09%)
CodeSize: 2163340 -> 2060644 (-4.75%)
Latency: 3432378 -> 3327802 (-3.05%)
InvThroughput: 270133 -> 262980 (-2.65%)
Branches: 8524 -> 3085 (-63.81%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20513>

19 months agomicrosoft/spirv_to_dxil: Let linking report the need of runtime data
Pedro J. Estébanez [Tue, 10 Jan 2023 13:02:38 +0000 (14:02 +0100)]
microsoft/spirv_to_dxil: Let linking report the need of runtime data

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

19 months agoetnaviv: properly check for new clear value in sampler TS setup
Lucas Stach [Mon, 9 Jan 2023 15:28:37 +0000 (16:28 +0100)]
etnaviv: properly check for new clear value in sampler TS setup

Comparing the 64bit clear value to the lower half 32bit clear state is
obviously wrong and results in a lot of false positives.

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

19 months agoetnaviv: blt: properly use upper half of clear value
Lucas Stach [Mon, 9 Jan 2023 15:27:50 +0000 (16:27 +0100)]
etnaviv: blt: properly use upper half of clear value

Instead of replicating the lower half of the clear value, properly
use the upper half to program the second clear value BLT state.

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

19 months agoir3/print: Consider the size of input when matching it to a reg
Danylo Piliaiev [Thu, 5 Jan 2023 13:02:17 +0000 (14:02 +0100)]
ir3/print: Consider the size of input when matching it to a reg

First component of the input may never be read, so we have to find
the first component of the input which is being read.

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

19 months agoir3: Force flat.b sources to be equal
Danylo Piliaiev [Thu, 5 Jan 2023 12:54:36 +0000 (13:54 +0100)]
ir3: Force flat.b sources to be equal

From cc29b940 according to Jonathan Marek using 2 immediates in a cat2
instruction is only "correct" if they are both equal.

They were not equal after reassigning of packed inlocks.

flat.b seemed to work fine even with imm values being different,
but better not to risk.

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

19 months agotu: Fix varyings interpolation reading stale values
Danylo Piliaiev [Thu, 5 Jan 2023 12:36:46 +0000 (13:36 +0100)]
tu: Fix varyings interpolation reading stale values

tu6_vpc_varying_mode returned how many bits are consumed IF they are
non-zero, for SMOOTH mode nothing is written and it was treated like
no bits were consumed.

When input with smooth interpolation was the last one and straddled
the VPC_VARYING_INTERP_MODE regs, the last interp mode were not written.

Fixes misrendering in "Psychonauts 2".

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

19 months agoloader/dri3: Overhaul draw->cur_num_back handling
Michel Dänzer [Mon, 19 Dec 2022 11:25:46 +0000 (12:25 +0100)]
loader/dri3: Overhaul draw->cur_num_back handling

draw->cur_num_back is no longer used for immediately reducing the number
of allocated back buffers. It just reflects how many of them are
currently allocated, and is used to prevent allocating more if the
current maximum is already reached.

This fixes an issue where the current in-progress back buffer could get
freed, which would result in visible artifacts.

Unused buffers are freed once they exceed buffer age 200. This ensures
we do not keep around more buffers than necessary in the long run.

v2:
* Drop buffer age threshold to 200. This will free unused buffers more
  quickly, and seems enough to avoid doing so prematurely even with
  "glxgears -fullscreen" running at thousands of frames per second.
* Use "buf_id != LOADER_DRI3_FRONT_ID". (Pierre-Eric Pelloux-Prayer)
* Simplify loader_dri3_get_buffers changes slightly.
* We can now use any unallocated back buffer slot in dri3_find_back.

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

19 months agoloader/dri3: Add dri3_set_render_buffer helper
Michel Dänzer [Mon, 19 Dec 2022 17:06:13 +0000 (18:06 +0100)]
loader/dri3: Add dri3_set_render_buffer helper

Preparation for next commit, no functional change intended.

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

19 months agoloader/dri3: Move NULL handling into dri3_free_render_buffer
Michel Dänzer [Mon, 19 Dec 2022 11:33:24 +0000 (12:33 +0100)]
loader/dri3: Move NULL handling into dri3_free_render_buffer

Both checking for draw->buffers[buf_id] being non-NULL, and setting
draw->buffers[buf_id] = NULL.

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

19 months agoradv: enable PS epilogs on-demand for some dynamic states
Samuel Pitoiset [Fri, 6 Jan 2023 13:03:12 +0000 (14:03 +0100)]
radv: enable PS epilogs on-demand for some dynamic states

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

19 months agoradv: add support for compiling PS epilogs on-demand
Samuel Pitoiset [Tue, 6 Dec 2022 15:00:29 +0000 (16:00 +0100)]
radv: add support for compiling PS epilogs on-demand

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

19 months agoradv: copy the non-compacted color format at pipeline bind time
Samuel Pitoiset [Mon, 9 Jan 2023 15:16:56 +0000 (16:16 +0100)]
radv: copy the non-compacted color format at pipeline bind time

For PS epilogs on-demand.

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

19 months agoradv: rework PS epilog emission
Samuel Pitoiset [Tue, 6 Dec 2022 14:21:56 +0000 (15:21 +0100)]
radv: rework PS epilog emission

With PS epilogs compiled on-demand (for some dynamic states), they need
to be emitted outside of the graphics pipeline path. Also keep track
of the last emitted PS epilog to avoid redundant emission.

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

19 months agoradv: keep track of SPI_SHADER_COL_FORMAT for PS epilogs
Samuel Pitoiset [Mon, 9 Jan 2023 15:27:54 +0000 (16:27 +0100)]
radv: keep track of SPI_SHADER_COL_FORMAT for PS epilogs

To emit the related register.

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

19 months agoradv: enable the PS epilogs cache when some ds3 states are enabled
Samuel Pitoiset [Wed, 7 Dec 2022 08:22:48 +0000 (09:22 +0100)]
radv: enable the PS epilogs cache when some ds3 states are enabled

These dynamic states need to compile PS epilogs on-demand.

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

19 months agoradv: add support for a PS epilogs cache in the device
Samuel Pitoiset [Tue, 6 Dec 2022 14:23:30 +0000 (15:23 +0100)]
radv: add support for a PS epilogs cache in the device

Similar to VS prologs.

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

19 months agoci/rpi4: add a couple of tests as flaky
Eric Engestrom [Mon, 9 Jan 2023 19:41:48 +0000 (19:41 +0000)]
ci/rpi4: add a couple of tests as flaky

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20591>

19 months agoci/rpi3: add another test variant (draw-copypixels-sync) as flaky
Eric Engestrom [Mon, 9 Jan 2023 19:41:21 +0000 (19:41 +0000)]
ci/rpi3: add another test variant (draw-copypixels-sync) as flaky

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20591>

19 months agogallium/draw: assert shader-stage
Erik Faye-Lund [Thu, 24 Nov 2022 14:52:18 +0000 (15:52 +0100)]
gallium/draw: assert shader-stage

Nobody calls this for the wrong shader-stage. Let's turn that check into
an assert instead.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20096>

19 months agogallium/draw: use nir_shader_instructions_pass for nir_lower_aaline_fs
Erik Faye-Lund [Thu, 24 Nov 2022 14:47:38 +0000 (15:47 +0100)]
gallium/draw: use nir_shader_instructions_pass for nir_lower_aaline_fs

This just cuts away some needless boilerplate code.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20096>

19 months agoradv: add a new dirty flag for the RB+ state
Samuel Pitoiset [Mon, 9 Jan 2023 15:01:23 +0000 (16:01 +0100)]
radv: add a new dirty flag for the RB+ state

With PS epilogs on-demand, the non-compacted color format field won't
come from the pipeline and it seems easier to introduce a new dirty
flag for re-emitting this state.

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

19 months agolvp: avoid redundant sampler views and image views
Yiwei Zhang [Mon, 9 Jan 2023 05:56:41 +0000 (21:56 -0800)]
lvp: avoid redundant sampler views and image views

Align the sampler view creation condition with the image and buffer
creation usage which maps to PIPE_BIND_SAMPLER_VIEW, which fixes the spam
of "Illegal sampler view creation without bind flag". Also fix the
PIPE_BIND_SHADER_IMAGE assignment for image usage bits and avoid setting
the image view struct if without PIPE_BIND_SHADER_IMAGE.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20580>

19 months agozink: stop using VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT
Mike Blumenkrantz [Wed, 4 Jan 2023 15:15:17 +0000 (10:15 -0500)]
zink: stop using VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT

this used to be fine back when there was only one thread doing cache management,
but now the cache is used by precompile threads too, so let the driver do sync

fixes #7660

Fixes: 41ffb15de56 ("zink: implement async gfx precompile")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20519>

19 months agoagx: Remove obsolete comment
Alyssa Rosenzweig [Sat, 7 Jan 2023 04:13:07 +0000 (23:13 -0500)]
agx: Remove obsolete comment

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agoagx: Remove dead arg
Alyssa Rosenzweig [Sat, 7 Jan 2023 04:13:03 +0000 (23:13 -0500)]
agx: Remove dead arg

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agoagx: Use i0/i1 variables
Alyssa Rosenzweig [Sat, 7 Jan 2023 03:43:13 +0000 (22:43 -0500)]
agx: Use i0/i1 variables

Now that we've defined them.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agoagx: Get rid of emit_alu_bool
Alyssa Rosenzweig [Sat, 7 Jan 2023 03:37:30 +0000 (22:37 -0500)]
agx: Get rid of emit_alu_bool

Deduplicate lots of cases. Splitting this out was silly, bools aren't that
special.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agoagx: Use agx_subdivide_to for umul_high
Alyssa Rosenzweig [Sat, 7 Jan 2023 03:32:40 +0000 (22:32 -0500)]
agx: Use agx_subdivide_to for umul_high

Helpers!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agoagx: Remove dead code
Alyssa Rosenzweig [Sat, 7 Jan 2023 03:30:57 +0000 (22:30 -0500)]
agx: Remove dead code

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20559>

19 months agodocs/envvars: Document MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ
Dmitry Osipenko [Mon, 9 Jan 2023 22:17:37 +0000 (01:17 +0300)]
docs/envvars: Document MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ

Add documentation for the MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ environment
variable.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Juston Li <justonli@google.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20595>

19 months agoutil/disk_cache: Fix rw cache lookup when using combined ro+rw caches
Dmitry Osipenko [Mon, 9 Jan 2023 22:10:48 +0000 (01:10 +0300)]
util/disk_cache: Fix rw cache lookup when using combined ro+rw caches

When combining of ro+rw caches is enabled, at first the ro cache should be
looked up and if data isn't found there then rw cache should be checked.
The rw cache checking got lost by accident after the code rebase and there
was no unit test covering this condition. Fix the rw cache looking up and
add the unit test case.

Fixes: 32fe60e8c429 ("util/disk_cache: Support combined foz ro and non-foz rw caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Juston Li <justonli@google.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20595>

19 months agodzn: No need to add another bind flag for clears if one is already present
Jesse Natalie [Tue, 20 Dec 2022 22:14:32 +0000 (14:14 -0800)]
dzn: No need to add another bind flag for clears if one is already present

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

19 months agodzn: Lower tg4 offsets
Jesse Natalie [Tue, 20 Dec 2022 22:06:20 +0000 (14:06 -0800)]
dzn: Lower tg4 offsets

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

19 months agodzn: Implement point coord
Jesse Natalie [Tue, 20 Dec 2022 19:25:36 +0000 (11:25 -0800)]
dzn: Implement point coord

Since we don't support wide points, this isn't a useful feature, but the CTS
requires a particular point coord value for the single rasterized pixel, based
on where the original point coord fell within the pixel. Since we're not doing
a quad, we don't get free interpolation like the GL driver does, so split the
logic between vertex (transform point center into screen space) and pixel
(compute delta between current pixel/sample and point center).

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

19 months agodzn: Lower fragcoord wtrans
Jesse Natalie [Tue, 20 Dec 2022 00:08:41 +0000 (16:08 -0800)]
dzn: Lower fragcoord wtrans

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

19 months agodzn: Use the right variable for heap slots when prepping resolves
Jesse Natalie [Mon, 19 Dec 2022 23:24:50 +0000 (15:24 -0800)]
dzn: Use the right variable for heap slots when prepping resolves

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

19 months agomicrosoft/compiler: Set the advanced texture ops flag correctly
Jesse Natalie [Tue, 20 Dec 2022 21:08:20 +0000 (13:08 -0800)]
microsoft/compiler: Set the advanced texture ops flag correctly

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

19 months agomicrosoft/compiler: Fill out and sort the shader/module flags
Jesse Natalie [Tue, 20 Dec 2022 21:08:07 +0000 (13:08 -0800)]
microsoft/compiler: Fill out and sort the shader/module flags

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

19 months agomicrosoft/compiler: For Vulkan, centroid should be ignored on position
Jesse Natalie [Mon, 19 Dec 2022 22:41:26 +0000 (14:41 -0800)]
microsoft/compiler: For Vulkan, centroid should be ignored on position

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

19 months agomicrosoft/compiler: For Vulkan, when shading at sample rate, pos is sample pos
Jesse Natalie [Mon, 19 Dec 2022 22:25:44 +0000 (14:25 -0800)]
microsoft/compiler: For Vulkan, when shading at sample rate, pos is sample pos

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

19 months agonir_lower_fragcoord_wtrans: Support Vulkan shaders
Jesse Natalie [Tue, 20 Dec 2022 00:52:50 +0000 (16:52 -0800)]
nir_lower_fragcoord_wtrans: Support Vulkan shaders

In Vulkan shaders, you might not have all derefs pointing to a variable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400>

19 months agoutil/driconf: add Dune: Spice Wars workaround
Timothy Arceri [Mon, 9 Jan 2023 03:12:52 +0000 (14:12 +1100)]
util/driconf: add Dune: Spice Wars workaround

As per the bug report the game does not correctly handle a uniform
index of -1 being returned for the unused array element, which
results in rendering issues. So here we skip the uniform array
resizing optimisation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6397
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20579>

19 months agod3d12: Update hard-coded heap sizes and batch limit
Giancarlo Devich [Mon, 9 Jan 2023 19:33:20 +0000 (11:33 -0800)]
d3d12: Update hard-coded heap sizes and batch limit

Increasing the heap sizes and active batch count reduces flushing
churn when rendering runs out of descriptors.

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

19 months agoReturn 'Mesa' for GL_VENDOR for community drivers
Daniel Stone [Wed, 20 Apr 2022 20:22:44 +0000 (21:22 +0100)]
Return 'Mesa' for GL_VENDOR for community drivers

Rather than a grab-bag of random values, return 'Mesa' as the GL_VENDOR
string for all community-supported drivers.

Drivers which are primarily developed/maintained by the hardware vendor
retain that vendor's name as the GL_VENDOR string.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16064>

19 months agozink: fix the stencil write
WebsterEndymion [Tue, 3 Jan 2023 02:52:10 +0000 (10:52 +0800)]
zink: fix the stencil write

Stencil writing also needs to be considered when setting the flag renderpass

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

19 months agozink: add a condition to needs_write_s
WebsterEndymion [Sat, 10 Dec 2022 11:12:58 +0000 (11:12 +0000)]
zink: add a condition to needs_write_s

Previously missing check on the stencil write, condition added to needs_write_s using util_writes_stencil

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

19 months agolavapipe: add some safety asserts when beginning rendering
Mike Blumenkrantz [Fri, 6 Jan 2023 20:19:38 +0000 (15:19 -0500)]
lavapipe: add some safety asserts when beginning rendering

if the render area exceeds the attachment size, this is not only illegal,
it will crash later

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20583>