nv50/ir/nir: remove image uniform hack
authorKarol Herbst <kherbst@redhat.com>
Mon, 15 Jun 2020 23:08:39 +0000 (01:08 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 15:15:17 +0000 (15:15 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp

index 548acc6..90ce9eb 100644 (file)
@@ -921,18 +921,8 @@ bool Converter::assignSlots() {
    info->io.viewportId = -1;
    info->numInputs = 0;
    info->numOutputs = 0;
-
-   // we have to fixup the uniform locations for arrays
-   unsigned numImages = 0;
-   nir_foreach_variable(var, &nir->uniforms) {
-      const glsl_type *type = var->type;
-      if (!type->without_array()->is_image())
-         continue;
-      var->data.driver_location = numImages;
-      numImages += type->is_array() ? type->arrays_of_arrays_size() : 1;
-   }
-
    info->numSysVals = 0;
+
    for (uint8_t i = 0; i < SYSTEM_VALUE_MAX; ++i) {
       if (!(nir->info.system_values_read & 1ull << i))
          continue;