platform/upstream/mesa.git
3 years agonir/opt_load_store_vectorize: improve handling of swizzles
Rhys Perry [Wed, 23 Sep 2020 15:17:12 +0000 (16:17 +0100)]
nir/opt_load_store_vectorize: improve handling of swizzles

Previously (for simplicity), it could have skipped vectorization if
swizzles were involved.

fossil-db (GFX10.3):
Totals from 498 (0.36% of 139391) affected shaders:
SGPRs: 25328 -> 26608 (+5.05%); split: -1.36%, +6.41%
VGPRs: 9988 -> 9996 (+0.08%)
SpillSGPRs: 40 -> 65 (+62.50%)
CodeSize: 1410188 -> 1385584 (-1.74%); split: -1.76%, +0.02%
Instrs: 257149 -> 250579 (-2.55%); split: -2.57%, +0.01%
Cycles: 1096892 -> 1070600 (-2.40%); split: -2.41%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>

3 years agonir/load_store_vectorize: assume CAN_REORDER ops don't alias with stores
Rhys Perry [Wed, 21 Oct 2020 15:43:16 +0000 (16:43 +0100)]
nir/load_store_vectorize: assume CAN_REORDER ops don't alias with stores

fossil-db (GFX10.3):
Totals from 20 (0.01% of 139391) affected shaders:
SGPRs: 688 -> 712 (+3.49%); split: -1.16%, +4.65%
CodeSize: 35488 -> 34424 (-3.00%); split: -3.04%, +0.05%
Instrs: 6405 -> 6259 (-2.28%); split: -2.44%, +0.16%
Cycles: 51768 -> 51268 (-0.97%); split: -1.21%, +0.24%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10384>

3 years agomesa: Replace _mesa_pack_ubyte_rgba_row() with pack_ubyte_rgba_8unorm().
Eric Anholt [Mon, 19 Apr 2021 22:17:58 +0000 (15:17 -0700)]
mesa: Replace _mesa_pack_ubyte_rgba_row() with pack_ubyte_rgba_8unorm().

The major thing that the codegen had was support for expanding integers
from byte-per-channel to the target format's channel size.  However, the
format_utils.c caller never did that for integers, and swrast doesn't have
support for integers, so that appears to be dead code.  With this done,
format_pack.py goes away entirely.

I slightly changed the prototype of _mesa_pack_ubyte_rgba_row() to match
up with the new function, which involved (mostly) dropping some manual
casts from the callers to make their data match the old prototype.

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

3 years agomesa: Remove dead _mesa_pack_ubyte_rgba_rect().
Eric Anholt [Mon, 19 Apr 2021 21:57:20 +0000 (14:57 -0700)]
mesa: Remove dead _mesa_pack_ubyte_rgba_rect().

