platform/upstream/mesa.git
21 months agor600/sfn: Make sure all components are usable when lowering TF inputs
Gert Wollny [Wed, 5 Oct 2022 14:48:27 +0000 (16:48 +0200)]
r600/sfn: Make sure all components are usable when lowering TF inputs

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Always enforce LDS operation order
Gert Wollny [Wed, 5 Oct 2022 13:05:40 +0000 (15:05 +0200)]
r600/sfn: Always enforce LDS operation order

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Unroll loops after doing some optimizations
Gert Wollny [Fri, 30 Sep 2022 13:13:33 +0000 (15:13 +0200)]
r600/sfn: Unroll loops after doing some optimizations

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: assert on use of abs modifier in op3
Gert Wollny [Fri, 30 Sep 2022 13:13:07 +0000 (15:13 +0200)]
r600/sfn: assert on use of abs modifier in op3

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn:explicitly initialize the memory pool
Gert Wollny [Wed, 28 Sep 2022 12:52:41 +0000 (14:52 +0200)]
r600/sfn:explicitly initialize the memory pool

This reduces the overhead of checking with each allocation
whether the pool is already initialized.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Use the correct allocator for loop lists
Gert Wollny [Wed, 28 Sep 2022 12:52:15 +0000 (14:52 +0200)]
r600/sfn: Use the correct allocator for loop lists

This fixes a memory leak.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Fix typo
Gert Wollny [Wed, 28 Sep 2022 06:47:27 +0000 (08:47 +0200)]
r600/sfn: Fix typo

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Delete final lowered nir shader early
Gert Wollny [Sat, 24 Sep 2022 16:42:24 +0000 (18:42 +0200)]
r600/sfn: Delete final lowered nir shader early

Since this is no longer needed we can as well free the
memory right away instead of waiting until the parent
shader is freed.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Add peephole optimization for kill instructions
Gert Wollny [Thu, 22 Sep 2022 06:33:39 +0000 (08:33 +0200)]
r600/sfn: Add peephole optimization for kill instructions

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: don't propagate registers into conditional test
Gert Wollny [Wed, 5 Oct 2022 09:23:02 +0000 (11:23 +0200)]
r600/sfn: don't propagate registers into conditional test

We don't check whether the register is overwritten between the actual
conditional test and the test of the used result, so don't try to
optimize the evaluation of the conditional.

Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
   r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Always start a new CF after a KILL instruction
Gert Wollny [Wed, 5 Oct 2022 09:20:00 +0000 (11:20 +0200)]
r600/sfn: Always start a new CF after a KILL instruction

Docu says:

   Ensure that the KILL* instruction is the last instruction
   in an ALU clause, because the remaining instructions executed
   in the clause do not reflect the updated valid state after
   the kill operation.

Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
    r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agor600/sfn: Only run 64 bit ops lowering passes when really needed
Gert Wollny [Wed, 5 Oct 2022 07:50:02 +0000 (09:50 +0200)]
r600/sfn: Only run 64 bit ops lowering passes when really needed

If the shader doesn't do 64 bit then there is no need to run these
lowering passes.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

21 months agoetnaviv: pass shader key by reference
Lucas Stach [Wed, 5 Oct 2022 13:23:33 +0000 (15:23 +0200)]
etnaviv: pass shader key by reference

The shader key has grown substancially since the introduction of the
shadow sampler lowering to the point where passing it by value when
looking for the right variant matching the current state is showing
up in the CPU profiles. Pass the key by reference to get rid of this
overhead.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18968>

21 months agoetnaviv: slim down etna_shader_key
Lucas Stach [Wed, 5 Oct 2022 13:14:50 +0000 (15:14 +0200)]
etnaviv: slim down etna_shader_key

The max number of exposed fragment samplers and views on any hardware is 16,
so there is no point in having arrays of 128 entries to track information
for the shadow sampler lowering in the shader key. Most of them will never
be used. Reduce the size of the arrays to what is actually necessary and add
a assert to make sure the sampler (view) limit isn't bumped without a
matching change in the shader key.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18968>

21 months agointel: add INTEL_DEBUG=capture-all to capture everything upon hang
Lionel Landwerlin [Wed, 5 Oct 2022 21:34:52 +0000 (00:34 +0300)]
intel: add INTEL_DEBUG=capture-all to capture everything upon hang

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18977>

21 months agovulkan,lavapipe: Use a tri-state enum for depth clip enable
Jason Ekstrand [Thu, 29 Sep 2022 16:55:03 +0000 (11:55 -0500)]
vulkan,lavapipe: Use a tri-state enum for depth clip enable

