Commit Graph

143636 Commits

Author SHA1 Message Date
Rhys Perry 4ec4d862c2 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>
2021-08-16 17:19:45 +00:00
Rhys Perry f95a16be72 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>
2021-08-16 17:19:45 +00:00
Rhys Perry 110bcb4919 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>
2021-08-16 17:19:45 +00:00
Rhys Perry b0238191ca 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>
2021-08-16 17:19:44 +00:00
Rhys Perry 82d0600ba2 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>
2021-08-16 17:19:44 +00:00
Alyssa Rosenzweig d42e53c77a 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>
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig 8dfbbee054 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>
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig 62e902101b 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>
2021-08-16 16:35:50 +00:00
Alyssa Rosenzweig b9c095cc2c 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>
2021-08-16 16:35:50 +00:00
Icecream95 0624346a20 panfrost: Only allow colour blit shaders to be killed
Fixes timeouts in SuperTuxKart with the advanced rendering pipeline.

Fixes: d034461921 ("panfrost: Set allow_forward_pixel_to_be_killed for blit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12267>
2021-08-16 16:21:55 +00:00
Alyssa Rosenzweig 76377de99b 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>
2021-08-16 16:08:10 +00:00
Icecream95 dab97fe227 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>
2021-08-16 14:53:00 +00:00
Icecream95 e8b97dcdb2 panfrost: Fill tiler job padding again
Fixes: 3d0f6592b2 ("panfrost: Use PAN_ARCH for the rest of pan_cmdstream")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12377>
2021-08-16 14:36:13 +00:00
Icecream95 191824ec8e 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>
2021-08-16 14:18:36 +00:00
Icecream95 10a344a857 panfrost: Free NIR when deleting shader state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
2021-08-16 14:18:36 +00:00
Icecream95 d349448717 panfrost: Free TGSI tokens
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
2021-08-16 14:18:36 +00:00
Icecream95 98165aa9f2 panfrost: Fix memory leaks for compute state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
2021-08-16 14:18:36 +00:00
Icecream95 a9ab168e16 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>
2021-08-16 14:18:36 +00:00
Icecream95 b85ff56696 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>
2021-08-16 14:18:36 +00:00
Jesse Natalie f378799d9d 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>
2021-08-16 06:55:54 -07:00
Connor Abbott 1564ff72a0 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>
2021-08-16 11:06:23 +00:00
Roman Stratiienko 86196eff98 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>
2021-08-16 09:18:46 +00:00
Roman Stratiienko 21de785562 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: 8621bd8d5e ("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>
2021-08-16 09:18:46 +00:00
Roman Stratiienko c3775ac507 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>
2021-08-16 09:18:46 +00:00
Roman Stratiienko a70ff21efb 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: 8621bd8d5e ("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>
2021-08-16 09:18:46 +00:00
Connor Abbott 71595a189a tu: Fix feedback loops in sysmem mode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12360>
2021-08-16 08:57:10 +00:00
Connor Abbott 351c6b8bfe 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>
2021-08-16 08:57:10 +00:00
Leandro Ribeiro d18f102275 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>
2021-08-16 10:23:06 +02:00
Leandro Ribeiro cb3b4609c1 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>
2021-08-16 10:22:50 +02:00
Simon Ser 151b65b211 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>
2021-08-16 10:22:48 +02:00
Leandro Ribeiro 7383827acc 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>
2021-08-16 10:22:39 +02:00
Leandro Ribeiro 1c9299eade 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>
2021-08-16 10:22:35 +02:00
Leandro Ribeiro db2635020f 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>
2021-08-16 10:22:28 +02:00
Leandro Ribeiro 4bf011a768 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>
2021-08-16 10:22:20 +02:00
Simon Ser e090316570 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>
2021-08-16 10:22:17 +02:00
Simon Ser 9990a351e8 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>
2021-08-16 10:21:38 +02:00
Emma Anholt d27a0dd7df 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>
2021-08-16 02:29:45 +00:00
Emma Anholt 12b248755e 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>
2021-08-16 02:29:45 +00:00
Emma Anholt 22ec89b66b 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>
2021-08-16 02:29:45 +00:00
Emma Anholt f46850d3b3 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>
2021-08-16 02:29:45 +00:00
Emma Anholt 5a088aead5 i915g: Make the 1D workaround keep TXP's .w channel in the right spot.
Fixes: 390a3fcdc4 ("nir_to_tgsi: Add support for TXP.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
2021-08-16 02:29:45 +00:00
Eric Engestrom 4d9acfa533 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>
2021-08-14 21:44:32 +00:00
Eric Engestrom 3f99ff8a0e glsl/tests: remove some dead code
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
2021-08-14 21:44:32 +00:00
Eric Engestrom 773a70f9cb isl: drop left-over comment
Fixes: cf9ff082b4 ("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>
2021-08-14 21:44:32 +00:00
Eric Engestrom e8937757ce 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>
2021-08-14 21:44:32 +00:00
Eric Engestrom 93cb3aca03 Revert "python: Explicitly add the 'L' suffix on Python 3"
This reverts commit ad363913e6.

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>
2021-08-14 21:44:32 +00:00
Eric Engestrom f1eae2f8bb 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>
2021-08-14 21:44:32 +00:00
Eric Engestrom dac09a3119 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>
2021-08-14 21:44:31 +00:00
Eric Engestrom 6f854145d2 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>
2021-08-14 21:44:31 +00:00
Caio Marcelo de Oliveira Filho 0092edfec0 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>
2021-08-14 01:48:03 +00:00