Unused since 8ec6534b2665 ("mesa: Use _mesa_format_convert to implement
texstore_rgba.") in 2014

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

3 years agomesa: Move per-pixel Z pack functions to swrast.
Eric Anholt [Mon, 19 Apr 2021 21:49:08 +0000 (14:49 -0700)]
mesa: Move per-pixel Z pack functions to swrast.

Only swrast uses them, and this makes it clearer why we only need partial
format support for them, avoids linker work deleting them for gallium
drivers, and means they will automatically go away when we get to finally
delete swrast.

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

3 years agomsea: Move z24s8-to-z24s8 packing fastpath to swrast.
Eric Anholt [Mon, 19 Apr 2021 21:53:06 +0000 (14:53 -0700)]
msea: Move z24s8-to-z24s8 packing fastpath to swrast.

It was only used here, and this made it clear (see
draw_depth_stencil_pixels()) that the z32f_s8 case was unused and could be
dropped.  Also, it means this code will nicely go away when swrast is
deleted.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
X

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

3 years agomesa: Remove dead _mesa_get_pack_float_z_func().
Eric Anholt [Mon, 19 Apr 2021 21:32:55 +0000 (14:32 -0700)]
mesa: Remove dead _mesa_get_pack_float_z_func().

Unused since its introduction 10 years ago.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>

3 years agomesa: Deduplicate _mesa_pack_uint_z_row().
Eric Anholt [Fri, 16 Apr 2021 19:31:53 +0000 (12:31 -0700)]
mesa: Deduplicate _mesa_pack_uint_z_row().

util_format_pack_z_32unorm() does the same thing but supports more
formats.

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

3 years agomesa: Deduplicate _mesa_pack_float_z_row().
Eric Anholt [Fri, 16 Apr 2021 19:29:59 +0000 (12:29 -0700)]
mesa: Deduplicate _mesa_pack_float_z_row().

util_format_pack_z_float() does the same thing but supports more formats.

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

3 years agomesa: Deduplicate _mesa_pack_ubyte_stencil_row()
Eric Anholt [Fri, 16 Apr 2021 19:25:14 +0000 (12:25 -0700)]
mesa: Deduplicate _mesa_pack_ubyte_stencil_row()

util_format_pack_s_8uint() has the same behavior of replacing the s
values but supports more formats.

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

3 years agoutil: Fix big-endian handling of z/s formats.
Eric Anholt [Mon, 19 Apr 2021 22:58:06 +0000 (15:58 -0700)]
util: Fix big-endian handling of z/s formats.

channel datatypes in Mesa are the host's endianness.  For example,
PIPE_FORMAT_R32_UINT doesn't do a bswap in and out in u_format_table.c's
pack/unpack functions.  So, z32_unorm shouldn't be byte swapping either,
and neither should z24s8 which is also a packed format, and once you've
got those it becomes clear that all of the swaps in this file were
mistaken.

Things would mostly work out because it's unusual to read/write Z/S data
through the GL API, and even for drivers like softpipe as long as the pack
and unpack both swap it could work anyway.  However, the bug would be
visible in glReadPixels() with the matching datatype which would hit the
memcpy fastpath without doing another swap.

Caught by a mesa/main unit test on transitioning to using these
pack/unpack functions.

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

3 years agonir/lower_fragcolor: set outputs_written for fragdata members
Mike Blumenkrantz [Wed, 7 Apr 2021 18:02:06 +0000 (14:02 -0400)]
nir/lower_fragcolor: set outputs_written for fragdata members

normal gather_info stuff

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10080>

3 years agodocs: update calendar and link releases notes for 21.0.3
Dylan Baker [Wed, 21 Apr 2021 18:26:44 +0000 (11:26 -0700)]
docs: update calendar and link releases notes for 21.0.3

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

3 years agodocs: update sha256 sum for mesa 21.0.3
Dylan Baker [Wed, 21 Apr 2021 18:24:36 +0000 (11:24 -0700)]
docs: update sha256 sum for mesa 21.0.3

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

3 years agodocs: add release notes for 21.0.3
Dylan Baker [Wed, 21 Apr 2021 16:54:09 +0000 (09:54 -0700)]
docs: add release notes for 21.0.3

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

3 years agodocs: write basic meta-documentation
Erik Faye-Lund [Tue, 30 Mar 2021 10:35:42 +0000 (12:35 +0200)]
docs: write basic meta-documentation

We were previously completely lacking documentation on how to write
documentation. This adds some very basic docs for that.

Maybe at some point this could deserve it's own article, but for now
this seems enough.

This also documents the group-consensus on preferring US English that
was reached on the mesa-dev mailing list[1].

[1]: https://lists.freedesktop.org/archives/mesa-dev/2021-March/225023.html

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9912>

3 years agozink: Learn about VK_KHR_swapchain
Adam Jackson [Fri, 9 Apr 2021 20:41:41 +0000 (16:41 -0400)]
zink: Learn about VK_KHR_swapchain

We're gonna want it eventually.

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

3 years agoRevert "ci/radeonsi: Add expected failures due to #4674 having slipped in"
Marek Olšák [Wed, 21 Apr 2021 11:33:28 +0000 (07:33 -0400)]
Revert "ci/radeonsi: Add expected failures due to #4674 having slipped in"

This reverts commit 106da39b19ba1cc243ef3aff934a1b5e8d6aa7f6.

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

3 years agoRevert "st/pbo: use cso_set_vertex_buffers_and_elements() for st_pbo_draw"
Marek Olšák [Tue, 20 Apr 2021 09:20:08 +0000 (05:20 -0400)]
Revert "st/pbo: use cso_set_vertex_buffers_and_elements() for st_pbo_draw"

cso_set_vertex_buffers_and_elements shouldn't be used between cso_save
and cso_restore because it can switch for cso_context to u_vbuf and vice
versa. Also, ẗhe preferred order of calls for future VB+draw merging would
be set_vertex_elements followed by set_vertex_buffers.

This reverts commit 33e117ed7f3c48d3dbeda9a28603a121eac7a860.

Fixes: 33e117ed7f3c48d3dbeda9a28603a121eac7a860
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4674

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

3 years agointel: Fix GEN_GEN macro checks
Anuj Phogat [Tue, 20 Apr 2021 23:06:13 +0000 (16:06 -0700)]
intel: Fix GEN_GEN macro checks

Fixes: 9da8a55b08f - intel: Rename GEN_GEN macro to GFX_VER
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10365>

3 years agofreedreno/regs: add 5nm DSI PHY/PLL regs
Robert Foss [Wed, 21 Apr 2021 09:00:54 +0000 (11:00 +0200)]
freedreno/regs: add 5nm DSI PHY/PLL regs

This is for the kernel driver.

Signed-off-by: Robert Foss <robert.foss@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10368>

3 years agopanfrost: Fix ZS reloading on Bifrost v6
Boris Brezillon [Thu, 15 Apr 2021 08:10:16 +0000 (10:10 +0200)]
panfrost: Fix ZS reloading on Bifrost v6

EARLY_ZS_ALWAYS was introduced in Bifrost v7. Use ALWAYS (or INTERSECT
depending on the situation) on v6.

Fixes: 8ba2f9f69858 ("panfrost: Create a blitter library to replace the existing preload helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Icecream95 <ixn@keemail.me>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10250>

3 years agogallium: when tracing is enabled for threaded drivers, trace the driver thread
Mike Blumenkrantz [Mon, 12 Apr 2021 16:55:33 +0000 (12:55 -0400)]
gallium: when tracing is enabled for threaded drivers, trace the driver thread

generally speaking, if I'm tracing an app, I want to see what's happening to
my driver, not what's happening to tc, as tc does rewriting of command streams
which can affect the operation of the driver

use GALLIUM_TRACE_TC for previous behavior

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10362>

3 years agozink: add clear-on-flush mechanic deeper into flush codepath
Mike Blumenkrantz [Tue, 20 Apr 2021 19:08:17 +0000 (15:08 -0400)]
zink: add clear-on-flush mechanic deeper into flush codepath

we should probably trigger this any time a flush occurs just to avoid
doing too much (unexpected) cmdstream rewriting

both calls must be kept, however, as the one in the base flush hook will change
the behavior of flushing if no other work is queued

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agozink: directly set batch->state->flush_res from flush_resource hook
Mike Blumenkrantz [Tue, 20 Apr 2021 19:07:26 +0000 (15:07 -0400)]
zink: directly set batch->state->flush_res from flush_resource hook

there's no need to have an intermediate pointer here since that only
complicates keeping scanout synchronized

this also eliminates the pointer on the context since it isn't used anymore

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agozink: move wsi flush info conditional to queue submission
Mike Blumenkrantz [Tue, 20 Apr 2021 19:05:37 +0000 (15:05 -0400)]
zink: move wsi flush info conditional to queue submission

having a resource pointer on batch states is now a requirement for
keeping scanout objects in sync

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agozink: add a flag indicating whether scanout object needs updating
Mike Blumenkrantz [Tue, 20 Apr 2021 19:04:11 +0000 (15:04 -0400)]
zink: add a flag indicating whether scanout object needs updating

this minimizes overhead of maintaining scanout objects

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agozink: move scanout sync to end of batch
Mike Blumenkrantz [Tue, 20 Apr 2021 18:42:29 +0000 (14:42 -0400)]
zink: move scanout sync to end of batch

this is called from the non-deferred flush path, which means it should always
be triggering work, which means it will always result in a queue submission

instead of relying on the pipe_context::flush hook to be triggered, which is
not a guarantee, do scanout sync during queue submission to ensure that scanout
objects are always in sync

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agoRevert "zink: force scanout sync when mapping scanout resource"
Mike Blumenkrantz [Tue, 20 Apr 2021 18:40:05 +0000 (14:40 -0400)]
Revert "zink: force scanout sync when mapping scanout resource"

This reverts commit 874535752b497bd8ab49cf97add6de2ed9b16f81.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Fixes: 874535752b4 ("zink: force scanout sync when mapping scanout resource")

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>

3 years agodocs/macos: Explain Apple GLX versus OSMesa on macOS
Alyssa Rosenzweig [Tue, 20 Apr 2021 19:14:32 +0000 (00:44 +0530)]
docs/macos: Explain Apple GLX versus OSMesa on macOS

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10359>

3 years agopanfrost: Keep panfrost_batch_reserve_framebuffer() private
Boris Brezillon [Wed, 21 Apr 2021 08:27:55 +0000 (10:27 +0200)]
panfrost: Keep panfrost_batch_reserve_framebuffer() private

This function is not used outside pan_job.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10369>

3 years agopan/bi: Don't set the EOS flag if there's at least one successor
Boris Brezillon [Mon, 19 Apr 2021 15:49:22 +0000 (17:49 +0200)]
pan/bi: Don't set the EOS flag if there's at least one successor

The EOS (End Of Shader) is set if the first successor is NULL, but the
second successor should be checked too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10369>

3 years agopanfrost: Fix indirect draws
Boris Brezillon [Wed, 21 Apr 2021 08:24:37 +0000 (10:24 +0200)]
panfrost: Fix indirect draws

Use panfrost_batch_reserve_tls() to reserve the TSD.

Cc: mesa-stable
Fixes: ff3eada7eb4e ("panfrost: Use the generic preload and FB helpers in the gallium driver")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10369>

3 years agopanfrost: Remove padded unorm blendable formats
Alyssa Rosenzweig [Mon, 19 Apr 2021 19:27:21 +0000 (15:27 -0400)]
panfrost: Remove padded unorm blendable formats

These are used to effectively disable dithering on the tilebuffer, but
we already disable dithering on a per-primitive basis anyway, so don't
bother.

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

3 years agopanfrost: Always pick dithered tb formats
Alyssa Rosenzweig [Mon, 12 Apr 2021 16:42:50 +0000 (12:42 -0400)]
panfrost: Always pick dithered tb formats

Matches current logic and simplifies the code considerably.

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

3 years agopanfrost: Drop blendable format accessor
Alyssa Rosenzweig [Mon, 12 Apr 2021 15:26:08 +0000 (11:26 -0400)]
panfrost: Drop blendable format accessor

Needless indirection.

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

3 years agopanfrost: Simplify format_to_bifrost_blend prototype
Alyssa Rosenzweig [Mon, 12 Apr 2021 15:21:16 +0000 (11:21 -0400)]
panfrost: Simplify format_to_bifrost_blend prototype

Avoids a util_format_description call in a hot path, and drops some
indirection everywhere.

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

3 years agopanfrost: Specialize blendable formats for sRGB
Alyssa Rosenzweig [Mon, 12 Apr 2021 15:18:16 +0000 (11:18 -0400)]
panfrost: Specialize blendable formats for sRGB

Avoids the need to go between linear and sRGB pipe formats in the hot
path. We're already reserving the space, may as well use it.

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

3 years agopanfrost: Keep Bifrost blendable -> pixel in table
Alyssa Rosenzweig [Mon, 12 Apr 2021 15:10:14 +0000 (11:10 -0400)]
panfrost: Keep Bifrost blendable -> pixel in table

Avoids a layer of indirection in a hot path, at the expense of a greater
memory foot print. (Is this a win?)

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

3 years agoir3: make possible to specify branchstack up to 64
Danylo Piliaiev [Fri, 26 Mar 2021 14:39:12 +0000 (16:39 +0200)]
ir3: make possible to specify branchstack up to 64

On a6xx/a5xx there is such dependency between branchstack bitfield
and the amount of nested ifs, which could be seen with blob:

IFs   BRANCHSTACK
0 0
1 1
2 2
3 2
4 3
5 3
6 4
...
59 30
60 31
61 31
62 32
63 32
64 32

Remove open-coded branchstack for a5xx compute along the way.

Fixes tests:
 dEQP-VK.spirv_assembly.instruction.compute.float16.opvectorshuffle.344
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.344_vert
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.444_geom
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.244_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.344_frag

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9859>

3 years agoir3: do not double threadsize when exceeding branchstack limit
Danylo Piliaiev [Mon, 29 Mar 2021 10:55:46 +0000 (13:55 +0300)]
ir3: do not double threadsize when exceeding branchstack limit

We can't support more than compiler->branchstack_size diverging threads
in a wave. Thus, doubling the threadsize is only possible if we don't
exceed the branchstack size limit.

As of blob version 512.490.0 - it doesn't have this heuristics.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9859>

3 years agointel/batch_decoder: set foreground color of decoded instructions
Marcin Ślusarz [Tue, 20 Apr 2021 08:42:18 +0000 (10:42 +0200)]
intel/batch_decoder: set foreground color of decoded instructions

It's impossible to see the names of instructions if the terminal's
color scheme uses black as foreground. Just set it to white - it
will look good on any color scheme.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10341>

3 years agointel/tools: remove unused macros
Marcin Ślusarz [Tue, 20 Apr 2021 08:30:14 +0000 (10:30 +0200)]
intel/tools: remove unused macros

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10341>

3 years agoaco: add and use Program::progress
Rhys Perry [Tue, 20 Apr 2021 16:35:41 +0000 (17:35 +0100)]
aco: add and use Program::progress

This is used when printing the program and to avoid updating register
demand during post-RA liveness analysis.

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

3 years agoaco: allow SDWA sels smaller than the operand size
Rhys Perry [Mon, 19 Apr 2021 10:32:56 +0000 (11:32 +0100)]
aco: allow SDWA sels smaller than the operand size

p_extract_vector copy-propagation can create byte sels for v2b operands.

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

3 years agoaco: don't update register demand during RA validation
Rhys Perry [Mon, 19 Apr 2021 10:24:03 +0000 (11:24 +0100)]
aco: don't update register demand during RA validation

It isn't intended to be accurate after RA, so num_waves can become zero,
breaking the sgpr_limit calculation.

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

3 years agoradv: allow concurrent MSAA images to be FMASK compressed
Samuel Pitoiset [Mon, 19 Apr 2021 14:39:51 +0000 (16:39 +0200)]
radv: allow concurrent MSAA images to be FMASK compressed

DCC decompress/FMASK expand are supported on compute queues. Since
the driver doesn't perform fast clears with concurrent images, we
don't need to perform a FCE on compute (we can't anyways).

This fixes a performance regression with Control and
VKD3D_CONFIG=multi_queue.

One more optimization (as discussed with Bas) is to implement FCE
on compute to allow fast clears.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10323>

3 years agoci/broadcom: add EGL testing jobs
Juan A. Suarez Romero [Tue, 20 Apr 2021 14:32:37 +0000 (16:32 +0200)]
ci/broadcom: add EGL testing jobs

Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>

3 years agoci/vc4: add KHR-GLES2.* job test
Juan A. Suarez Romero [Tue, 20 Apr 2021 14:32:04 +0000 (16:32 +0200)]
ci/vc4: add KHR-GLES2.* job test

Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>

3 years agoci/broadcom: update expected results
Juan A. Suarez Romero [Tue, 20 Apr 2021 07:24:30 +0000 (09:24 +0200)]
ci/broadcom: update expected results

Reviewed-by: Eric Anholt <eric@anholt.net
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10352>

3 years agozink: use undefined layout for first scanout obj transition
Mike Blumenkrantz [Tue, 13 Apr 2021 13:14:15 +0000 (09:14 -0400)]
zink: use undefined layout for first scanout obj transition

doesn't really matter, but technically an error

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10213>

3 years agolibgl-xlib: Add missing dep_x11 dependency
Jeremy Huddleston Sequoia [Tue, 20 Apr 2021 19:12:16 +0000 (12:12 -0700)]
libgl-xlib: Add missing dep_x11 dependency

Cc: 20.3 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10360>

3 years agolibgl-xlib: Set darwin-versions
Jeremy Huddleston Sequoia [Tue, 20 Apr 2021 19:09:52 +0000 (12:09 -0700)]
libgl-xlib: Set darwin-versions

Cc: 20.3 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10360>

3 years agovenus: change SpaceBeforeParens style option
Chia-I Wu [Sat, 17 Apr 2021 18:01:17 +0000 (11:01 -0700)]
venus: change SpaceBeforeParens style option

This requires clang-format 11 however.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10326>

3 years agovenus: clang-format clean
Chia-I Wu [Sat, 17 Apr 2021 18:08:56 +0000 (11:08 -0700)]
venus: clang-format clean

Add parentheses to VN_DEBUG to avoid confusing clang-format.

Remove redundant comments, that confuse clang-format, because
VN_USE_WSI_PLATFORM can serve as comments.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10326>

3 years agoturnip: enable shaderInt16
Danylo Piliaiev [Tue, 6 Apr 2021 11:36:47 +0000 (14:36 +0300)]
turnip: enable shaderInt16

We should have everything to enable it.
16b integer division is lowered by nir_lower_idiv.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>

3 years agoir3: treat 16b imul as mul.s24
Danylo Piliaiev [Thu, 8 Apr 2021 12:06:21 +0000 (15:06 +0300)]
ir3: treat 16b imul as mul.s24

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>

3 years agoir3: handle 16b op_i2b1
Rob Clark [Fri, 17 Jul 2020 21:09:11 +0000 (14:09 -0700)]
ir3: handle 16b op_i2b1

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10054>

3 years agointel: Rename _gen keyword to _gfx_ver in few build files
Anuj Phogat [Wed, 7 Apr 2021 22:33:23 +0000 (15:33 -0700)]
intel: Rename _gen keyword to _gfx_ver in few build files

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename since_gen to since ver
Anuj Phogat [Wed, 7 Apr 2021 22:26:45 +0000 (15:26 -0700)]
intel: Rename since_gen to since ver

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "since_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/since_gen/since_ver/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename {i965, iris, anv, isl}_gen prefix in build files
Anuj Phogat [Wed, 14 Apr 2021 05:03:32 +0000 (22:03 -0700)]
intel: Rename {i965, iris, anv, isl}_gen prefix in build files

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "(i965|iris|anv|isl)_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/\(i965\|iris\|anv\|isl\)_gen\([_@]\)/\1_per_hw_ver\2/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename GEN_PART to INTEL_PART
Anuj Phogat [Wed, 7 Apr 2021 21:58:56 +0000 (14:58 -0700)]
intel: Rename GEN_PART to INTEL_PART

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PART" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PART/INTEL_PART/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename _gen_{program, part, batch, freq} to _intel_{..}
Anuj Phogat [Mon, 19 Apr 2021 22:56:52 +0000 (15:56 -0700)]
intel: Rename _gen_{program, part, batch, freq} to _intel_{..}

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "[[:alnum:]]_gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/_gen_\(program\|part\|batch\|freq\)/_intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename calculate_gen_slm_size to intel_calculate_slm_size
Anuj Phogat [Mon, 19 Apr 2021 22:54:47 +0000 (15:54 -0700)]
intel: Rename calculate_gen_slm_size to intel_calculate_slm_size

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "calculate_gen_slm_size" -rIl $SEARCH_PATH | xargs sed -ie "s/calculate_gen_slm_size/intel_calculate_slm_size/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_10 to ver_10
Anuj Phogat [Wed, 14 Apr 2021 04:54:48 +0000 (21:54 -0700)]
intel: Rename gen_10 to ver_10

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename vk_to_gen keyword to vk_to_intel
Anuj Phogat [Mon, 19 Apr 2021 22:50:14 +0000 (15:50 -0700)]
intel: Rename vk_to_gen keyword to vk_to_intel

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "vk_to_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/vk_to_gen/vk_to_intel/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename isl_to_gen keyword to isl_encode
Anuj Phogat [Mon, 19 Apr 2021 22:47:22 +0000 (15:47 -0700)]
intel: Rename isl_to_gen keyword to isl_encode

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "isl_to_gen" -rIl $SEARCH_PATH | xargs sed -ie "s/isl_to_gen/isl_encode/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Remove devinfo_to_gen() helper function
Anuj Phogat [Wed, 14 Apr 2021 04:50:42 +0000 (21:50 -0700)]
intel: Remove devinfo_to_gen() helper function

This changes behavior.  Now Baytrail will be decoded with the
gen7.xml instead of the gen75.xml. Haswell is the only graphics
hardware generation 75 and Baytrail is closer to Ivybridge
in most ways. (Kenneth Graunke)

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_{mapped, clflush, invalidate} prefix to intel_{..}
Anuj Phogat [Wed, 7 Apr 2021 20:22:19 +0000 (13:22 -0700)]
intel: Rename gen_{mapped, clflush, invalidate} prefix to intel_{..}

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_\(mapped\|clflush\|invalidate\|shader\)/intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename eu compact instruction tests
Anuj Phogat [Tue, 6 Apr 2021 23:33:30 +0000 (16:33 -0700)]
intel: Rename eu compact instruction tests

grep -E "gen_[[:alnum:]_]{2,}" -rIl src/intel/compiler/test_eu_compact.cpp | xargs sed -ie "s/gen_\([[:alnum:]_]\{2,\}\)/test_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename index_gen keyword to index_ver
Anuj Phogat [Tue, 6 Apr 2021 21:38:37 +0000 (14:38 -0700)]
intel: Rename index_gen keyword to index_ver

grep -E "index_gen" -rIl src/intel/compiler | xargs sed -ie "s/index_gen/index_ver/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gens keyword to gfx_vers
Anuj Phogat [Tue, 6 Apr 2021 21:35:53 +0000 (14:35 -0700)]
intel: Rename gens keyword to gfx_vers

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gens" -rIl src/intel/compiler | xargs sed -ie "s/gens/gfx_vers/g"
Exclude changes to few comments.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen keyword in test_eu_validate.cpp
Anuj Phogat [Wed, 7 Apr 2021 21:33:08 +0000 (14:33 -0700)]
intel: Rename gen keyword in test_eu_validate.cpp

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen enum to gfx_ver
Anuj Phogat [Tue, 6 Apr 2021 17:33:24 +0000 (10:33 -0700)]
intel: Rename gen enum to gfx_ver

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_from_devinfo" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_from_devinfo/gfx_ver_from_devinfo/g"

Few manual changes.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename brw_gen_enum.h to brw_gfx_ver_enum.h
Anuj Phogat [Tue, 6 Apr 2021 17:25:46 +0000 (10:25 -0700)]
intel: Rename brw_gen_enum.h to brw_gfx_ver_enum.h

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "brw_gen_enum" -rIl $SEARCH_PATH | xargs sed -ie "s/brw_gen_enum\.h/brw_gfx_ver_enum\.h/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_{pipeline, oa, counter, hw} to intel_{..}
Anuj Phogat [Wed, 7 Apr 2021 19:52:05 +0000 (12:52 -0700)]
intel: Rename gen_{pipeline, oa, counter, hw} to intel_{..}

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_\(pipeline\|oa\|counter\|hw\)/intel_\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename GEN_PERF prefix to INTEL_PERF in source files
Anuj Phogat [Tue, 6 Apr 2021 20:35:43 +0000 (13:35 -0700)]
intel: Rename GEN_PERF prefix to INTEL_PERF in source files

export': export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PERF" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF/INTEL_PERF/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename GEN_PERF prefix to INTEL_PERF in build files
Anuj Phogat [Tue, 6 Apr 2021 17:08:41 +0000 (10:08 -0700)]
intel: Rename GEN_PERF prefix to INTEL_PERF in build files

export': export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "GEN_PERF[A-Z_]*_FILES" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF\([A-Z_]*_FILES\)/INTEL_PERF\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Fix alignment and line wrapping due to gen_perf renaming
Anuj Phogat [Tue, 13 Apr 2021 17:31:52 +0000 (10:31 -0700)]
intel: Fix alignment and line wrapping due to gen_perf renaming

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_perf prefix to intel_perf in source files
Anuj Phogat [Tue, 6 Apr 2021 20:32:02 +0000 (13:32 -0700)]
intel: Rename gen_perf prefix to intel_perf in source files

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([^\.]\)/intel_perf\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_perf prefix in filenames to intel_perf
Anuj Phogat [Tue, 6 Apr 2021 00:24:14 +0000 (17:24 -0700)]
intel: Rename gen_perf prefix in filenames to intel_perf

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
find $SEARCH_PATH -type f -name "*gen_perf*[cph]" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_perf/intel_perf}"' \;
grep -E "GEN_PERF[[:alnum:]_]*_H( |$)" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_PERF\([[:alnum:]_]*_H\)\( \|$\)/INTEL_PERF\1\2/g"
grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([[:alnum:]_]*\.[ch]\)/intel_perf\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_context prefix to intel_context
Anuj Phogat [Tue, 6 Apr 2021 22:22:04 +0000 (15:22 -0700)]
intel: Rename gen_context prefix to intel_context

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_context" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_context/intel_context/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_context.h to intel_context.h
Anuj Phogat [Tue, 6 Apr 2021 00:11:05 +0000 (17:11 -0700)]
intel: Rename gen_context.h to intel_context.h

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_context" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_context\.h/intel_context\.h/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Drop gen prefix in gen_has_get_tiling()
Anuj Phogat [Wed, 7 Apr 2021 18:46:15 +0000 (11:46 -0700)]
intel: Drop gen prefix in gen_has_get_tiling()

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_get_aperture_size to intel_get_aperture_size
Anuj Phogat [Mon, 5 Apr 2021 23:52:37 +0000 (16:52 -0700)]
intel: Rename gen_get_aperture_size to intel_get_aperture_size

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_get_device prefix to intel_get_device
Anuj Phogat [Mon, 5 Apr 2021 22:59:35 +0000 (15:59 -0700)]
intel: Rename gen_get_device prefix to intel_get_device

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_get_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_get_device/intel_get_device/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename GEN_DEVICE prefix in macros to INTEL_DEVICE
Anuj Phogat [Mon, 5 Apr 2021 21:29:06 +0000 (14:29 -0700)]
intel: Rename GEN_DEVICE prefix in macros to INTEL_DEVICE

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_DEVICE" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEVICE/INTEL_DEVICE/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Fix alignment and line wrapping due to gen_device renaming
Anuj Phogat [Tue, 13 Apr 2021 03:17:16 +0000 (20:17 -0700)]
intel: Fix alignment and line wrapping due to gen_device renaming

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_device prefix to intel_device
Anuj Phogat [Mon, 5 Apr 2021 20:19:39 +0000 (13:19 -0700)]
intel: Rename gen_device prefix to intel_device

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_device prefix in filenames
Anuj Phogat [Mon, 5 Apr 2021 18:47:31 +0000 (11:47 -0700)]
intel: Rename gen_device prefix in filenames

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f -name "gen_device" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_device/intel_device}"' \;
grep -E "gen_device_info*\.[cph]" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device_info\(.*\.[cph]\)/intel_device_info\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename intel_device_info.c to intel_dev_info.c
Anuj Phogat [Mon, 5 Apr 2021 18:38:25 +0000 (11:38 -0700)]
intel: Rename intel_device_info.c to intel_dev_info.c