This should make it a lot more clear how depth clip enables work.
Annoyingly, because of the way they originally worked in Vulkan 1.0,
it's dependent on the depth clamp if the state isn't set in the pipeline
and isn't declared dynamic.  The enum is explicitly set up so that
drivers don't need to be aware of this change unless they already
implement VK_EXT_extended_dynamic_state3.  If depth clamp/clamp are not
dynamic, depth clip will be either TRUE or FALSE which map to 1/0 so the
field can still be treated as a boolean.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18889>

21 months agor300: be more careful when pair merging with presubtract
Pavel Ondračka [Fri, 20 May 2022 14:38:15 +0000 (16:38 +0200)]
r300: be more careful when pair merging with presubtract

and when some argument reads both from rgb and apha. We would fail to
properly rewrite the sources in such case.

Consider the following instructions:
2: src0.xyz = const[3], src1.xyz = temp[6], srcp.xyz = (src1 - src0)
   CMP temp[8].x, src0.0__, src0.1__, srcp.x__
   ...
5: src0.xyz = const[1], src0.w = const[1]
   MAX temp[10].xy, |src0.xz_|, |src0.yw_|

We can merge them together into pair like
 2: src0.xyz = const[3], src1.xyz = temp[6], src2.xyz = const[1], src2.w = const[1], srcp.xyz = (src1 - src0)
    MAX temp[10].xy, |src2.xz_|, |src2.yw_|
    CMP temp[8].w, src0.0, src0.1, srcp.x

However the current code fails to do so properly and we end with this:
  2: src0.xyz = const[3], src0.w = const[1], src1.xyz = temp[6], src2.xyz = const[1], srcp.xyz = (src1 - src0)
     MAX temp[10].xy, |src2.xz_|, |src2.yw_|
     CMP temp[8].w, src0.0, src0.1, srcp.x
where the src2.w is undefined.

Just check for the the case where the arguments reads both from rgb and
alpha and bail out from the merge.

Fixes the following dEQPs:
dEQP-GLES2.functional.uniform_api.random.47
dEQP-GLES2.functional.uniform_api.value.initial.render.array_in_struct.float_vec4_both
dEQP-GLES2.functional.uniform_api.value.initial.render.basic_array.vec4_both

Only a minor change in shader-db with RV530:
total instructions in shared programs: 180847 -> 180864 (<.01%)
instructions in affected programs: 3178 -> 3195 (0.53%)
helped: 2
HURT: 16

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

21 months agoCI: Collabora farm down for maintenance
Daniel Stone [Thu, 6 Oct 2022 14:51:00 +0000 (09:51 -0500)]
CI: Collabora farm down for maintenance

We have major maintenance planned tomorrow, so let's just disable LAVA
until it comes back.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18987>

21 months agoci/etnaviv: add GC7000 support
Christian Gmeiner [Sat, 30 Oct 2021 10:21:54 +0000 (12:21 +0200)]
ci/etnaviv: add GC7000 support

Will be used in combination with Nitrogen8M boards.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13691>

21 months agoci/bare-metal: introduce BM_MKBOOT_PARAMS
Christian Gmeiner [Fri, 5 Nov 2021 12:24:42 +0000 (13:24 +0100)]
ci/bare-metal: introduce BM_MKBOOT_PARAMS

Make it possible to provide per device mkimage.py params.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13691>

21 months agoci: switch to mkbootimg.py
Christian Gmeiner [Sun, 31 Oct 2021 13:54:29 +0000 (14:54 +0100)]
ci: switch to mkbootimg.py

On ARM64 appending the dtb does not work with U-Boot and fastbooting
with such an image failes like:

  ## Booting Android Image at 0x40480000 ...
  Kernel load addr 0x00000000 size 30514 KiB
  Kernel command line: ip=dhcp console=ttymxc0,115200n8 root=/dev/nfs rw nfsrootdebug init=/init nfsroot=10.10.10.17:/mnt/disks/testing-nfs-root/gc7000-00,vers=3,tcp
  RAM disk load addr 0x00000000 size 1 KiB
  Error: header_version must be >= 2 to get dtb
     Loading Kernel Image
  "Error" handler, esr 0xbf000002
  elr: 000000004029ce70 lr : 000000004029cf0c (reloc)
  elr: 00000000be59ae70 lr : 00000000be59af0c
  x0 : 0000000000100000 x1 : 0000000040580800
  x2 : 0000000000010000 x3 : 00000000000020c0
  x4 : f9402063f9400463 x5 : 0000000000000000
  x6 : 0000000000100000 x7 : 0000000006000000
  x8 : 00000000b64f1488 x9 : 0000000000000008
  x10: 00000000b651c450 x11: 00000000b653df68
  x12: 0000000000000000 x13: 0000000000000200
  x14: 0000000000000000 x15: 0000000000000020
  x16: 00000000be55acc8 x17: 0000000000004530
  x18: 00000000b64fddc0 x19: 0000000000100000
  x20: 0000000040580800 x21: 0000000001ccc4af
  x22: 0000000000010000 x23: 0000000000010000
  x24: 0000000040480800 x25: 00000000b64f15c8
  x26: 0000000000000000 x27: 0000000000000000
  x28: 0000000040480800 x29: 00000000b64f1470

  Code: d65f03c0 f8636824 f8236804 91002063 (cb030044)
  Resetting CPU ...

  resetting ...

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13691>

