r600g/compute: Use the first parameter in evergreen_set_global_binding()
authorTom Stellard <thomas.stellard@amd.com>
Tue, 19 Aug 2014 23:07:24 +0000 (16:07 -0700)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 21 Aug 2014 13:12:12 +0000 (06:12 -0700)
src/gallium/drivers/r600/evergreen_compute.c

index acc1b714fdf2f2e2ee1834ff8c895657e39643a6..9e3404f2d1d8a3fdafc7c8c06f94402f86fe2926 100644 (file)
@@ -648,6 +648,7 @@ static void evergreen_set_global_binding(
        struct compute_memory_pool *pool = ctx->screen->global_pool;
        struct r600_resource_global **buffers =
                (struct r600_resource_global **)resources;
+       unsigned i;
 
        COMPUTE_DBG(ctx->screen, "*** evergreen_set_global_binding first = %u n = %u\n",
                        first, n);
@@ -659,7 +660,7 @@ static void evergreen_set_global_binding(
 
        /* We mark these items for promotion to the pool if they
         * aren't already there */
-       for (unsigned i = 0; i < n; i++) {
+       for (i = first; i < first + n; i++) {
                struct compute_memory_item *item = buffers[i]->chunk;
 
                if (!is_item_in_pool(item))
@@ -671,7 +672,7 @@ static void evergreen_set_global_binding(
                return;
        }
 
-       for (unsigned i = 0; i < n; i++)
+       for (i = first; i < first + n; i++)
        {
                uint32_t buffer_offset;
                uint32_t handle;