This change is required to avoid a filename conflict due to
next patch in this series to rename gen_device_info.c

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename GEN_DEBUG prefix to INTEL_DEBUG
Anuj Phogat [Mon, 5 Apr 2021 18:13:16 +0000 (11:13 -0700)]
intel: Rename GEN_DEBUG prefix to INTEL_DEBUG

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_DEBUG" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEBUG/INTEL_DEBUG/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename gen_debug prefix to intel_debug
Anuj Phogat [Mon, 5 Apr 2021 18:11:29 +0000 (11:11 -0700)]
intel: Rename gen_debug prefix to intel_debug

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_debug" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_debug/intel_debug/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agointel: Rename files with gen_debug prefix
Anuj Phogat [Mon, 5 Apr 2021 17:44:41 +0000 (10:44 -0700)]
intel: Rename files with gen_debug prefix

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f -name "*gen_debug.*[cph]" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen_debug/intel_debug}"' \;
grep -E "gen_debug" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_debug\./intel_debug\./g"
grep -E "GEN_DEBUG" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_DEBUG_H/INTEL_DEBUG_H/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>

3 years agoutil/format: add util_format_is_rgbx_or_bgrx
Mike Blumenkrantz [Tue, 20 Apr 2021 16:17:40 +0000 (12:17 -0400)]
util/format: add util_format_is_rgbx_or_bgrx

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10351>

