platform/upstream/mesa.git
21 months agointel/genxml: add type annotations to gen_sort_tags.py
Dylan Baker [Fri, 30 Sep 2022 18:27:44 +0000 (11:27 -0700)]
intel/genxml: add type annotations to gen_sort_tags.py

let static analysis help us out

Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>

21 months agointel/genxml: don't use parens with python assert statement
Dylan Baker [Fri, 30 Sep 2022 18:00:57 +0000 (11:00 -0700)]
intel/genxml: don't use parens with python assert statement

assert is a statement in python, not a function. Useing parens with it
leads to madness, because assert takes two arguments in the form `assert
expression: bool, message: str`. With parens though it's tempting to
write `assert(expression, message)`, which results in an assert that is
*always* true, because a non-empty tuple (which is what is written) is
*never* false.

Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>

21 months agointel/genxml: use a set for lookups
Dylan Baker [Fri, 30 Sep 2022 17:59:15 +0000 (10:59 -0700)]
intel/genxml: use a set for lookups

Python will pre-compute the set since it's const, and the performance of
a set search is significantly better than that of a list search

Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>

21 months agointel/genxml: use a single pattern for res
Dylan Baker [Fri, 30 Sep 2022 17:58:16 +0000 (10:58 -0700)]
intel/genxml: use a single pattern for res

regex is expensive, do less of it.

Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>

21 months agodocs/release-calendar: add 22.3 schedule
Eric Engestrom [Thu, 22 Sep 2022 14:11:41 +0000 (16:11 +0200)]
docs/release-calendar: add 22.3 schedule

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

21 months agointel/compiler: Explicitly include build-id when linking intel_clc
Caio Oliveira [Sat, 1 Oct 2022 07:36:59 +0000 (00:36 -0700)]
intel/compiler: Explicitly include build-id when linking intel_clc

Ensure that the program will have a build-id.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18924>

21 months agoradeonsi: stop vectorizing unpack_32_2x16_split
Karol Herbst [Tue, 27 Sep 2022 17:08:41 +0000 (19:08 +0200)]
radeonsi: stop vectorizing unpack_32_2x16_split

nir_to_llvm can't deal with them being vectors.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agoac/llvm: fix load_ubo for vectors with more than 4 elements
Karol Herbst [Tue, 27 Sep 2022 22:22:39 +0000 (00:22 +0200)]
ac/llvm: fix load_ubo for vectors with more than 4 elements

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agoac/llvm: fix load/store_shared for vectors with more than 4 elements
Karol Herbst [Tue, 27 Sep 2022 18:10:37 +0000 (20:10 +0200)]
ac/llvm: fix load/store_shared for vectors with more than 4 elements

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agoac/llvm: fix load_const for vectors with more than 4 elements
Karol Herbst [Tue, 27 Sep 2022 14:45:05 +0000 (16:45 +0200)]
ac/llvm: fix load_const for vectors with more than 4 elements

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agoac/llvm: support non 32 bit sized workgroup ids
Karol Herbst [Sat, 24 Sep 2022 22:49:09 +0000 (00:49 +0200)]
ac/llvm: support non 32 bit sized workgroup ids

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agorusticl/kernel: assign locations before passing the nir to drivers
Karol Herbst [Sat, 24 Sep 2022 22:01:05 +0000 (00:01 +0200)]
rusticl/kernel: assign locations before passing the nir to drivers

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agorusticl: limit global mem to 2GB
Karol Herbst [Sat, 24 Sep 2022 19:09:32 +0000 (21:09 +0200)]
rusticl: limit global mem to 2GB

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>

21 months agoci/b2c: add support for the new format of CI_RUNNER_TAGS
Martin Roukala (né Peres) [Sat, 1 Oct 2022 03:46:19 +0000 (06:46 +0300)]
ci/b2c: add support for the new format of CI_RUNNER_TAGS

Seems like Gitlab did not follow their own documentation:

```
CI_RUNNER_TAGS  8.10  0.5  A comma-separated list of the runner tags.
```

But it would seem like a gitlab update brought json-style lists which
broke:

```
CI_RUNNER_TAGS = '["keywords-gateway", "CI-gateway"]'
```

