Commit graph

60942 commits

Author SHA1 Message Date
Pavel Ondračka
9db5da0f38 r300: add partial CMP support on R5xx
VE_COND_MUX_GTE4 is a nice match for the TGSI CMP opcode, however
there is a big limitation due to the general shortcoming of the
vertex shader engine that any instruction can read only two different
temporary registers. So we still have to lower in some cases.

Shader-db RV530:
total instructions in shared programs: 130872 -> 130333 (-0.41%)
instructions in affected programs: 29854 -> 29315 (-1.81%)
helped: 294
HURT: 83
total temps in shared programs: 16747 -> 16775 (0.17%)
temps in affected programs: 407 -> 435 (6.88%)
helped: 10
HURT: 38

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23691>
2023-06-22 14:34:39 +00:00
Karol Herbst
33673bcc2a rusticl: stop linking with libgalliumvl
it's not needed.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23778>
2023-06-22 11:51:21 +00:00
Karol Herbst
92fdfea5af rusticl: specify which symbols to export
Drops release binary size from 31MB to 29MB

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23778>
2023-06-22 11:51:21 +00:00
Karol Herbst
72fe01a6be rusticl: add ld_args_gc_sections
This drops release file size from 33MB to 31MB on my system.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23778>
2023-06-22 11:51:21 +00:00
Karol Herbst
29b4c1a09f rusticl: experimental support for cl_khr_fp16
Hidden behind `RUSTICL_ENABLE=fp16` for now as the OpenCL CTS doesn't have
enough fp16 tests at the moment. There has been a lot of work on it though,
so hopefully we can enable and verify it soon.

Additionally libclc also misses a bunch of fp16 functionality, so most of
the tests would also just crash.

However this flag is useful for development as it already wires up most of
the code needed.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23788>
2023-06-22 10:45:48 +00:00
Karol Herbst
6ae801c4d8 rusticl/device: rename doubles to fp64 and long to int64
They are obviously the better names.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23788>
2023-06-22 10:45:48 +00:00
norablackcat
5c120173b3 zink/screen: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
79cd51d0e6 radeonsi/get: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
979f47a04d r600/pipe: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
6e1f873a0c iris/screen: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
d27040ed89 crocus/screen: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
6ec57403db sofpipe/screen: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
35f5bc0ad4 llvmpipe/screen: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
norablackcat
660f2eabe1 gallium: add PIPE_CAP_TIMER_RESOLUTION
Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-22 09:08:33 +00:00
Marek Olšák
77f5b1cce0 radeonsi: clean up #includes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
56c787b36d radeonsi: declare compiler[] and nir_options as pointers to reduce #includes
so that we don't have to include the structure definitions.
(ac_llvm_compiler includes LLVM, and nir_options includes NIR)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
620ff256a2 radeonsi: clean up query functions, make them static, remove forward decls
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
69bc1180b7 radeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for compute by buffering reg writes
This is the compute portion of the work. It uses a separate buffer
for compute SH registers in si_context.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
1753b321f8 radeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for gfx by buffering reg writes
Instead of writing SH registers into the command buffer, push them into
an array in si_context. Before a draw, take all buffered register writes
and create a single SET_SH_REG_PAIRS_PACKED packet for them.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
a6e6646d91 radeonsi: reorder compute code to prepare for packed SET_SH_REG packets
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
f71607c8d3 radeonsi/gfx11: enable register shadowing by default
required by SET_SH_REG_PAIRS_PACKED*

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
aafef61f6a radeonsi/gfx11: fix GLCTS with register shadowing by keeping the CS preamble
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
c7f4ffa401 radeonsi: remove uses_reg_shadowing parameter from si_init_gfx_preamble_state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
913c6392f6 radeonsi: remove radeon_winsys::cs_set_preamble
It only does radeon_emit_array and it's not possible to do anything better.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
c4811edfa6 radeonsi: use si_pm4_create_sized for the shadowing preamble
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
fff585bdb8 radeonsi: don't do BREAK_BATCH for context regs with only 1 context per batch
because it has no effect

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:55 +00:00
Marek Olšák
835190dd9f radeonsi: keep pipeline statistics disabled when they are not used
so that we don't always disable/enable pipeline stats around blits
when there are no pipeline stat queries

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
ccb856fbaa radeonsi: determine si_pm4_state::reg_va_low_idx automatically
The existing code doesn't work with the packed SET packets, so si_pm4_state
needs to find reg_va_low_idx after the whole packet is built.

