Commit graph

166555 commits

Author SHA1 Message Date
Georg Lehmann
4c9ac73064 aco: allow output modifiers for ldexp_f16
It also supports imod for the first operand, but we cannot express that at
moment.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21174>
2023-02-08 18:52:28 +00:00
Georg Lehmann
b63aa2bb8e aco: don't allow output modifiers for v_cvt_pkrtz_f16_f32
Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21174>
2023-02-08 18:52:28 +00:00
Rob Clark
dc93033234 freedreno: Indent fixes
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21195>
2023-02-08 18:27:55 +00:00
Rob Clark
e9eee8781a freedreno/a2xx: Move pack_rgba()
It is only used in fd2_draw.c

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21195>
2023-02-08 18:27:55 +00:00
Rob Clark
e7f88c41c4 freedreno: Quiet unused variable warnings
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21195>
2023-02-08 18:27:55 +00:00
Rob Clark
eaf272aa93 ir3: Quiet unused variable warning
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21195>
2023-02-08 18:27:55 +00:00
Sil Vilerino
727afda21f d3d12: Video Encode - Fix ID3D12CommandAllocator leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21196>
2023-02-08 18:00:41 +00:00
Sil Vilerino
997b91fead d3d12: Video processing - Fix out of bounds array access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21196>
2023-02-08 18:00:41 +00:00
Rob Clark
2c8c151591 freedreno/drm/virtio: Limit guest handles passed to virtgpu
We only need to have virtgpu in the loop for shared buffers when
implicit sync is in play.  The rest of the time we can rely on userspace
fence waits.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21143>
2023-02-08 17:36:23 +00:00
Rob Clark
53ba7d8867 freedreno/drm: Move sa_cpu_prep() to core
Now that we can do a blocking wait on an fd_fence (which the suballoc
heap already depended on) we can just move the fence wait into core
leaving the backend cpu_prep() implementation only needing to care
about implicit sync on shared buffers.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21143>
2023-02-08 17:36:23 +00:00
Rob Clark
dec49ec50a freedreno/a6xx: Move CS state to PROG state group
It is pretty easy to just cache the stateobj with the hwcso (since
unlike 3d, there is only a single shader state) and re-emit it by
pointer when it changes, now that the CS state doesn't depend on the
grid info.