This commit adds support for both style.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: John Brooks <john@fastquake.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18923>

21 months agorusticl/mem: align fill pattern buffer to 4 bytes
Karol Herbst [Wed, 28 Sep 2022 00:01:45 +0000 (02:01 +0200)]
rusticl/mem: align fill pattern buffer to 4 bytes

drivers might treat it as a uint32_t* buffer.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18853>

21 months agospirv: Enable OpEmitMeshTasksEXT workaround for Clay Shader Compiler
Caio Oliveira [Thu, 29 Sep 2022 20:30:31 +0000 (13:30 -0700)]
spirv: Enable OpEmitMeshTasksEXT workaround for Clay Shader Compiler

Clay Shader Compiler is the SPIR-V generator used by GravityMark benchmark.

Fixes #7368.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18894>

21 months agorusticl/mem: fix image OOB checks
Karol Herbst [Tue, 27 Sep 2022 22:49:00 +0000 (00:49 +0200)]
rusticl/mem: fix image OOB checks

The CL API puts the array layer on the height, where gallium puts it on
the depth. This is taken into account everywhere else, except for API
validation.

Fixes: 8b9a5adf8be ("rusticl/mem: return errors for OOB accesses")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18852>

21 months agodelete graw tests
Mike Blumenkrantz [Fri, 30 Sep 2022 03:00:41 +0000 (23:00 -0400)]
delete graw tests

These seem abandoned and they make interfaces changes less easy.

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

21 months agodelete rbug
Mike Blumenkrantz [Fri, 30 Sep 2022 03:00:28 +0000 (23:00 -0400)]
delete rbug

These seem abandoned and they make interfaces changes less easy.

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

21 months agoremove xvmc
Mike Blumenkrantz [Fri, 30 Sep 2022 02:59:29 +0000 (22:59 -0400)]
remove xvmc

These seem abandoned and they make interfaces changes less easy.

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

22 months agozink: set depth clamp
Mike Blumenkrantz [Tue, 27 Sep 2022 18:39:56 +0000 (14:39 -0400)]
zink: set depth clamp

this is correct according to spec

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

22 months agozink: define zink_pipeline_dynamic_state3 as zink_rasterizer_hw_state
Mike Blumenkrantz [Fri, 30 Sep 2022 15:40:58 +0000 (11:40 -0400)]
zink: define zink_pipeline_dynamic_state3 as zink_rasterizer_hw_state

this ensures the structs are kept in sync

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

22 months agozink: reenable GPL
Mike Blumenkrantz [Fri, 30 Sep 2022 04:38:07 +0000 (00:38 -0400)]
zink: reenable GPL

this is now functional again

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

22 months agozink: use an extra pipeline state bit to track coherent fbfetch usage for gpl outputs
Mike Blumenkrantz [Sun, 25 Sep 2022 16:40:57 +0000 (12:40 -0400)]
zink: use an extra pipeline state bit to track coherent fbfetch usage for gpl outputs

bringing parity to non-gpl codepath

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

22 months agozink: don't deref prog->shaders during pipeline construction
Mike Blumenkrantz [Sun, 25 Sep 2022 16:18:59 +0000 (12:18 -0400)]
zink: don't deref prog->shaders during pipeline construction

this may or may not be valid depending on (upcoming) threading changes,
and the nir pointers are all readily available

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

22 months agozink: reorder zink_destroy_gfx_program()
Mike Blumenkrantz [Sun, 25 Sep 2022 16:18:12 +0000 (12:18 -0400)]
zink: reorder zink_destroy_gfx_program()

this ensures that pipeline cache entries are freed before shaders

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

22 months agozink: move binding_map to hw_state part of vertex state
Mike Blumenkrantz [Fri, 23 Sep 2022 16:11:35 +0000 (12:11 -0400)]
zink: move binding_map to hw_state part of vertex state

this is used when dynamic states aren't used

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

22 months agozink: add param to disable optimization when combining pipeline libraries
Mike Blumenkrantz [Fri, 23 Sep 2022 02:24:49 +0000 (22:24 -0400)]
zink: add param to disable optimization when combining pipeline libraries

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