3 years agocompiler/glsl: Always propagate_invariance() last
Matt Turner [Tue, 20 Apr 2021 16:12:05 +0000 (12:12 -0400)]
compiler/glsl: Always propagate_invariance() last

Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>

3 years agocompiler/glsl: Propagate invariant/precise when splitting arrays
Matt Turner [Fri, 16 Apr 2021 17:52:46 +0000 (13:52 -0400)]
compiler/glsl: Propagate invariant/precise when splitting arrays

This fixes the
dEQP-GLES3.functional.shaders.invariance.{low,medium,high}p.loop_4 tests when
run in a VM with virgl on a host with iris. virgl mangles the GLSL shaders and
emits shader code for the host driver that contains vec4 arrays. As such, the
test did not fail when running directly on the host.

The test also did not fail if the host was using i965. Disabling
PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY in iris was sufficient to work around it,
so I believe that i965 didn't show the problem because after arrays were split
by optimize_split_arrays(), even though the invariant/precise qualifiers were
lost, do_common_optimization() would be called again and thus
propagate_invariance() would propagate the qualifiers to the new variables
produced by optimize_split_arrays().

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>

3 years agocompiler/glsl: Return progress from propagate_invariance()
Matt Turner [Fri, 16 Apr 2021 17:50:41 +0000 (13:50 -0400)]
compiler/glsl: Return progress from propagate_invariance()

Doing so allow you to easily tell what the pass did using the existing
infrastructure in the OPT macro.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>

3 years agoRevert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it"
Rhys Perry [Tue, 6 Apr 2021 08:52:26 +0000 (09:52 +0100)]
Revert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it"

This reverts commit cd12fcff96cc7db794047e2a045142ea861254a2.

The terrain looks fine now that TRUNC_COORD=0 for textureGather().

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>

3 years agoaco: remove image parameter from get_sampler_desc()
Rhys Perry [Mon, 5 Apr 2021 15:18:47 +0000 (16:18 +0100)]
aco: remove image parameter from get_sampler_desc()

We can just check whether tex_instr is NULL instead.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>