Dave Airlie [Sat, 14 Aug 2021 20:19:52 +0000 (06:19 +1000)]
draw/gs: add clipvertex support for compatibility
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374>
Dave Airlie [Fri, 13 Aug 2021 05:00:13 +0000 (15:00 +1000)]
draw: handle primitive ID for quads/quad strips.
In order to enable compat contexts QUADS/QUAD_STRIPS need
to support primitive ID. There are some piglit tests for this.
This adds support to the decomposer to pass quads so the prim
assembler can pick them up and add primitive IDs.
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12374>
Juan A. Suarez Romero [Mon, 16 Aug 2021 10:48:37 +0000 (12:48 +0200)]
v3dv: initialize CL submission structure
This fixes an issue related with testing this with a kernel with the
performance counters enabled: it introduces a "pad" field that in the CL
submission structure that is not initialized.
Fixes:
ca13868098e ("drm-uapi: add v3d performance counters")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12390>
Rhys Perry [Mon, 16 Aug 2021 12:24:52 +0000 (13:24 +0100)]
ci: update trace hashes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Wed, 13 Jan 2021 15:11:57 +0000 (15:11 +0000)]
nir,glsl_to_nir: use nir_fdot()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Tue, 16 Jun 2020 13:28:18 +0000 (14:28 +0100)]
spirv: create ffma more often
We will not be able to combine instructions into ffma later if they are
exact, so create them from the start. They can be lowered later if they
are unwanted.
fossil-db (GFX10.3):
Totals from 14697 (10.05% of 146267) affected shaders:
VGPRs: 645736 -> 614168 (-4.89%)
CodeSize:
59312768 ->
58735352 (-0.97%); split: -0.97%, +0.00%
MaxWaves: 372900 -> 376666 (+1.01%)
Instrs:
11339280 ->
11120882 (-1.93%); split: -1.93%, +0.00%
Latency:
284874519 ->
285277327 (+0.14%); split: -0.10%, +0.24%
InvThroughput:
68791374 ->
68526739 (-0.38%); split: -0.49%, +0.10%
fossil-db (GFX10):
Totals from 11039 (7.55% of 146267) affected shaders:
CodeSize:
54785444 ->
54785268 (-0.00%); split: -0.00%, +0.00%
Instrs:
10401349 ->
10401396 (+0.00%); split: -0.00%, +0.00%
Latency:
277781803 ->
278572890 (+0.28%); split: -0.00%, +0.29%
InvThroughput:
65035902 ->
65100855 (+0.10%); split: -0.00%, +0.10%
fossil-db (GFX9):
Totals from 24055 (16.43% of 146401) affected shaders:
SGPRs: 1790704 -> 1790640 (-0.00%)
VGPRs: 1105736 -> 1105716 (-0.00%)
CodeSize:
110944732 ->
110948812 (+0.00%); split: -0.00%, +0.01%
Instrs:
21609095 ->
21610227 (+0.01%); split: -0.00%, +0.01%
Latency:
756137596 ->
756145812 (+0.00%); split: -0.02%, +0.02%
InvThroughput:
344103825 ->
344112245 (+0.00%); split: -0.00%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Fri, 5 Mar 2021 17:28:36 +0000 (17:28 +0000)]
nir: lower fdot to ffma if lower_ffma=false
fossil-db (GFX10.3):
Totals from 57689 (39.44% of 146267) affected shaders:
VGPRs: 2873712 -> 2873432 (-0.01%); split: -0.01%, +0.00%
CodeSize:
227661100 ->
227583572 (-0.03%); split: -0.08%, +0.04%
MaxWaves: 1289562 -> 1289598 (+0.00%); split: +0.01%, -0.00%
Instrs:
43115433 ->
43083308 (-0.07%); split: -0.12%, +0.05%
Latency:
869947191 ->
870279826 (+0.04%); split: -0.06%, +0.10%
InvThroughput:
199425811 ->
199434448 (+0.00%); split: -0.04%, +0.05%
fossil-db (GFX10):
Totals from 2 (0.00% of 146267) affected shaders:
Latency: 8123 -> 8107 (-0.20%)
fossil-db (GFX9):
Totals from 2 (0.00% of 146401) affected shaders:
(no stat changes)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Thu, 23 Jul 2020 10:40:11 +0000 (11:40 +0100)]
nir: create ffma from builders more often
We will not be able to combine instructions into ffma later if they are
exact, so create them from the start. They can be lowered later if they
are unwanted.
fossil-db (GFX10.3):
Totals from 16589 (11.34% of 146267) affected shaders:
VGPRs: 938872 -> 938704 (-0.02%)
SpillSGPRs: 11334 -> 10785 (-4.84%)
CodeSize:
96551964 ->
96498040 (-0.06%); split: -0.08%, +0.02%
MaxWaves: 338760 -> 338772 (+0.00%)
Instrs:
18356857 ->
18350486 (-0.03%); split: -0.06%, +0.02%
Latency:
561563310 ->
561414360 (-0.03%); split: -0.08%, +0.05%
InvThroughput:
145629673 ->
145594740 (-0.02%); split: -0.04%, +0.01%
fossil-db (GFX10):
Totals from 16252 (11.11% of 146267) affected shaders:
VGPRs: 893820 -> 893744 (-0.01%)
SpillSGPRs: 11334 -> 10785 (-4.84%)
CodeSize:
95890244 ->
95839124 (-0.05%); split: -0.08%, +0.02%
MaxWaves: 367704 -> 367734 (+0.01%)
Instrs:
18199741 ->
18194437 (-0.03%); split: -0.06%, +0.03%
Latency:
560912971 ->
560854179 (-0.01%); split: -0.07%, +0.06%
InvThroughput:
142899814 ->
142877939 (-0.02%); split: -0.03%, +0.02%
fossil-db (GFX9):
Totals from 16287 (11.12% of 146401) affected shaders:
SGPRs: 1312784 -> 1312768 (-0.00%); split: -0.05%, +0.05%
VGPRs: 931440 -> 931444 (+0.00%); split: -0.00%, +0.00%
SpillSGPRs: 14623 -> 14597 (-0.18%)
CodeSize:
94428788 ->
94344404 (-0.09%); split: -0.10%, +0.01%
MaxWaves: 90105 -> 90109 (+0.00%)
Instrs:
18486905 ->
18473434 (-0.07%); split: -0.08%, +0.01%
Latency:
720947295 ->
720818323 (-0.02%); split: -0.07%, +0.05%
InvThroughput:
365240104 ->
365224659 (-0.00%); split: -0.02%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Wed, 2 Jun 2021 14:14:41 +0000 (15:14 +0100)]
nir: add ffma creation helpers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Thu, 13 May 2021 11:50:09 +0000 (12:50 +0100)]
nir/algebraic: add is_used_once to dot product reassociation optimization
This improves register usage.
fossil-db (Sienna Cichlid, on top of !9805):
Totals from 4317 (2.88% of 149839) affected shaders:
VGPRs: 352592 -> 351704 (-0.25%); split: -1.48%, +1.23%
SpillSGPRs: 182 -> 248 (+36.26%)
CodeSize:
31601192 ->
31587624 (-0.04%); split: -0.09%, +0.04%
MaxWaves: 56964 -> 57298 (+0.59%); split: +2.48%, -1.90%
Instrs: 5973557 -> 5974122 (+0.01%); split: -0.05%, +0.06%
Latency:
72088175 ->
72253033 (+0.23%); split: -0.36%, +0.59%
InvThroughput:
14978160 ->
14798919 (-1.20%); split: -1.29%, +0.09%
VClause: 100994 -> 98645 (-2.33%); split: -3.05%, +0.73%
SClause: 278206 -> 276820 (-0.50%); split: -0.54%, +0.04%
Copies: 200264 -> 199556 (-0.35%); split: -1.17%, +0.82%
Branches: 86410 -> 85930 (-0.56%); split: -0.56%, +0.01%
PreSGPRs: 207355 -> 207759 (+0.19%); split: -0.00%, +0.20%
PreVGPRs: 314646 -> 310911 (-1.19%); split: -1.35%, +0.17%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Wed, 17 Mar 2021 19:54:38 +0000 (19:54 +0000)]
nir/algebraic: reassociate add chains for more MAD/FMA-friendly code
fossil-db (GFX10.3):
Totals from 25866 (17.68% of 146267) affected shaders:
VGPRs: 1625456 -> 1644936 (+1.20%); split: -0.05%, +1.24%
SpillSGPRs: 11729 -> 11725 (-0.03%); split: -0.07%, +0.03%
CodeSize:
161604460 ->
161458052 (-0.09%); split: -0.11%, +0.02%
MaxWaves: 454842 -> 452160 (-0.59%); split: +0.04%, -0.63%
Instrs:
30652596 ->
30456446 (-0.64%); split: -0.65%, +0.01%
Latency:
723098749 ->
722084247 (-0.14%); split: -0.21%, +0.07%
InvThroughput:
166023468 ->
165506875 (-0.31%); split: -0.36%, +0.05%
fossil-db (GFX10):
Totals from 25866 (17.68% of 146267) affected shaders:
VGPRs: 1593576 -> 1611976 (+1.15%); split: -0.09%, +1.25%
SpillSGPRs: 11729 -> 11725 (-0.03%); split: -0.07%, +0.03%
CodeSize:
162294468 ->
162154456 (-0.09%); split: -0.11%, +0.02%
MaxWaves: 477448 -> 474166 (-0.69%); split: +0.10%, -0.79%
Instrs:
30820164 ->
30625805 (-0.63%); split: -0.65%, +0.02%
Latency:
723190249 ->
722273445 (-0.13%); split: -0.20%, +0.08%
InvThroughput:
163114872 ->
162582966 (-0.33%); split: -0.37%, +0.04%
fossil-db (GFX9):
Totals from 25866 (17.67% of 146401) affected shaders:
SGPRs: 2167808 -> 2169920 (+0.10%); split: -0.09%, +0.19%
VGPRs: 1649404 -> 1667592 (+1.10%); split: -0.43%, +1.53%
CodeSize:
161273556 ->
161281996 (+0.01%); split: -0.07%, +0.08%
MaxWaves: 114910 -> 113519 (-1.21%); split: +0.10%, -1.31%
Instrs:
31557180 ->
31403708 (-0.49%); split: -0.50%, +0.02%
Latency:
899594793 ->
898786283 (-0.09%); split: -0.19%, +0.10%
InvThroughput:
412265691 ->
411551698 (-0.17%); split: -0.28%, +0.11%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Fri, 5 Mar 2021 18:41:13 +0000 (18:41 +0000)]
nir/algebraic: add various ffma optimizations
fossil-db (GFX10.3):
Totals from 7532 (5.15% of 146267) affected shaders:
VGPRs: 414696 -> 414304 (-0.09%); split: -0.18%, +0.08%
CodeSize:
33393444 ->
33375908 (-0.05%); split: -0.13%, +0.08%
MaxWaves: 149854 -> 150094 (+0.16%); split: +0.27%, -0.11%
Instrs: 6279823 -> 6271364 (-0.13%); split: -0.18%, +0.05%
Latency:
60308898 ->
60296025 (-0.02%); split: -0.13%, +0.11%
InvThroughput:
13770542 ->
13745192 (-0.18%); split: -0.24%, +0.06%
fossil-db (GFX10):
Totals from 7532 (5.15% of 146267) affected shaders:
VGPRs: 406664 -> 405564 (-0.27%); split: -0.39%, +0.12%
CodeSize:
33544656 ->
33527568 (-0.05%); split: -0.13%, +0.08%
MaxWaves: 158584 -> 158858 (+0.17%); split: +0.30%, -0.13%
Instrs: 6316242 -> 6307913 (-0.13%); split: -0.18%, +0.05%
Latency:
60243290 ->
60232844 (-0.02%); split: -0.13%, +0.11%
InvThroughput:
13643345 ->
13620171 (-0.17%); split: -0.24%, +0.07%
fossil-db (GFX9):
Totals from 7543 (5.15% of 146401) affected shaders:
SGPRs: 546384 -> 547472 (+0.20%); split: -0.08%, +0.28%
VGPRs: 412636 -> 411896 (-0.18%); split: -0.27%, +0.09%
CodeSize:
33216196 ->
33210564 (-0.02%); split: -0.12%, +0.11%
MaxWaves: 38771 -> 38789 (+0.05%); split: +0.17%, -0.12%
Instrs: 6419878 -> 6414891 (-0.08%); split: -0.18%, +0.11%
Latency:
70972327 ->
70922754 (-0.07%); split: -0.15%, +0.08%
InvThroughput:
33949039 ->
33909258 (-0.12%); split: -0.20%, +0.08%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Wed, 17 Jun 2020 11:07:13 +0000 (12:07 +0100)]
spirv: swap fadd operands in build_asin() and matrix_multiply()
This shouldn't do anything but will make testing a later patch easier.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Rhys Perry [Wed, 17 Jun 2020 10:53:13 +0000 (11:53 +0100)]
nir: swap fadd operands in nir_atan()
This shouldn't do anything but will make testing a later patch easier.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
Alyssa Rosenzweig [Fri, 13 Aug 2021 19:09:50 +0000 (19:09 +0000)]
panfrost: Unit test clear colour packing
dEQP has poor coverage of clear colours with odd formats, and doesn't
check that we dither as expected. This functionality is trivial to unit
test, so there's no excuse not to. Nontrivial reference values are
captured from pandecode of the Mali G52 DDK but should be valid for all
Midgard/Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365>
Alyssa Rosenzweig [Fri, 13 Aug 2021 20:20:28 +0000 (20:20 +0000)]
panfrost: Mark R5G6B5 as blendable
We support B5G6R5 as blendable, this is just a swizzle away. Reduces the
amount we hit blend shaders, and will fix a clear colour packing unit
test in a moment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365>
Alyssa Rosenzweig [Fri, 13 Aug 2021 21:10:55 +0000 (21:10 +0000)]
panvk: Use pan_pack_color
This is in common code now. Inherit all the bug fixes from panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365>
Alyssa Rosenzweig [Fri, 13 Aug 2021 17:36:59 +0000 (17:36 +0000)]
panfrost: Rewrite the clear colour packing code
At the beginning of a render pass, the hardware will fill the tilebuffer
with an arbitrary 128-bit word. To implement colour clears, the driver
must pack the API-specific clear colour according to the 128-bit layout
of the tilebuffer. This layout depends only on the render target format.
The existing code to handle this was based on loose guesswork. It works
for the format / clear colour combinations tested in dEQP-GLES3, but it
is severely deficient in the general case. It works by matching on the
PIPE format of the render target (not the layout of the tilebuffer). For
special cased PIPE formats, it open codes a buggy pack routine.
Otherwise, it defaults to util_pack_color in the hope that will work.
Since util_pack_color doesn't know anything about Mali tilebuffer
layouts, that means it's defaulting to wrong behaviour.
Now that we understand internal tilebuffer layouts, let's rewrite the
packing code. Instead of matching PIPE formats, map the PIPE format to
the internal tilebuffer layout using the common table, ensuring the
mapping remains in sync with the render target descriptor. Then for
blendable tilebuffer formats, pack using a common float -> fixed point
path supporting optional sRGB translation. Raw formats use
util_pack_color as before.
For formats with less than 8 bits per channel, the new code uses the
fractional bits of the fixed-point representation. This is required for
correct dithering if the clear colour is not exactly representable in
the final low precision format.
In summary, at least the following bugs in the old code are fixed:
* Swapped R/B channels with sRGB
* Swapped R/B channels with some missing formats
* Incorrect dithering with RGB565, RGB5_A1
Fixes the following test cases:
dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb
dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb
dEQP-EGL.functional.wide_color.window_888_colorspace_srgb
dEQP-EGL.functional.wide_color.pbuffer_888_colorspace_srgb
Later in the series, unit tests are added for the new implementation.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12365>
Icecream95 [Sun, 8 Aug 2021 02:08:08 +0000 (14:08 +1200)]
panfrost: Only allow colour blit shaders to be killed
Fixes timeouts in SuperTuxKart with the advanced rendering pipeline.
Fixes:
d0344619214 ("panfrost: Set allow_forward_pixel_to_be_killed for blit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12267>
Alyssa Rosenzweig [Thu, 12 Aug 2021 17:39:15 +0000 (17:39 +0000)]
panfrost: Fix leak of render node fd
Transfer ownership of the render node fd to the panfrost_device (minor
change to panvk), and then close the file descriptor for the render node
bound to the panfrost_device when destroying the panfrost_device. Of all
the users of panfrost_open_device, panvk is the only one that correctly
closed the fd before. Accordingly, this fixes an fd leak in the Gallium
driver (and performance counter utilities).
This fix still applies to the Gallium driver when renderonly is in use--
although renderonly closes its own fd, the fd is _duplicated_ in
panfrost_drm_winsys.c, so renderonly and panfrost must _both_ close
their respective fd to fix the leak.
This fixes a crash when running dEQP-EGL for more than two hours.
dEQP-EGL creates a new screen for every test case and then immediately
destroys it. If destroying a screen leaks the fd, this causes the number
of open file descriptors to increase monotonically until the process
ends. This will eventually hit the system limit for number of open files
and abort the process.
This bug was identified while attempting to run the OpenGL ES
conformance tests via cts-runner, and then confirmed with `lsof`. With
the fix, the number of file descriptors reported by `lsof | wc -l` is
now constant while running dEQP-EGL as expected.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12346>
Icecream95 [Sat, 14 Aug 2021 11:45:52 +0000 (23:45 +1200)]
panfrost: Add nocache debug flag for disabling the BO cache
Useful for making execution more deterministic.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12378>
Icecream95 [Sun, 15 Aug 2021 04:26:25 +0000 (16:26 +1200)]
panfrost: Fill tiler job padding again
Fixes:
3d0f6592b2a ("panfrost: Use PAN_ARCH for the rest of pan_cmdstream")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12377>
Icecream95 [Sat, 14 Aug 2021 11:14:43 +0000 (23:14 +1200)]
pan/mdg: Reduce size of tex_opcode_props
Also include midgard_ops.h to prevent the definitions from going out
of sync again.
Found by compiling with LTO enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Icecream95 [Sat, 14 Aug 2021 11:13:09 +0000 (23:13 +1200)]
panfrost: Free NIR when deleting shader state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Icecream95 [Sat, 14 Aug 2021 11:11:10 +0000 (23:11 +1200)]
panfrost: Free TGSI tokens
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Icecream95 [Sat, 14 Aug 2021 11:09:57 +0000 (23:09 +1200)]
panfrost: Fix memory leaks for compute state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Icecream95 [Sat, 14 Aug 2021 11:04:43 +0000 (23:04 +1200)]
pan/bi,pan/mdg: Fix memory leak of hash tables
Despite being created with a ralloc context, some memory is still
leaked when not manually destroying hash tables.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Icecream95 [Sat, 14 Aug 2021 11:01:42 +0000 (23:01 +1200)]
panfrost: Call primconvert and u_transfer_helper destroy functions
Fixes a couple of small memory leaks.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
Jesse Natalie [Mon, 16 Aug 2021 13:51:30 +0000 (06:51 -0700)]
CI: Update Windows quick_gl baseline for mysterious new passes
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12391>
Connor Abbott [Tue, 10 Aug 2021 16:07:51 +0000 (18:07 +0200)]
tu: Fix xfb when there is a hole at the end
We were handling the case where we had an unassigned output in the
middle of the outputs array, but v->outputs can be smaller than the
shader's info.num_outputs when an output at the end isn't assigned. This
lead to us reading garbage after the end, and assuming that it
corresponded to r0.x and overwriting the xfb entry for some other random
output with the unassigned output's entry.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12310>
Roman Stratiienko [Wed, 11 Aug 2021 08:07:41 +0000 (11:07 +0300)]
AOSP: Add panfrost vulkan library suffix
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
Roman Stratiienko [Tue, 10 Aug 2021 17:22:36 +0000 (20:22 +0300)]
AOSP: Update timestamps of target binaries
Fixes warning during the build and unnecessary rule execution:
***
ninja: Missing `restat`? An output file is older than the most recent input:
***
Fixes:
8621bd8d5e67 ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
Roman Stratiienko [Tue, 10 Aug 2021 10:14:22 +0000 (13:14 +0300)]
AOSP: Upgrade libLLVM dependency to v12
Now LLVMv12 seems to be stable enough, so we can upgrade to it.
Version adapted for AOSP can be found here [1]
[1]: https://github.com/maurossi/llvm-project/tree/release_12.x
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
Roman Stratiienko [Tue, 10 Aug 2021 10:10:44 +0000 (13:10 +0300)]
AOSP: Extract version from libdrm instead of hardcoding it.
mesa3d require up-to-date version of libdrm.
Hardcoding it to 2.4.105 is wrong.
Fixes:
8621bd8d5e67 ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
Connor Abbott [Fri, 13 Aug 2021 14:24:01 +0000 (16:24 +0200)]
tu: Fix feedback loops in sysmem mode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12360>
Connor Abbott [Fri, 13 Aug 2021 13:37:23 +0000 (15:37 +0200)]
freedreno/a6xx: Document GRAS_SC_CNTL::SINGLE_PRIM_MODE
Add a value discovered when investigating how the blob implements
GL_KHR_blend_equation_advanced.
Note that everything added here is a bit speculative, because it's
assuming the blob's implementation of GL_KHR_blend_equation_advanced is
sane. In particular a value of 0x3 seems to solve the UBWC problem as
well, so I'm not sure whether my description of the difference between
0x1 and 0x3 is correct. I'm also surprised that it uses the same value
for the coherent and non-coherent cases when forcing sysmem.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12360>
Leandro Ribeiro [Wed, 4 Aug 2021 23:33:41 +0000 (20:33 -0300)]
vulkan/wsi/wayland: add helper function find_format()
There are some places in the code in which we search for a certain
format in the u_vector. This new function help us to avoid repetition.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Leandro Ribeiro [Thu, 5 Aug 2021 16:08:48 +0000 (13:08 -0300)]
vulkan/wsi/wayland: always initialize format vector
In wsi_wl_display_init(), the format vector is initialized only when the
caller sets the function to query the formats/modifiers. But
wsi_wl_display_finish() always release the vector, no matter if it has
been initialized or not.
For now it just works because the u_vector_foreach() macro works when
the format vector is uninitialized, but it is a weird design to try to
release something that has not been initialized.
So in this patch we start to always initialize the format vector, even
when not querying formats/modifiers.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Simon Ser [Wed, 28 Jul 2021 20:44:14 +0000 (17:44 -0300)]
vulkan/wsi/wayland: generalize modifier handling
Instead of having hard-coded lists of modifiers for argb8888 and
xrgb8888, store a list of modifiers alongside each VkFormat. To
achieve this goal, introduce a new struct wsi_wl_format that holds
both a VkFormat and a modifier list, and use it for the items in
the formats list.
This commit unlocks non-{A,X}RGB8888 formats, which were previously
always disabled for linux-dmabuf.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Leandro Ribeiro [Tue, 27 Jul 2021 21:35:35 +0000 (18:35 -0300)]
vulkan/wsi/wayland: fold wsi_wl_display_swrast and wsi_wl_display_dmabuf into parent
The two structs wsi_wl_display_swrast and wsi_wl_display_dmabuf have in
common the list of formats and the only difference between both is the
interface object.
As we know that only one of the arrays is populated (we never bind to
wl_shm and the dmabuf interface simultaneously), we can move the members
of these structs to wsi_wl_display and simplify the code.
This is based on previous work of Simon Ser <contact@emersion.fr>.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Leandro Ribeiro [Wed, 28 Jul 2021 17:08:34 +0000 (14:08 -0300)]
vulkan/wsi/wayland: fix crash when force_bgra8_unorm_first is true
When force_bgra8_unorm_first is true, we access display->formats and
change the order of certain formats. The final result is BGRA8_UNORM
being the first in the format list, as some clients require this.
But we are trying to do this before before setting up display->formats,
so it should result in a crash. Fix this by changing the order of
things. Now we first set up display->formats before trying to access it.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Leandro Ribeiro [Wed, 28 Jul 2021 21:03:28 +0000 (18:03 -0300)]
vulkan/wsi/wayland: do not perform roundtrip when not querying formats
When we call wsi_wl_display_init() with get_format_list set to false
there's no need to dispatch the events from the interfaces. This allow
us to remove a check in the event handlers to verify if we're querying
the formats or not, what makes the code easier to read.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Leandro Ribeiro [Wed, 28 Jul 2021 16:51:45 +0000 (13:51 -0300)]
vulkan/wsi/wayland: check directly if we got globals successfully
Until now we had a weird way to bail out if we could not get any
globals. Instead, add a direct check, what makes the code easier to
read.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Simon Ser [Tue, 27 Jul 2021 19:46:52 +0000 (16:46 -0300)]
vulkan/wsi/wayland: drop support for wl_drm
Nowadays, all Wayland compositors implement linux-dmabuf. We
shouldn't need to support the legacy wl_drm interface anymore.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Simon Ser [Tue, 27 Jul 2021 19:06:01 +0000 (16:06 -0300)]
vulkan/wsi/wayland: use drm_fourcc.h for formats
drm_fourcc.h is the canonical source for DRM formats. Instead of
using the values from wl_drm, use the canonical header.
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12117>
Emma Anholt [Sat, 14 Aug 2021 04:10:21 +0000 (21:10 -0700)]
i915g: Add support for FXT1.
This was the only GL extension supported by i915c and not i915g.
Closes: #5229
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
Emma Anholt [Sat, 14 Aug 2021 00:07:24 +0000 (17:07 -0700)]
i915g: Fix up the format mapping for DXT1_*RGB
We weren't wiring alpha to 1 like we should.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
Emma Anholt [Sat, 14 Aug 2021 00:03:55 +0000 (17:03 -0700)]
i915g: Add missing support for sRGB S3TC.
Apparently despite not advertising the format, GL wanted it and we would
assertion fail in format choosing. Easy enough to add.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
Emma Anholt [Fri, 13 Aug 2021 23:57:15 +0000 (16:57 -0700)]
i915g: Add support for blitting compressed textures.
Previously we would assertion fail on s3tc uploads.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
Emma Anholt [Sat, 14 Aug 2021 02:33:39 +0000 (19:33 -0700)]
i915g: Make the 1D workaround keep TXP's .w channel in the right spot.
Fixes:
390a3fcdc45e ("nir_to_tgsi: Add support for TXP.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
Eric Engestrom [Sat, 7 Aug 2021 10:36:38 +0000 (11:36 +0100)]
python: drop explicit output_encoding='utf-8' in mako templates
Python 3 handles unicode strings by default, so we can drop all that.
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sat, 7 Aug 2021 10:01:54 +0000 (11:01 +0100)]
glsl/tests: remove some dead code
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sat, 8 Aug 2020 14:07:49 +0000 (16:07 +0200)]
isl: drop left-over comment
Fixes:
cf9ff082b48779c52fa6 ("isl: Bring back isl_format_layout::bpb")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sat, 8 Aug 2020 12:28:57 +0000 (14:28 +0200)]
isl: drop comment about "python 2 vs 3" as it doesn't apply anymore
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sat, 8 Aug 2020 14:10:16 +0000 (16:10 +0200)]
Revert "python: Explicitly add the 'L' suffix on Python 3"
This reverts commit
ad363913e6766280f53838126d67370f9e97aa12.
This code was added to be able to compare the output file while porting
the script from python2 to python3, but this has long been finished and
the extra complexity is not needed anymore.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sun, 2 Feb 2020 18:25:47 +0000 (18:25 +0000)]
python: drop python2 support
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Thu, 6 Aug 2020 14:24:31 +0000 (16:24 +0200)]
gitlab-ci: stop installing python-is-python3 package
Suggested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Eric Engestrom [Sun, 2 Feb 2020 15:26:16 +0000 (15:26 +0000)]
python: explicitly require python3
Ubuntu has dropped the `python` symlink to `python2` [1] instead of
redirecting it to `python3` like other distros are doing, which means
that if we want to build Mesa on Ubuntu we need the `python3` shebang.
[1] https://lists.ubuntu.com/archives/ubuntu-devel/2020-January/040882.html
Reported-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
Caio Marcelo de Oliveira Filho [Tue, 30 Mar 2021 21:18:05 +0000 (14:18 -0700)]
nir/dead_cf: Do not remove loops with loads that can't be reordered
If a loop is followed by a barrier, the ordering between a load inside
the loop and other memory operations after the barrier may have to be
preserved depending on the type of memory involved. This is relevant
when the memory is writeable by other invocations. In such case, it
is not valid to completely eliminate the loop.
This commit doesn't attempt to precisely catch the barrier case, as
analysis could become too complex. It simply assumes it can't drop
the loops that contain certain types of loads unless those are known
to be safe to reorder (via the access flag).
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4475
Acked-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9938>
Alyssa Rosenzweig [Thu, 12 Aug 2021 18:54:49 +0000 (18:54 +0000)]
drm-shim: Support kernels with >4k pages
mmap requires its offset is page aligned, but the current code only
guarantees 4k alignment, causing drm-shim to break badly on kernels with
>4k page sizes. This fixes drm-shim on my Apple M1, running bare metal
Linux with 16k pages. It probably also fixes exotic PowerPC systems with
64k pages.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Zoltan Boszormenyi <zboszor@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12347>
Ian Romanick [Tue, 10 Aug 2021 19:27:59 +0000 (12:27 -0700)]
gallium: Remove "optimize" parameter from pipe_screen::finalize_nir
As part of adding support for inline uniforms in Iris, I was going to
add a finalize_nir hook. I went looking to see how other drivers use
the "optimize" parameter, and I discovered that *nobody* uses it at all.
v2: Fix typo in commit message. Noticed by Mike.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12317>
Ella-0 [Sat, 10 Jul 2021 20:02:47 +0000 (20:02 +0000)]
v3dv: implement VK_EXT_color_write_enable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11784>
Bas Nieuwenhuizen [Mon, 26 Jul 2021 15:05:20 +0000 (17:05 +0200)]
nir/inline_functions: Handle halting functions.
Without this stitch_blocks complains about ending in a jump with a
non-empty block after the inserted body.
I hit this with CTS raytracing tests where we tried to inline a
function that basically ended up being something like
{
ignore_ray_intersection
halt
}
I kept the nop path when possible as that does not leave a mess
for the optimization loop to optimize.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12163>
Bas Nieuwenhuizen [Mon, 26 Jul 2021 13:23:29 +0000 (15:23 +0200)]
nir/lower_scratch: Ensure we don't lower vars with unsupported usage.
Need to avoid lowering temps when they are used by other instructions,
like the rt instructions (some of the shader call parameters get
converted to temp variables and we will lower them later with
the explicit io lowering pass as we need to guarantee they will
end up in scratch).
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12162>
Rhys Perry [Fri, 13 Aug 2021 14:34:41 +0000 (15:34 +0100)]
nir: remove src/compiler/nir/nir_control_flow
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12357>
Emma Anholt [Wed, 7 Jul 2021 20:24:45 +0000 (13:24 -0700)]
nir: Move phi src setup to a helper.
Cleans up the ralloc/list push code all over the tree.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11772>
Juan A. Suarez Romero [Fri, 13 Aug 2021 07:50:22 +0000 (09:50 +0200)]
ci/v3dv: update flakes
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12352>
Leo Liu [Sat, 7 Aug 2021 21:09:55 +0000 (17:09 -0400)]
frontends/va: Reallocate p010 buffer for AV1 10 bits decode
Check bit depth and reallocate p010 buffer if it's 10 bits.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Leo Liu [Sat, 7 Aug 2021 21:07:36 +0000 (17:07 -0400)]
radeon/vcn: Enable the AV1 decode p010 mode
It will still support 8 bits dithering mode decode.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Leo Liu [Sat, 7 Aug 2021 21:04:20 +0000 (17:04 -0400)]
frontends/va: Add AV1 profile main to the config
Thus enabling the AV1 support
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Leo Liu [Sat, 7 Aug 2021 20:41:57 +0000 (16:41 -0400)]
frontends/va: Place AV1 picture and slice parameter buffers functions
So that can pass the parameters from application to driver.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Leo Liu [Sat, 7 Aug 2021 20:01:43 +0000 (16:01 -0400)]
frontends/va: Add AV1 parameter buffers functions
Includes picture parameter and slice parameter buffers.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Leo Liu [Sat, 7 Aug 2021 19:50:32 +0000 (15:50 -0400)]
frontends/va: Add AV1 picture description
Driver will get codec parameters for hardware from it.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
Italo Nicola [Fri, 13 Aug 2021 11:33:33 +0000 (08:33 -0300)]
virgl/ci: switch glmark2 traces from .rdc to .trace
Lately we've been experiencing some flakes with glmark2 renderdoc traces
on CI, this patch makes traces-virgl.yml use apitraces instead.
Hopefully this helps with reducing the flakes.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12354>
Michel Zou [Mon, 14 Jun 2021 13:57:17 +0000 (15:57 +0200)]
radv: fix build with mingw
Cc: 21.2 mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes #5092
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12178>
Connor Abbott [Thu, 12 Aug 2021 12:55:56 +0000 (14:55 +0200)]
freedreno, tu: Set GRAS_LRZ_PS_INPUT_CNTL::SAMPLEID
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340>
Connor Abbott [Thu, 12 Aug 2021 12:51:15 +0000 (14:51 +0200)]
freedreno, tu: Stop asking for foveation quality
We were setting it to r0.x.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340>
Connor Abbott [Thu, 12 Aug 2021 12:47:40 +0000 (14:47 +0200)]
freedreno/a6xx: Add new register fields
Also use them in drivers and delete some comments that are now
irrelevant.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12340>
Lionel Landwerlin [Wed, 11 Aug 2021 09:57:37 +0000 (12:57 +0300)]
anv/android: handle image bindings from gralloc buffers
When creating an image out of a swapchain on Android, the android
layer call will detect a VkBindImageMemorySwapchainInfoKHR in the
pNext chain of the vkBindImageMemory2() call and add a
VkNativeBufferANDROID in the chain. This is what we should use as
backing memory for that image.
v2: Fix a couple of obvious mistakes (Tapani)
v3: Silence build warning (Lionel)
Fix invalid object argument to vk_error() (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
bc3c71b87ae0b8 ("anv: don't try to access Android swapchains")
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12244>
Vinson Lee [Mon, 9 Aug 2021 21:24:07 +0000 (14:24 -0700)]
nir: Initialize evaluate_cube_face_index_amd dst.x.
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value dst.x.
Fixes:
a1a2a8dfda7 ("nir: add AMD_gcn_shader extended instructions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12290>
Vinson Lee [Tue, 10 Aug 2021 01:12:22 +0000 (18:12 -0700)]
meson: Remove duplicate xvmc in build summary.
Fixes:
d30ce03bc07 ("meson: add build-summary")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12296>
Axel Davy [Tue, 10 Aug 2021 18:52:45 +0000 (20:52 +0200)]
util: Fix translate from block compressed to rgba
Since
2b5178ee util: Switch the non-block formats to unpacking rgba rows instead of rects,
compressed formats define unpack_rgba_8unorm_rect instead
of unpack_rgba_8unorm.
Fixes the u_format_translate check to take this into account.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5201
Fixes:
2b5178ee ("util: Switch the non-block formats to unpacking rgba rows instead of rects")
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12315>
Kenneth Graunke [Wed, 21 Jul 2021 19:09:59 +0000 (12:09 -0700)]
iris: Stop using SET_DOMAIN on discrete GPUs altogether
SET_DOMAIN is definitely not going to be allowed on discrete GPUs,
so don't even bother trying it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
Kenneth Graunke [Wed, 21 Jul 2021 19:08:14 +0000 (12:08 -0700)]
iris: Allow SET_DOMAIN to fail when allocating new GEM objects
We're just using this as a minor optimization to allocate pages for
buffers up front outside of some kernel locking. It's not essential.
The SET_DOMAIN ioctl may be going away in the future, so let's be a
bit cautious and try it but not fail.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
Kenneth Graunke [Wed, 21 Jul 2021 19:02:54 +0000 (12:02 -0700)]
iris: Use the new I915_USERPTR_PROBE API
We need to raise an error when importing a user pointer as a BO if the
supplied pointer can't actually be used on the GPU. Previously, we were
(ab)using the SET_DOMAIN ioctl for this, but it's not really intended
for that purpose, and is going away on discrete.
Fortunately, there's a new kernel API for this: the I915_USERPTR_PROBE
flag tries to perform basic sanity checking of the supplied pointer so
that we can at least reject obvious misuse of this API up front.
Use the new API where available. Fall back to SET_DOMAIN if it isn't.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
Jason Ekstrand [Fri, 23 Jul 2021 17:45:47 +0000 (12:45 -0500)]
anv: Use I915_USERPTR_PROBE when available
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
Jason Ekstrand [Wed, 14 Jul 2021 18:26:22 +0000 (13:26 -0500)]
iris: Use I915_MMAP_OFFSET_FIXED for LMEM platforms
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Thu, 22 Jul 2021 20:29:16 +0000 (15:29 -0500)]
iris: Add a new IRIS_MMAP_NONE map type
This indicates that the buffer can never be mapped. We use this
primarily for imported BOs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Kenneth Graunke [Mon, 26 Jul 2021 19:59:42 +0000 (12:59 -0700)]
iris: Don't try to CPU read imported clear color BOs
Previously, when importing a resource with modifiers that include
clear color as auxiliary data, we were mapping the clear color BO
on the CPU in order to set res->aux.clear_color to the value stored
there.
We are generally trying to avoid CPU mapping imported buffers, because
in hybrid setups, they could be from a different device, and may not be
mappable. So we'd like to avoid that here.
This CPU-side knowledge of the clear color is only used in a few cases:
1. Avoiding a resolve due to a partial clear with a changing clear color
2. Avoiding disabling CCS when rendering to a texture view of a resource
where the only format difference is sRGB vs. linear and the clear
color is 0/1.
Instead of mapping the clear color BO on the CPU, we instead set a flag
indicating that we don't know the clear color, and reset it to known on
our first clear.
In the first case, the first partial fast clear of a resource would eat
an extra resolve (there is no penalty if we clear the whole resource).
The second case doesn't seem that critical, as it's someone rendering
to an imported BO - when the common case is to texture from it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Fri, 16 Jul 2021 14:39:56 +0000 (09:39 -0500)]
iris: Add an assert to iris_bo_gem_mmap_legacy()
It only supports two caching modes so we should assert that the only
mode we ever see is one of them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Wed, 14 Jul 2021 18:17:03 +0000 (13:17 -0500)]
iris: Use a tiny table to map mmap modes to offsets
This is a little more obvious than the if-ladder.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Fri, 23 Jul 2021 17:03:32 +0000 (12:03 -0500)]
iris: SMEM buffers on discrete platforms are coherent
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Wed, 14 Jul 2021 18:11:01 +0000 (13:11 -0500)]
anv: Use I915_MMAP_OFFSET_FIXED for LMEM platforms
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Jason Ekstrand [Tue, 27 Jul 2021 21:24:08 +0000 (16:24 -0500)]
include/drm-uapi: Bump headers
From drm-next at the following commit:
commit
a22c074fd1dd52a8b41dd6789220409b64093e9c
Merge:
cb22f12f3025 3bfa7d40ce73
Author: Dave Airlie <airlied@redhat.com>
Date: Thu Aug 12 11:20:16 2021 +1000
Merge tag 'drm-intel-next-2021-08-10-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
Alyssa Rosenzweig [Thu, 12 Aug 2021 15:05:26 +0000 (11:05 -0400)]
docs/panfrost: Update llvm option
meson complains that =false is deprecated and that we should use
=disabled instead.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12344>
Rhys Perry [Tue, 2 Mar 2021 16:34:59 +0000 (16:34 +0000)]
radv: enable DCC with signedness reinterpretation
It seems we can enable DCC if the possible formats differ in signedness
and are otherwise compatible. We just need a fast-clear eliminate for
certain clear colors.
Improves Trine 4 performance.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9387>
Italo Nicola [Tue, 10 Aug 2021 15:58:07 +0000 (12:58 -0300)]
ci: skip minio login if PIGLIT_REPLAY_UPLOAD_TO_MINIO is not set
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12309>
Juan A. Suarez Romero [Thu, 12 Aug 2021 08:50:09 +0000 (10:50 +0200)]
broadcom/compiler: set current block on incrementing unifa
When incrementing unifa address in DCE optimization, ensure that we
setup correctly the current block, so the ldfunif optimization is also
executed correctly.
This fixes
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
heap-buffer overflow with address sanitizer enabled.
v2 (Iago):
- Save and restore current block
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12339>
Iago Toral Quiroga [Thu, 12 Aug 2021 09:50:12 +0000 (11:50 +0200)]
v3dv: add API entry points for sampler Ycbcr conversions
While this feature is optional in Vulkan 1.1 and we don't currently
expose it, the CTS still requires that the entry points exist.
From the Vulkan 1.1 spec:
"If the VK_KHR_sampler_ycbcr_conversion extension is not supported,
support for the samplerYcbcrConversion feature is optional."
(...)
"samplerYcbcrConversion specifies whether the implementation supports
sampler YCBCR conversion. If samplerYcbcrConversion is VK_FALSE,
sampler YCBCR conversion is not supported, and samplers using sampler
YCBCR conversion must not be used."
Fixes (with Vulkan 1.1 exposed):
dEQP-VK.api.version_check.entry_points
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12338>
Iago Toral Quiroga [Thu, 12 Aug 2021 07:26:40 +0000 (09:26 +0200)]
v3dv: don't try to access pColorBlendState if rasterization is disabled
Fixes:
dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12337>