22 months agozink: require optimal_keys for GPL
Mike Blumenkrantz [Fri, 23 Sep 2022 02:24:25 +0000 (22:24 -0400)]
zink: require optimal_keys for GPL

this is pointless otherwise

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

22 months agozink: set VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
Mike Blumenkrantz [Fri, 23 Sep 2022 02:23:22 +0000 (22:23 -0400)]
zink: set VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT

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

22 months agozink: further compress zink_gfx_output_key lookups
Mike Blumenkrantz [Thu, 22 Sep 2022 21:23:44 +0000 (17:23 -0400)]
zink: further compress zink_gfx_output_key lookups

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

22 months agozink: compress zink_gfx_output_key members
Mike Blumenkrantz [Thu, 22 Sep 2022 21:13:10 +0000 (17:13 -0400)]
zink: compress zink_gfx_output_key members

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

22 months agozink: don't access prog->shaders array during pipeline compile
Mike Blumenkrantz [Tue, 27 Sep 2022 13:54:18 +0000 (09:54 -0400)]
zink: don't access prog->shaders array during pipeline compile

this may or may not have valid data

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

22 months agozink: add tgl ci skip
Mike Blumenkrantz [Fri, 30 Sep 2022 23:39:32 +0000 (19:39 -0400)]
zink: add tgl ci skip

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

22 months agovenus: Update mutable descriptor struct type
Dawn Han [Tue, 20 Sep 2022 17:24:32 +0000 (17:24 +0000)]
venus: Update mutable descriptor struct type

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>

22 months agovenus: support the promoted VK_EXT_mutable_descriptor_type
Dawn Han [Tue, 20 Sep 2022 01:22:51 +0000 (01:22 +0000)]
venus: support the promoted VK_EXT_mutable_descriptor_type

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>

22 months agogallivm: remove dead cube map lod calculation code
Roland Scheidegger [Thu, 29 Sep 2022 18:59:03 +0000 (20:59 +0200)]
gallivm: remove dead cube map lod calculation code

