Commit graph

158595 commits

Author SHA1 Message Date
Qiang Yu
db0e9d3cab ac/nir/ngg: support line culling
Port from ac_llvm_cull.c

Acked-by: Marek Olšák <marek.olsak@amd.com>
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/17651>
2022-08-26 05:50:30 +00:00
Qiang Yu
f1f2c931a7 ac/nir/cull: support caller react when primitive is rejected
Make accept_func optional, and return accpect result for caller
react when primitive is rejected.

This is for GS culling.

Acked-by: Marek Olšák <marek.olsak@amd.com>
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/17651>
2022-08-26 05:50:30 +00:00
Qiang Yu
035d70f721 ac/nir/ngg,radv: use nir_load_viewport_xy_scale_and_offset
Acked-by: Marek Olšák <marek.olsak@amd.com>
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/17651>
2022-08-26 05:50:30 +00:00
Qiang Yu
a19dcdf9d5 nir,ac/llvm: add nir_intrinsic_load_viewport_xy_scale_and_offset
Used by RADV/Radeonsi NGG culling. Pack them into a single vec4
load for radeonsi to reduce const buffer load.

Acked-by: Marek Olšák <marek.olsak@amd.com>
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/17651>
2022-08-26 05:50:30 +00:00
Qiang Yu
1aef9c8318 nir,ac/llvm: add nir_intrinsic_load_half_line_width_amd
Used by AMD GPU NGG line culling. We could use nir load
line width and viewport scale to calculate this in shader,
but this way needs expensive divide ops.

Acked-by: Marek Olšák <marek.olsak@amd.com>
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/17651>
2022-08-26 05:50:30 +00:00
Dave Airlie
0c2b824f67 gallivm: don't indirect image/sampler destroy.
These are pointless indirections, just call direct the destroy
functions.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17946>
2022-08-26 04:39:59 +00:00
Dave Airlie
5fdd77c7f2 gallivm/sample: remove unused base parameter from dynamic callbacks.
This parameters was never used anywhere, so just remove it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17946>
2022-08-26 04:39:59 +00:00
Dave Airlie
1f0d1a96cb gallivm: drop unused parameter to lp_build_sample_aos
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17946>
2022-08-26 04:39:59 +00:00
Emma Anholt
bc2e1a3ed6 ci: disable the freedreno farm.
It seems to have gone down at the end of the day today.  I'm off tomorrow,
someone else can debug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18263>
2022-08-26 04:02:15 +00:00
Emma Anholt
6b338d6cc5 ci: Move 'never' rules includes above "on_success" rules includes.
The farm online-ness filters were listed after some of the checks for
whether code changed, so an offline farm might still be used in that case.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18263>
2022-08-26 04:02:15 +00:00
Kenneth Graunke
71ace23fa7 iris: Use linear for exported resources if we can't convey tiling
If we have modifiers, we can use those to convey the tiling of exported
resources.  If we have the deprecated i915 GET/SET_TILING uAPI, we can
use that to convey the tiling.

If we have neither, then we have to fall back to linear.

Fixes: e658835436 ("iris/bufmgr: Do not use map_gtt or use set/get_tiling on DG1")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6938
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18240>
2022-08-25 16:08:56 -07:00
Jesse Natalie
d66e840ab4 dzn: Get max supported shader model
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:49 +00:00
Jesse Natalie
85359eba03 d3d12: Get max supported shader model
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:49 +00:00
Jesse Natalie
cb21534a7c microsoft/compiler: Support SM6.7
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:49 +00:00
Jesse Natalie
01b6676d5f microsoft/compiler: SM6.6 is supported
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
8a4cba7143 microsoft/compiler: Handle SM6.6 handles
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
15e472f7d2 microsoft/compiler: Pass lower_bound, upper_bound, space to createhandle
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
6725362dfe microsoft/compiler: Delete double-assignment of sampler metadata field
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
a19628e3c7 microsoft/compiler: Add getters for res bind/props structs
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
b5c6416d40 microsoft/compiler: Add dynamic create handle helper
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
e9489beb76 microsoft/compiler: Add struct and function defs for SM6.6 handle funcs
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
d4b964b546 microsoft/compiler: Support up to shader model 6.5
We don't actually use any of the new features, but that's okay, it's
still valid DXIL at the higher shader models.

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Jesse Natalie
ebb9ff2165 microsoft/compiler: Always emit a shader at the max-supported shader model
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18022>
2022-08-25 21:22:48 +00:00
Chia-I Wu
6abadd27ec turnip: improve tracing of secondary cmd buffers
This visualizes secondary cmd buffers in perfetto.  I did not test
dynamic rendering, which appears to call tu_clone_trace_range already.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
4b37439764 turnip: add cmd_buffer tracepoint
It is only used for primary cmd buffers for the moment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
4c03e40991 turnip: rename some tracing stages
Rename SURFACE_STAGE_ID to RENDER_PASS_STAGE_ID.  Indicate whether gmem
or bypass is used in the stage name.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
57d2d75237 turnip: clean up tu_perfetto.h
Move enums, stages, queues, and some function declarations to
tu_perfetto.cc.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
c867753c94 turnip: convert tu_perfetto_state to a stack
A stage does not end until its nested stages end.  tu_perfetto_state can
be a stack.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
c6d488814c turnip: add tu_clone_trace_range helper
Remove some duplicated code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
9aa57bae9f util/u_trace: add PERFETTO HeaderScope
Headers with the PERFETTO scope will be included by the generated
perfetto utils header.  This is needed because to_prim_type may have
header dependencies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
dea0d684b7 util/u_trace: include the generated header first
This is a good practice to make sure the generated header is
self-contained (no missing includes, declarations, etc.).

