Mesa (main): microsoft/spirv_to_dxil: lower input attachments
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 31 20:32:42 UTC 2022
Module: Mesa
Branch: main
Commit: d11a417ded1c2ed5a8fc1a7162488ff73065eca7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d11a417ded1c2ed5a8fc1a7162488ff73065eca7
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date: Tue Nov 9 22:54:57 2021 -0500
microsoft/spirv_to_dxil: lower input attachments
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
---
src/microsoft/spirv_to_dxil/spirv_to_dxil.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
index 50dda8d5f31..3c9e0580502 100644
--- a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
+++ b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
@@ -336,6 +336,14 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
conf->runtime_data_cbv.register_space,
conf->runtime_data_cbv.base_shader_register);
+ if (stage == MESA_SHADER_FRAGMENT) {
+ NIR_PASS_V(nir, nir_lower_input_attachments,
+ &(nir_input_attachment_options){
+ .use_fragcoord_sysval = false,
+ .use_layer_id_sysval = true,
+ });
+ }
+
NIR_PASS_V(nir, nir_opt_deref);
if (conf->read_only_images_as_srvs) {
More information about the mesa-commit
mailing list