Since commit d413fd02190d ("gallivm: Always take the per-pixel LOD path
for cubemaps.") the special cube rho code was not used anymore.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18892>

22 months agovulkan/wsi/x11: Fix double free of modifiers.
Bas Nieuwenhuizen [Fri, 30 Sep 2022 22:10:46 +0000 (00:10 +0200)]
vulkan/wsi/x11: Fix double free of modifiers.

Breaks radv when modifiers are used.

Fixes: 8775f08bf11 ("vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7386
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7398
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18919>

22 months agozink: use more dynamic state3 when available
Mike Blumenkrantz [Tue, 14 Jun 2022 20:13:23 +0000 (16:13 -0400)]
zink: use more dynamic state3 when available

this is an all-or-nothing type of thing, where either all the blend/ms
states are available or they aren't

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

22 months agozink: use dynamic state3 rasterization states when available
Mike Blumenkrantz [Mon, 13 Jun 2022 21:05:56 +0000 (17:05 -0400)]
zink: use dynamic state3 rasterization states when available

this massively reduces the number of pipelines required

also temporarily disable GPL until a few more patches land since something's
weird and broken

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

22 months agolavapipe: improve blend handling on pipeline binds
Mike Blumenkrantz [Fri, 30 Sep 2022 18:06:40 +0000 (14:06 -0400)]
lavapipe: improve blend handling on pipeline binds

* use renderpass info for independent blend
* only reset blend state if no color attachments

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

22 months agoaco: fix assembler.gfx11.vinterp test
Rhys Perry [Tue, 27 Sep 2022 11:06:42 +0000 (12:06 +0100)]
aco: fix assembler.gfx11.vinterp test

This was missed. I guess CI doesn't have a recent enough LLVM for these
tests.

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

22 months agoaco: limit hard clauses to 63 instructions
Rhys Perry [Thu, 21 Jul 2022 15:16:16 +0000 (16:16 +0100)]
aco: limit hard clauses to 63 instructions

See https://reviews.llvm.org/D127391

fossil-db (gfx1100):
Totals from 4 (0.00% of 161689) affected shaders:
Latency: 24545 -> 24539 (-0.02%)
InvThroughput: 102867 -> 102835 (-0.03%)

fossil-db (navi10):
Totals from 4 (0.00% of 161220) affected shaders:
Latency: 25969 -> 25959 (-0.04%)
InvThroughput: 112917 -> 112869 (-0.04%)

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

22 months agoaco/gfx11: update form_hard_clauses
Rhys Perry [Thu, 21 Jul 2022 15:15:45 +0000 (16:15 +0100)]
aco/gfx11: update form_hard_clauses

See https://reviews.llvm.org/D127391

fossil-db (gfx1100):
Totals from 116 (0.07% of 161689) affected shaders:
Instrs: 124719 -> 124664 (-0.04%); split: -0.06%, +0.02%
CodeSize: 731660 -> 731440 (-0.03%); split: -0.04%, +0.01%
Latency: 2771695 -> 2771671 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1050309 -> 1050312 (+0.00%)
VClause: 3731 -> 3779 (+1.29%)

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

22 months agoaco/gfx11: deallocate VGPRs at the end of the shader
Rhys Perry [Thu, 21 Jul 2022 14:54:26 +0000 (15:54 +0100)]
aco/gfx11: deallocate VGPRs at the end of the shader

fossil-db (gfx1100):
Totals from 65987 (40.81% of 161689) affected shaders:
Instrs: 57123207 -> 57199947 (+0.13%)
CodeSize: 308402500 -> 308709460 (+0.10%)
Latency: 680527139 -> 680527160 (+0.00%)
InvThroughput: 131620026 -> 131620045 (+0.00%)

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

22 months agoaco: update sendmsg enum from LLVM
Rhys Perry [Thu, 21 Jul 2022 14:45:11 +0000 (15:45 +0100)]
aco: update sendmsg enum from LLVM

Add GFX11 enums and some new ones that apparently existed before.

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

22 months agoaco/gfx11: fix s_waitcnt printing
Rhys Perry [Thu, 21 Jul 2022 14:17:24 +0000 (15:17 +0100)]
aco/gfx11: fix s_waitcnt printing

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

22 months agoaco: improve wait_imm unpack
Rhys Perry [Thu, 21 Jul 2022 14:12:38 +0000 (15:12 +0100)]
aco: improve wait_imm unpack

Add GFX11 support and use wait_imm::unset_counter. Looping in the waitcnt
pass was probably broken on GFX11 because of this.

fossil-db (gfx1100):
Totals from 899 (0.56% of 161689) affected shaders:
Instrs: 1319368 -> 1319179 (-0.01%)
CodeSize: 7124640 -> 7123884 (-0.01%)
Latency: 26554304 -> 26404606 (-0.56%)
InvThroughput: 9032485 -> 8978773 (-0.59%); split: -0.59%, +0.00%

No navi10 fossil-db changes.

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

22 months agoaco/gfx11: swap ds_cmpst_* data operands
Rhys Perry [Wed, 13 Jul 2022 17:42:21 +0000 (18:42 +0100)]
aco/gfx11: swap ds_cmpst_* data operands

According to an LLVM comment, these are swapped in GFX11.

No fossil-db changes.

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

22 months agozink: enable loop unrolling for loops that have soft fp64
SoroushIMG [Tue, 27 Sep 2022 10:18:11 +0000 (11:18 +0100)]
zink: enable loop unrolling for loops that have soft fp64

The info that a loop contains fp64 ops is lost after full
software lowering.
Therefore, specifically unroll these loops in zink instead of
in vulkan, where the blown up body is no longer unrolled.
This helps a lot in KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2.

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

22 months agonir: allow to fine tune unrolling for loops with soft fp64 ops
SoroushIMG [Thu, 29 Sep 2022 14:04:21 +0000 (15:04 +0100)]
nir: allow to fine tune unrolling for loops with soft fp64 ops

Lowered fp64 ops can blow up the loop bodies while still being
suitable for unrolling.
Allow for using different parameters to unroll loops with
soft fp64.

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

22 months agonir: track whether a loop contains soft fp64 ops
SoroushIMG [Thu, 29 Sep 2022 13:59:06 +0000 (14:59 +0100)]
nir: track whether a loop contains soft fp64 ops

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

22 months agozink: fix spirv temp func variable class emission
SoroushIMG [Mon, 26 Sep 2022 22:19:02 +0000 (23:19 +0100)]
zink: fix spirv temp func variable class emission

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

22 months agozink: fix nir_op_unpack_64_2x32 emission
SoroushIMG [Wed, 21 Sep 2022 19:49:43 +0000 (20:49 +0100)]
zink: fix nir_op_unpack_64_2x32 emission

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>

22 months agozink: lower 64bit pack when float64 not supported
SoroushIMG [Wed, 21 Sep 2022 20:20:54 +0000 (21:20 +0100)]
zink: lower 64bit pack when float64 not supported

SPIRV ops for 64bit pack/unpack require float64 cap.

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

22 months agozink: optimise lower_64bit_vars for when int64 is supported
SoroushIMG [Wed, 21 Sep 2022 19:52:28 +0000 (20:52 +0100)]
zink: optimise lower_64bit_vars for when int64 is supported

There are vulkan drivers that support Int64 but not Float64.
Optimise the 64bit lowering by converting doubles to uint64,
but keep matrix lowerig to float as glsl int64 matrices do
not exist.

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

22 months agozink: lower 64bit vars for drivers without float64
SoroushIMG [Wed, 21 Sep 2022 19:59:37 +0000 (20:59 +0100)]
zink: lower 64bit vars for drivers without float64

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

22 months agozink: call flush_resource when presenting garbage
Mike Blumenkrantz [Fri, 30 Sep 2022 12:53:59 +0000 (08:53 -0400)]
zink: call flush_resource when presenting garbage

this ensures the resource is queued for presentation

fixes #7359

Fixes: babf9474c43 ("zink: rework flush_frontbuffer to always flush")

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

22 months agoci: Remove Wno-error=stringop-truncation from debian-arm64-asan
Corentin Noël [Thu, 15 Sep 2022 13:56:09 +0000 (15:56 +0200)]
ci: Remove Wno-error=stringop-truncation from debian-arm64-asan

All the warnings are now fixed.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>

22 months agogallium/hud: use snprintf(..., "%s", ...) instead of strncpy
Corentin Noël [Thu, 15 Sep 2022 12:55:52 +0000 (14:55 +0200)]
gallium/hud: use snprintf(..., "%s", ...) instead of strncpy

This fixes a warning with stringop-truncation:
```
error: 'strncpy' output may be truncated copying 127 bytes from a string of length 255 [-Werror=stringop-truncation]
 1443 |             strncpy(graph->name, s, sizeof(graph->name)-1);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>

22 months agomesa/main: do not copy the exact size of the string
Corentin Noël [Thu, 15 Sep 2022 12:49:22 +0000 (14:49 +0200)]
mesa/main: do not copy the exact size of the string

This fixes a compiler warning with stringop-truncation:
```
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
  286 |    strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>

22 months agoaco: add VMEMtoScalarWriteHazard tests
Rhys Perry [Fri, 26 Aug 2022 10:46:06 +0000 (11:46 +0100)]
aco: add VMEMtoScalarWriteHazard tests

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

22 months agoaco: improve printing of s_waitcnt_depctr
Rhys Perry [Thu, 21 Jul 2022 14:13:57 +0000 (15:13 +0100)]
aco: improve printing of s_waitcnt_depctr

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

22 months agoaco: improve printing of sgpr_null
Rhys Perry [Thu, 21 Jul 2022 14:13:46 +0000 (15:13 +0100)]
aco: improve printing of sgpr_null

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

22 months agoaco: use some helpers in GFX10 hazard workarounds
Rhys Perry [Thu, 25 Aug 2022 19:07:41 +0000 (20:07 +0100)]
aco: use some helpers in GFX10 hazard workarounds

No fossil-db changes.

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

22 months agoaco: improve VMEMtoScalarWriteHazard s_waitcnt mitigation
Rhys Perry [Thu, 25 Aug 2022 19:40:31 +0000 (20:40 +0100)]
aco: improve VMEMtoScalarWriteHazard s_waitcnt mitigation

fossil-db (navi10):
Totals from 171 (0.13% of 134563) affected shaders:
Instrs: 69348 -> 69144 (-0.29%)
CodeSize: 381112 -> 380296 (-0.21%)
Latency: 451534 -> 451387 (-0.03%)
InvThroughput: 88692 -> 88686 (-0.01%)

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

22 months agoaco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation
Rhys Perry [Thu, 25 Aug 2022 19:04:01 +0000 (20:04 +0100)]
aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation

It doesn't make sense for a "s_waitcnt vmcnt(0)" to affect a store or DS
instruction.

LLVM checks for "s_waitcnt vmcnt(0) lgkmcnt(0) expcnt(0)" but ignores
s_waitcnt_vscnt (which I assume is a bug).

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: bcf94bb933e ("aco: properly recognize that s_waitcnt mitigates VMEMtoScalarWriteHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>

22 months agonir/opt_algebraic: Optimize more (a cmp b ? a : b) to min/max.
Georg Lehmann [Mon, 12 Sep 2022 11:12:18 +0000 (13:12 +0200)]
nir/opt_algebraic: Optimize more (a cmp b ? a : b) to min/max.

Foz-DB Navi21:
Totals from 112 (0.08% of 134913) affected shaders:
CodeSize: 1618384 -> 1618172 (-0.01%); split: -0.06%, +0.04%
Instrs: 307695 -> 307535 (-0.05%); split: -0.05%, +0.00%
Latency: 3590228 -> 3589658 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 563692 -> 563447 (-0.04%); split: -0.05%, +0.01%
Copies: 24541 -> 24519 (-0.09%); split: -0.10%, +0.01%
Branches: 13480 -> 13468 (-0.09%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18548>

22 months agopvr: Implement vkGetEventStatus API.
Rajnesh Kanwal [Thu, 22 Sep 2022 11:08:00 +0000 (12:08 +0100)]
pvr: Implement vkGetEventStatus 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/18864>

22 months agopvr: Add assert to check for non-NULL binding_desc.
Rajnesh Kanwal [Sun, 25 Sep 2022 19:36:41 +0000 (20:36 +0100)]
pvr: Add assert to check for non-NULL binding_desc.

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

22 months agopvr: Call VALGRIND_FREELIKE_BLOCK before unmapping to avoid use after free.
Rajnesh Kanwal [Sun, 25 Sep 2022 19:25:18 +0000 (20:25 +0100)]
pvr: Call VALGRIND_FREELIKE_BLOCK before unmapping to avoid use after free.

Fixes: CID 1503261.

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

22 months agopvr: Fix Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) errors.
Rajnesh Kanwal [Sun, 25 Sep 2022 19:11:53 +0000 (20:11 +0100)]
pvr: Fix Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) errors.

Fixes: CID 1503255, 1503258, 1503265, 1503268, 1504078, 1507509.

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

22 months agopvr: Zero init pbe_cs_words to avoid passing on garbage.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:52:10 +0000 (19:52 +0100)]
pvr: Zero init pbe_cs_words to avoid passing on garbage.

In case if the surface->resolve_type is not PVR_RESOLVE_TYPE_PBE
then we do not setup pbe_cs_words in which case we might end up
using garbage values.

Fixes: CID 1515466.

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

22 months agopvr: Remove dead code from pvr_perform_start_of_render_clears.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:47:43 +0000 (19:47 +0100)]
pvr: Remove dead code from pvr_perform_start_of_render_clears.

