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>
This commit is contained in:
Connor Abbott 2025-03-10 16:44:22 -04:00 committed by Marge Bot
parent 122f2c422a
commit 8864ee7b0f

View file

@ -1028,7 +1028,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
@ -1055,7 +1054,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);