nir/lower_io_to_temporaries: don't set compact on shadow vars
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 6 Jul 2017 19:23:33 +0000 (12:23 -0700)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 13 Jul 2017 21:45:25 +0000 (14:45 -0700)
The compact flag doesn't make sense on local variables, since the
packing on them is up to the driver. This fixes nir_validate assertions
in some cases, particularly when lower_io_to_temporaries is used on
per-vertex inputs/outputs.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_io_to_temporaries.c

index 6031bbdb520bd6049eb10e57c524321ee54f2bf4..d2df14ed1e0088ebe66aca97b557366587b6eec3 100644 (file)
@@ -141,6 +141,7 @@ create_shadow_temp(struct lower_io_state *state, nir_variable *var)
    temp->data.mode = nir_var_global;
    temp->data.read_only = false;
    temp->data.fb_fetch_output = false;
+   temp->data.compact = false;
 
    return nvar;
 }