Logically the hw_render would never be NULL so the if block is
never used and can be removed.

Fixes: CID1503270.

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

22 months agopvr: Remove framebuffer NULL check from pvr_CmdBeginRenderPass2.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:43:47 +0000 (19:43 +0100)]
pvr: Remove framebuffer NULL check from pvr_CmdBeginRenderPass2.

Framebuffer can not be NULL in pvr_CmdBeginRenderPass2.

Fixes: CID 1503259.

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

22 months agopvr: Remove redundant assignment error.instruction.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:39:31 +0000 (19:39 +0100)]
pvr: Remove redundant assignment error.instruction.

Fixes: CID 1503256.

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

22 months agopvr: Remove redundant instruction buffer check.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:38:37 +0000 (19:38 +0100)]
pvr: Remove redundant instruction buffer check.

Fixes: CID 1503273.

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

22 months agopvr: Convert attachment indexes to unsigned.
Rajnesh Kanwal [Sun, 25 Sep 2022 18:20:22 +0000 (19:20 +0100)]
pvr: Convert attachment indexes to unsigned.

This commit converts attachment indexes used in renderpass to unsigned
and uses VK_ATTACHMENT_UNUSED for unused attachments instead of -1.

Also fixes some signed to unsigned comparisons.

Fixed: CID 1515587, 1515590, 1515597, 1515604.

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