Remove si_pm4_set_reg_va and do the same thing for SET_SH_REG.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
22f3bcfb5a radeonsi/gfx11: use SET_*_REG_PAIRS_PACKED packets for pm4 states
It can generate all PACKED packets, but only SET_CONTEXT_REG_PAIRS_PACKED
is generated because register shadowing is required by
SET_SH_REG_PAIRS_PACKED*.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
1aa99437d3 radeonsi: eliminate redundant TCS user data and RSRC2 register changes
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
6959493f8c radeonsi: move the only tcs_out_lds_offsets field to vs_state_bits
This removes 1 user data SGPR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
5632d8d1a7 radeonsi: replace tcs_out_lds_layout with nearly identical tes_offchip_addr
tcs_out_lds_layout is basically renamed to tes_offchip_addr in TCS, using
the same variable as TES and also using the same bit layout. The only
difference in the bit layout was that TCS had to mask out the low bits,
which this also removes.

The enums are renamed to *_SGPR_TCS_OFFCHIP_ADDR so as not to conflict
with *_SGPR_TES_OFFCHIP_ADDR, which are in different user data SGPRs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Marek Olšák
1b40ab2150 radeonsi: move TCS.gl_PatchVerticesIn into the tcs_offchip_layout SGPR
we'll be able to remove 1 TCS user data SGPR thanks to this

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>
2023-06-22 08:35:54 +00:00
Martin Roukala (né Peres)
b4e2073f04 zink/ci: remove 3 tests from the fails list
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23789>
2023-06-22 08:10:06 +00:00
Gert Wollny
e853332805 r600/sfn: Add source mod propagation also to fp64 ops
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23754>
2023-06-22 06:31:50 +00:00
Gert Wollny
255eee10ac r600/sfn: Implement fsat for 64 bit ops
Because a plain mov with the fsat modifier doesn't do a proper 64 bit fsat
we either have to propagate the op as modifier to the instruction that
creates the value, or we add a fake op that applies the fsat op, i.e. we
implement the mov as an add_64 with zero as the second value.

Fixes:  0ff3c4bef2
    r600/sfn: drop use of nir source mods

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23754>
2023-06-22 06:31:50 +00:00
Mike Blumenkrantz
886b7aaa6b zink: add fastpaths for no-op sampler/view rebinds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:48 +00:00
Mike Blumenkrantz
8125437acd zink: check sampler views pointer before loop
this doesn't need to be checked in every loop iteration

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:48 +00:00
Mike Blumenkrantz
58b82d231d zink: don't update tc info directly from cso binds
this somehow becomes expensive at extremely high fps, so defer
until rp begin to check layout change state

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:48 +00:00
Mike Blumenkrantz
7b4c1b3a42 zink: track and apply ds3 states only on change
drivers don't do their own state tracking, so ensure the calls are only
made when necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:48 +00:00
Mike Blumenkrantz
5dc2d329cb zink: use local screen var in blend state bind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Mike Blumenkrantz
2543fc15a1 zink: clean up rp update tracking on dsa bind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Mike Blumenkrantz
b65efda508 zink: specialize invalidate_descriptor_state hook for compact mode
the constant flag check here has perf implications at high fps,
so avoid it when possible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Mike Blumenkrantz
53542dd120 zink: make invalidate_descriptor_state a ctx hook
this will allow for specialization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Mike Blumenkrantz
ad04bd81b9 zink: force inlining for a bunch of functions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Mike Blumenkrantz
14bf10c1ad zink: no-op redundant samplemask changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
2023-06-21 22:43:47 +00:00
Eric Engestrom
63f44951ac asahi: drop unnecessary DRM_FORMAT_MOD_{LINEAR,INVALID} fallbacks
Since afe134a49c ("asahi: Drop macOS backend"), `drm_fourcc.h` is
unconditionally included, meaning these defines are now dead code.

Fixes: afe134a49c ("asahi: Drop macOS backend")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23773>
2023-06-21 18:17:56 +00:00
Mike Blumenkrantz
7cf7ea2500 zink: radv vangogh ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
2023-06-21 07:57:38 -04:00
Mike Blumenkrantz
1ca87a300d zink: always clamp NUM_QUERIES to 500
this avoids ooming on some weaker GPUs with big query energy

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
2023-06-21 11:20:01 +00:00
Mike Blumenkrantz
0e32de0aed zink: recache present semaphores
this otherwise depletes the entire cache

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
2023-06-21 11:20:01 +00:00