21 months agoci: include etnaviv support in ARM64 container
Christian Gmeiner [Sat, 30 Oct 2021 10:21:10 +0000 (12:21 +0200)]
ci: include etnaviv support in ARM64 container

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13691>

21 months agoaco: Fix build error with std::max on GCC 12
Timur Kristóf [Wed, 5 Oct 2022 14:53:10 +0000 (09:53 -0500)]
aco: Fix build error with std::max on GCC 12

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18969>

21 months agoac/nir/ngg: Fix cross-invocation indices and cull outputs.
Timur Kristóf [Tue, 27 Sep 2022 16:25:49 +0000 (18:25 +0200)]
ac/nir/ngg: Fix cross-invocation indices and cull outputs.

The layout calculation accidentally thought these would be
stored in variables, but that's not the case.

Fixes: 697ea022020650cecfaeaf8c00afc5bff521e019
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18846>

21 months agocso: asst. clean-ups in cso_context.[ch]
Brian Paul [Tue, 4 Oct 2022 16:13:19 +0000 (10:13 -0600)]
cso: asst. clean-ups in cso_context.[ch]

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>

21 months agocso: asst. clean-ups in cso_cache.[ch]
Brian Paul [Tue, 4 Oct 2022 16:13:11 +0000 (10:13 -0600)]
cso: asst. clean-ups in cso_cache.[ch]

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>

21 months agocso: use util_bitcount
Brian Paul [Mon, 3 Oct 2022 21:40:14 +0000 (15:40 -0600)]
cso: use util_bitcount

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>

21 months agocso: asst. clean-ups in cso_hash.[ch]
Brian Paul [Mon, 3 Oct 2022 21:33:47 +0000 (15:33 -0600)]
cso: asst. clean-ups in cso_hash.[ch]

Consistent whitespace, move var decls to first use, add some const
qualifiers, etc.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>

21 months agovulkan_hasvk: set READ/WRITE_WITHOUT_FORMAT for buffer views
Iván Briano [Tue, 4 Oct 2022 01:11:14 +0000 (18:11 -0700)]
vulkan_hasvk: set READ/WRITE_WITHOUT_FORMAT for buffer views

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18958>

21 months agoanv: set READ/WRITE_WITHOUT_FORMAT for buffer views
Iván Briano [Tue, 4 Oct 2022 01:11:14 +0000 (18:11 -0700)]
anv: set READ/WRITE_WITHOUT_FORMAT for buffer views

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18958>

21 months agopanfrost: Remove load_kernel_input path
Alyssa Rosenzweig [Sun, 18 Sep 2022 22:05:47 +0000 (18:05 -0400)]
panfrost: Remove load_kernel_input path

Now the state tracker's responsible to lower away for us (and the state tracker
can do it correctly, our implementation is incorrect with a strict reading of
the Gallium contract).

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

21 months agoagx: Remove load_kernel_input path
Alyssa Rosenzweig [Sun, 18 Sep 2022 22:05:32 +0000 (18:05 -0400)]
agx: Remove load_kernel_input path

Unused and now won't be used.

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

21 months agolavapipe: zero-init sampler objects
Brian Paul [Mon, 3 Oct 2022 21:18:31 +0000 (15:18 -0600)]
lavapipe: zero-init sampler objects

The cso code hashes these as a block of bytes.  This silences some
Valgrind uninitialized memory warnings and possibly avoids creating
some redundant sampler instances.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>

21 months agolavapipe: remove continue statements in emit_state() to be more consistent
Brian Paul [Mon, 3 Oct 2022 21:17:12 +0000 (15:17 -0600)]
lavapipe: remove continue statements in emit_state() to be more consistent

Rejig some dirty state checks to avoid continue and make it consistent
with surrounding code.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>

21 months agozink: Map ETC1 to ETC2 to avoid uncompressing in the frontend.
Emma Anholt [Tue, 4 Oct 2022 19:20:29 +0000 (12:20 -0700)]
zink: Map ETC1 to ETC2 to avoid uncompressing in the frontend.

