clover: fix array images view creation
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>
This commit is contained in:
parent
18be15ad16
commit
bc02fc4823
|
@ -26,6 +26,7 @@
|
|||
#include "util/u_sampler.h"
|
||||
#include "util/format/u_format.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_resource.h"
|
||||
|
||||
using namespace clover;
|
||||
|
||||
|
@ -125,7 +126,10 @@ resource::create_image_view(command_queue &q) {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue