platform/upstream/mesa.git
2 years agov3dv: expose VK_EXT_image_drm_format_modifier
Iago Toral Quiroga [Thu, 17 Mar 2022 10:49:03 +0000 (11:49 +0100)]
v3dv: expose VK_EXT_image_drm_format_modifier

This has been implemented for a while but we could not expose it on
Vulkan 1.0 because the extension declares a dependency on
VK_KHR_sampler_ycbcr_conversion, which we don't implement, and
CTS would complain.

On Vulkan 1.1 however, VK_KHR_sampler_ycbcr_conversion was promoted
to core as an optional feature, and this is enough for the the
dependency to be satisfied, even if the feature is not supported,
meaning that we can now expose the extension.

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

2 years agolavapipe: add EXT_texel_buffer_alignment support.
Dave Airlie [Fri, 11 Mar 2022 03:57:32 +0000 (13:57 +1000)]
lavapipe: add EXT_texel_buffer_alignment support.

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

2 years agozink: flag sample locations for re-set on batch flush
Mike Blumenkrantz [Tue, 15 Mar 2022 22:24:28 +0000 (18:24 -0400)]
zink: flag sample locations for re-set on batch flush

this needs to be re-set any time the cmdbuf changes

cc: mesa-stable

Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15397>

2 years agointel/fs: Force destination types on DP4A instructions
Ian Romanick [Wed, 16 Mar 2022 19:56:54 +0000 (12:56 -0700)]
intel/fs: Force destination types on DP4A instructions

Most of the time, this doesn't matter.  On the versions with _sat, if
the destination type is incorrect, the clamping will not happen
correctly.

Fixes the following CTS tests:

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