Maybe the frontend should map for us in this case, but it's easy enough
here: ETC2 is an extension to use undefined states from ETC1, and is
backwards compatible.

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

21 months agozink: Enable ASTC texture format translation.
Emma Anholt [Tue, 4 Oct 2022 18:55:28 +0000 (11:55 -0700)]
zink: Enable ASTC texture format translation.

Without this, the frontend would decompress them for us without even the
kindness of a perf debug warning.

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

21 months agozink: enable native ETC2 if vk driver supports it
SoroushIMG [Mon, 16 May 2022 19:38:08 +0000 (20:38 +0100)]
zink: enable native ETC2 if vk driver supports it

There is a 1-to-1 mapping from pipe to vk formats for ETC2.

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

21 months agozink: Skip border color clamping for compressed formats.
Emma Anholt [Tue, 4 Oct 2022 22:31:41 +0000 (15:31 -0700)]
zink: Skip border color clamping for compressed formats.

You won't have a non-void channel for block formats, because "how many
bits are there in the red channel" doesn't even make sense.

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

21 months agoci/zink: Clear stale xfails for turnip.
Emma Anholt [Tue, 4 Oct 2022 22:37:17 +0000 (15:37 -0700)]
ci/zink: Clear stale xfails for turnip.

The linked MR landed and fixed them.

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

21 months agofreedreno: Fix graphic glitches on a4xx and a5xx
Alejandro Tafalla [Tue, 27 Sep 2022 08:33:56 +0000 (10:33 +0200)]
freedreno: Fix graphic glitches on a4xx and a5xx

Like on adreno 3xx, hw binning and scissor optimizations don't work correctly
together on a4xx and a5xx GPUs.

Disable binning as a workaround if scissor optimizations are being used.

Fixes: f68c6951b86a 8efaae3e1969

Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18925>

21 months agoiris: better error message with GuC loading failures
Lionel Landwerlin [Tue, 4 Oct 2022 15:20:43 +0000 (18:20 +0300)]
iris: better error message with GuC loading failures

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18952>

21 months agollvmpipe: bump LP_MAX_THREADS to 32
Jeremy Rand [Sun, 4 Sep 2022 10:17:23 +0000 (10:17 +0000)]
llvmpipe: bump LP_MAX_THREADS to 32

On my ppc64le machine with 32 hardware threads, this speeds up OpenArena
(1920x1200) from 7.2 fps to 8.1 fps.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18415>

21 months agoci/venus: enable render server for venus testing
Yiwei Zhang [Fri, 30 Sep 2022 20:30:41 +0000 (20:30 +0000)]
ci/venus: enable render server for venus testing

Render server config will soon become a mandatory requirement for venus.

v2: updated DEBIAN_BASE_TAG and KERNEL_ROOTFS_TAG

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reveiwed-by: Ryan Neph <ryanneph@google.com> (v1)
Reveiwed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> (v1)
Reviewed-by: Corentin Noël <corentin.noel@collabora.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18918>

21 months agoturnip: Don't use the dynamic color write enable during non-dynamic.
Emma Anholt [Tue, 4 Oct 2022 17:15:00 +0000 (10:15 -0700)]
turnip: Don't use the dynamic color write enable during non-dynamic.

We have the correct merged color write enable state as a local var here,
use that instead of the zero cmd->state.color_write_enable.  Fixes
blending in many traces with ANGLE on turnip.  In the process of fixing,
clarify the logic a little bit.

Fixes: 169e03800d0f ("tu: Implement VK_EXT_color_write_enable")
Fixes: #7328
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18956>

21 months agogallivm: remove legacy pointer_get apis
Dave Airlie [Tue, 27 Sep 2022 05:28:18 +0000 (15:28 +1000)]
gallivm: remove legacy pointer_get apis

These are no longer used.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agogallivm/sample: use retrieved types to do opaque pointer loads.
Dave Airlie [Mon, 26 Sep 2022 05:02:38 +0000 (15:02 +1000)]
gallivm/sample: use retrieved types to do opaque pointer loads.

This uses the types to do the loads using opaque ptr interfaces.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agodraw/llvmpipe: add way to return pointer types to generic code.
Dave Airlie [Mon, 26 Sep 2022 04:59:54 +0000 (14:59 +1000)]
draw/llvmpipe: add way to return pointer types to generic code.

Some of the generic code tries to load from things it has no
types for, mip offsets, row and image strides.

Fix the interfaces to allow returning types for these.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agodraw/llvmpipe: move texture/sampler/image member load to opaque.
Dave Airlie [Mon, 26 Sep 2022 04:41:20 +0000 (14:41 +1000)]
draw/llvmpipe: move texture/sampler/image member load to opaque.