22 months agoanv: limit to default fast clear color when image used for transfer
Tapani Pälli [Tue, 27 Sep 2022 05:42:13 +0000 (08:42 +0300)]
anv: limit to default fast clear color when image used for transfer

v2: use vk_image_layout_to_usage_flags for detecting
    transfer usage (Nanley)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7189
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18836>

22 months agopvr: Handle indirect buffer address in pvr_setup_descriptor_mappings.
Rajnesh Kanwal [Thu, 22 Sep 2022 14:39:32 +0000 (15:39 +0100)]
pvr: Handle indirect buffer address in pvr_setup_descriptor_mappings.

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

22 months agopvr: implement vkcmddispatchindirect api.
Rajnesh Kanwal [Thu, 22 Sep 2022 13:36:02 +0000 (14:36 +0100)]
pvr: implement vkcmddispatchindirect 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/18872>

22 months agoradv: enable the unified heap on APUs for Red Dead Redemption 2
Samuel Pitoiset [Thu, 29 Sep 2022 12:49:34 +0000 (14:49 +0200)]
radv: enable the unified heap on APUs for Red Dead Redemption 2

This seems to resolve the memory explosion without hurting performance.
This workaround is only applied for native Vulkan.

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

22 months agoradv: add a new drirc option to enable a unified heap on APUs
Samuel Pitoiset [Tue, 27 Sep 2022 17:46:53 +0000 (19:46 +0200)]
radv: add a new drirc option to enable a unified heap on APUs