Remove unnecessary SOURCE header scope from the default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
0d57cf8cad turnip: tidy up tracepoint header includes
Remove unused util/u_dump.h.  Add missing forward declarations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
b1ba0791e3 turnip: fix gem_store tracepoint
Set cmd->trace_renderpass_end after tu6_emit_tile_store in case of gmem.

To be able to do that, we push the update of cmd->trace_renderpass_end
down into tu_cmd_render_tiles/tu_cmd_render_sysmem.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
f539bd7a03 turnip: move trace_start_gmem_store before cond exec
Suggested by Danylo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
3f045bd176 turnip: fix a missing trace_end_gmem_clear
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:14 +00:00
Chia-I Wu
91a0411d2a turnip: improve perfetto sync_timestamp
tu_device_get_gpu_timestamp takes >100us on my otherwise idle sc7180.
Read the cpu block again after the call returns.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
2022-08-25 21:00:13 +00:00
Yiwei Zhang
ce0e13155d venus: avoid scrubing wsi/external sempahores
When the renderer supports sync_fd import for the binary semaphore,
venus can import the special signaled payload to the semaphore instead
of scrubing it. This avoids the bugs w.r.t timeline semaphore and device
group submission in the legacy scrub path.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
7cf59d6982 venus: re-implement sync_fd external sempahore
sync_wait is deferred to a submission that waits on the semaphore.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
4da0ac54cf venus: re-implement sync_fd external fence
Instead of waiting for signal before importing, we are able to retain
the imported sync file and handle the fence related commands on the
driver side.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
db9fa4be04 venus: query renderer sync_fd props to fill the feature stubs
This change enables the fixed code paths.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
3518c31098 venus: fix vn_GetSemaphoreFdKHR
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
adac798598 venus: fix vn_GetFenceFdKHR
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
b21e4a7990 venus: put android wsi on the sub-optimal path
Simplify Android wsi to only use performant path if fixed sync_fd fence
support is enabled. This removes hacky codes and allows us to deprecate
a special ring wait code path as well.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
64f9fbb9ea venus: stub out renderer sync_fd fencing features
With syncFdFencing feature, venus starts forwarding renderer sync_fd
fencing support. The driver side now can track the renderer sync_fd
fencing features. This change adds the initial stubs.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
1498b0877b venus: sync to latest venus protocol headers for syncFdFencing
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
88a5146d95 venus: avoid pre-allocating the feedback pool
Now that we don't create fence upon device creation, let's also defer
the feedback pool grow to the first event or non-external fence
creation. This makes venus device creation lighter and is good for CI.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
81b44b4931 venus: lazily create queue wait fence and make it non-external
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
d85d29b731 venus: use a separate sync fence for Android wsi
Also refactors the codes a bit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
5457f4c0a4 venus: avoid feedback for external fence
Sync fd fence export implies a payload reset operation, and application
can immediately do another submission with the same fence after export.
Concurrent use of the same feedback slot is incorrect. Keeping a list of
feedback slots for sync_fd external fence is a bit over designed given
those fences are usually not checked or waited by the app, but will hand
off the ownership via sync fd to an external client.

Fixes: d7f2e6c8d0 ("venus: add fence feedback")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang
7925340220 venus: require necessary extensions for common wsi support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00