This removes the non-opaque paths from the draw/lp sampling code.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agogallivm/llvmpipe: add opaque pointers support to sampler
Dave Airlie [Mon, 26 Sep 2022 04:11:30 +0000 (14:11 +1000)]
gallivm/llvmpipe: add opaque pointers support to sampler

This adds explicit context types wiring through the sampler code

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agollvmpipe/tests: port to new pointer interfaces.
Dave Airlie [Mon, 3 Oct 2022 23:41:00 +0000 (09:41 +1000)]
llvmpipe/tests: port to new pointer interfaces.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>

21 months agoanv: Split the debug part of anv_queue_exec_locked()
José Roberto de Souza [Fri, 2 Sep 2022 13:55:22 +0000 (06:55 -0700)]
anv: Split the debug part of anv_queue_exec_locked()

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agoanv: Use Vulkan types for priority as much as possible
José Roberto de Souza [Wed, 17 Aug 2022 19:44:29 +0000 (12:44 -0700)]
anv: Use Vulkan types for priority as much as possible

Continuing the work to split i915_drm.h specific code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agoanv: Split i915 specific parts of anv_queue_submit_simple_batch()
José Roberto de Souza [Wed, 10 Aug 2022 18:33:33 +0000 (11:33 -0700)]
anv: Split i915 specific parts of anv_queue_submit_simple_batch()

This will make easier to spot more places where the code can
simplified after the hasvk split.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agoanv: Move fetch of i915 physical device parameters
José Roberto de Souza [Mon, 8 Aug 2022 20:26:59 +0000 (13:26 -0700)]
anv: Move fetch of i915 physical device parameters

Move everything that depends on i915_drm.h to its own function,
in a future MR will move the parameters that are also needed by
Iris to intel_device_info.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agointel/dev: Split i915 specific parts of intel_get_device_info_from_fd()
José Roberto de Souza [Mon, 8 Aug 2022 16:18:34 +0000 (09:18 -0700)]
intel/dev: Split i915 specific parts of intel_get_device_info_from_fd()

Continuing the work to split i915_drm.h specific code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agointel: Make engine related functions and types not i915 dependent
José Roberto de Souza [Mon, 8 Aug 2022 18:25:26 +0000 (11:25 -0700)]
intel: Make engine related functions and types not i915 dependent

There is too much i915_drm.h code spread, this patch start to fix that
by re-organizing engine related code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>

21 months agodocs: move VK_EXT_extended_dynamic_state3 out from 1.3
Yiwei Zhang [Mon, 3 Oct 2022 19:39:24 +0000 (19:39 +0000)]
docs: move VK_EXT_extended_dynamic_state3 out from 1.3

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18941>

21 months agotu: Implement extendedDynamicState2PatchControlPoints
Connor Abbott [Wed, 21 Sep 2022 14:46:53 +0000 (16:46 +0200)]
tu: Implement extendedDynamicState2PatchControlPoints

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

21 months agotu: DS primitive stride does not use patch control points
Connor Abbott [Wed, 21 Sep 2022 12:38:21 +0000 (14:38 +0200)]
tu: DS primitive stride does not use patch control points

Previously we would use patch control points if there was no GS, but
it wasn't immediately obvious that this driver param is unused if there
is no GS. Make it output 0 instead, making it clear that we can emit it
even if we don't know the patch control points. This change in the
cmdstream is split out from the next commit.

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

21 months agotu: Fix param_stride placement
Connor Abbott [Wed, 21 Sep 2022 11:46:27 +0000 (13:46 +0200)]
tu: Fix param_stride placement

Even though it's tessellation-related, it's set based on the
tessellation variant which is only known after linking. The param stride
may change due to LTO if fast linking is not used.

