From e9b6cf708b4d68171b0b5102c93e6a34f9d562ed Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 10 Mar 2025 16:44:22 -0400 Subject: [PATCH] tu: Fix reported FDM fragment size with multiview We were never setting has_multiview. It's not actually necessary anyway, since we can just do the optimization we were trying to do whenever num_views is 1 instead. This doesn't affect the actual fragment size, which was already correct, only gl_FragSizeEXT. Fixes: 6f2be52487b ("tu, ir3: Handle FDM shader builtins") Part-of: (cherry picked from commit 8864ee7b0f430c909435f30336301fe919be631f) --- .pick_status.json | 2 +- src/freedreno/vulkan/tu_shader.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b9c2d846f90..0767a863239 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1874,7 +1874,7 @@ "description": "tu: Fix reported FDM fragment size with multiview", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "6f2be52487bf2f84f1b4d12b27275847ff6facf0", "notes": null diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index d52e53c83dc..d29c9fce8b3 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -1023,7 +1023,6 @@ tu_lower_io(nir_shader *shader, struct tu_device *dev, struct lower_fdm_options { unsigned num_views; bool adjust_fragcoord; - bool multiview; }; static bool @@ -1050,7 +1049,7 @@ lower_fdm_instr(struct nir_builder *b, nir_instr *instr, void *data) nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); nir_def *view; - if (options->multiview) { + if (options->num_views > 1) { nir_variable *view_var = nir_find_variable_with_location(b->shader, nir_var_shader_in, VARYING_SLOT_VIEW_INDEX);