clover: fix image resource depth and array_size
authorZoltan Gilian <zoltan.gilian@gmail.com>
Mon, 27 Jul 2015 09:27:12 +0000 (11:27 +0200)
committerZoltan Gilian <zoltan.gilian@gmail.com>
Mon, 3 Aug 2015 11:47:19 +0000 (13:47 +0200)
src/gallium/state_trackers/clover/core/memory.cpp
src/gallium/state_trackers/clover/core/resource.cpp

index 055336a33255c236d4f7e7e8b4e22e9bb2372c9d..b852e6896fedeea304131c8acc805ae7d7225b72 100644 (file)
@@ -189,7 +189,7 @@ image2d::image2d(clover::context &ctx, cl_mem_flags flags,
                  const cl_image_format *format, size_t width,
                  size_t height, size_t row_pitch,
                  void *host_ptr) :
-   image(ctx, flags, format, width, height, 0,
+   image(ctx, flags, format, width, height, 1,
          row_pitch, 0, height * row_pitch, host_ptr) {
 }
 
index 78ebafb644fa1ff72501dda4a9e2d7296d0d393f..10a29a94eac4498eda633dea65347dd8918beda2 100644 (file)
@@ -132,6 +132,7 @@ root_resource::root_resource(clover::device &dev, memory_obj &obj,
       info.depth0 = 1;
    }
 
+   info.array_size = 1;
    info.target = translate_target(obj.type());
    info.bind = (PIPE_BIND_SAMPLER_VIEW |
                 PIPE_BIND_COMPUTE_RESOURCE |