Mesa (master): rbug: send the actual number of layers to the client

Marek Olšák mareko at kemper.freedesktop.org
Tue Aug 19 10:57:07 UTC 2014


Module: Mesa
Branch: master
Commit: ba81a3784b451d9cdddd7af2bb15f54bfdfcba42
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba81a3784b451d9cdddd7af2bb15f54bfdfcba42

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Aug 17 01:34:33 2014 +0200

rbug: send the actual number of layers to the client

This sends the correct value for array textures.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/drivers/rbug/rbug_core.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index c5b26b8..ece5e2f 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -204,6 +204,7 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
    struct rbug_proto_texture_info *gpti = (struct rbug_proto_texture_info *)header;
    struct rbug_list *ptr;
    struct pipe_resource *t;
+   unsigned num_layers;
 
    pipe_mutex_lock(rb_screen->list_mutex);
    foreach(ptr, &rb_screen->resources) {
@@ -219,11 +220,13 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
    }
 
    t = tr_tex->resource;
+   num_layers = util_max_layer(t, 0) + 1;
+
    rbug_send_texture_info_reply(tr_rbug->con, serial,
                                t->target, t->format,
                                &t->width0, 1,
                                &t->height0, 1,
-                               &t->depth0, 1,
+                               &num_layers, 1,
                                util_format_get_blockwidth(t->format),
                                util_format_get_blockheight(t->format),
                                util_format_get_blocksize(t->format),




More information about the mesa-commit mailing list