Fixes: e9f5de11d40 ("tu: Initial implementation of VK_EXT_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18773>

21 months agomesa: fix GL_INVALID_OPERATION in glEGLImageTargetTexStorageEXT
Simon Zeni [Mon, 3 Oct 2022 18:25:22 +0000 (14:25 -0400)]
mesa: fix GL_INVALID_OPERATION in glEGLImageTargetTexStorageEXT

Using EGLImages from DMA-BUF as target storage should return
GL_INVALID_OPERATION if the target is not GL_TEXTURE_2D or
GL_TEXTURE_EXTERNAL_OES.

Fixes: 6a3f5c65 ("mesa: simplify st_egl_image binding process for texture storage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18939

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18939>

21 months agoir3: Add missing cat5 encoding to asm parser
Connor Abbott [Mon, 26 Sep 2022 16:40:53 +0000 (18:40 +0200)]
ir3: Add missing cat5 encoding to asm parser

We were missing the case where there is a sampler and texture but the
texture offset is encoded in a1.x.

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

21 months agoir3/analyze_ubo_ranges: Account for reserved consts better
Connor Abbott [Mon, 26 Sep 2022 16:31:48 +0000 (18:31 +0200)]
ir3/analyze_ubo_ranges: Account for reserved consts better

It turns out that the ir3_setup_const_state() already includes reserved
consts, so we were accidentally counting it twice. This makes us use
less consts, and if there are enough reserved consts can make it go
negative and wrap around. Fix this while also making sure the previous
bug remains fixed.

Fixes: 8cb1deded60 ("ir3/analyze_ubo_ranges: Account for reserved consts")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>

21 months agoir3: Move fixup_regfootprint() to ir3_collect_info()
Connor Abbott [Mon, 26 Sep 2022 16:27:53 +0000 (18:27 +0200)]
ir3: Move fixup_regfootprint() to ir3_collect_info()

This fixes the case where fixup_regfootprint() adds to the reg footprint
but it isn't accounted for when determining whether we should double
threadsize in ir3_collect_info(). This would produce a hang on a650 and
above where we have a reg footprint of 33 and doubled threadsize.

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

21 months agoir3: Delete outputs from fixup_regfootprint()
Connor Abbott [Mon, 26 Sep 2022 16:12:04 +0000 (18:12 +0200)]
ir3: Delete outputs from fixup_regfootprint()

We weren't considering the number of components, which means that we
would overestimate the output size, which could result in nonsensical
things like a reg footprint of larger than r48.x. In addition, in some
cases we can force double regsize which would go badly if this
miscalculated the reg footprint, although currently this only happens
with compute shaders where there are no outputs. It's not actually
necessary anyway, because any output must come from an input or
something in the shader - this is how RA works. Just delete it.

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

21 months agov3dv/pipeline: use a array instead of individual pointer to stages
Alejandro Piñeiro [Thu, 29 Sep 2022 13:03:27 +0000 (15:03 +0200)]
v3dv/pipeline: use a array instead of individual pointer to stages

Before this commit we were using individual pointers to each pipeline
stage struct. We did that instead of an array because we needed to had
a pointer for the binner stages too, and at that time we didn't have a
enum to handle those stages.

Since then we introduced broadcom_shader_stage, and started to use in
a lot of places (and per-stage arrays) so we can now use an array.

The main advantage is being able to handle several cases as
loops. This also adds some consistency to the code (because as
mentioned, in a lot of other places we use an array).

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18943>

21 months agoaco: Use s_pack_ll for s_bfe operand on GFX9+.
Georg Lehmann [Mon, 3 Oct 2022 09:18:40 +0000 (11:18 +0200)]
aco: Use s_pack_ll for s_bfe operand on GFX9+.

Foz-DB Navi21:
Totals from 1 (0.00% of 134913) affected shaders:
CodeSize: 340 -> 336 (-1.18%)
Instrs: 77 -> 76 (-1.30%)
Latency: 1065 -> 1063 (-0.19%)
InvThroughput: 4260 -> 4252 (-0.19%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18936>

21 months agointel: revert preemption disable via VFG changes
Tapani Pälli [Mon, 3 Oct 2022 15:56:46 +0000 (18:56 +0300)]
intel: revert preemption disable via VFG changes

This register will not be whitelisted and this change will be
done in kernel instead.

This change reverts commits d5d4604addcd6b3827c5b93d.

Signed-off-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/18897>

21 months agonir_lower_to_source_mods: Don't sneek in an abs modifier from parent
Gert Wollny [Fri, 30 Sep 2022 13:27:13 +0000 (15:27 +0200)]
nir_lower_to_source_mods: Don't sneek in an abs modifier from parent

If the abs source modifiers is not supported for the current
instruction because it is an instruction with three sources we
may still see a parent mov that has the `abs` modifier. In this
case we must not propagate that abs modifier from that parent
instructions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7350

Fixes: cd73b6174b093b75f581c3310bf784bed7c74c1f
    nir/lower_to_source_mods: Stop turning add, sat, and neg into mov

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18902>

21 months agovulkan: update beta and video headers to 1.3.230
Dave Airlie [Mon, 3 Oct 2022 22:44:38 +0000 (08:44 +1000)]
vulkan: update beta and video headers to 1.3.230

Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18945>

21 months agogallium/tgsi: handle temps/outputs array.
Dave Airlie [Thu, 29 Sep 2022 04:24:20 +0000 (14:24 +1000)]
gallium/tgsi: handle temps/outputs array.

The old code used GetElementType on a pointer, to pick a path,
I cant find a test to hit the second path, so just hardcode it
for now.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agogallivm/tgsi: port tgsi to explicit types.
Dave Airlie [Wed, 28 Sep 2022 22:10:37 +0000 (08:10 +1000)]
gallivm/tgsi: port tgsi to explicit types.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agodraw: handle primid for tess being a different pointer type
Dave Airlie [Tue, 27 Sep 2022 05:26:23 +0000 (15:26 +1000)]
draw: handle primid for tess being a different pointer type

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agodraw: fix gs/tes explicit pointer handling
Dave Airlie [Mon, 26 Sep 2022 07:29:08 +0000 (17:29 +1000)]
draw: fix gs/tes explicit pointer handling

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agollvmpipe/fs/linear: port to explicit pointers.
Dave Airlie [Mon, 26 Sep 2022 08:35:39 +0000 (18:35 +1000)]
llvmpipe/fs/linear: port to explicit pointers.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agogallivm/llvmpipe: hand sample position type in for loading.
Dave Airlie [Tue, 27 Sep 2022 05:34:56 +0000 (15:34 +1000)]
gallivm/llvmpipe: hand sample position type in for loading.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agogallivm/sample: move border color load to explicit pointers
Dave Airlie [Mon, 26 Sep 2022 06:21:12 +0000 (16:21 +1000)]
gallivm/sample: move border color load to explicit pointers

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agogallivm/nir: fixup atomic path for explicit pointers.
Dave Airlie [Mon, 26 Sep 2022 08:16:08 +0000 (18:16 +1000)]
gallivm/nir: fixup atomic path for explicit pointers.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agogallivm/nir: move to explicit pointer interfaces.
Dave Airlie [Mon, 26 Sep 2022 07:05:35 +0000 (17:05 +1000)]
gallivm/nir: move to explicit pointer interfaces.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>

21 months agodocs: update venus extension support
Yiwei Zhang [Mon, 3 Oct 2022 19:32:28 +0000 (19:32 +0000)]
docs: update venus extension support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18940>

21 months agovenus: move vendor ext to bottom and sort the ext list
Yiwei Zhang [Mon, 3 Oct 2022 19:31:23 +0000 (19:31 +0000)]
venus: move vendor ext to bottom and sort the ext list

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18940>

21 months agoradv: Fix incorrect build info indexing
Konstantin Seurer [Sat, 1 Oct 2022 18:15:03 +0000 (20:15 +0200)]
radv: Fix incorrect build info indexing

Fixes: 8666b1f ("radv: Build acceleration structures using BVH IR")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18928>

21 months agoci/iris: Update iris traces checksums.
Emma Anholt [Thu, 8 Sep 2022 00:11:47 +0000 (17:11 -0700)]
ci/iris: Update iris traces checksums.

The previous commits in this MR caused a minor rendering change for
Unvanquished.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agoglsl: Remove lower_vec_index_to_swizzle.
Emma Anholt [Wed, 7 Sep 2022 14:03:43 +0000 (07:03 -0700)]
glsl: Remove lower_vec_index_to_swizzle.

GLSL's lower_vector_derefs already does this, and even if it didn't
nir_vector_extract() would when glsl-to-nir happens.

No effect on freedreno shader-db.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agoglsl: remove opt_structure_splitting.
Emma Anholt [Wed, 7 Sep 2022 13:34:03 +0000 (06:34 -0700)]
glsl: remove opt_structure_splitting.

nir_lower_vars_to_ssa will split temp structs up anyway.  This fixes a bug
where mediump wouldn't be propagated to the split vars.

The effect is tiny, I think just shuffling some code scheduling from
optimizing at different places.  Affects Natural Selection 2, Serious Sam
3, 3dmark slingshot, and Lego Legacy.

freedreno shader-db:
total instructions in shared programs: 11315637 -> 11315993 (<.01%)
instructions in affected programs: 24861 -> 25217 (1.43%)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agoglsl: Remove opt_array_splitting.
Emma Anholt [Wed, 7 Sep 2022 13:28:14 +0000 (06:28 -0700)]
glsl: Remove opt_array_splitting.

nir_lower_vars_to_ssa will split temp arrays up anyway.  Fixes a bug where
split arrays wouldn't get their precision qualifier.

Helps mostly Android and skia shaders.  Also affects Civ5, Witcher 2, and
Borderlands 2.

freedreno shader-db:
total instructions in shared programs: 11319395 -> 11319355 (<.01%)
instructions in affected programs: 65744 -> 65704 (-0.06%)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agoglsl: Remove do_set_program_inouts.
Emma Anholt [Wed, 7 Sep 2022 14:05:28 +0000 (07:05 -0700)]
glsl: Remove do_set_program_inouts.

No longer used since 214c774ba6c7 ("mesa/st: Remove st_glsl_to_tgsi.").

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agoglsl: Remove lower_output_reads.
Emma Anholt [Wed, 7 Sep 2022 13:01:54 +0000 (06:01 -0700)]
glsl: Remove lower_output_reads.

No longer used since 214c774ba6c7 ("mesa/st: Remove st_glsl_to_tgsi.").

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agonir/vars_to_ssa: Always do OOB load/store removal.
Emma Anholt [Thu, 29 Sep 2022 23:57:38 +0000 (16:57 -0700)]
nir/vars_to_ssa: Always do OOB load/store removal.

We elminated OOB loads while renaming vars to SSA.  However, if the OOB
load only appeared after some other passes had constant folded, there may
be no renaming work to do, at which point we'd leave the OOB load deref
around without renaming it or deleting it.  For vc4, this was quite a
surprise and caused a regression when we stop eliminating some OOB
accesses at the GLSL level.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18466>

21 months agod3d12: Updating refactored fields in pipe_h264_enc_picture_desc
Ruijing Dong [Fri, 30 Sep 2022 14:08:45 +0000 (10:08 -0400)]
d3d12: Updating refactored fields in pipe_h264_enc_picture_desc

Updating accesses to refactored fields in pipe_h264_enc_picture_desc

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agoradeonsi/vcn: support aspect ratio and vui timing info
Ruijing Dong [Thu, 29 Sep 2022 20:08:44 +0000 (16:08 -0400)]
radeonsi/vcn: support aspect ratio and vui timing info

add aspect ratio and vui timing info into vui
for both avc/hevc encoder.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agofrontends/va: add aspect ratio and vui timing info
Ruijing Dong [Thu, 29 Sep 2022 20:07:11 +0000 (16:07 -0400)]
frontends/va: add aspect ratio and vui timing info

add aspect ratio and vui timing info to va interface

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agoradeonsi/vcn: use avc seq paramters
Ruijing Dong [Thu, 29 Sep 2022 19:50:19 +0000 (15:50 -0400)]
radeonsi/vcn: use avc seq paramters

- use avc seq parameters
- clean up pipe_264_enc_picture_desc structure
- clean up get_param function

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agofrontends/va: apply avc seq parameters
Ruijing Dong [Thu, 29 Sep 2022 19:49:23 +0000 (15:49 -0400)]
frontends/va: apply avc seq parameters

using avc seq parameters

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agofrontends/omx: apply avc seq parameters
Ruijing Dong [Thu, 29 Sep 2022 19:47:27 +0000 (15:47 -0400)]
frontends/omx: apply avc seq parameters

change omx according to avc seq parameters

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agoradeonsi/vce: apply avc seq parameters
Ruijing Dong [Thu, 29 Sep 2022 19:45:56 +0000 (15:45 -0400)]
radeonsi/vce: apply avc seq parameters

just apply avc seq parameters

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agogallium/pipe/video: group avc encoder seq structure
Ruijing Dong [Thu, 29 Sep 2022 19:38:31 +0000 (15:38 -0400)]
gallium/pipe/video: group avc encoder seq structure

Prepare for using new seq structure

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18877>

21 months agonir/nir_opt_copy_prop_vars: Don't leak dynarray memory during the pass.
Emma Anholt [Thu, 29 Sep 2022 18:24:58 +0000 (11:24 -0700)]
nir/nir_opt_copy_prop_vars: Don't leak dynarray memory during the pass.

It was swept at the end, but it meant that in shaders with lots of copies
available at the start of lots of if statements, you'd blow up memory
usage.

turnip memory consumption on dEQP-VK.ssbo.layout.random.scalar.75 drops
from 1.4GB to 110MB, and runtime from 19s to 17s.

Fixes: #7361
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18891>

21 months agointel: Share code to read render timestamp
José Roberto de Souza [Fri, 30 Sep 2022 17:18:13 +0000 (10:18 -0700)]
intel: Share code to read render timestamp

Timestamp read is not in any hot path so there is no down-sides in
share the same function between iris, crocus, anv and hasvk.

Also while at it also dropping the functions to read MMIO from kernel,
the only use is read render timestamp so we don't need it.

v2:
- fix compilaton of ds

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18920>

21 months agopvr: Implement vkCmdExecuteCommands API.
Rajnesh Kanwal [Wed, 21 Sep 2022 15:19:45 +0000 (16:19 +0100)]
pvr: Implement vkCmdExecuteCommands API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>