Mesa (main): tu: Call nir_opt_access
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 28 23:55:24 UTC 2022
Module: Mesa
Branch: main
Commit: 06485f7d3dff0841052a7e7473fc3ee71c974735
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=06485f7d3dff0841052a7e7473fc3ee71c974735
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Mon Feb 21 19:24:39 2022 +0100
tu: Call nir_opt_access
This adds some small optimizations, and enables lowering to isam in more
cases where the app didn't specify readonly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>
---
src/freedreno/vulkan/tu_shader.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c
index e3e72f5f413..186e4348515 100644
--- a/src/freedreno/vulkan/tu_shader.c
+++ b/src/freedreno/vulkan/tu_shader.c
@@ -715,6 +715,11 @@ tu_shader_create(struct tu_device *dev,
if (!shader)
return NULL;
+ NIR_PASS_V(nir, nir_opt_access, &(nir_opt_access_options) {
+ .is_vulkan = true,
+ .infer_non_readable = true,
+ });
+
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
NIR_PASS_V(nir, nir_lower_input_attachments,
&(nir_input_attachment_options) {
More information about the mesa-commit
mailing list