Commit Graph

158375 Commits

Author SHA1 Message Date
Yonggang Luo
0f9b662f9a meson: add enable-glcpp-tests option
these are too intermittent to be left enabled on CI for now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
2022-08-22 14:18:53 +00:00
Yonggang Luo
201a62cbba meson: Use different STRACEDIR folder for intel_devinfo_override_test
Fixes
--- stderr ---
strace: Can't fopen 'meson-logs/strace/intel_device_info_override_test_120_/log.10613': No such file or directory

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
2022-08-22 14:18:53 +00:00
Yonggang Luo
12bb9cba8b anv: Fixes struct anv_device::info is not initialized with struct anv_physical_device
Refactoring the function anv_device_set_physical out, so that it's can be called in unittests

Fixes: 356a60bd6c ("anv: Do not duplicate intel_device_info memory in each logical device")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: José Roberto de Souza jose.souza@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
2022-08-22 14:18:53 +00:00
Samuel Pitoiset
8a78fbb832 radv: move lowering the view index to radv_pipeline_link_shaders()
This is a link step because it needs to know if the previous stage is
a mesh shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
98fe5acbdb radv: move lowering patch vertices to radv_pipeline_link_tcs()
This also moves merging the tess info.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
b9ed82815d radv: move assigning driver locations to the new linking helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
cac4ad2115 radv: rework linking shaders in NIR
Replace these ugly loops with something much cleaner and easier to
maintain.

There shouldn't be any functional changes.

No fossils-db changes (tested on NAVI21, VEGA10 and POLARIS10).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
f9e3339e39 radv: add radv_remove_point_size() linking helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
7e635adb2c radv: remove useless parameter from radv_link_shaders()
It can be accessed from the pipeline key instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
f461fa1933 radv: use NIR_PASS with radv_export_implicit_primitive_id
For consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
2167a61611 radv: remove unused parameter in radv_lower_io_to_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
f66d822d87 radv: move dumping NIR shaders to the previous similar loop
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
619da8df77 radv: move lowering FS intrinsics to radv_postprocess_nir()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
0fd0c3871a radv: add a radv_postprocess_nir() helper
This looks cleaner.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
22faf8597a radv: copy the whole radv_shader_info struct for merged stages
We do something similar for shader args and this allows to remove this
ugly hack when postprocessing NIR shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
6262586bd7 radv: copy linked I/O info for merged stages in radv_fill_shader_info
To copy info to merged stage at the same place.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Samuel Pitoiset
0eab07bf66 radv: remove useless check when creating the noop FS
If the pipeline type is graphics, VK_PIPELINE_CREATE_LIBRARY_KHR
shouldn't never be set, so this was redundant.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
2022-08-22 13:45:28 +00:00
Alyssa Rosenzweig
4ac72f7d1a r600/sfn: Don't use broken idiv lowering
NIR has two implementations of lower_idiv, keyed on the imprecise_32bit_lowering
flag. This flag is misleading: the results when setting this flag "imprecise",
they're completely wrong for some values. Non-constant highp integer division is
rare enough this shouldn't noticeably harm performance of real applications.

Address r600 portion of #6555.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18154>
2022-08-22 13:06:39 +00:00
Pavel Ondračka
c38023a9b2 r300: Set more shadow sampler lowering in precompiles.
This extends the commit 17cea74b8c
also for rectangular textures. They are otherwise lowered to MOV
dst temp[0].0000 and deadcode elimitation goes crazy.

Fixes shader-db with tesseract shaders from https://gitlab.freedesktop.org/mesa/mesa/-/issues/6771

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18168>
2022-08-22 11:21:24 +00:00
Konrad Kleine
58432e56ae Update docs/drivers/llvmpipe.rst
to include a link to the LLVM Snapshots for Fedora.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14537>
2022-08-22 11:16:13 +00:00
Juan A. Suarez Romero
4ba21c3e8c vc4: store tex sampler in proper register
When unpacking the texture sample result ensure it is moved to the
proper expected dest register.

This fixes incorrect texturing in Chromium using PixiJS framework.

CC: mesa-stable
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18122>
2022-08-22 10:34:39 +00:00
Erico Nunes
177f7fae01 ci: enable lima farm
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18178>
2022-08-22 09:58:12 +00:00
Konstantin Seurer
ddae033674 lavapipe: Set ss_dirty in emit_state
Set ss_dirty to false when updating the samplers.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18161>
2022-08-22 09:43:03 +00:00
Eric Engestrom
3743ea0fad meson: drop duplicate lib in lib name
The default lib prefix is `lib`, so adding `lib` to the lib name just
results in `liblibbroadcom_v3d.a` for instance.