v2: Update anv-tgl-fails.txt.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 0f809dbf404 ("intel/compiler: Basic support for DP4A instruction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15417>

2 years agointel: change INTEL_MEASURE output to microseconds
Felix DeGrood [Fri, 11 Mar 2022 18:18:35 +0000 (18:18 +0000)]
intel: change INTEL_MEASURE output to microseconds

Change time event durations from ns -> us. Microseconds are easier
to work with.

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15348>

2 years agointel: increase INTEL_MEASURE batch/buffer sizes
Felix DeGrood [Wed, 9 Mar 2022 15:35:29 +0000 (15:35 +0000)]
intel: increase INTEL_MEASURE batch/buffer sizes

Increase default batch_size and buffer_size from 16 -> 64. These
are sized to be big enough to service most games. As games have
become more demanding, larger sizes become necessary.

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15348>

2 years agoanv: add indirect draw to INTEL_MEASURE
Felix DeGrood [Wed, 9 Mar 2022 15:34:11 +0000 (15:34 +0000)]
anv: add indirect draw to INTEL_MEASURE

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15348>

2 years agoclover/nir: respect lower to scalar options.
Dave Airlie [Tue, 10 Aug 2021 19:04:53 +0000 (05:04 +1000)]
clover/nir: respect lower to scalar options.

This just calls the lower alu to scalar pass like mesa/st

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

2 years agovulkan: update vk video headers for new vulkan headers.
Dave Airlie [Thu, 17 Mar 2022 20:09:48 +0000 (06:09 +1000)]
vulkan: update vk video headers for new vulkan headers.

These got out of sync update to the latest video headers.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15434>

2 years agotu: Trivially implement VK_EXT_texel_buffer_alignment
Connor Abbott [Thu, 17 Mar 2022 12:21:38 +0000 (13:21 +0100)]
tu: Trivially implement VK_EXT_texel_buffer_alignment

The previous alignment of 64 bytes, which we got from the blob,
indicates that single-texel alignment isn't supported. So just do a
trivial no-op implementation that returns the same alignment as before.
This matches what newer blobs that expose this extension do.

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

2 years agoaco/tests: add v_fma_mix tests
Rhys Perry [Thu, 27 Jan 2022 14:19:21 +0000 (14:19 +0000)]
aco/tests: add v_fma_mix tests

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: use v_fma_mix to combine mul/add/fma output conversions
Rhys Perry [Mon, 17 Jan 2022 16:52:10 +0000 (16:52 +0000)]
aco: use v_fma_mix to combine mul/add/fma output conversions

fossil-db (Sienna Cichlid):
Totals from 42 (0.03% of 134913) affected shaders:
CodeSize: 596904 -> 596332 (-0.10%); split: -0.10%, +0.00%
Instrs: 110194 -> 109902 (-0.26%)
Latency: 1205239 -> 1204915 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 189697 -> 189375 (-0.17%)
VClause: 1365 -> 1366 (+0.07%)
Copies: 5429 -> 5414 (-0.28%); split: -0.33%, +0.06%
Branches: 4034 -> 4026 (-0.20%)

fossil-db (Navi):
Totals from 42 (0.03% of 134913) affected shaders:
CodeSize: 596044 -> 595488 (-0.09%); split: -0.10%, +0.00%
Instrs: 110845 -> 110540 (-0.28%)
Latency: 1206131 -> 1205747 (-0.03%)
InvThroughput: 190178 -> 189809 (-0.19%)
VClause: 1372 -> 1370 (-0.15%); split: -0.29%, +0.15%
Copies: 5671 -> 5641 (-0.53%); split: -0.56%, +0.04%
Branches: 4033 -> 4025 (-0.20%)

fossil-db (Vega):
Totals from 42 (0.03% of 135048) affected shaders:
CodeSize: 605824 -> 605352 (-0.08%); split: -0.08%, +0.00%
Instrs: 115975 -> 115706 (-0.23%)
Latency: 1399845 -> 1398912 (-0.07%)
InvThroughput: 489901 -> 489442 (-0.09%)
VClause: 1314 -> 1311 (-0.23%); split: -0.38%, +0.15%
Copies: 9673 -> 9666 (-0.07%); split: -0.12%, +0.05%
Branches: 4025 -> 4024 (-0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: apply clamp to v_fma_mix
Rhys Perry [Mon, 17 Jan 2022 17:54:47 +0000 (17:54 +0000)]
aco: apply clamp to v_fma_mix

fossil-db (Sienna Cichlid):
Totals from 2536 (1.88% of 134913) affected shaders:
CodeSize: 17314568 -> 17282960 (-0.18%)
Instrs: 3191438 -> 3187487 (-0.12%)
Latency: 59465090 -> 59407885 (-0.10%)
InvThroughput: 10271466 -> 10260512 (-0.11%)

fossil-db (Navi):
Totals from 2512 (1.86% of 134913) affected shaders:
CodeSize: 17194700 -> 17173396 (-0.12%)
Instrs: 3215093 -> 3212430 (-0.08%)
Latency: 60174315 -> 60142593 (-0.05%)
InvThroughput: 9491103 -> 9483979 (-0.08%)

fossil-db (Vega):
Totals from 2512 (1.86% of 135048) affected shaders:
CodeSize: 17186776 -> 17165472 (-0.12%)
Instrs: 3311166 -> 3308503 (-0.08%)
Latency: 65737409 -> 65716096 (-0.03%)
InvThroughput: 21735857 -> 21719792 (-0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: combine add/mul as v_fma_mix into fma
Rhys Perry [Mon, 17 Jan 2022 17:48:33 +0000 (17:48 +0000)]
aco: combine add/mul as v_fma_mix into fma

fossil-db (Sienna Cichlid):
Totals from 7345 (5.44% of 134913) affected shaders:
CodeSize: 73840060 -> 73768936 (-0.10%); split: -0.10%, +0.00%
Instrs: 13701603 -> 13684183 (-0.13%); split: -0.13%, +0.00%
Latency: 185389373 -> 185306538 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 33785020 -> 33757593 (-0.08%); split: -0.08%, +0.00%
VClause: 237337 -> 237338 (+0.00%)
SClause: 485728 -> 485720 (-0.00%)
Copies: 935900 -> 935279 (-0.07%); split: -0.07%, +0.00%
Branches: 480721 -> 480722 (+0.00%)

fossil-db (Navi):
Totals from 10649 (7.89% of 134913) affected shaders:
VGPRs: 756624 -> 756516 (-0.01%); split: -0.02%, +0.01%
CodeSize: 92156580 -> 91707900 (-0.49%); split: -0.49%, +0.00%
MaxWaves: 159402 -> 159476 (+0.05%); split: +0.07%, -0.02%
Instrs: 17155827 -> 17070449 (-0.50%); split: -0.50%, +0.00%
Latency: 246296456 -> 245487120 (-0.33%); split: -0.33%, +0.00%
InvThroughput: 41438159 -> 41117424 (-0.77%); split: -0.77%, +0.00%
VClause: 323790 -> 323867 (+0.02%); split: -0.00%, +0.03%
SClause: 612077 -> 612034 (-0.01%); split: -0.01%, +0.00%
Copies: 1103012 -> 1102775 (-0.02%); split: -0.03%, +0.01%
Branches: 555893 -> 555896 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 824372 -> 824378 (+0.00%)
PreVGPRs: 740390 -> 740363 (-0.00%); split: -0.01%, +0.01%

fossil-db (Vega):
Totals from 10950 (8.11% of 135048) affected shaders:
SGPRs: 1034528 -> 1034560 (+0.00%)
VGPRs: 794092 -> 794104 (+0.00%); split: -0.01%, +0.01%
CodeSize: 94409768 -> 93955568 (-0.48%); split: -0.48%, +0.00%
MaxWaves: 38950 -> 38939 (-0.03%); split: +0.00%, -0.03%
Instrs: 18162637 -> 18070934 (-0.50%); split: -0.51%, +0.00%
Latency: 291718455 -> 290772451 (-0.32%); split: -0.32%, +0.00%
InvThroughput: 109114674 -> 108489767 (-0.57%); split: -0.57%, +0.00%
VClause: 334498 -> 334579 (+0.02%); split: -0.01%, +0.03%
SClause: 628871 -> 628825 (-0.01%); split: -0.01%, +0.00%
Copies: 1674477 -> 1674850 (+0.02%); split: -0.02%, +0.04%
PreSGPRs: 834800 -> 834802 (+0.00%)
PreVGPRs: 750460 -> 750415 (-0.01%); split: -0.01%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: use v_fma_mix to combine mul/add/fma input conversions
Rhys Perry [Mon, 17 Jan 2022 13:58:34 +0000 (13:58 +0000)]
aco: use v_fma_mix to combine mul/add/fma input conversions

fossil-db (Sienna Cichlid):
Totals from 11558 (8.57% of 134913) affected shaders:
VGPRs: 829392 -> 825200 (-0.51%); split: -0.52%, +0.02%
SpillSGPRs: 7845 -> 8399 (+7.06%)
CodeSize: 101822704 -> 101677172 (-0.14%); split: -0.25%, +0.11%
MaxWaves: 172216 -> 173182 (+0.56%); split: +0.59%, -0.03%
Instrs: 19061343 -> 18883450 (-0.93%); split: -0.93%, +0.00%
Latency: 256011590 -> 255177378 (-0.33%); split: -0.39%, +0.06%
InvThroughput: 46104438 -> 45604059 (-1.09%); split: -1.12%, +0.04%
VClause: 352211 -> 351948 (-0.07%); split: -0.21%, +0.13%
SClause: 676506 -> 676961 (+0.07%); split: -0.04%, +0.11%
Copies: 1246571 -> 1237745 (-0.71%); split: -0.97%, +0.26%
Branches: 626229 -> 626241 (+0.00%); split: -0.02%, +0.03%
PreSGPRs: 882176 -> 888853 (+0.76%); split: -0.00%, +0.76%
PreVGPRs: 796705 -> 792304 (-0.55%); split: -0.56%, +0.00%

fossil-db (Navi):
Totals from 11558 (8.57% of 134913) affected shaders:
VGPRs: 803900 -> 798660 (-0.65%); split: -0.73%, +0.08%
SpillSGPRs: 7894 -> 8492 (+7.58%); split: -0.10%, +7.68%
CodeSize: 96892596 -> 97134716 (+0.25%); split: -0.05%, +0.29%
MaxWaves: 181454 -> 183014 (+0.86%); split: +0.94%, -0.08%
Instrs: 18186813 -> 18093994 (-0.51%); split: -0.56%, +0.05%
Latency: 253385909 -> 253325528 (-0.02%); split: -0.15%, +0.12%
InvThroughput: 43315355 -> 42805541 (-1.18%); split: -1.33%, +0.15%
VClause: 338755 -> 338535 (-0.06%); split: -0.16%, +0.10%
SClause: 656561 -> 656829 (+0.04%); split: -0.07%, +0.11%
Copies: 1162235 -> 1153558 (-0.75%); split: -1.07%, +0.32%
Branches: 588536 -> 588542 (+0.00%); split: -0.03%, +0.03%
PreSGPRs: 854849 -> 861640 (+0.79%); split: -0.00%, +0.80%
PreVGPRs: 783401 -> 779031 (-0.56%); split: -0.56%, +0.00%

fossil-db (Vega):
Totals from 11516 (8.53% of 135048) affected shaders:
SGPRs: 1072128 -> 1076288 (+0.39%); split: -0.01%, +0.40%
VGPRs: 821312 -> 818124 (-0.39%); split: -0.43%, +0.04%
SpillSGPRs: 11952 -> 12677 (+6.07%)
CodeSize: 96378496 -> 96707596 (+0.34%); split: -0.04%, +0.38%
MaxWaves: 42614 -> 42883 (+0.63%); split: +0.68%, -0.04%
Instrs: 18672844 -> 18600274 (-0.39%); split: -0.44%, +0.05%
Latency: 296658786 -> 296338296 (-0.11%); split: -0.21%, +0.10%
InvThroughput: 111665547 -> 111283559 (-0.34%); split: -0.40%, +0.06%
VClause: 343001 -> 342826 (-0.05%); split: -0.14%, +0.09%
SClause: 646684 -> 646657 (-0.00%); split: -0.05%, +0.04%
Copies: 1715316 -> 1712895 (-0.14%); split: -0.53%, +0.39%
PreSGPRs: 850737 -> 856543 (+0.68%); split: -0.04%, +0.72%
PreVGPRs: 775293 -> 772215 (-0.40%); split: -0.41%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: refactor selection of mad/fma
Rhys Perry [Mon, 17 Jan 2022 17:33:25 +0000 (17:33 +0000)]
aco: refactor selection of mad/fma

In the future, whether we need to use fma will depend on which
multiplication is chosen.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: improve support for v_fma_mix
Rhys Perry [Thu, 27 Jan 2022 14:00:38 +0000 (14:00 +0000)]
aco: improve support for v_fma_mix

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agoaco: fix fp16 opcode definitions
Rhys Perry [Wed, 23 Feb 2022 11:33:16 +0000 (11:33 +0000)]
aco: fix fp16 opcode definitions

The v_fma_mix optimizations assume v_cvt_f16_f32 and v_mul_f16 use a v2b
definition.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14769>

2 years agomesa/main: replace use of simple_list with util/list
Dylan Baker [Thu, 10 Feb 2022 22:59:05 +0000 (14:59 -0800)]
mesa/main: replace use of simple_list with util/list

Because really, do we want simple_list?

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

2 years agoutil/list.h: Add docstrings for list_add and list_addtail
Dylan Baker [Wed, 16 Mar 2022 17:41:29 +0000 (10:41 -0700)]
util/list.h: Add docstrings for list_add and list_addtail

Which have easily confused parameters: the first argument is the item to
be added, the second is the list to add to; but this could easily be the
other way around.

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

2 years agopan/va: Use XML for special FAU page 0
Alyssa Rosenzweig [Sun, 13 Mar 2022 18:16:08 +0000 (14:16 -0400)]
pan/va: Use XML for special FAU page 0

Now all special FAU handling is unified, which makes both assembler and
disassembler considerably nicer. This adds some more special FAU indices from
page 0 that were previously missing, allowing them to be assembled and
disasembled.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Use boring names for FAU special pages 1/3
Alyssa Rosenzweig [Sun, 13 Mar 2022 18:08:17 +0000 (14:08 -0400)]
pan/va: Use boring names for FAU special pages 1/3

There's no magic underlying interpretation, be.. uniform.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Remove immediate modes from XML/asm
Alyssa Rosenzweig [Sun, 13 Mar 2022 18:06:54 +0000 (14:06 -0400)]
pan/va: Remove immediate modes from XML/asm

Now replaced by inference in the assembler, as they should be.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Use 64-bit special FAU for pages 1 and 3
Alyssa Rosenzweig [Sun, 13 Mar 2022 18:05:04 +0000 (14:05 -0400)]
pan/va: Use 64-bit special FAU for pages 1 and 3

This aligns with how the hardware actually sees special FAU.

Also fix the names while we're at it.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Rename imm_mode -> fau_page
Alyssa Rosenzweig [Sun, 13 Mar 2022 17:52:40 +0000 (13:52 -0400)]
pan/va: Rename imm_mode -> fau_page

In accordance with new information on the hardware.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Handle uniforms from page 1
Alyssa Rosenzweig [Sun, 13 Mar 2022 17:51:20 +0000 (13:51 -0400)]
pan/va: Handle uniforms from page 1

Like Bifrost, Valhall can access 2x as many fast acess uniforms as previously
thought. However, on Valhall this requires using the pagination mechanism.
Support this in the dis/assembler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Rewrite FAU handling in dis/assembler
Alyssa Rosenzweig [Sun, 13 Mar 2022 17:49:18 +0000 (13:49 -0400)]
pan/va: Rewrite FAU handling in dis/assembler

FAU pages do not need to be specified explicitly in the assembly. Rather, they
should be inferred by the assembler by the instructions used. Rewrite the code
handling this in alignment with new information about the hardware.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Fix BLEND instruction
Alyssa Rosenzweig [Sat, 5 Mar 2022 01:03:08 +0000 (20:03 -0500)]
pan/va: Fix BLEND instruction

There's only one staging register, the other register is just offset due to the
Msg64 source.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Handle 64-bit sources in message instrs
Alyssa Rosenzweig [Sat, 5 Mar 2022 01:00:35 +0000 (20:00 -0500)]
pan/va: Handle 64-bit sources in message instrs

These take up two slots, reading an aligned register pair, even though they are
in a 32-bit instruction. Required to correctly model BLEND.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Add start property to source
Alyssa Rosenzweig [Sat, 5 Mar 2022 00:59:50 +0000 (19:59 -0500)]
pan/va: Add start property to source

The bit position of sources is more complicated than (8 * index). Make it a part
of the Valhall reflection information.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agopan/va: Fix typo in BLEND text
Alyssa Rosenzweig [Sat, 5 Mar 2022 00:59:38 +0000 (19:59 -0500)]
pan/va: Fix typo in BLEND text

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>

2 years agoci/freedreno: Disable a618 jobs
Tomeu Vizoso [Thu, 17 Mar 2022 16:12:24 +0000 (17:12 +0100)]
ci/freedreno: Disable a618 jobs

Some of these machines are experiencing networking problems currently.
Disable for now so people aren't blocked.

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

2 years agogallium: rename ballot cap
Erik Faye-Lund [Mon, 14 Mar 2022 09:22:10 +0000 (10:22 +0100)]
gallium: rename ballot cap

This cap is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename clock cap
Erik Faye-Lund [Mon, 14 Mar 2022 09:20:07 +0000 (10:20 +0100)]
gallium: rename clock cap

This cap is no longer TGSI specific, so let's rename it to reflect
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename group-vote cap
Erik Faye-Lund [Mon, 14 Mar 2022 08:36:29 +0000 (09:36 +0100)]
gallium: rename group-vote cap

This cap is no longer TGSI specific, so let's rename it to reflect
reality.

Because the name got a bit vague when removing the TGSI-bits, let's add
some more details to the name.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename texture query samples cap
Erik Faye-Lund [Mon, 14 Mar 2022 08:21:34 +0000 (09:21 +0100)]
gallium: rename texture query samples cap

This isn't specific to TGSI, so let's update the name to reflect
reality.

Because the name of the opcode was TGSI specific, let's pick a new one,
based on the naming of the PIPE_CAP_TEXTURE_QUERY_LOD cap.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename read-outputs cap
Erik Faye-Lund [Mon, 14 Mar 2022 09:13:40 +0000 (10:13 +0100)]
gallium: rename read-outputs cap

This cap is no longer TGSI-specific, so let's update the name to reflect
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename array-components cap
Erik Faye-Lund [Mon, 14 Mar 2022 09:11:26 +0000 (10:11 +0100)]
gallium: rename array-components cap

This cap is no longer TGSI specific, so let's update the name to reflect
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename sysval caps
Erik Faye-Lund [Mon, 14 Mar 2022 08:33:45 +0000 (09:33 +0100)]
gallium: rename sysval caps

These aren't spiecic to TGSI any more, so let's rename them to reflect
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename fine derivative cap
Erik Faye-Lund [Mon, 14 Mar 2022 08:17:08 +0000 (09:17 +0100)]
gallium: rename fine derivative cap

This is no longer TGSI specific, so let's rename it to reflect the
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename pixel-coord caps
Erik Faye-Lund [Mon, 14 Mar 2022 08:02:05 +0000 (09:02 +0100)]
gallium: rename pixel-coord caps

These aren't specific to TGSI, so let's rename them to reflect the
reality.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename layer-viewport caps
Erik Faye-Lund [Tue, 8 Mar 2022 16:25:46 +0000 (17:25 +0100)]
gallium: rename layer-viewport caps

Similar to the previous commits, these aren't TGSI specific, so let's
drop TGSI from their name.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename vs instance id cap
Erik Faye-Lund [Tue, 8 Mar 2022 10:13:19 +0000 (11:13 +0100)]
gallium: rename vs instance id cap

This cap is no longer specific to TGSI, so let's rename it and update
the documentation to reflect that.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agogallium: rename pack half-float cap
Erik Faye-Lund [Tue, 8 Mar 2022 09:27:13 +0000 (10:27 +0100)]
gallium: rename pack half-float cap

This cap no longer has anything to do with TGSI, as the lowering happens
on GLSL IR, and applies just as much to NIR drivers. So let's rename
this cap and update the docs to reflect the current situation.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>

2 years agopanvk: Convert to the common sync/submit framework
Jason Ekstrand [Wed, 9 Mar 2022 04:13:20 +0000 (22:13 -0600)]
panvk: Convert to the common sync/submit framework

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

2 years agoanv: zero-out anv_batch_bo
Lionel Landwerlin [Thu, 17 Mar 2022 09:57:07 +0000 (11:57 +0200)]
anv: zero-out anv_batch_bo

anv_batch_bo has a length field that we use to flush cachelines. Not
having that field initialized properly leads us to access out of bound
memory.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>

2 years agoanv: fix variable shadowing
Lionel Landwerlin [Thu, 17 Mar 2022 09:53:54 +0000 (11:53 +0200)]
anv: fix variable shadowing

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 83fee30e8596 ("anv: allow multiple command buffers in anv_queue_submit")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>

2 years agoradv: enable radv_disable_aniso_single_level for DXVK/vkd3d
Samuel Pitoiset [Mon, 14 Mar 2022 08:04:08 +0000 (09:04 +0100)]
radv: enable radv_disable_aniso_single_level for DXVK/vkd3d

It seems the default D3D behavior and it's complicated to emulate this
in DXVK/vkd3d. Enable it by default to prevent rendering issues in
other games not listed here.

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

2 years agoradv: do not compute the cache UUID for LLVM if it's not used
Samuel Pitoiset [Wed, 16 Mar 2022 09:32:33 +0000 (10:32 +0100)]
radv: do not compute the cache UUID for LLVM if it's not used

If the LLVM version (even minor) isn't the same on the OS that
precompiles shaders vs the OS that runs them, the cache UUID would
be different, even if only ACO is used.

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

2 years agointel/fs: Add Wa_14014435656
Sagar Ghuge [Thu, 9 Sep 2021 17:45:33 +0000 (10:45 -0700)]
intel/fs: Add Wa_14014435656

For any fence greater than local scope, always set flush type to at
least invalidate so that fence goes on properly.

v2: Fixup condition to trigger workaround (Lionel)

v3: Simplify workaround (Curro)

v4: Don't drop the existing WA (Curro)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: 22.0 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14947>

2 years agointel/fs: Add Wa_22013689345
Sagar Ghuge [Wed, 27 Oct 2021 21:11:27 +0000 (14:11 -0700)]
intel/fs: Add Wa_22013689345

v2: Use a simpler framework (Lionel)

v3: Rebase, add task/mesh (Lionel)

v4: Fixup fence exec size (SIMDX -> SIMD1)

v5: Fix invalidate_analysis, add finishme comment (Curro)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: 22.0 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14947>

2 years agoanv, iris: Add Wa_16011411144 for DG2
Anuj Phogat [Mon, 3 May 2021 18:25:07 +0000 (11:25 -0700)]
anv, iris: Add Wa_16011411144 for DG2

v2: Use CS_STALL instead of FLUSH_ENABLE in Iris (Lionel)
    Add missing CS_STALL after SO_BUFFER change in Anv (Lionel)

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: 22.0 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14947>

2 years agobroadcom/ci: Update flake list
Juan A. Suarez Romero [Wed, 16 Mar 2022 15:07:51 +0000 (16:07 +0100)]
broadcom/ci: Update flake list

Some of the tests marked as flake didn't show up as flakes for a long
time (more than 3 months). So likely they are already fixed.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15411>

2 years agotu: Enable UniformBufferUpdateAfterBind
Connor Abbott [Fri, 1 Oct 2021 14:24:47 +0000 (16:24 +0200)]
tu: Enable UniformBufferUpdateAfterBind

UBOs are now read at run-time via the preamble so this can be enabled.

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

2 years agoir3, turnip: Use ldc.k to push UBOs
Connor Abbott [Fri, 24 Sep 2021 17:08:39 +0000 (19:08 +0200)]
ir3, turnip: Use ldc.k to push UBOs

This reuses the same UBO analysis to do the pushing in the shader
preamble via the ldc.k instruction instead of in the driver via
CP_LOAD_STATE6. The const_data UBO is exempted as it uses a different
codepath that isn't as critical.

Don't do this on gallium because there are some regressions. Aztec Ruins
in particular regresses a bit, and nothing I've benchmarked benefits.

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

2 years agoir3: Refactor ir3_compiler_create() to take an options struct
Connor Abbott [Wed, 26 Jan 2022 15:56:45 +0000 (16:56 +0100)]
ir3: Refactor ir3_compiler_create() to take an options struct

This will let us add more options without creating too much churn.

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

2 years agoir3: Implement and document ldc.k
Connor Abbott [Tue, 21 Sep 2021 14:50:04 +0000 (16:50 +0200)]
ir3: Implement and document ldc.k

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

2 years agoir3: Add preamble optimization pass
Connor Abbott [Fri, 24 Sep 2021 17:04:04 +0000 (19:04 +0200)]
ir3: Add preamble optimization pass

Now that everything is plumbed through, we can tie it together.

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

2 years agoir3: Don't include preamble instructions in stats
Connor Abbott [Wed, 29 Sep 2021 14:43:24 +0000 (16:43 +0200)]
ir3: Don't include preamble instructions in stats

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

2 years agoir3: Insert frag coord code after preamble
Connor Abbott [Fri, 1 Oct 2021 10:15:10 +0000 (12:15 +0200)]
ir3: Insert frag coord code after preamble

To match the pre-preamble behavior, and so that we can better schedule
it.

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

2 years agoir3: Support prefetching with preambles
Connor Abbott [Wed, 29 Sep 2021 11:56:51 +0000 (13:56 +0200)]
ir3: Support prefetching with preambles

Since the NIR pass runs very late, it needs to be aware of preambles,
and when creating the instruction we need to move it to the start block
so that RA doesn't overwrite it in the preamble.

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

2 years agoir3/legalize: Handle inserting (ei) with preamble
Connor Abbott [Wed, 29 Sep 2021 10:36:49 +0000 (12:36 +0200)]
ir3/legalize: Handle inserting (ei) with preamble

Make sure that shaders with a preamble are still considered
early-release so that we don't regress them.

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

2 years agoir3: Plumb through store_uniform_ir3 intrinsic
Connor Abbott [Fri, 24 Sep 2021 15:32:31 +0000 (17:32 +0200)]
ir3: Plumb through store_uniform_ir3 intrinsic

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

2 years agoir3: Better assemble/disassemble stc
Connor Abbott [Fri, 24 Sep 2021 14:14:30 +0000 (16:14 +0200)]
ir3: Better assemble/disassemble stc

Add in the type, even though it turns out to not be that useful. Add
in support for assembling it. Add some notes based on computerator
experiments. And add support for the indirect a1.x mode that's needed
for storing c64.x and later.

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

2 years agoir3: Implement basic shader preamble intrinsics
Connor Abbott [Tue, 21 Sep 2021 15:23:10 +0000 (17:23 +0200)]
ir3: Implement basic shader preamble intrinsics

These will be used to implement the ir3-specific shader preamble
lowering in NIR. shps is conceptually similar to getone (although it
technically can't be duplicated) and shpe is similar to other barriers,
since it has to happen after any stores to the constant file in the
preamble. Add NIR intrinsics and plumbs them through ir3.

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

2 years agoir3: Don't count reserved user consts in ubo_state::size
Connor Abbott [Tue, 25 Jan 2022 09:30:33 +0000 (10:30 +0100)]
ir3: Don't count reserved user consts in ubo_state::size

Previously we included the reserved user consts (for Vulkan push
constants) as part of the pushed UBO contents, but that led to a problem
because when calculating the worst-case space for UBOs we didn't factor
in the reserved user consts. We'll have the same problem when doing the
same thing in the preamble optimization pass. Stop including the
reserved size in ubo_state::size, and have ir3_setup_consts() add it in
instead, so we won't forget to add it anywhere.

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

2 years agoir3: Fix scan.macro valid flags
Connor Abbott [Tue, 15 Mar 2022 12:31:39 +0000 (13:31 +0100)]
ir3: Fix scan.macro valid flags

Right now we don't support any. We could probably support const, but
that's not worth it because we could optimize a reduce of a const better
anyway.

Fixes: 1a78604d201 ("ir3: Add support for subgroup arithmetic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13148>

2 years agonir: Add a preamble optimization pass
Connor Abbott [Fri, 24 Sep 2021 16:41:29 +0000 (18:41 +0200)]
nir: Add a preamble optimization pass

This pass tries to move computations that are uniform for the entire
draw to the preamble. There's also an API for backends to insert their
own instructions into the preamble, for porting existing UBO pushing
passes.

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

2 years agonir: Add a "deep" instruction clone
Connor Abbott [Fri, 24 Sep 2021 16:38:27 +0000 (18:38 +0200)]
nir: Add a "deep" instruction clone

For the shader preamble, we need to add support for cloning one
instruction at a time into the preamble, but we also need to rewrite
sources.

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

2 years agonir: Add preamble functions
Connor Abbott [Fri, 24 Sep 2021 16:12:24 +0000 (18:12 +0200)]
nir: Add preamble functions

These are functions that run before the entrypoint at least once per
draw and write their results via store_preamble, and then are loaded in
the rest of the shader via load_preamble.

We will add users in the following commits.

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

2 years agov3dv: change MESA_GLSL_CACHE envvar reference
Juan A. Suarez Romero [Mon, 14 Mar 2022 17:54:43 +0000 (18:54 +0100)]
v3dv: change MESA_GLSL_CACHE envvar reference

This was renamed to MESA_SHADER_CACHE.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15390>

2 years agoradv: change MESA_GLSL_CACHE envvar reference
Juan A. Suarez Romero [Mon, 14 Mar 2022 17:53:14 +0000 (18:53 +0100)]
radv: change MESA_GLSL_CACHE envvar reference

This was renamed to MESA_SHADER_CACHE.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15390>

2 years agoci: use MESA_SHADER_CACHE envvar
Juan A. Suarez Romero [Mon, 14 Mar 2022 17:50:26 +0000 (18:50 +0100)]
ci: use MESA_SHADER_CACHE envvar

This was renamed from MESA_GLSL_CACHE.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15390>

2 years agoutil/disk_cache: rename MESA_GLSL_CACHE envvar
Juan A. Suarez Romero [Mon, 14 Mar 2022 17:47:37 +0000 (18:47 +0100)]
util/disk_cache: rename MESA_GLSL_CACHE envvar

Rename MESA_GLSL_CACHE to MESA_SHADER_CACHE, as the on-disk cache can
store not only GLSL but also SPIR-V shaders.

v2:
 - Keep old envvar as deprecated (Mike)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15390>

2 years agovenus: add VK_EXT_calibrated_timestamps extension
Igor Torrente [Fri, 11 Feb 2022 10:25:43 +0000 (07:25 -0300)]
venus: add VK_EXT_calibrated_timestamps extension

Implements all the necessary code in the device initialization
and extension functions.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15389>

2 years agovenus: move vkGetCalibratedTimestamps to vn_protocol_driver_device.h
Igor Torrente [Wed, 16 Mar 2022 11:30:30 +0000 (08:30 -0300)]
venus: move vkGetCalibratedTimestamps to vn_protocol_driver_device.h

Update venus-protocol files to move vkGetCalibratedTimestamps function
from vn_protocol_driver_transport.h to vn_protocol_driver_device.h.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15389>

2 years agovulkan: Make sure we've loaded our connectors when querying plane props.
Emma Anholt [Fri, 11 Mar 2022 21:55:52 +0000 (13:55 -0800)]
vulkan: Make sure we've loaded our connectors when querying plane props.

If you hadn't already called wsi_GetPhysicalDeviceDisplayProperties2KHR or
wsi_GetDrmDisplayEXT before calling
GetPhysicalDeviceDisplayPlaneProperties2KHR, then the connectors list
wouldn't be populated and you'd get no plane properties.  Fixes failure of
dEQP-VK.wsi.display.get_display_plane_capabilities when run on its own.

Fixes: #4575
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15353>

2 years agozink: emulate some more memory
Gurchetan Singh [Tue, 1 Mar 2022 01:59:04 +0000 (17:59 -0800)]
zink: emulate some more memory

If ZINK_HEAP_DEVICE_LOCAL_VISIBLE isn't available natively, then
fallback to device local memory without asserting.

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

2 years agoci/turnip: Drop alpha_to-coverage flake note on a618.
Emma Anholt [Fri, 11 Mar 2022 21:03:10 +0000 (13:03 -0800)]
ci/turnip: Drop alpha_to-coverage flake note on a618.

It's only ever been seen on a630.

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

2 years agoturnip: Use the DRM or KGSL GPU reset status ioctls to report device loss.
Emma Anholt [Wed, 2 Feb 2022 20:59:54 +0000 (12:59 -0800)]
turnip: Use the DRM or KGSL GPU reset status ioctls to report device loss.

ANGLE-on-venus-on-turnip and zink-on-turnip want real data here for EGL's
reset tests.

This required moving the remaining GPU-reset-causing tests from flakes or
xfails to skips.  Otherwise, the rest of the caselist associated with them
ends up being marked as fails as well.  The alternative would be to put
these tests in their own test groups with tests_per_group = 1, but that
didn't seem worth the effort.  Or, we could finally do something with
https://gitlab.freedesktop.org/anholt/deqp-runner/-/issues/14.

Fixes: #5955
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14839>

2 years agoci/freedreno: Remove some xfails for tests that now skip.
Emma Anholt [Fri, 11 Mar 2022 20:42:06 +0000 (12:42 -0800)]
ci/freedreno: Remove some xfails for tests that now skip.

The last CTS uprev correctly turned them into NotSupported.

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

2 years agoci/freedreno: Drop the skips of spirv_ids_abuse in pre-merge.
Emma Anholt [Fri, 11 Mar 2022 20:22:35 +0000 (12:22 -0800)]
ci/freedreno: Drop the skips of spirv_ids_abuse in pre-merge.

The crash was fixed in 62a7acee93bd939645205de5a8646e4c0ea1881f, and
runtime of the tests locally is 5-17s each with a hot shader cache, 11-25s
without.

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

2 years agoci/lvp: Stop skipping spv-stable-maze-flatten-copy-composite
Emma Anholt [Thu, 10 Mar 2022 21:27:04 +0000 (13:27 -0800)]
ci/lvp: Stop skipping spv-stable-maze-flatten-copy-composite

The runtime was fixed in VK-GL-CTS
1751124d2870840bada579c236a66d38b48c039b, now it's just 1 second.

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

2 years agoci: Drop skips of spv-stable-pillars-volatile-nontemporal-store
Emma Anholt [Thu, 10 Mar 2022 21:12:21 +0000 (13:12 -0800)]
ci: Drop skips of spv-stable-pillars-volatile-nontemporal-store

The runtime was fixed in VK-GL-CTS
7cc65f6c02276767407233e74c7174d88dab7919.  Now it's .6s on lvp, 20ms on
turnip a618.

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

2 years agoanv: Include scissors in viewport calculations
Jason Ekstrand [Tue, 15 Mar 2022 15:29:31 +0000 (10:29 -0500)]
anv: Include scissors in viewport calculations

It's tricky to always get the render area to the viewport code.  In
particular, it's not provided to secondary command buffers as part of
the inheritance info so we have to bend over backwards and look for a
framebuffer.  With VK_KHR_dynamic_rendering, there is no framebuffer and
this approach won't work and we'll need something better if we want
competent guardbands in secondary command buffers.

The good news is that any client that's sloppily rendering and trusting
the clipper to keep things inside the render area will set a scissor and
that's something they have to set inside the secondary.  We can dig
through the scissor state and also include the corresponding scissor (if
any) and use that for our render area.  This should give us the same
secondary command buffer performance with VK_KHR_dynamic_rendering.

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

2 years agoanv: Move viewport/scissor emit to genX_cmd_buffer.c
Jason Ekstrand [Tue, 15 Mar 2022 15:10:28 +0000 (10:10 -0500)]
anv: Move viewport/scissor emit to genX_cmd_buffer.c

There's never been a particularly good reason to stick these in gfx7/8.
We mostly did it to deduplicate the binary a bit but this shouldn't emit
all that much code.

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

2 years agoanv: Calculate the real guardband based on render area
Jason Ekstrand [Mon, 28 Feb 2022 20:18:09 +0000 (14:18 -0600)]
anv: Calculate the real guardband based on render area

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

2 years agointel/guardband: Take min/max instead of total size
Jason Ekstrand [Mon, 28 Feb 2022 20:17:59 +0000 (14:17 -0600)]
intel/guardband: Take min/max instead of total size

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

2 years agodocs: Add high-level documentation for Vulkan render passes
Jason Ekstrand [Fri, 18 Feb 2022 04:18:49 +0000 (22:18 -0600)]
docs: Add high-level documentation for Vulkan render passes

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agodocs: Add the start of Vulkan runtime docs
Jason Ekstrand [Fri, 18 Feb 2022 04:10:04 +0000 (22:10 -0600)]
docs: Add the start of Vulkan runtime docs

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv: Convert to 100% dynamic rendering
Jason Ekstrand [Wed, 9 Feb 2022 18:03:15 +0000 (12:03 -0600)]
anv: Convert to 100% dynamic rendering

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv: Drop pipeline pass/subpass in favor of rendering_info
Jason Ekstrand [Fri, 11 Feb 2022 17:40:34 +0000 (11:40 -0600)]
anv: Drop pipeline pass/subpass in favor of rendering_info

This is about the only "small" change we can make in the process of
converting from render-pass-based to dynamic-rendering-based.  Make
everything in pipeline creation work in terms of dynamic rendering and
create the dynamic rendering structs from the render pass as-needed.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv/pipeline: Stop pretending we're the validator
Jason Ekstrand [Sat, 12 Feb 2022 03:10:09 +0000 (21:10 -0600)]
anv/pipeline: Stop pretending we're the validator

This was ill-conceived at best.  Yes, it checks for a few error
conditions but it doesn't check much and what checks it has are very far
away from the code that relies on those invariants.  If we care about
these invariants, we should add asserts near the code that makes those
assumptions rather than pretending to be the validation layers.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv: Stop treating color input attachments specially
Jason Ekstrand [Wed, 9 Feb 2022 23:07:03 +0000 (17:07 -0600)]
anv: Stop treating color input attachments specially

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv/pass: Make unused color attachments VK_ATTACHMENT_UNUSED
Jason Ekstrand [Thu, 10 Feb 2022 06:57:25 +0000 (00:57 -0600)]
anv/pass: Make unused color attachments VK_ATTACHMENT_UNUSED

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv: Better null surface state size for dynamic rendering
Jason Ekstrand [Fri, 11 Feb 2022 02:23:10 +0000 (20:23 -0600)]
anv: Better null surface state size for dynamic rendering

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agoanv: Fix handling of null depth/stencil attachments with dynamic rendering
Jason Ekstrand [Wed, 9 Feb 2022 18:40:33 +0000 (12:40 -0600)]
anv: Fix handling of null depth/stencil attachments with dynamic rendering

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agovulkan/framebuffer: Add a flags field
Jason Ekstrand [Sat, 12 Feb 2022 03:08:18 +0000 (21:08 -0600)]
vulkan/framebuffer: Add a flags field

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agovulkan/render_pass: Add an optimization for UNDEFINED+LOAD_OP_CLEAR
Jason Ekstrand [Thu, 17 Feb 2022 18:58:39 +0000 (12:58 -0600)]
vulkan/render_pass: Add an optimization for UNDEFINED+LOAD_OP_CLEAR

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>

2 years agovulkan/render_pass: Support fragment shading rate
Jason Ekstrand [Thu, 10 Feb 2022 15:43:27 +0000 (09:43 -0600)]
vulkan/render_pass: Support fragment shading rate

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>