nv/codegen: Call nir_shader_gather_info
authorM Henning <drawoc@darkrefraction.com>
Sat, 29 Jul 2023 16:25:05 +0000 (12:25 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Aug 2023 18:58:03 +0000 (18:58 +0000)
We need this info to be up-to-date for slot assignment.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24327>

src/nouveau/codegen/nv50_ir_from_nir.cpp

index 27ae9ed..c5a8c7c 100644 (file)
@@ -913,6 +913,12 @@ bool Converter::assignSlots() {
    uint8_t i;
    BITSET_FOREACH_SET(i, nir->info.system_values_read, SYSTEM_VALUE_MAX) {
       switch (i) {
+      case SYSTEM_VALUE_BARYCENTRIC_LINEAR_CENTROID:
+      case SYSTEM_VALUE_BARYCENTRIC_LINEAR_PIXEL:
+      case SYSTEM_VALUE_BARYCENTRIC_LINEAR_SAMPLE:
+      case SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID:
+      case SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL:
+      case SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE:
       case SYSTEM_VALUE_BASE_GLOBAL_INVOCATION_ID:
          continue;
       default:
@@ -3270,6 +3276,8 @@ Converter::run()
    // Garbage collect dead instructions
    nir_sweep(nir);
 
+   nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
+
    if (!parseNIR()) {
       ERROR("Couldn't prase NIR!\n");
       return false;