This option (radv_enable_unified_heap_on_apu) allows to force the
driver to expose only one heap of VRAM because some games seem to
perform better with that.

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

22 months agozink: enable glthread by default
Mike Blumenkrantz [Tue, 27 Sep 2022 20:11:01 +0000 (16:11 -0400)]
zink: enable glthread by default

huge perf gains.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>

22 months agopipe-loader: fix zink driinfo header path
Mike Blumenkrantz [Tue, 27 Sep 2022 21:06:28 +0000 (17:06 -0400)]
pipe-loader: fix zink driinfo header path

this feels like a compiler bug, but somehow just specifying the
shorter path ends up with a broken/partial header include

Fixes: d760a9151b7 ("gallium: Learn about kopper")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>

22 months agozink: export PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE
Mike Blumenkrantz [Tue, 27 Sep 2022 20:04:49 +0000 (16:04 -0400)]
zink: export PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>

22 months agozink: export PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION
Mike Blumenkrantz [Tue, 27 Sep 2022 20:04:39 +0000 (16:04 -0400)]
zink: export PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>

22 months agozink: fix/improve handling for multi-component bitfield ops
Mike Blumenkrantz [Tue, 20 Sep 2022 15:42:41 +0000 (11:42 -0400)]
zink: fix/improve handling for multi-component bitfield ops

the original improvement for this correctly handled cases where
the offset/count values were swizzled with .xxxx, but it was broken
for any other swizzling

this adds a nir pass to more easily manipulate the swizzles and rewrite
the multi-component ops as multiple ops with the swizzled params

fixes #6697

Fixes: 8e97f51c676 ("zink: handle swizzled offset/count values for shader bitfield ops")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18706>

22 months agollvmpipe/fs: convert outputs handling to explicit api
Dave Airlie [Wed, 28 Sep 2022 22:26:01 +0000 (08:26 +1000)]
llvmpipe/fs: convert outputs handling to explicit api

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

22 months agollvmpipe/fs: cleanup some remaining mask handling and reuse types
Dave Airlie [Wed, 28 Sep 2022 22:25:42 +0000 (08:25 +1000)]
llvmpipe/fs: cleanup some remaining mask handling and reuse types

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

