Found this on top of Karol's patches but it seems like it can just be
applied to master.
Helps with some cases of
kernel_image_methods/test_kernel_image_methods 2Darray
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9381>
#include "util/u_sampler.h"
#include "util/format/u_format.h"
#include "util/u_inlines.h"
+#include "util/u_resource.h"
using namespace clover;
view.u.buf.size = obj.size();
} else {
view.u.tex.first_layer = 0;
- view.u.tex.last_layer = 0;
+ if (util_texture_is_array(pipe->target))
+ view.u.tex.last_layer = pipe->array_size - 1;
+ else
+ view.u.tex.last_layer = 0;
view.u.tex.level = 0;
}