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: 6f2be52487 ("tu, ir3: Handle FDM shader builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
(cherry picked from commit 8864ee7b0f)
This commit is contained in:
Connor Abbott 2025-03-10 16:44:22 -04:00 committed by Eric Engestrom
parent 0df2cf3ae4
commit e9b6cf708b
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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);