platform/upstream/mesa.git
2 years agovulkan: add support for VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
Samuel Pitoiset [Mon, 28 Feb 2022 18:56:07 +0000 (19:56 +0100)]
vulkan: add support for VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT

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

2 years agovulkan: Update the XML and headers to 1.3.224
Mike Blumenkrantz [Thu, 4 Aug 2022 11:40:48 +0000 (07:40 -0400)]
vulkan: Update the XML and headers to 1.3.224

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17883>

2 years agofreedreno: Drop fixed upper bound on # of tiles
Rob Clark [Thu, 4 Aug 2022 19:25:57 +0000 (12:25 -0700)]
freedreno: Drop fixed upper bound on # of tiles

Placate things that think 16k x 16k FBO is a good idea.

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

2 years agofreedreno/gmem: Fix col0 calc
Rob Clark [Fri, 5 Aug 2022 15:40:38 +0000 (08:40 -0700)]
freedreno/gmem: Fix col0 calc

Fix typo in calculation of position of start of a row of tiles.  This
could otherwise cause an out-of-bounds access in the next patch.

Fixes: 81d85be9a5c freedreno/gmem: Reverse order of alternative tile rows
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17888>

2 years agofreedreno/drm: Fix potential bo cache vs export crash
Rob Clark [Thu, 4 Aug 2022 16:25:07 +0000 (09:25 -0700)]
freedreno/drm: Fix potential bo cache vs export crash

Keep the list head valid (empty) after allocation from bo cache.  Avoids
a potential later crash in lookup_bo in the following sequence:

1. alloc, bo cache hit
2. export
3. re-import