22 months agollvmpipe/fs: handle explicit types around blending and c/zs bufs calcs
Dave Airlie [Wed, 28 Sep 2022 22:24:44 +0000 (08:24 +1000)]
llvmpipe/fs: handle explicit types around blending and c/zs bufs calcs

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

22 months agollvmpipe/fs: use explicit api in viewport code.
Dave Airlie [Wed, 28 Sep 2022 22:20:25 +0000 (08:20 +1000)]
llvmpipe/fs: use explicit api in viewport code.

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

22 months agollvmpipe/fs: pass mask type to alpha to coverage handler
Dave Airlie [Wed, 28 Sep 2022 22:19:44 +0000 (08:19 +1000)]
llvmpipe/fs: pass mask type to alpha to coverage handler

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

22 months agollvmpipe/fs: add sample position type to the interp interface
Dave Airlie [Wed, 28 Sep 2022 22:17:35 +0000 (08:17 +1000)]
llvmpipe/fs: add sample position type to the interp interface

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

22 months agollvmpipe/fs: port depth code to opaque pointer api
Dave Airlie [Wed, 28 Sep 2022 22:15:28 +0000 (08:15 +1000)]
llvmpipe/fs: port depth code to opaque pointer api

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

22 months agollvmpipe/fs: pass explicit mask_type into interp code.
Dave Airlie [Mon, 26 Sep 2022 07:36:58 +0000 (17:36 +1000)]
llvmpipe/fs: pass explicit mask_type into interp code.

This is so it is known for explicit pointer support

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

22 months agollvmpipe/fs: add mask_type for mask_store accesses.
Dave Airlie [Mon, 26 Sep 2022 03:55:57 +0000 (13:55 +1000)]
llvmpipe/fs: add mask_type for mask_store accesses.

This adds and passes around the type for mask stores.

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

22 months agogallivm/struct: add opaque ptr friendly pointer accessors.
Dave Airlie [Mon, 26 Sep 2022 03:47:15 +0000 (13:47 +1000)]
gallivm/struct: add opaque ptr friendly pointer accessors.

These just add explicit types.

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

22 months agoRevert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"
Kenneth Graunke [Fri, 30 Sep 2022 00:39:18 +0000 (17:39 -0700)]
Revert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"

This reverts commit abba55382f5588e3b9dfbc517d5fe940b2917c7c.
The assertions I added late in the process broke shader-db, and my
quick fix broke CI, so let's just revert it for now and I'll resubmit
this later when it's working better.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7385
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18895>

22 months agofreedreno/ir3: Validate our scheduling DAGs after construction.
Eric Anholt [Tue, 8 Sep 2020 21:39:51 +0000 (14:39 -0700)]
freedreno/ir3: Validate our scheduling DAGs after construction.

This gives us some better explanation of a stack overflow in ir3_postsched
with shader-db:

IR3_SHADER_DEBUG=nouboopt ./run shaders/nexuiz/46.shader_test

DAG validation failed at:
  0x55f6570e8460: 0079:0107:002:  _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000:  mov.u32u32], _[0112:0143:000:  mov.u32u32], _[0087:0113:000:  mov.u32u32], _[0113:0144:000:  mov.u32u32], _[0099:0127:000:  mov.u32u32], _[0088:0114:000:  mov.u32u32]

Nodes in stack:
  0x55f657102050: 0079:0103:009:  mov.u32u32 r1.w, r0.x, right=_[0080:0104:009:  mov.u32u32]

  0x55f6570e8460: 0079:0107:002:  _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000:  mov.u32u32], _[0112:0143:000:  mov.u32u32], _[0087:0113:000:  mov.u32u32], _[0113:0144:000:  mov.u32u32], _[0099:0127:000:  mov.u32u32], _[0088:0114:000:  mov.u32u32]

  0x55f657075f80: 0083:0108:007:  samgq (f32)(xyz)r0.z (wrmask=0x7), r1.w (wrmask=0xff), s#3, t#3

  0x55f657051b60: 0104:0134:008:  ldc.offset0 r3.x (wrmask=0xf), imm[0.000000,0,0x0], r9.w

  0x55f657103040: 0112:0143:000:  mov.u32u32 r9.w, r0.x, right=_[0113:0144:000:  mov.u32u32]

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