Alyssa Rosenzweig [Sun, 25 Sep 2022 23:26:58 +0000 (19:26 -0400)]
agx: Check that we don't push too much
Currently we don't have a good mechanism for this other than being
careful... assert() at least. The long term plan is to lift the
UBO/VBO lowerings into NIR, making the sysval requirements visible in
the NIR. (And possibly moving to a descriptor set model to better match
Vulkan? I need to talk to jekstrand about what we want to do here long
term.)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sun, 25 Sep 2022 18:16:31 +0000 (14:16 -0400)]
agx: Be less sloppy about high uniforms
We need 9-bits to index into the uniform file. Fix an overflow and add
some asserts to try to catch these issues earlier.
Sigh, C.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sun, 25 Sep 2022 23:50:16 +0000 (19:50 -0400)]
asahi: Support preamble shaders
Extend the compiler/driver ABI to attach preambles, and plumb them into
the USC hardware when needed. This is the easy part!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sat, 22 Oct 2022 14:28:47 +0000 (10:28 -0400)]
asahi: Add group tests
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sat, 22 Oct 2022 14:00:12 +0000 (10:00 -0400)]
asahi: Don't use unnecessary test fixture
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sat, 22 Oct 2022 13:59:50 +0000 (09:59 -0400)]
asahi: Rename LOD clamps tests to fit other packing
We'll use for testing the "groups" encoding.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Fri, 21 Oct 2022 01:11:02 +0000 (21:11 -0400)]
asahi: Use USC_UNIFORM_HIGH
Abstract it away so we get access to the full uniform file without
special cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Thu, 20 Oct 2022 22:42:13 +0000 (18:42 -0400)]
asahi: Make agx_varyings a union
More accurate.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Tue, 18 Oct 2022 21:03:35 +0000 (17:03 -0400)]
asahi: Remove "padding" field
Trivial.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Fri, 14 Oct 2022 03:08:11 +0000 (23:08 -0400)]
asahi: Identify more shader-related fields
The big discovery is the "number of uniform registers" field. I learned
about this one accidentally when my preamble shaders weren't working
right, because we had inadvertently hardcoded "at most 32 registers" :-)
In the course of identifying that field, I found that the pipeline
address is used as a tagged pointer, with some unknown field in the
bottom bits and alignment demanded. The XML is updated to account for
this.
I later found that there's also a "number of general purpose registers
used by the preamble shader" field. I missed this one first, because the
encoding is slightly different from the usual "number of general purpose
registers in the main shader" field. The specification is slightly
coarser. I don't know why the hardware needs that
information anyway -- occupancy of the preamble shader should be
irrelevant -- but it's not a big deal.
Finally I found that the "more than 4 textures?" bit is... not that. I
do not yet know what it is, but it is... not that.
These all use the new groups() modifier for GenXML
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Mon, 17 Oct 2022 00:47:18 +0000 (20:47 -0400)]
asahi: Identify "Uniform high" USC word
The start field in the Uniform USC word is only 8-bits, whereas 9-bits
are required to address the entire uniform register file. This other
word gets used for the high half, with start indexed from u128l in
the natural way.
Apparently spending the evening stuffing too many uniforms into Metal is
paying off.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sun, 31 Jul 2022 17:45:00 +0000 (13:45 -0400)]
asahi: Route shader-db stats to debug callback
This way multithreading works correctly in shader-db including CPU time account.
Code from v3d via panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Thu, 9 Jun 2022 12:50:35 +0000 (08:50 -0400)]
asahi: Precompile for shader-db
This gets shader-db's runner working, in conjunction with a shader-db ./run
modified to set ASAHI_MESA_DEBUG=precompile. This flag triggers precompiles of
all shaders witha default key so we can exercise the compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Thu, 9 Jun 2022 13:42:58 +0000 (09:42 -0400)]
asahi: Remove AGX_FAKE_DEVICE environment variable
The proper way to fake a device on Linux will be drm-shim.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sat, 22 Oct 2022 18:50:58 +0000 (14:50 -0400)]
agx: Remove command line compiler
It has not been used in quite some time but adds maintainence burden.
Its function is replaced by drm-shim in conjunction with shader-db's
./run, which goes through the actual driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Sun, 25 Sep 2022 02:26:58 +0000 (22:26 -0400)]
nir/opt_preamble: Move load_texture_base_agx
nir_opt_preamble will be crucial to optimize out the lowering for array
textures on AGX, which involves this AGX-specific sysval.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
Alyssa Rosenzweig [Fri, 21 Oct 2022 02:42:39 +0000 (22:42 -0400)]
asahi: Hold a reference to BOs in a batch
Fixes GPU-side use after frees, e.g. in dEQP-GLES2.functional.texture.vertex.2d.wrap.clamp_mirror
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19215>
Georg Lehmann [Mon, 10 Oct 2022 11:56:51 +0000 (13:56 +0200)]
nir: Fix ifind_msb_rev constant folding.
For example if src0 is 0x80000000 we should return 1, not 0.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes:
a5747f8ab35 ("nir: add opcodes for *find_msb_rev and lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18951>
Georg Lehmann [Tue, 4 Oct 2022 14:02:28 +0000 (16:02 +0200)]
nir/opt_algebraic: Optimize various find_msb_rev patterns.
From dxvk, dxil-spirv, fxc, dxc and others.
Totals from 177 (0.13% of 134913) affected shaders:
CodeSize: 1079504 -> 1059872 (-1.82%)
Instrs: 195381 -> 192269 (-1.59%)
Latency: 3664137 -> 3631951 (-0.88%)
InvThroughput: 599479 -> 585675 (-2.30%)
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/18951>
Georg Lehmann [Tue, 4 Oct 2022 13:44:16 +0000 (15:44 +0200)]
radv,aco: Lower uclz in NIR.
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/18951>
Georg Lehmann [Tue, 4 Oct 2022 13:38:58 +0000 (15:38 +0200)]
nir/opt_algebraic: Add an option to lower uclz.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18951>
Georg Lehmann [Tue, 4 Oct 2022 13:24:59 +0000 (15:24 +0200)]
ac/llvm: Implement [ui]find_msb_rev.
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/18951>
Georg Lehmann [Tue, 4 Oct 2022 13:08:06 +0000 (15:08 +0200)]
aco: Implement [ui]find_msb_rev.
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/18951>
Georg Lehmann [Tue, 4 Oct 2022 12:32:50 +0000 (14:32 +0200)]
nir/opt_algebraic: Mirror optimizations for find_msb_rev.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18951>
Konstantin Seurer [Thu, 20 Oct 2022 18:54:26 +0000 (20:54 +0200)]
radv/rt: Fix setting tmax for opaque AABBs
data->vars->tmax will be overwritten by inner_vars.tmax so we have to
set inner_vars.tmax instead. This probably doesn't affect anything in
practise.
cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19207>
Emma Anholt [Wed, 19 Oct 2022 22:54:18 +0000 (15:54 -0700)]
nir/opt_phi_precision: Fix missing swizzles when narrowing phi srcs.
This NIR:
vec4 32 ssa_169 = phi block_1: ssa_168, block_2: ssa_138
vec1 16 ssa_209 = f2fmp ssa_169.x
vec1 16 ssa_210 = f2fmp ssa_169.y
vec1 16 ssa_211 = f2fmp ssa_169.z
vec1 16 ssa_212 = f2fmp ssa_169.w
vec4 16 ssa_213 = vec4 ssa_209, ssa_210, ssa_211, ssa_212
intrinsic store_output (ssa_213, ssa_171) (base=0, wrmask=xyzw /*15*/, component=0, src_type=float16 /*144*/, io location=4 slots=1 mediump /*8388740*/, xfb() /*0*/, xfb2() /*0*/)
would turn into:
vec4 32 ssa_169 = phi block_1: ssa_168, block_2: ssa_138
vec4 16 ssa_216 = phi block_1: ssa_214, block_2: ssa_215
vec1 16 ssa_209 = f2fmp ssa_169.x
vec1 16 ssa_210 = f2fmp ssa_169.y
vec1 16 ssa_211 = f2fmp ssa_169.z
vec1 16 ssa_212 = f2fmp ssa_169.w
vec4 16 ssa_213 = vec4 ssa_216.x, ssa_216.x, ssa_216.x, ssa_216.x
intrinsic store_output (ssa_213, ssa_171) (base=0, wrmask=xyzw /*15*/, component=0, src_type=float16 /*144*/, io location=4 slots=1 mediump /*8388740*/, xfb() /*0*/, xfb2() /*0*/)
ignoring the swizzles from the f2fmp srcs. Fixes failures in
dEQP-GLES2.functional.shaders.random.all_features.fragment.20 on
turnip+ANGLE.
Fixes:
c7b935962b27 ("nir: Add pass to lower phi precision")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19179>
Yonggang Luo [Fri, 21 Oct 2022 13:36:24 +0000 (21:36 +0800)]
ci/macos: Building both dri and xlib version of glx
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
Yonggang Luo [Fri, 21 Oct 2022 14:07:37 +0000 (22:07 +0800)]
xlib: Remove macro guard with GLX_INDIRECT_RENDERING in xlib.c
According meson about with_glx == 'xlib' check only defied '-DUSE_XSHM',
so the macro check GLX_INDIRECT_RENDERING make no-sense, removed it.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
Yonggang Luo [Fri, 21 Oct 2022 11:17:08 +0000 (19:17 +0800)]
meson: with_glx never assigned to 'gallium-xlib', remove 'gallium-xlib'
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
Yonggang Luo [Fri, 21 Oct 2022 11:16:28 +0000 (19:16 +0800)]
meson: with_glx never assigned to 'gallium-xlib', so need add with_glx == 'xlib' for dep_glproto
Fixes:
76791db0882b3715cd7d ("mesa/x11: Remove the swrast-classic-based fake libGL")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19221>
Thomas H.P. Andersen [Tue, 18 Oct 2022 02:25:01 +0000 (04:25 +0200)]
vulkan: drop const for descriptor set
drivers should be able to update the reference count
member of the vk_descriptor_set_layout struct
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19132>
Mike Blumenkrantz [Thu, 20 Oct 2022 17:00:30 +0000 (13:00 -0400)]
zink: fix ds3 line stipple enable handling
ds3 can be used without line stipple enable if the driver doesn't support
line stipple, so this needs special-casing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19204>
Mike Blumenkrantz [Thu, 20 Oct 2022 17:00:06 +0000 (13:00 -0400)]
zink: fix duplicate VK_DYNAMIC_STATE_LINE_STIPPLE_EXT setting
if ds3 is used, this is already set above
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19204>
Alyssa Rosenzweig [Wed, 5 Oct 2022 16:12:47 +0000 (12:12 -0400)]
panfrost: Remove NIR_SERIALIZED support
Only used by Clover (due to the dynamic pipeloader), which we never
shipped support for. We'll do OpenCL via Rusticl, which does not use the
dynamic pipeloader.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18972>
Rhys Perry [Thu, 20 Oct 2022 14:47:02 +0000 (15:47 +0100)]
aco/gfx11: optimize LS/HS load_local_invocation_index
fossil-db (gfx1100):
Totals from 1361 (1.01% of 135032) affected shaders:
Instrs: 501227 -> 500469 (-0.15%); split: -0.16%, +0.01%
CodeSize: 2730012 -> 2724820 (-0.19%); split: -0.20%, +0.00%
VGPRs: 63716 -> 63688 (-0.04%)
Latency: 2228848 -> 2228858 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 878418 -> 878275 (-0.02%); split: -0.02%, +0.00%
VClause: 14866 -> 14868 (+0.01%); split: -0.03%, +0.04%
SClause: 16674 -> 16645 (-0.17%); split: -0.22%, +0.05%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19196>
Rhys Perry [Wed, 19 Oct 2022 17:34:12 +0000 (18:34 +0100)]
ac/llvm: ignore g16 if the image opcode doesn't use derivatives
g16 is irrelevant in this case.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19198>
Rhys Perry [Wed, 19 Oct 2022 17:17:29 +0000 (18:17 +0100)]
ac/llvm: fix mixing non-uniform/uniform sampler/texture descriptors
Non-uniform descriptors are not loaded in NIR and instead the pointer is
passed to abi->load_sampler_desc. It can be the case that only the texture
or sampler uses this path.
For the descriptor which doesn't use the path, we would previously pass
NULL to abi->load_sampler_desc.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19198>
Damian Korczowski [Fri, 21 Oct 2022 11:00:09 +0000 (11:00 +0000)]
d3d12: Fix placed footprint of subresources
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19220>
Sil Vilerino [Fri, 21 Oct 2022 13:58:35 +0000 (09:58 -0400)]
d3d12: HEVC Decode - Fix slice size and offsets translation from VA to DXVA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19231>
Samuel Pitoiset [Fri, 21 Oct 2022 14:05:42 +0000 (16:05 +0200)]
radv: disable AMD_shader_explicit_vertex_parameter on GFX11
Not supported by ACO.
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/19230>
Samuel Pitoiset [Fri, 21 Oct 2022 14:04:48 +0000 (16:04 +0200)]
radv: disable VK_AMD_texture_gather_bias_lod on GFX11
image_gather4_b_o no longer exists apparently, so this is likely
broken.
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/19230>
Samuel Pitoiset [Mon, 30 May 2022 13:51:31 +0000 (15:51 +0200)]
radv: advertise VK_EXT_extended_dynamic_state3
Some tricky dynamic states still need to be implemented for full ds3
support with Zink, I will implement them later.
Pass dEQP-VK.pipeline.*extended_dynamic_state* on NAVI21.
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 13:35:57 +0000 (15:35 +0200)]
radv: add support for dynamic depth clamp enable
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 12:41:56 +0000 (14:41 +0200)]
radv: add support for dynamic provoking vertex mode
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 11:34:50 +0000 (13:34 +0200)]
radv: add support for dynamic depth clip negative one to one
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 11:27:21 +0000 (13:27 +0200)]
radv: add support for dynamic conservative rasterization mode
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 11:21:46 +0000 (13:21 +0200)]
radv: add support for dynamic depth clip enable
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 09:03:12 +0000 (11:03 +0200)]
radv: add support for dynamic sample mask
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 08:59:03 +0000 (10:59 +0200)]
radv: add support for dynamic alpha to coverage enable
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/18882>
Samuel Pitoiset [Wed, 24 Aug 2022 08:58:31 +0000 (10:58 +0200)]
radv: add support for dynamic line stipple enable
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/18882>
Samuel Pitoiset [Tue, 31 May 2022 09:29:07 +0000 (11:29 +0200)]
radv: add support for dynamic logic op enable
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/18882>
Samuel Pitoiset [Tue, 31 May 2022 09:04:49 +0000 (11:04 +0200)]
radv: add support for dynamic tessellation domain origin
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/18882>
Samuel Pitoiset [Tue, 31 May 2022 09:04:19 +0000 (11:04 +0200)]
radv: add support for dynamic polygon mode
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/18882>
Samuel Pitoiset [Tue, 31 May 2022 09:04:07 +0000 (11:04 +0200)]
radv: declare new dynamic states
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/18882>
David Heidelberg [Thu, 20 Oct 2022 23:05:34 +0000 (01:05 +0200)]
ci/freedreno: add Guilherme Gallo into restricted traces access list
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19210>
Simon Ser [Wed, 19 Oct 2022 08:27:01 +0000 (10:27 +0200)]
egl: fix error string for dri2_create_image_dma_buf()
Using dri2_create_image_khr_texture_error() here prints an error
like so:
command: eglCreateImageKHR, error: EGL_BAD_ALLOC (0x3003), message: "dri2_create_image_khr_texture"
This is confusing, because dri2_create_image_khr_texture() is
unrelated to this error.
Instead, print a more accurate error manually.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19156>
Karol Herbst [Mon, 17 Oct 2022 23:59:53 +0000 (01:59 +0200)]
zink: handle f2f16_rtz
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19212>
Karol Herbst [Fri, 21 Oct 2022 01:14:26 +0000 (03:14 +0200)]
zink: handle more opcodes for CL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19212>
Martin Roukala (né Peres) [Thu, 20 Oct 2022 09:01:12 +0000 (12:01 +0300)]
zink: update the RADV expectations
We got 4 more tests passing, let's document that :)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19190>
Karol Herbst [Fri, 21 Oct 2022 00:26:04 +0000 (02:26 +0200)]
ci/llvmpipe: update to new RUSTICL_ENABLE var
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>
Karol Herbst [Tue, 18 Oct 2022 22:10:12 +0000 (00:10 +0200)]
docs: Add documentation for Rusticl's env variables
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>
Karol Herbst [Sat, 15 Oct 2022 14:22:17 +0000 (16:22 +0200)]
rusticl: add RUSTICL_ENABLE to have a global way of enabling devices
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>
Leandro Ribeiro [Sun, 16 Oct 2022 19:37:47 +0000 (16:37 -0300)]
vulkan/wsi/wayland: avoid useless re-allocations when receiving per-surface dma-buf feedback
It's not just because we received dma-buf feedback that we should
re-allocate, as sometimes it is useless.
We must compare the most recent allocation parameters used and the ones
that we have with the newest feedback. So do that.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Thu, 13 Oct 2022 21:16:37 +0000 (18:16 -0300)]
vulkan/wsi/wayland: add per-surface dma-buf feedback support
Follow up of "vulkan/wsi/wayland: add default dma-buf feedback support".
The surface feedback is dynamic, differently from the default feedback.
When we receive per-surface feedback, that means that we could be using
a better DRM format/modifier pair for the chain's buffers. So the next
time that the client calls vkAcquireNextImageKHR(), we return
VK_SUBOPTIMAL_KHR instead of VK_SUCCESS. Some clients will re-create the
swapchain when receiving SUBOPTIMAL, and for those we'll re-create the
chain. An optimal DRM format/modifier pair from the per-surface feedback
will be used to create the images of this swapchain.
Note that for now we won't be able to change the DRM format, only the
modifier. That's good enough for many cases in which direct scanout
would not be possible because of the modifier. In order to be able to
switch the format, we'll need a mechanism to negotiate preferred formats
with clients. Currently we can only expose a set of supported formats
all with the same preference.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Thu, 13 Oct 2022 21:11:21 +0000 (18:11 -0300)]
vulkan/wsi/wayland: add default dma-buf feedback support
This bumps the supported dma-buf version up to 4 and adds default
dma-buf feedback support. It follows the changes in the dma-buf protocol
extension to include dma-buf feedback.
From version 4 onwards, the dma-buf modifier events are not sent by the
compositor anymore, so we use the default feedback to pick the set of
formats/modifiers supported by the compositor.
In the next commit we add support for per-surface feedback.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Wed, 5 Oct 2022 00:26:09 +0000 (21:26 -0300)]
vulkan/wsi/wayland: remove refcount from struct wsi_wl_display
After "vulkan/wsi/wayland: move wl_surface and wl_display from chain to
struct wsi_wl_surface", refcount is being unused. So remove it and its
associated functions.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Wed, 5 Oct 2022 00:22:01 +0000 (21:22 -0300)]
vulkan/wsi/wayland: move wl_surface and wl_display from chain to struct wsi_wl_surface
When a swapchain is re-created, if the old swapchain is not passed to
us, we need to re-create the wl_display and the Wayland objects. As
described in "vulkan/wsi/wayland: introduce struct wsi_wl_surface", this
gets in the way when adding the dma-buf feedback implementation.
With this change now the lifetime of the Wayland objects is tied to the
VkSurface. When the swapchain gets re-created, we won't have to
re-create the wl_display (and consequently the Wayland objects).
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Tue, 4 Oct 2022 20:55:50 +0000 (17:55 -0300)]
vulkan/wsi/wayland: take ownership of wsi_wl_surface when creating chain
When we create a swapchain, take ownership of a struct wsi_wl_surface.
When the chain gets destroyed, the ownership is dropped.
We can safely do that because only a single swapchain can be associated
with the surface at a time, according to vkCreateSwapchainKHR spec:
"If pCreateInfo->oldSwapchain is VK_NULL_HANDLE, and the native
window referred to by pCreateInfo->surface is already associated
with a Vulkan swapchain, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR must
be returned."
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Tue, 4 Oct 2022 20:43:24 +0000 (17:43 -0300)]
vulkan/wsi/wayland: introduce struct wsi_wl_surface
In the following commits we add dma-buf feedback support. In order to do
that, we need to keep the feedback tied to the lifetime of the surface,
instead of tied to the lifetime of the chain.
Why do we need this change?
The reason is per-surface feedback and swapchain re-creation. If we
receive feedback and return SUBOPTIMAL to the client in the next
acquireNextImage() call, it may re-create the swapchain. If it
doesn't pass us the oldSwapchain, we won't have access to the surface
feedback data (as it was tied to the oldSwapchain). We could bind
again to the surface feedback, but compositors may have a transient
state when we bind to surface feedback, and send a non-optimal batch
of dma-buf feedback which is updated when the drawing loop starts. So
we would re-create the chain with this non-optimal batch, and after a
few moments receive new feedback. This could potentially lead into an
allocation loop, so it is not safe.
Tying the feedback to the lifetime of the VkSurface we don't have to
re-bind to the surface dma-buf feedback every time that the swapchain
is re-created, avoiding this dangerous allocation loop described
above.
So add struct wsi_wl_surface in order to add support for dma-buf
feedback. For now it is just the stub, but in the next commits we start
making use of that.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Wed, 19 Oct 2022 13:51:15 +0000 (10:51 -0300)]
vulkan/wsi/wayland: remove unnecessary spaces in struct fields
We have arbitrary amount of spaces between structs fields types and
their names. That doesn't improve legibility and get in the way when
adding new fields/structs. So remove these spaces.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Leandro Ribeiro [Wed, 19 Oct 2022 13:51:01 +0000 (10:51 -0300)]
vulkan/wsi/wayland: move some structs to beginning of code
There are some structs defined in the middle of the code. Move them
closer to where the other structs are defined.
This makes the code easier to read and also will help us in the next
commits, in which we add dma-buf feedback support.
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:33:19 +0000 (10:33 +0200)]
Revert "ac: use LLVMContextSetOpaquePointers if available"
This reverts commit
940734630de229d98630e4398fd68e95c105177a.
radeonsi and radv now support opaque pointers.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Thu, 13 Oct 2022 09:40:52 +0000 (11:40 +0200)]
ac/llvm: pass ac_llvm_ptr instead of separate type/ptr
This simplifies the API.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Fri, 14 Oct 2022 13:08:12 +0000 (15:08 +0200)]
ac/llvm: add ac_get_ptr_arg
For argument of type AC_AR_..._PTR, this returns a ac_llvm_pointer.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:48:01 +0000 (10:48 +0200)]
radv/llvm: replace LLVMBuildLoad by LLVMBuildLoad2
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:39:18 +0000 (10:39 +0200)]
ac/llvm: remove gep_2 and others temporary functions
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 15:40:45 +0000 (17:40 +0200)]
radeonsi: port the remaining code to opaque pointers
Mechanical changes (= use ac_llvm_pointer and adapt the callers/callees)
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 12:39:50 +0000 (14:39 +0200)]
radeonsi: make ngg_gs_get_vertex_storage return a ac_llvm_pointer
gs_ngg_emit is declared as a 0-size array so we can't store it as a
ac_llvm_pointer.
Instead, we simply modify the ngg_gs_get_vertex_storage to return
a properly typed pointer, when num_outputs is known.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:33:06 +0000 (12:33 +0200)]
radeonsi: use LLVMBuildGEP2 in si_build_gep_i8_var
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:32:31 +0000 (12:32 +0200)]
radeonsi: use ac_get_arg_pointee_type to get the right type
And switch to the xxx2 versions of the ac/llvm functions.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:30:26 +0000 (12:30 +0200)]
radv/llvm: use ac_build_gep0_type to get args types
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:28:49 +0000 (12:28 +0200)]
ac/llvm: remove unneeded casts
The only useful information in pointer types is the address space and these
casts don't change it.
The type information is explicitely passed by the caller of GEP2 and similar
functions.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:27:13 +0000 (12:27 +0200)]
ac/llvm: store constant_data and scratch as ac_llvm_pointer
This way we can pass the type information to LLVM when needed.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:21:33 +0000 (12:21 +0200)]
ac/llvm: store lds as ac_llvm_pointer
This way we can pass the type information to LLVM when needed.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:13:02 +0000 (12:13 +0200)]
ac/llvm: add xxxx2 functions to iteratively port to opaque pointers
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 09:44:27 +0000 (11:44 +0200)]
ac/llvm: add type param to ac_build_load_invariant
And adapt the only user of this function.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Thu, 6 Oct 2022 09:11:57 +0000 (11:11 +0200)]
ac/llvm: switch ac_build_pointer_add to LLVMBuildGEP2
The cast was superfluous: GEP2 return value is a pointer to
the given type.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Thu, 6 Oct 2022 09:03:14 +0000 (11:03 +0200)]
ac/llvm: switch ac_build_gep_ptr to LLVMBuildGEP2
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 4 Oct 2022 13:15:54 +0000 (15:15 +0200)]
ac/llvm: port functions to use ac_llvm_pointer
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 4 Oct 2022 13:00:41 +0000 (15:00 +0200)]
ac/llvm: add a ac_llvm_pointer type
This struct stores a pointer's value and the pointee type and
will be used everywhere LLVM requires us to pass the pointee
type.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 5 Jul 2022 19:31:45 +0000 (21:31 +0200)]
ac/llvm: remove LLVMBuildGEP usages
Use LLVMBuildGEP2 instead.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 15:41:04 +0000 (17:41 +0200)]
ac/llvm: add helpers to get pointer types of ac_arg
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Tue, 5 Jul 2022 19:13:59 +0000 (21:13 +0200)]
ac/llvm: simplify get_memory_ptr
We actually don't need the type: lds is always treaded as
a "pointer to i8" in this function.
The caller will use the proper type when using the result.
For the same reason, we can get rid of the cast in setup_shared
because LLVM won't use this information anymore.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 07:40:45 +0000 (09:40 +0200)]
ac/llvm: drop visit_deref
This functions processes mem_shared and nir_var_mem_global:
- mem_shared is lowered by radv and radeonsi.
- mem_global is lowered by radv and radonsi doesn't use it.
So we can safely drop this function.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 07:33:37 +0000 (09:33 +0200)]
radeonsi: use nir_lower_explicit_io to get rid of mem_shared deref
We can get them through GLSL compute or SPIR-V.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 08:55:53 +0000 (10:55 +0200)]
radeonsi: remove USE_LDS_SYMBOLS
This has been set to true for 3 years and radeonsi wants LLVM 11, so
we can remove the define and use true directly.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Pierre-Eric Pelloux-Prayer [Wed, 6 Jul 2022 13:37:33 +0000 (15:37 +0200)]
ac/llvm: remove unused vars hash table
It's unused because variables are never dereferenced during the
NIR -> LLVM IR translation.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
Samuel Pitoiset [Thu, 20 Oct 2022 01:41:51 +0000 (01:41 +0000)]
aco: fix tcs_wave_id unpacking on GFX11
Only the first 3 bits are useful.
Ported from ac/llvm.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19194>
Samuel Pitoiset [Thu, 20 Oct 2022 08:36:03 +0000 (08:36 +0000)]
radv: advertise fragmentShadingRateWithShaderDepthStencilWrites on NAVI23+
It should work.
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/19195>
Samuel Pitoiset [Thu, 20 Oct 2022 08:26:20 +0000 (08:26 +0000)]
ac: add radeon_info::has_vrs_ds_export_bug
According to PAL, only NAVI21 and NAVI22 are affected.
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/19195>