Those are internal, build-temporary static libraries that end up being
linked into the real user-visible libraries, so it doesn't really
matter, but we might as well just clean up their names anyway.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18171>
2022-08-22 08:35:41 +00:00
Simon Ser
137b34a67e vulkan/wsi/x11: detect Xwayland via the XWAYLAND extension
This is more robust than checking for XRandR output names.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/954
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17790>
2022-08-22 10:10:23 +02:00
Vinson Lee
87182ba977 bin/perf-annotate-jit.py: Update to Python 3.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12926>
2022-08-21 22:14:43 -07:00
Mike Blumenkrantz
7b81dbe591 st_pbo/compute: pre-clamp loaded geometry based on coord components
if only some of these components will be used, clamp the rest to enable
better shader optimizing

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
2022-08-22 02:00:55 +00:00
Mike Blumenkrantz
613348766c st_pbo/compute: pre-clamp shader geometry to 16bit
no point doing this in the shader

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
2022-08-22 02:00:55 +00:00
Mike Blumenkrantz
2fa5afd639 st_pbo/compute: fix 1D coord dimension by pre-trimming vectors
cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
2022-08-22 02:00:55 +00:00
Mike Blumenkrantz
cd07a0002f st_pbo/compute: fix 1D_ARRAY offsets
these come in as yoffset, but the constant data must use 0 since the sampler
view is created with the offset

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
2022-08-22 02:00:55 +00:00
Mike Blumenkrantz
bd3b03939b st_pbo/compute: handle download failures with fallback
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
2022-08-22 02:00:55 +00:00
Alyssa Rosenzweig
fcae7cfd27 panfrost: Assert that blend shaders are nontrivial
Even if the driver doesn't *use* trivial blend shaders, building and compiling
blend shaders is expensive. We shouldn't be building blend shaders that should
never be used.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
1d5aad9db4 panfrost: Include mask in replace blend shader name
Helpful to disambiguate blend shaders with different colour masks used for the
same format/replace operation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
378b7e37f4 panfrost: Simplify blitter blend shader creation
We don't need blending in the blitter. That means blend shaders are only needed
on Midgard. Simplify accordingly.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
0a71d56fd4 panfrost: Invert no_colour to enabled
This way, blend info that's left zeroed out defaults to disabled. Fixes an
assertion failure in KHR-GLES31.core.draw_buffers_indexed.color_masks due to
the blend CSO max_rt being set unreliably. This is also probably clearer.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
39bf3ea7d3 panfrost: Don't compile empty blend shaders
This is silly. They'll be masked out later, but it's still pointless, and adds
noise when grepping BIFROST_MESA_DEBUG=shaders,internal for "pan_blend" when
debugging why an app is using blend shaders.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
d849d9779a panfrost: Avoid blend shader when not blending
On Midgard, we need a "blend" shader even if blending is disabled, if the format
isn't blendable. This is inefficient. Bifrost solves this by decoupling the
format conversion from the blending, allowing opaque (unblended) output to any
format without a blend shader or fragment key.

Unfortunately, our blend code is from the Midgard era -- I wrote an early
version of nir_lower_blend when I was still in high school! -- so we've been
using blend shaders for opaque output even on Bifrost. Whoops!

In SuperTuxKart, reduces blend shader calls by 30%, translating to a 15%
reduction in i-cache misses.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
e59c74ec56 panfrost: Promote blend shader outputs 8->16-bit
..on Bifrost and later, where the conversion hardware makes this reasonable.
This saves us from inserting a pile of conversions in the compiler to lower away
the 8-bit input/output. This also generates substantially better code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
08746d7b52 panfrost: Don't saturate in Bifrost blend shaders
It's unnecessary since the hardware already does the conversion for us.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
b1c9c924c7 panfrost: Set blit output variable types correctly
The type of the output variable will propagate through the store_output
intrinsic's src_type field to the BLEND instruction's register format field. On
Valhall, the register format for a BLEND comes from the instruction -- the
register format specified in the conversion descriptor (used on Bifrost) is
ignored. That means it has to match.

Previously, we always used a blend shader for integer rendering. Since blend
shaders ignore the register format of the BLEND instruction, that masked this
issue. That also means we don't need to backport this.