Cc: mesa-stable
Fixes: f3cc0d27475 ("freedreno: import libdrm_freedreno + redesign submit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6988
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17888>

2 years agovirgl/ci: Update virglrenderer
Corentin Noël [Tue, 2 Aug 2022 10:53:07 +0000 (12:53 +0200)]
virgl/ci: Update virglrenderer

Update virglrenderer to the latest version on time.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17853>

2 years agoci: separate wine setup into own script
David Heidelberg [Thu, 4 Aug 2022 13:57:51 +0000 (15:57 +0200)]
ci: separate wine setup into own script

It will be used by LAVA jobs too.

Reviewed-by: "Sergi Blanch Torne" <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17887>

2 years agoci: make shellcheck happy on dxvk script
David Heidelberg [Thu, 4 Aug 2022 13:47:39 +0000 (15:47 +0200)]
ci: make shellcheck happy on dxvk script

Reviewed-by: "Sergi Blanch Torne" <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17887>

2 years agoci: move DXVK instalation outside of x86_test-vk
David Heidelberg [Thu, 4 Aug 2022 13:45:30 +0000 (15:45 +0200)]
ci: move DXVK instalation outside of x86_test-vk

It will be used by LAVA jobs.

Reviewed-by: "Sergi Blanch Torne" <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17887>

2 years agod3d12: Fixes compile error with mingw/gcc-x64 when static linkage to runtime library
Yonggang Luo [Thu, 4 Aug 2022 17:24:05 +0000 (01:24 +0800)]
d3d12: Fixes compile error with mingw/gcc-x64 when static linkage to runtime library

Closes #6968

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Suggested-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17889>

2 years agoci: Turn off the entire Lima farm (devices report out-of-space)
David Heidelberg [Fri, 5 Aug 2022 12:14:24 +0000 (14:14 +0200)]
ci: Turn off the entire Lima farm (devices report out-of-space)

Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7009

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

2 years agoanv: Don't require 32-bit addresses for scratch on Gen12.5+
Jason Ekstrand [Thu, 11 Feb 2021 19:13:03 +0000 (13:13 -0600)]
anv: Don't require 32-bit addresses for scratch on Gen12.5+

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

2 years agogenxml: Add BVH data structures
Jason Ekstrand [Wed, 5 Aug 2020 22:03:55 +0000 (17:03 -0500)]
genxml: Add BVH data structures

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

2 years agointel/rt: Handle multiple exits in lower_shader_returns
Jason Ekstrand [Wed, 17 Feb 2021 19:48:57 +0000 (13:48 -0600)]
intel/rt: Handle multiple exits in lower_shader_returns

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

2 years agointel/rt: Handle halts in any-hit shaders properly
Jason Ekstrand [Wed, 17 Feb 2021 04:03:17 +0000 (22:03 -0600)]
intel/rt: Handle halts in any-hit shaders properly

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

2 years agointel/fs_reg_allocate: Improve compressed instruction self-interference
Jason Ekstrand [Mon, 7 Sep 2020 06:21:23 +0000 (01:21 -0500)]
intel/fs_reg_allocate: Improve compressed instruction self-interference

The old version worked fine for SIMD16 instructions but SIMD8
instructions where the destination spans two registers have the same
problem.

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

2 years agointel/nir: specify synchronous value for tracing op
Lionel Landwerlin [Fri, 18 Feb 2022 12:57:26 +0000 (14:57 +0200)]
intel/nir: specify synchronous value for tracing op

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17908>

2 years agointel/compiler: document units of brw_ubo_range fields
Lionel Landwerlin [Tue, 26 Oct 2021 08:42:37 +0000 (11:42 +0300)]
intel/compiler: document units of brw_ubo_range fields

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17908>

2 years agointel/fs: fixup simd selection with shader calls
Lionel Landwerlin [Wed, 3 Nov 2021 10:42:29 +0000 (12:42 +0200)]
intel/fs: fixup simd selection with shader calls

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17908>

2 years agointel/fs: store num of resume shaders in prog_data
Lionel Landwerlin [Wed, 13 Oct 2021 13:05:59 +0000 (13:05 +0000)]
intel/fs: store num of resume shaders in prog_data

That way we can look at the SBT entries for debug purposes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17908>

2 years agor300: add khr r400 failures
Filip Gawin [Fri, 5 Aug 2022 10:43:30 +0000 (12:43 +0200)]
r300: add khr r400 failures

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

2 years agor300: add list of deqp gles2 r400 failures
Filip Gawin [Wed, 3 Aug 2022 21:29:13 +0000 (23:29 +0200)]
r300: add list of deqp gles2 r400 failures

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

2 years agobroadcom/compiler: use nir_opt_idiv_const
Iago Toral Quiroga [Wed, 3 Aug 2022 10:46:10 +0000 (12:46 +0200)]
broadcom/compiler: use nir_opt_idiv_const

total instructions in shared programs: 12463625 -> 12463571 (<.01%)
instructions in affected programs: 1758 -> 1704 (-3.07%)
helped: 12
HURT: 0

total uniforms in shared programs: 3704589 -> 3704591 (<.01%)
uniforms in affected programs: 17 -> 19 (11.76%)
helped: 0
HURT: 1

total max-temps in shared programs: 2148088 -> 2148138 (<.01%)
max-temps in affected programs: 170 -> 220 (29.41%)
helped: 0
HURT: 10

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

2 years agobroadcom/compiler: don't use imprecise_32bit_lowering for idiv lowering
Iago Toral Quiroga [Wed, 3 Aug 2022 08:44:45 +0000 (10:44 +0200)]
broadcom/compiler: don't use imprecise_32bit_lowering for idiv lowering

This is known to produce bogus results for certain combinations of
operands, so don't use it. See this issue for details:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/6555

With this change, the idiv lowering will produce mul_high instructions,
so we need to instruct the compiler to lower those with the ALU lowering
right after the idiv lowering by adding the lower_mul_high option (we
only need to add this to V3D, since V3DV already had it set). This will
cause injection of uadd_carry instructions, for which we have backend
implementations that produce better code for us than the NIR lowering.

total instructions in shared programs: 12457692 -> 12463625 (0.05%)
instructions in affected programs: 23115 -> 29048 (25.67%)
helped: 0
HURT: 111

total threads in shared programs: 416372 -> 416368 (<.01%)
threads in affected programs: 8 -> 4 (-50.00%)
helped: 0
HURT: 2

total uniforms in shared programs: 3704067 -> 3704589 (0.01%)
uniforms in affected programs: 5804 -> 6326 (8.99%)
helped: 2
HURT: 109

total max-temps in shared programs: 2147845 -> 2148088 (0.01%)
max-temps in affected programs: 2456 -> 2699 (9.89%)
helped: 6
HURT: 91

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

2 years agoac/llvm: handle external textures in ac_nir_lower_resinfo
Marek Olšák [Fri, 5 Aug 2022 08:36:57 +0000 (04:36 -0400)]
ac/llvm: handle external textures in ac_nir_lower_resinfo

Fixes: 4f622d62d0dd8 - ac/nir: add ac_nir_lower_resinfo
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6993

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

2 years agoradeonsi: fix a regression due to reordering PIPE_SHADER_*
Marek Olšák [Fri, 5 Aug 2022 01:58:22 +0000 (21:58 -0400)]
radeonsi: fix a regression due to reordering PIPE_SHADER_*

Fixes: 27f46465c7a408d3 - gallium/tgsi: reorder pipe shader type defines.

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

2 years agoradeonsi/ci: update failing tests on navi21
Marek Olšák [Fri, 5 Aug 2022 00:53:24 +0000 (20:53 -0400)]
radeonsi/ci: update failing tests on navi21

These pass now.

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

2 years agoradeonsi: don't assume that TC_ACTION_ENA invalidates L1 cache on gfx9
Marek Olšák [Thu, 4 Aug 2022 06:09:23 +0000 (02:09 -0400)]
radeonsi: don't assume that TC_ACTION_ENA invalidates L1 cache on gfx9

Just got into a midnight discussion with a hw guy.
TC_ACTION_ENA apparently doesn't invalidate L1, so don't clear
the INV_VCACHE flag.

Fixes: 4056e953fe43bd667 - radeonsi: move emit_cache_flush functions into si_gfx_cs.c

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

2 years agoiris: Handle new untyped dataport cache flush PIPE_CONTROL field
Sagar Ghuge [Tue, 24 Aug 2021 19:23:57 +0000 (12:23 -0700)]
iris: Handle new untyped dataport cache flush PIPE_CONTROL field

Also while switching to GPGPU pipeline, make sure to flush the untyped
dataport cache. HDC pipeline flush bit must be set if we are flushing
untyped dataport L1 data cache.

v2: Add utrace support (Lionel)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agoanv: Handle bits to flush data-port's Untyped L1 data cache
Sagar Ghuge [Wed, 11 Aug 2021 23:53:42 +0000 (16:53 -0700)]
anv: Handle bits to flush data-port's Untyped L1 data cache

v2: Drop ANV_PIPE_UNTYPED_DATAPORT_CACHE_FLUSH_BIT from invalidate bits (Lionel)
    Add utrace support
    Expand on comment about PIPE_CONTROL::UntypedDataPortCache

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agointel/ds: track untyped dataport flushes
Lionel Landwerlin [Tue, 7 Jun 2022 11:33:04 +0000 (14:33 +0300)]
intel/ds: track untyped dataport flushes

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agoiris: Specify Untyped L1 cache policy for stateless accesses
Sagar Ghuge [Mon, 16 Aug 2021 19:29:37 +0000 (12:29 -0700)]
iris: Specify Untyped L1 cache policy for stateless accesses

Set write back L1 cache policy in STATE_BASE_ADDRESS instruction for A64
messages.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agoanv: Specify Untyped L1 cache policy for stateless accesses
Sagar Ghuge [Mon, 16 Aug 2021 19:16:49 +0000 (12:16 -0700)]
anv: Specify Untyped L1 cache policy for stateless accesses

Set write back L1 cache policy in STATE_BASE_ADDRESS instruction for A64
messages.

v2: Also set the value in genX_state.c (Lionel)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agointel/isl: Setting L1 caching policy to Write-back mode
Sagar Ghuge [Thu, 12 Aug 2021 18:53:47 +0000 (11:53 -0700)]
intel/isl: Setting L1 caching policy to Write-back mode

For a RW L1 cache, both reads and writes are cached in the L1, at high
priority (MRU position). For a RO L1 cache, reads are cached at higher
priority and writes bypass the cache.

v1: (Ken)
- Set caching policy for buffer surfaces too

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agoanv: fixup PIPE_CONTROL restriction on gfx8
Lionel Landwerlin [Tue, 7 Jun 2022 15:39:28 +0000 (18:39 +0300)]
anv: fixup PIPE_CONTROL restriction on gfx8

We're missing a condition that is currently papered over by having
ANV_PIPE_HDC_PIPELINE_FLUSH_BIT in the invalidate bits.

v2: rework with simplication (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16905>

2 years agovc4: properly restore vc4 debug option
Juan A. Suarez Romero [Thu, 4 Aug 2022 11:28:03 +0000 (13:28 +0200)]
vc4: properly restore vc4 debug option

Otherwise VC4_DEBUG does not work.

Fixes: c3f5d276317 ("vc4/v3d: restore calling debug_get_option_vc4/v3d_debug")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17882>

2 years agodraw: don't touch info values that aren't valid.
Dave Airlie [Thu, 4 Aug 2022 03:24:25 +0000 (13:24 +1000)]
draw: don't touch info values that aren't valid.

These shouldn't be accessed, and shows up as an uninit access in
valgrind with piglit rasterpos

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>

2 years agollvmpipe/ci: update ci results for clover.
Dave Airlie [Tue, 2 Aug 2022 00:47:31 +0000 (10:47 +1000)]
llvmpipe/ci: update ci results for clover.

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

2 years agolavapipe: scan shader for info before lowering images.
Dave Airlie [Fri, 7 May 2021 00:14:15 +0000 (10:14 +1000)]
lavapipe: scan shader for info before lowering images.

Otherwise the values will be wrong.

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

2 years agolavapipe: lower images to non-derefs in vulkan side
Dave Airlie [Thu, 6 May 2021 02:27:35 +0000 (12:27 +1000)]
lavapipe: lower images to non-derefs in vulkan side

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

2 years agogallivm/nir/st: lower image derefs in advance.
Dave Airlie [Wed, 5 May 2021 03:13:14 +0000 (13:13 +1000)]
gallivm/nir/st: lower image derefs in advance.

This improves clover from crashing to just failing, but I mainly
want it this to cleanup the nir code first

It's also important the shaders coming from the state tracker
for feedback get images lowered when they are draw shaders now.

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

2 years agovirgl/vtest: fix memory overwrite problem in virgl_vtest_send_get_caps()
Feng Jiang [Fri, 5 Aug 2022 02:09:44 +0000 (10:09 +0800)]
virgl/vtest: fix memory overwrite problem in virgl_vtest_send_get_caps()

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17901>

2 years agovenus: double the abort timeout to allow long shader compiles
Yiwei Zhang [Thu, 4 Aug 2022 20:31:36 +0000 (20:31 +0000)]
venus: double the abort timeout to allow long shader compiles

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17898>

2 years agovenus: increase busy wait order in vn_relax
Yiwei Zhang [Thu, 4 Aug 2022 19:06:17 +0000 (19:06 +0000)]
venus: increase busy wait order in vn_relax

This is mainly to workaround a platform issue that has huge sleep
penalty, which could lead to a timeout if the small synchronous queries
are going to sleep.

This change adjusts the warn and abort order correspondingly so that to
match prior timing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17898>

2 years agozink: remove an old RGBA4 nvidia workaround
Mike Blumenkrantz [Wed, 3 Aug 2022 20:29:36 +0000 (16:29 -0400)]
zink: remove an old RGBA4 nvidia workaround

this should be automatically handled

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

2 years agozink: don't fixup sparse texops
Mike Blumenkrantz [Wed, 3 Aug 2022 19:57:00 +0000 (15:57 -0400)]
zink: don't fixup sparse texops

this is broken, and these will never need to be fixed

Fixes: 3a475766876 ("zink: add a compiler pass to match up tex op dest types")

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

2 years agozink: add all format modifiers when adding for dmabuf export
Mike Blumenkrantz [Wed, 3 Aug 2022 17:22:37 +0000 (13:22 -0400)]
zink: add all format modifiers when adding for dmabuf export

adding LINEAR before was a good starter step, but LINEAR
might not actually be supported (e.g., nvidia)

cc: mesa-stable

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

2 years agozink: don't add modifiers if EXT_image_drm_format_modifier isn't present
Mike Blumenkrantz [Tue, 2 Aug 2022 16:31:54 +0000 (12:31 -0400)]
zink: don't add modifiers if EXT_image_drm_format_modifier isn't present

cc: mesa-stable

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

2 years agozink: use modifier_aspect to check for modifier plane in zink_resource_get_param
Mike Blumenkrantz [Tue, 2 Aug 2022 16:27:59 +0000 (12:27 -0400)]
zink: use modifier_aspect to check for modifier plane in zink_resource_get_param

cc: mesa-stable

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

2 years agozink: demote dmabuf tiling to linear if modifiers aren't supported
Mike Blumenkrantz [Tue, 2 Aug 2022 16:26:55 +0000 (12:26 -0400)]
zink: demote dmabuf tiling to linear if modifiers aren't supported

this is effectively the same as LINEAR, and it still allows dmabuf creation

cc: mesa-stable

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

2 years agozink: add u_queue.h to kopper header
Mike Blumenkrantz [Tue, 2 Aug 2022 16:14:37 +0000 (12:14 -0400)]
zink: add u_queue.h to kopper header

types are used, so include the header

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

2 years agonine: check return on resource_get_handle
Mike Blumenkrantz [Mon, 1 Aug 2022 19:59:48 +0000 (15:59 -0400)]
nine: check return on resource_get_handle

this has a return code, and if it return false, this is probably an
exit condition

cc: mesa-stable

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

2 years agozink: support PIPE_QUERY_TIMESTAMP_DISJOINT
Mike Blumenkrantz [Mon, 1 Aug 2022 13:10:21 +0000 (09:10 -0400)]
zink: support PIPE_QUERY_TIMESTAMP_DISJOINT

the key point here is that disjoint is always false, but also return a handwavy
guess at frequency value based on timestampPeriod

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

2 years agozink: export PIPE_CAP_MULTISAMPLE_Z_RESOLVE
Mike Blumenkrantz [Fri, 29 Jul 2022 16:38:42 +0000 (12:38 -0400)]
zink: export PIPE_CAP_MULTISAMPLE_Z_RESOLVE

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

2 years agozink: rewrite all undefined shader reads as 0001 instead of undef
Mike Blumenkrantz [Fri, 29 Jul 2022 15:39:44 +0000 (11:39 -0400)]
zink: rewrite all undefined shader reads as 0001 instead of undef

this is a little less hostile towards broken/buggy apps

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

2 years agozink: handle invalid gl_TexCoord reads
Mike Blumenkrantz [Fri, 29 Jul 2022 15:36:33 +0000 (11:36 -0400)]
zink: handle invalid gl_TexCoord reads

if a texcoord input is read in a fragment shader but not written in
the previous stage, the texcoord variable must be preserved until
nir_lower_texcoord_replace has (possibly) run, and only then can it
be replaced with a 0000 read

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

2 years agozink: explicitly set nir cursor in rewrite_and_discard_read
Mike Blumenkrantz [Fri, 29 Jul 2022 15:36:10 +0000 (11:36 -0400)]
zink: explicitly set nir cursor in rewrite_and_discard_read

not sure if this is a bug but it looks weird

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

2 years agozink: fix return for PIPE_CAP_DEPTH_CLIP_DISABLE
Mike Blumenkrantz [Thu, 28 Jul 2022 17:15:33 +0000 (13:15 -0400)]
zink: fix return for PIPE_CAP_DEPTH_CLIP_DISABLE

this uses the extension now

Fixes: 21ea19d504b ("zink: Always enable depth clamping, make depth clipping independent.")

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

2 years agozink: handle !half_pixel_center
Mike Blumenkrantz [Thu, 28 Jul 2022 16:20:54 +0000 (12:20 -0400)]
zink: handle !half_pixel_center

the shader is already getting a -0.5,-0.5 bias, but the viewport also
needs to be shifted by 0.5 to match

cc: mesa-stable

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

2 years agozink: handle unscaled depth bias from nine
Mike Blumenkrantz [Thu, 28 Jul 2022 15:12:42 +0000 (11:12 -0400)]
zink: handle unscaled depth bias from nine

nine uses this to pass unscaled units for depth bias, which means
the units must be scaled based on the format of the depth buffer

cc: mesa-stable

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

2 years agozink: drop mode_changed check from linewidth/depthbias draw updates
Mike Blumenkrantz [Thu, 28 Jul 2022 15:09:19 +0000 (11:09 -0400)]
zink: drop mode_changed check from linewidth/depthbias draw updates

this doesn't need to be updated on primtype change since it's always
set

cc: mesa-stable

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

2 years agozink: allow sw loading with D3D_ALWAYS_SOFTWARE for nine
Mike Blumenkrantz [Wed, 27 Jul 2022 21:03:42 +0000 (17:03 -0400)]
zink: allow sw loading with D3D_ALWAYS_SOFTWARE for nine

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>

2 years agozink: use maintenance4
Mike Blumenkrantz [Wed, 27 Jul 2022 20:13:21 +0000 (16:13 -0400)]
zink: use maintenance4

just by enabling this there are fewer validation warnings

truly incredible.

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

2 years agozink: force a new framebuffer for clear_depth_stencil if the clear region is big
Mike Blumenkrantz [Wed, 27 Jul 2022 20:04:54 +0000 (16:04 -0400)]
zink: force a new framebuffer for clear_depth_stencil if the clear region is big

can't clear outside the framebuffer, so set a new one if necessary

Fixes: f1f08e3529d ("zink: massively simplify zink_clear_depth_stencil")

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

2 years agozink: force flush clears on fb change if fb geometry changes
Mike Blumenkrantz [Wed, 27 Jul 2022 20:03:42 +0000 (16:03 -0400)]
zink: force flush clears on fb change if fb geometry changes

Fixes: 66ceea7ed9a ("zink: lift clearing on fb state change up a level")

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

2 years agotu: Implement VK_EXT_vertex_input_dynamic_state
Connor Abbott [Thu, 14 Jul 2022 12:16:39 +0000 (14:16 +0200)]
tu: Implement VK_EXT_vertex_input_dynamic_state

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

2 years agotu: Decouple vertex input state from shader
Connor Abbott [Wed, 13 Jul 2022 13:48:57 +0000 (15:48 +0200)]
tu: Decouple vertex input state from shader

Emit VFD_DECODE and VFD_DEST separately, similarly to what Gallium does.
This means we emit a few more VFD_DECODE for binning shaders and when
there are unused attributes, but hopefully the overhead won't be too
much. In exchange we lose one draw state, and in the future we can
pre-compute the dynamic vertex state independently of the shader, so
there should be lower CPU overhead with dynamic vertex inputs.

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

2 years agofreedreno: Disable UBWC for frontbuffer rendering
Rob Clark [Thu, 28 Jul 2022 21:27:56 +0000 (14:27 -0700)]
freedreno: Disable UBWC for frontbuffer rendering

Note that glamor would still need to set this new
GBM_BO_USE_FRONT_RENDERING flag.

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

2 years agogbm: Add USE_FRONT_RENDERING flag
Rob Clark [Thu, 28 Jul 2022 21:04:27 +0000 (14:04 -0700)]
gbm: Add USE_FRONT_RENDERING flag

Provide a use flag to let the driver know that the allocated buffer will
be used for frontbuffer rendering.  For example, bandwidth compressed
formats should usually be avoided for frontbuffer rendering to avoid the
visual corruption that results from this display racing with the GPU
writing header data vs. pixel data.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17799>

2 years agoci/zink: Re-enable a630 zink-on-turnip traces job using gbm as the backend.
Emma Anholt [Fri, 15 Jul 2022 00:03:02 +0000 (17:03 -0700)]
ci/zink: Re-enable a630 zink-on-turnip traces job using gbm as the backend.

This is a workaround for #6753, without having to build and install a
custom xlib in our containers.  Maybe some day debian will have a
backport?

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

2 years agozink: Replace the "optimal_tiling" flag with a "linear" flag instead.
Emma Anholt [Tue, 26 Jul 2022 23:52:20 +0000 (16:52 -0700)]
zink: Replace the "optimal_tiling" flag with a "linear" flag instead.

That's what it actually means now.

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

2 years agozink: Take the tiling path for resources with modifiers.
Emma Anholt [Wed, 27 Jul 2022 18:59:22 +0000 (11:59 -0700)]
zink: Take the tiling path for resources with modifiers.

transfer_map (the only consumer of the flag now) was doing direct mapping
on resources with modifiers (UBWC compressed images on turnip) and
accessing them as linear.  We definitely want the staging blit path
instead.

Fixes glReadPixels() from gbm surfaces on turnip.

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

2 years agoutil/memstream: insert null terminator on windows
Karol Herbst [Thu, 4 Aug 2022 11:13:16 +0000 (13:13 +0200)]
util/memstream: insert null terminator on windows

Libc's open_memstream is doing so on Unix systems already.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agogallium: mark the input data as const in pipe_grid_info
Karol Herbst [Fri, 1 Jul 2022 12:40:33 +0000 (14:40 +0200)]
gallium: mark the input data as const in pipe_grid_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agovtn: silence warning about linkage
Karol Herbst [Tue, 3 May 2022 23:08:58 +0000 (01:08 +0200)]
vtn: silence warning about linkage

For OpenCL kernels we simply link together SPIR-V files, so the only case
where we are left with linking shaders together is libclc and we handle
that just fine.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoclc: undefine spirv defs to work around LLVMs headers
Karol Herbst [Thu, 12 May 2022 21:57:24 +0000 (23:57 +0200)]
clc: undefine spirv defs to work around LLVMs headers

Clang unconditionally adds those definitions if using a spirv LLVM target.

That's not a problem on its own, but clang's internal OpenCL header enable
a bunch of OpenCL extensions if those are set.

Lucky for us, we can simply undefine them and spare us the trouble of
finding an upstream solution to this problem :)

This fixes the OpenCL CTS' compiler features_macro test.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agomicrosoft/clc: drop inline sampler reordering
Karol Herbst [Wed, 3 Aug 2022 17:20:35 +0000 (19:20 +0200)]
microsoft/clc: drop inline sampler reordering

nir_dedup_inline_samplers is now taking care of it.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir: Clean up and improve nir_dedup_inline_samplers
Jason Ekstrand [Fri, 15 Jul 2022 14:35:55 +0000 (16:35 +0200)]
nir: Clean up and improve nir_dedup_inline_samplers

It now removes dead inline sampler variables and moves everything to the
end so we no longer need nir_move_inline_samplers_to_end().

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir: extract the clc inline sampler dedup pass from clc
Karol Herbst [Fri, 1 Jul 2022 12:38:11 +0000 (14:38 +0200)]
nir: extract the clc inline sampler dedup pass from clc

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir/lower_images: extract from clover
Karol Herbst [Sat, 2 Jul 2022 16:50:55 +0000 (18:50 +0200)]
nir/lower_images: extract from clover

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir: serialize printf metadata for CL kernels
Karol Herbst [Fri, 1 Jul 2022 12:35:23 +0000 (14:35 +0200)]
nir: serialize printf metadata for CL kernels

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoprintf: add some unit tests
Karol Herbst [Tue, 2 Aug 2022 20:15:19 +0000 (22:15 +0200)]
printf: add some unit tests

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoprintf: extract clovers printf impl
Karol Herbst [Sat, 16 Apr 2022 08:48:08 +0000 (10:48 +0200)]
printf: extract clovers printf impl

Also make the code cleaner and simplier.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoci/bin: ignore Gitlab GQL cache
David Heidelberg [Thu, 4 Aug 2022 14:22:17 +0000 (16:22 +0200)]
ci/bin: ignore Gitlab GQL cache

Fixes: 266e3a627fbf ("ci/bin: Cache GQL queries")

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17885>

2 years agoradv/nir_lower_abi: Use instructions_pass
Konstantin Seurer [Sat, 23 Jul 2022 21:23:55 +0000 (23:23 +0200)]
radv/nir_lower_abi: Use instructions_pass

nir_shader_instructions_pass is sufficient and it should be a bit faster
than nir_shader_lower_instructions.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17727>

2 years agomeson: Cleanup usage dri_drivers as it's a dead option
Yonggang Luo [Sat, 30 Jul 2022 19:13:52 +0000 (03:13 +0800)]
meson: Cleanup usage dri_drivers as it's a dead option

Initial value of with_dri have no relation with dri_drivers.length()
Do not show useless `DRI drivers:`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>

2 years agomeson: Place all pre_args about HAVE_DRI* into single place
Yonggang Luo [Sat, 30 Jul 2022 19:08:27 +0000 (03:08 +0800)]
meson: Place all pre_args about HAVE_DRI* into single place

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>

2 years agodocs: update calendar for 22.2.0-rc1
Dylan Baker [Thu, 4 Aug 2022 17:34:36 +0000 (10:34 -0700)]
docs: update calendar for 22.2.0-rc1

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

2 years agodocs: update calendar and link releases notes for 22.1.5
Dylan Baker [Thu, 4 Aug 2022 17:34:05 +0000 (10:34 -0700)]
docs: update calendar and link releases notes for 22.1.5

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

2 years agodocs: update calendar and link releases notes for 22.1.4
Dylan Baker [Thu, 4 Aug 2022 17:34:03 +0000 (10:34 -0700)]
docs: update calendar and link releases notes for 22.1.4

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

2 years agodocs: Add sha256 sum for 22.1.4
Dylan Baker [Wed, 3 Aug 2022 21:07:57 +0000 (14:07 -0700)]
docs: Add sha256 sum for 22.1.4

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

2 years agodocs: add release notes for 22.1.4
Dylan Baker [Fri, 15 Jul 2022 17:42:47 +0000 (10:42 -0700)]
docs: add release notes for 22.1.4

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

2 years agodocs: Add sha256 sum for 22.1.5
Dylan Baker [Wed, 3 Aug 2022 21:44:59 +0000 (14:44 -0700)]
docs: Add sha256 sum for 22.1.5

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

2 years agodocs: add release notes for 22.1.5
Dylan Baker [Wed, 3 Aug 2022 21:13:26 +0000 (14:13 -0700)]
docs: add release notes for 22.1.5

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

2 years agoutil/disk_cache: Add new mesa-db cache type
Dmitry Osipenko [Mon, 13 Jun 2022 16:31:20 +0000 (19:31 +0300)]
util/disk_cache: Add new mesa-db cache type

Introduce new cache type, the Mesa-DB. This is a single-file read/write
cache that is based on the read-only Fossilize DB cache. Mesa-DB supports
cache size capping. It's a much more efficient cache than the multi-file
cache because Mesa-DB doesn't have the inode overhead. The plan is to make
Mesa-DB the default cache implementation once it will be deemed as stable
and well tested. For now users have to set the new MESA_DISK_CACHE_DATABASE
environment variable in order to active the Mesa-DB cache.

Mesa-DB cache is resilient to corrupted cache files and doesn't require
maintenance from users and developers. The size capping is implemented
by evicting least recently used cache items and compacting the cache
database files with the evicted entries. In order to prevent frequent
compaction of the cache, at minimum a half of cache is evicted when cache
is full.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Make disk_cache_os.h usable by C++ code
Dmitry Osipenko [Mon, 27 Jun 2022 17:00:56 +0000 (20:00 +0300)]
util/disk_cache: Make disk_cache_os.h usable by C++ code

The cache tests are written in C++ and the upcoming new Mese-DB cache
tests will need to include disk_cache_os.h that misses extern "C"
modifier required by C++ linkage. Add the modifier.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Move struct cache_entry_file_data to the disk_cache_os.h
Dmitry Osipenko [Mon, 27 Jun 2022 16:52:28 +0000 (19:52 +0300)]
util/disk_cache: Move struct cache_entry_file_data to the disk_cache_os.h

Relocate struct cache_entry_file_data to the header file, making it
accessible to the cache testing code. This is a preparatory step towards
addition of the new Mesa-DB cache type.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Append to disk_cache_load_cache_index() with _foz
Dmitry Osipenko [Mon, 27 Jun 2022 16:48:21 +0000 (19:48 +0300)]
util/disk_cache: Append to disk_cache_load_cache_index() with _foz

The disk_cache_load_cache_index() is solely about the foz-db cache and
we're going to add the new cache type. Append the function name with
_foz postfix to improve the naming, making clear what that function is
about.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Enable testing of uncompressed caches
Dmitry Osipenko [Mon, 27 Jun 2022 16:29:00 +0000 (19:29 +0300)]
util/disk_cache: Enable testing of uncompressed caches

Mesa caches are compressed by default and we just added option to disable
compression that will be needed by the new Mesa-DB cache. Let's enable
testing of uncompressed caches for the multi-file and foz-db caches in
addition to the compressed to increase test coverage of the new code.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Add option to disable compression
Dmitry Osipenko [Mon, 13 Jun 2022 15:59:57 +0000 (18:59 +0300)]
util/disk_cache: Add option to disable compression

The shader cache files produced by multi-file cache have a minimum size
limitation imposed by filesystem, usually it's 4KB. In order to make
cache tests suitable for a single file caches, we need to bypass the data
compression, making size of written out data determined for the eviction
testing.

The disk_cache_create() now checks whether driver_id name is set to
"make_check_uncompressed" in order to disable cache data compression.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>