Mario Kleiner
bf5cfb6486
v3dv: Enable (leased) direct display extensions.
...
Enable support for the following extensions, which are already supported
by the driver and shared wsi code, and were just missing enables inside
v3dv_device:
VK_EXT_direct_mode_display, VK_EXT_acquire_drm_display,
VK_EXT_acquire_xlib_display.
Successfully tested on RPi 400, RaspberryPi OS 11, with X11 RandR output
leasing to lease a RandR output and use it for direct display mode.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21529 >
2023-02-28 11:30:07 +00:00
Frank Binns
12f0daddfc
pvr: initialise size for placeholder "zeroed" shaders
...
Fixes an assert() in pvr_gpu_upload_usc().
Signed-off-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/21537 >
2023-02-28 10:59:13 +00:00
Eric Engestrom
c9f3ba987f
glapi/meson: drop duplicate line in deps
...
Fixes: 0842bc879b ("meson: wire the new generator for es1 and es2")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21562 >
2023-02-28 10:31:37 +00:00
Samuel Pitoiset
7c62f6fa01
radv: fix flushing non-coherent images in EndCommandBuffer()
...
The condition was inverted.
This doesn't fix anything known.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21549 >
2023-02-28 09:35:07 +00:00
Samuel Pitoiset
6750a9094f
radv: fix flushing non-coherent images inside secondaries on GFX9+
...
Fixes
dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.multi_draw.mosaic.*
on VEGA10 (related to the use of HTILE).
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21549 >
2023-02-28 09:35:07 +00:00
Eric Engestrom
78c95b2865
glsl: align definition of _mesa_problem with the one in main/error.h
...
The ctx pointer not used by that function anyway, so const'ing it makes
no difference.
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21557 >
2023-02-28 09:04:47 +00:00
Dylan Baker
ff494361be
util: rzalloc and free hash_table_u64
...
Otherwise we're prone to leaking the table itself, since it's not freed
in the destroy function
CID: 1516552
fixes: 6649b840c3
("mesa/util: add a hash table wrapper which support 64-bit keys")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21499 >
2023-02-28 08:35:32 +00:00
Tapani Pälli
75968398f3
anv: emit 3DSTATE_HS for each primitive on gfx12
...
This is Wa_16011107343, same workaround as commit 880a3efe6c
but for gfx12.
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/21551 >
2023-02-28 08:07:01 +00:00
Tapani Pälli
df9f71d795
iris: emit 3DSTATE_HS for each primitive on gfx12
...
This is Wa_16011107343, same workaround as commit a043ae8e24
but for gfx12.
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/21551 >
2023-02-28 08:07:01 +00:00
Qiang Yu
4b3a22fcd4
aco: only ls and ps use store output now
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21435 >
2023-02-28 07:19:29 +00:00
Qiang Yu
e9616d1d2a
ac/llvm: only init outputs when fragment shader for radv
...
LS pass output to TCS by reg is not enabled when LLVM.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21435 >
2023-02-28 07:19:29 +00:00
Qiang Yu
ee9ccd7ac5
radeonsi: only init llvm output when needed.
...
These are the cases which still uses nir_store_output.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21435 >
2023-02-28 07:19:29 +00:00
Emma Anholt
87ec94f6aa
glsl: Move lower_vector_insert to GLSL-to-NIR.
...
We already have a nir_builder equivalent for generating this code, just
use that instead of doing it in GLSL.
No change on r300 shader-db.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21476 >
2023-02-28 06:13:06 +00:00
Emma Anholt
f16a23aa9d
panfrost/midgard: Drop redundant arg to emit_explicit_constant.
...
Every caller passed the same value twice. Just reuse it?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21476 >
2023-02-28 06:13:05 +00:00
Emma Anholt
63aa5909b4
panfrost/midgard: Fix handling of csel with a vector constant condition.
...
If it's not all true or all false, then you'll have a csel with a vector
constant, and the backend failed to translate appropriately. Expand the
constant to fix it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21476 >
2023-02-28 06:13:05 +00:00
Yiwei Zhang
35c85c0ae6
venus: fix device memory export alloc info
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
23c350517a
venus: fix external image creation
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
953ff3cf55
venus: simplify support for non-AHB external images
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
ca96f94aee
venus: simplify ahb image creation
...
Those excessive asserts are only useful when bringing up Android.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
768017f72b
venus: refactor image create info pnext tracking
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
4d616fb919
venus: remove redundant abstractions for wsi struct search
...
Doing that won't avoid linking wsi headers, and in fact we have already
included both android and common wsi headers. For swapchain info, it's
currently disabled by the swapchain spec version advertised on Android.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
21a0608395
venus: fix external buffer creation
...
Move buffer create info scrub into core venus.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
09f5033232
venus: distinguish external memory from mappable memory support
...
Mappable memory support is a must for Venus core, but the support of
such can be transparent to the driver. Thus the renderer external memory
type won't expose opaque fd type.
External memory over vtest can be exposed and the wsi support on top can
be made explicit as long as masking out the importable bit.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
19c3608672
venus: tighten up the sync fd requirements for Android wsi
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
657cd2e1d4
venus: refactor sync fd fence and sempahore features
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
05791b6ae0
venus: clean up globalFencing
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
344be4405c
venus: clean up memoryResourceAllocationSize
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
6f8fe78e3b
venus: start requiring all experimental features
...
This is to prepare for promoting exp features to core.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
9d76ed9638
venus: replace binary search with hardcode for max buffer size
...
Avoid the couple test buffer creations without maintenance4.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Yiwei Zhang
417de28e43
venus: further disallow sparse resource
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21379 >
2023-02-28 04:56:14 +00:00
Georg Lehmann
e1eabab6fe
aco/optimizer_postRA: assume all registers are untrackable in loop headers
...
Register writes from the pre-header might not be correct for any but
the first loop iteration because they can be clobbered inside the loop.
Foz-DB Navi21:
Totals from 18 (0.01% of 134913) affected shaders:
CodeSize: 251384 -> 251508 (+0.05%)
Instrs: 47644 -> 47664 (+0.04%)
Latency: 801801 -> 801852 (+0.01%)
InvThroughput: 177579 -> 177593 (+0.01%)
Copies: 4752 -> 4771 (+0.40%)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8376
Fixes: d3b0f78110 ("aco/optimizer_postRA: Initialize loop header with preheader information")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21540 >
2023-02-28 04:27:05 +00:00
Mike Blumenkrantz
4c978d5445
zink: skip buffer barriers for ACCESS_NONE -> ACCESS_READ / ACCESS_WRITE
...
these do nothing and may cause unnecessary driver flushing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21427 >
2023-02-28 04:08:08 +00:00
Emma Anholt
fef6e6588b
ci: Update traces expectations for gutting glsl opt_algebraic.
...
All look like harmless changes.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
2f53188f18
glsl: Remove unused as_rvalue_to_saturate().
...
This is not where saturate recognition happens. Dead code since
5598458e69 ("i965/vec4: Remove try_emit_saturate") in 2014!
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
d76fb3b2b1
glsl/opt_algebraic: Drop the flrp recognizer.
...
No change to r300.
freedreno looks mixed but slightly positive in instructions:
total instructions in shared programs: 11012472 -> 11012453 (<.01%)
instructions in affected programs: 8250 -> 8231 (-0.23%)
helped: 16
HURT: 50
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
579aca894f
glsl/opt_algebraic: Drop the ftrunc pattern recognizer.
...
Now that it's in NIR, there's no change to r300 or freedreno shader-db
when we do.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
6d52e6fd2c
nir: Port a floor->truncate algebraic opt pattern from GLSL.
...
Prevents regression when dropping code from the GLSL optimizer.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
6229d34b91
glsl/opt_algebraic: Drop some fmul simplifications.
...
Looks like mostly noise, trending slightly positively.
freedreno:
total instructions in shared programs: 11012781 -> 11012472 (<.01%)
instructions in affected programs: 114072 -> 113763 (-0.27%)
helped: 123
HURT: 153
r300:
total instructions in shared programs: 1338236 -> 1337897 (-0.03%)
instructions in affected programs: 3460 -> 3121 (-9.80%)
helped: 61
HURT: 11
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
4bf65ce221
glsl/opt_algebraic: Drop the flrp/ffma simplifiers.
...
NIR seems to do a better job. Freedreno:
total instructions in shared programs: 11013096 -> 11012781 (<.01%)
instructions in affected programs: 258358 -> 258043 (-0.12%)
helped: 470
HURT: 269
r300:
total instructions in shared programs: 1338237 -> 1338236 (<.01%)
instructions in affected programs: 161 -> 160 (-0.62%)
helped: 1
HURT: 0
total presub in shared programs: 45127 -> 44881 (-0.55%)
presub in affected programs: 1719 -> 1473 (-14.31%)
helped: 246
HURT: 0
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:09 +00:00
Emma Anholt
3f632ce764
glsl/opt_algebraic: Drop no-op pack/unpack optimization.
...
No change on freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
d589760f44
glsl/opt_algebraic: Drop the eq/neq add-removal optimization.
...
No change on freedreno or r300 shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
d352bd9737
glsl/opt_algebraic: Drop scalar all_eq/any_neq -> eq/neq opt.
...
No change in r300 or freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
62afead36f
glsl/opt_algebraic: Drop fdot 0-channel optimizations.
...
No change on i915g shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
ef02581590
nir: Add optimization for fdot(x, 0) -> 0.
...
We had all these nice fdot opts to drop individual channels that were 0,
but nothing handling it being entirely 0! Avoids r300g regression when
dropping them from GLSL.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
b328c97e11
glsl/opt_algebraic: Drop csel(true/false, x, y) optimization.
...
No change on freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
652ff42f14
glsl/opt_algebraic: Drop x + -x -> 0 optimization.
...
No change on freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
69b178ac90
glsl/opt_algebraic: Drop add/sub with 0 optimizations.
...
Looks like minor instruction selection noise in freedreno shader-db:
total instructions in shared programs: 11013100 -> 11013096 (<.01%)
instructions in affected programs: 2714 -> 2710 (-0.15%)
helped: 8
HURT: 6
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
c6908fc8ac
glsl/opt_algebraic: Drop fdiv(1,x) -> frcp(x) and fdiv(x,1) -> x optimizations.
...
No change on freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
4fc9342fc6
glsl/opt_algebraic: Drop and/or/xor optimizations.
...
NIR has them, and if anything freedreno shader-db prefers that NIR sees them:
total instructions in shared programs: 11013112 -> 11013100 (<.01%)
instructions in affected programs: 26266 -> 26254 (-0.05%)
helped: 4
HURT: 0
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00
Emma Anholt
ab7a9b4538
glsl/opt_algebraic: Drop rcp optimizations.
...
No change on freedreno shader-db.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475 >
2023-02-28 03:36:08 +00:00