radeonsi: fix images with level > 0
authorMarek Olšák <marek.olsak@amd.com>
Fri, 3 Jun 2016 17:17:46 +0000 (19:17 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 5 Jun 2016 15:00:14 +0000 (17:00 +0200)
This should fix spec@arb_shader_image_load_store@level.

Broken by:
    Commit: 95c5bbae66af3ca1f805d94f6fe8d8e4ba2c9c43
    radeonsi: set some image descriptor fields at bind time

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/drivers/radeonsi/si_descriptors.c

index 7aaac3950b8c31e3b82ef53d7027964cf67f7490..baddc5f245ce35a789d5c828dfff6707990d5be7 100644 (file)
@@ -602,7 +602,7 @@ static void si_set_shader_image(struct si_context *ctx,
                                           view->u.tex.last_layer,
                                           width, height, depth,
                                           desc, NULL);
-               si_set_mutable_tex_desc_fields(tex, tex->surface.level, level,
+               si_set_mutable_tex_desc_fields(tex, &tex->surface.level[level], level,
                                               util_format_get_blockwidth(view->format),
                                               false, desc);
        }