This also moves immed consts into the PROG state, so they are only
updated when the PROG state is dirty.  And splits user consts and
driver param consts, so they are only re-emit when needed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21127>
2023-02-08 16:59:40 +00:00
Matt Coster
7ea98091c1 pvr: Add firmware stream support for transfer submit
Move transfer jobs over to the new firmware stream interface. This had already
been done for render and compute jobs in 947e183ff5 ("pvr: Implement new
firmware stream interface").

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21163>
2023-02-08 16:33:35 +00:00
Sarah Walker
5a2618c73c pvr: Update FWIF transfer queue register structures
This matches changes made in FW 1.17.OS@6293467.

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21163>
2023-02-08 16:33:35 +00:00
Michel Dänzer
0dd89dacf2 mesa/st: Handle all 10 bpc types in st_choose_format
Only GL_UNSIGNED_INT_2_10_10_10_REV was handled, add
GL_UNSIGNED_INT_10_10_10_2 & GL_UNSIGNED_INT_10_10_10_2_OES.

This makes sure that if the Gallium driver doesn't support the exact
corresponding format, another 10 bpc format is tried before an 8 bpc one
as a fallback.

Fixes the mutter test cogl-test-offscreen-texture-formats with iris.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21021>
2023-02-08 16:06:38 +00:00
Michel Dänzer
98526b7d48 mesa/st: Fix GL_EXT_texture_type_2_10_10_10_REV name in comment
Suggested by Adam Jackson in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21021#note_1747761

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21021>
2023-02-08 16:06:37 +00:00
Lionel Landwerlin
6390953fa5 anv: put the video extension behind a variable
As initialized acked.

The WSI code is currently trying to blit on the video queue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 633efa7af7 ("anv: enable video decode extensions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21194>
2023-02-08 15:38:27 +00:00
Simon Perretta
81af999a75 pvr: Clarify unreachable text
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
c13bed8bef pvr: Add block printing support during validation
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
1bd84f4753 pvr: Validate instruction repeat and src/dst sizes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
8ac16c97cf pvr: Adjust instruction repeat offset
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
d431adaecd pvr: Keep NIR SSA defs instead of registers
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
d47d0ea101 pvr: Drop the ENUM_PACKED macro
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
52bcb0e292 pvr: Commonise some instruction member defs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
e74aaa347b pvr: Support dual-destination ALU instructions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
6187f1fd8c pvr: Add support for optional instruction params
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Simon Perretta
d187418f63 pvr: Add new Rogue compiler framework
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
2023-02-08 15:15:17 +00:00
Georg Lehmann
5038a049f1 aco: add mov/cndmask opcodes to does_fp_op_flush_denorms
For completeness sake also add v_mov_b32, even if we don't use imod for it
because it's only supported since gfx10.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21170>
2023-02-08 13:07:46 +00:00
Georg Lehmann
c8adf16278 aco: fix imod/omod for gfx11 VOP3 opcodes
Fixes: d8d99c3c4f ("aco: add GFX11 opcode numbers")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21170>
2023-02-08 13:07:46 +00:00
Mike Blumenkrantz
8f5a63ebfe util/vbuf: fix multidraw unrolling
* drawid needs to be incremented at end of loop
* rescope draw structs to initialize at top of loop

fix #8191

Fixes: 6b07893b31 ("util/vbuf: handle multidraws")

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21139>
2023-02-08 12:41:32 +00:00
Tatsuyuki Ishi
c6ebd2de71 radv: Fix noop FS not getting constructed for GPL pipelines.
The condition was inverted, causing compilation to be actually skipped when
a noop FS is used and straight emitting the pipeline from the default
initialized struct.

Fixes: 3eb97b9d33 ("radv: skip compilation when possible with GPL fast-linking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21166>
2023-02-08 10:52:54 +00:00
Daniel Schürmann
e5600d5257 radv: CSE ray_launch_{size|id}
Stats for Q2RTX
Totals from 7 (0.01% of 134913) affected shaders: (GFX10.3)

VGPRs: 736 -> 704 (-4.35%)
CodeSize: 204424 -> 204400 (-0.01%); split: -0.03%, +0.02%
MaxWaves: 67 -> 69 (+2.99%)
Instrs: 37540 -> 37549 (+0.02%); split: -0.02%, +0.04%
Latency: 973556 -> 973267 (-0.03%)
InvThroughput: 209068 -> 200902 (-3.91%)
VClause: 920 -> 921 (+0.11%); split: -0.11%, +0.22%
SClause: 1045 -> 1043 (-0.19%)
Copies: 4853 -> 4865 (+0.25%); split: -0.08%, +0.33%
Branches: 1571 -> 1578 (+0.45%)
PreSGPRs: 421 -> 407 (-3.33%)
PreVGPRs: 638 -> 632 (-0.94%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21156>
2023-02-08 10:10:27 +00:00
Timur Kristóf
8ebb34ee57 radv: Refactor radv_emit_ngg_culling_state so it's based on dirty flags.
This significantly lowers the CPU overhead of this function.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20980>
2023-02-08 09:28:20 +00:00
Timur Kristóf
22947ef0cc radv: Remove NGG culling skip from command buffer.
This code used to runtime-disable NGG culling for small draw calls.
However, this had too much CPU overhead, let's remove it.
It will be solved by the shaders instead.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20980>
2023-02-08 09:28:19 +00:00
Timur Kristóf
88a4e17018 radv: Use shader code to skip NGG culling in small workgroups.
Extend RADV lowering of the load_cull_any_enabled_amd intrinsic to
take into account the number of primitives in the current workgroup.

Workgroups that have less than 16 triangles are considered "small"
and will disable shader culling. Note that LLPC does the same,
but it checks the number of vertices not primitives.

The primary intention of this change is to eliminate the need to
check the draw size in radv_cmd_buffer, but this is actually
beneficial to larger draw calls too, specifically this may improve
the performance of the last workgroup of larger draws too.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20980>
2023-02-08 09:28:19 +00:00
Timur Kristóf
def53a085c radv: Move checking primitive topology to radv_get_ngg_culling_settings.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20980>
2023-02-08 09:28:19 +00:00
Timur Kristóf
8457dfec47 radv: Don't change LDS_SIZE for NGG culling shaders.
There was no measurable perf benefit from this optimization,
and it made the code messy and difficult to refactor.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20980>
2023-02-08 09:28:19 +00:00
Sidney Just
ab87b19088 loader: Add missing brace to fix compile
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 1a0ec8e8d3 ("loader,glx,egl,vl,d3d: loader_get_user_preferred_fd() function to return original_fd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21115>
2023-02-08 08:49:57 +00:00
Dave Airlie
53283bc26d anv/video: fix video memory bindings.
A break snuck in here.

Fixes: 98c58a16ef ("anv: add initial video decode support for h264.")
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21184>
2023-02-08 06:42:09 +00:00
Chia-I Wu
d6fb4d8d7d freedreno/registers: correct WFM bit in CP_REG_TEST
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21151>
2023-02-08 06:17:12 +00:00
Yiwei Zhang
dda85cf94b venus: move exp features init back to use ring submit
Since largeRing has been enforced, there's no need to do renderer
submission to fill the exp features. So we move it back after ring has
been initialized. Meanwhile, vn_renderer_submit_simple_sync is
intentionally left there to be re-used soon for server ping purpose.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21153>
2023-02-08 05:34:13 +00:00
Yiwei Zhang
830c7a9f1a venus: render server enforces blob_id_0
Render server enforcement has guaranteed blob_id_0. Meanwhile, blob_id_0
has deprecated largeRing feature.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21153>
2023-02-08 05:34:13 +00:00
Yiwei Zhang
0938c1f7e2 venus: fix tracing init to include instance creation
The issue was hidden so far because:
- wsi_device_init does the perfetto tracing init
- Android atrace does lazy tracing init

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21153>
2023-02-08 05:34:13 +00:00
Yiwei Zhang
91b0ae93b2 venus: fix formating
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21153>
2023-02-08 05:34:13 +00:00
Patrick Lerda
66313732a7 mesa/program: fix memory leak triggered by parser errors
This change requires the %destructor directive which is supported
by bison or yacc, yacc needs to be compiled with the back-tracking
functionality.

This issue could be checked with the following piglit programs:
glsl-invalid-asm-01, glsl-invalid-asm-02 or vp-bad-program

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x7f8dc89050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
    #1 0x7f83791cbc in handle_ident ../src/mesa/program/program_lexer.l:129
    #2 0x7f83791cbc in _mesa_program_lexer_lex ../src/mesa/program/program_lexer.l:312
    #3 0x7f8377e8d8 in yylex ../src/mesa/program/program_parse.y:289
    #4 0x7f8377e8d8 in yyparse src/mesa/program/program_parse.tab.c:2124
    #5 0x7f83788c14 in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2584
    #6 0x7f8377371c in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #7 0x7f8372d42c in set_program_string ../src/mesa/main/arbprogram.c:402

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21150>
2023-02-08 04:58:33 +00:00
Juston Li
3061ec366e venus: add SHADER_DEVICE_ADDRESS_BIT to buffer cache
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT is being set by zink.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21177>
2023-02-08 04:14:42 +00:00
Chia-I Wu
4054b08f39 turnip: reorder tu6_format_*
This is cosmetic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu
6a76bd8d4c turnip: handle ubwc in blit_base_format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu
3c4eea2aab turnip: add blit_format_color and blit_base_format
Similar to blit_format_texture but for blit dst.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu
75f601279b turnip: add blit_format_texture
The use of FMT6_8_8_8_8_UNORM for z24s8/z24x8 is for blit src.  Make
that clear by moving the logic from fd6_texture_format to the newly
added blit_format_texture.  Add a comment on why this is simpler than in
fdl6_view_init.

This should have no functional change in practice.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu
659b2e56bd turnip: let tu6_format_vtx* take pipe format
For consistency with other tu6_format_* functions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00