summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-08-17 02:23:05 +0200
committerMarek Olšák <marek.olsak@amd.com>2014-08-25 13:00:58 +0200
commit67943e8bdf930f1155c84522ec05da4e783ce691 (patch)
treeefc438eab58341fe8ca8d3148409fec32bc24754
parenta5d5a2f69fd4f772d6edde18fa4c1e41368b58df (diff)
rbug-gui: print texture target and format in the info column
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r--src/texture.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/texture.c b/src/texture.c
index 659d0de..40e6f29 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -28,6 +28,9 @@
#include "pipe/p_format.h"
#include "util/u_format.h"
+#undef CLAMP
+#include "util/u_inlines.h"
+#include "tgsi/tgsi_strings.h"
/* needed for u_tile */
#include "pipe/p_state.h"
@@ -437,7 +440,7 @@ static gboolean texture_action_read_info(struct rbug_event *e,
struct rbug_proto_texture_info_reply *info;
struct texture_action_read *action;
uint32_t serial = 0;
- char info_short_string[64];
+ char info_short_string[128];
char info_long_string[128];
GdkPixbuf *buf = NULL;
@@ -598,7 +601,10 @@ static gboolean texture_action_read_info(struct rbug_event *e,
case PIPE_FORMAT_B4G4R4X4_UNORM: break;
}
- snprintf(info_short_string, 64, "%ux%ux%u", info->width[0], info->height[0], info->depth[0]);
+ snprintf(info_short_string, 128, "%s, %ux%ux%u, %s",
+ tgsi_texture_names[util_pipe_tex_to_tgsi_tex(info->target, info->nr_samples)],
+ info->width[0], info->height[0], info->depth[0],
+ util_format_name(info->format)+12);
snprintf(info_long_string, 128, "%s (%ux%ux%u) %u", util_format_name(info->format), info->width[0], info->height[0], info->depth[0], info->last_level);
gtk_tree_store_set(p->main.treestore, &action->iter,