Will prevent a regression from the following commit.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
d680560970 panfrost: Handle untyped_color_outputs on Bifrost
For untyped_color_outputs, we need to ignore the type of the colour output in
the shader and instead use the type from the format. We have all the information
to do this at blend descriptor pack time, but not at shader compile time. This
means we need a (somewhat expensive) fixup in this edge case to ingest
NIR-to-TGSI. This will prevent a regression from the rest of the series.

Although the register_format field is also present on Valhall blend descriptors,
it is ignored so we don't need the fixup there.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
cf55e05f8f pan/bi: Handle info.fs.untyped_color_outputs on Valhall
Colour outputs in TGSI are untyped so we have to ignore the register format on
the store_output. Luckily, Valhall gives us the auto32 escape hatch to deal with
it, and Bifrost doesn't care anyway. This will avoid regressions from native int
output without corrupting the compiler for GLSL and SPIR-V shaders that are
well-typed.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
394e1f5862 pan/bi: Don't allow ATEST to take a temporary
Clause scheduler edition of db2bdc1dc3 ("pan/bi: Require ATEST coverage mask
input in R60"). ATEST wants to read r60, which can't work if its input isn't
even in a register.

When per-sample shading isn't in use, prevents regressions in:

   KHR-GLES31.core.sample_variables.mask.*

These tests previously passed because per-sample shading was forced. It's
not clear whether the bug addressed in this patch is possible to hit "in the
wild", i.e. without the optimizations in this series that allow us to use
per-pixel shading in more cases.

No shader-db changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
e12a9ce8d6 pan/bi: Don't reorder image loads across stores
Fixes flaking in
dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32i due to
image reads being moved past a BARRIER.

To make this more robust/optimal, we probably need scheduling information
(coherent/volatile/etc) added to instructions like ACO does. That's left for a
future extension, for now I just want the test to stop flaking.

Fixes: 569e5dc745 ("pan/bi: Schedule for pressure pre-RA")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
2022-08-21 19:37:10 +00:00
Alyssa Rosenzweig
15e15422ba asahi: Fix warning building for macOS 12.0
Unnecessary rename that breaks forward compatibility... but Apple says
this is just NULL. Do the simpler thing. Note that the argument is a
mach_port_t, which is a natural_t == uint32_t in userspace... even
though it's a pointer in the kernel. Although Apple's docs claim that
kIOMasterPortDefault is NULL, it's really just 0.

../src/asahi/lib/agx_device.c:290:35: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
      IOServiceGetMatchingService(kIOMasterPortDefault, matching);
                                  ^~~~~~~~~~~~~~~~~~~~
                                  kIOMainPortDefault

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18121>
2022-08-21 14:32:40 -04:00
Danylo Piliaiev
1635ad0322 tu: Assert that if draw state is enabled it has valid iova
GPU faults at draw state loading completely could completely bring
down the board. (Happened on HDK888)

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18149>
2022-08-21 15:42:22 +00:00
Pavel Ondračka
9c01fff445 r300: merge MOVs with MULs or ADDs in merge channels
Shader-db stats with RV530:
total instructions in shared programs: 166499 -> 164362 (-1.28%)
instructions in affected programs: 80056 -> 77919 (-2.67%)
total temps in shared programs: 21658 -> 21565 (-0.43%)
temps in affected programs: 1780 -> 1687 (-5.22%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
2022-08-21 09:52:50 +02:00
Pavel Ondračka
275beae42d r300: merge MOVs into ADD using the 0 swizzle
Shader-db stats with RV530:
total instructions in shared programs: 169509 -> 166013 (-2.06%)
instructions in affected programs: 99126 -> 95630 (-3.53%)
total presub in shared programs: 10975 -> 10758 (-1.98%)
presub in affected programs: 744 -> 527 (-29.17%)
total temps in shared programs: 21722 -> 21649 (-0.34%)
temps in affected programs: 1350 -> 1277 (-5.41%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
2022-08-21 09:52:31 +02:00
Pavel Ondračka
13607d8c48 r300: don't merge w channel in fragment shaders
Skip the merge if one of the instructions writes just w channel
and we are compiling a fragment shader. We can pair-schedule it together
later anyway and it will also give the scheduler a bit more flexibility.

Shader-db stats with RV530:
total instructions in shared programs: 169522 -> 169509 (<.01%)
instructions in affected programs: 14170 -> 14157 (-0.09%)
total temps in shared programs: 21712 -> 21722 (0.05%)
temps in affected programs: 324 -> 334 (3.09%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
2022-08-21 09:52:15 +02:00
Pavel Ondračka
268f317f22 r300: generalize the merge_movs pass
To allow a simple extension with more merging combinations in the
later commits.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
2022-08-21 09:51:49 +02:00