summaryrefslogtreecommitdiff
path: root/progs/rbug
diff options
context:
space:
mode:
Diffstat (limited to 'progs/rbug')
-rw-r--r--progs/rbug/bin_to_bmp.c13
-rw-r--r--progs/rbug/ctx_rule.c2
-rw-r--r--progs/rbug/shdr_disable.c2
-rw-r--r--progs/rbug/shdr_info.c2
-rw-r--r--progs/rbug/tex_dump.c3
-rw-r--r--progs/rbug/tex_info.c3
6 files changed, 17 insertions, 8 deletions
diff --git a/progs/rbug/bin_to_bmp.c b/progs/rbug/bin_to_bmp.c
index 49a5416787..99a7ec5bc5 100644
--- a/progs/rbug/bin_to_bmp.c
+++ b/progs/rbug/bin_to_bmp.c
@@ -22,6 +22,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdio.h>
+
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
#include "pipe/p_state.h"
@@ -30,9 +32,10 @@
#include "util/u_debug.h"
#include "util/u_format.h"
#include "util/u_network.h"
+#include "util/u_string.h"
#include "util/u_tile.h"
-static uint8_t* read(const char *filename, unsigned size);
+static uint8_t* rbug_read(const char *filename, unsigned size);
static void dump(unsigned src_width, unsigned src_height,
unsigned src_stride, enum pipe_format src_format,
uint8_t *data, unsigned src_size);
@@ -45,9 +48,9 @@ int main(int argc, char** argv)
unsigned stride = width * 4;
unsigned size = stride * height;
const char *filename = "mybin.bin";
- enum pipe_format format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ enum pipe_format format = PIPE_FORMAT_B8G8R8A8_UNORM;
- dump(width, height, stride, format, read(filename, size), size);
+ dump(width, height, stride, format, rbug_read(filename, size), size);
return 0;
}
@@ -72,7 +75,7 @@ static void dump(unsigned width, unsigned height,
rgba = MALLOC(dst_size);
}
- util_snprintf(filename, 512, "%s.bmp", pf_name(src_format));
+ util_snprintf(filename, 512, "%s.bmp", util_format_name(src_format));
if (util_format_is_compressed(src_format)) {
debug_printf("skipping: %s\n", filename);
@@ -92,7 +95,7 @@ static void dump(unsigned width, unsigned height,
FREE(rgba);
}
-static uint8_t* read(const char *filename, unsigned size)
+static uint8_t* rbug_read(const char *filename, unsigned size)
{
uint8_t *data;
FILE *file = fopen(filename, "rb");
diff --git a/progs/rbug/ctx_rule.c b/progs/rbug/ctx_rule.c
index e38b7b4e9b..dccebfb79f 100644
--- a/progs/rbug/ctx_rule.c
+++ b/progs/rbug/ctx_rule.c
@@ -22,6 +22,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdio.h>
+
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
#include "util/u_memory.h"
diff --git a/progs/rbug/shdr_disable.c b/progs/rbug/shdr_disable.c
index e6b12073d8..a80a841a77 100644
--- a/progs/rbug/shdr_disable.c
+++ b/progs/rbug/shdr_disable.c
@@ -22,6 +22,8 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdio.h>
+
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
#include "util/u_memory.h"
diff --git a/progs/rbug/shdr_info.c b/progs/rbug/shdr_info.c
index b6864e988e..ec8d77675e 100644
--- a/progs/rbug/shdr_info.c
+++ b/progs/rbug/shdr_info.c
@@ -51,7 +51,7 @@ static void shader_info(struct rbug_connection *con, rbug_context_t ctx)
assert(header->opcode == RBUG_OP_SHADER_INFO_REPLY);
info = (struct rbug_proto_shader_info_reply *)header;
- debug_printf("% 15llu |% 15llu |% 15u |\n",
+ debug_printf("%15llu | %15llu | %15u |\n",
(unsigned long long)ctx,
(unsigned long long)list->shaders[i],
(unsigned)info->disabled);
diff --git a/progs/rbug/tex_dump.c b/progs/rbug/tex_dump.c
index 963f8eeede..dd30d30908 100644
--- a/progs/rbug/tex_dump.c
+++ b/progs/rbug/tex_dump.c
@@ -29,6 +29,7 @@
#include "util/u_debug.h"
#include "util/u_format.h"
#include "util/u_network.h"
+#include "util/u_string.h"
#include "util/u_tile.h"
#include "rbug/rbug.h"
@@ -48,7 +49,7 @@ static void dump(rbug_texture_t tex,
char filename[512];
util_snprintf(filename, 512, "%llu_%s_%u.bmp",
- (unsigned long long)tex, pf_name(info->format), mip);
+ (unsigned long long)tex, util_format_name(info->format), mip);
if (util_format_is_compressed(info->format)) {
debug_printf("skipping: %s\n", filename);
diff --git a/progs/rbug/tex_info.c b/progs/rbug/tex_info.c
index 4a21bae359..60ed9e2149 100644
--- a/progs/rbug/tex_info.c
+++ b/progs/rbug/tex_info.c
@@ -24,6 +24,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_debug.h"
#include "util/u_network.h"
@@ -60,7 +61,7 @@ static void talk()
info = (struct rbug_proto_texture_info_reply *)header;
debug_printf("%llu %s %u x %u x %u, block(%ux%u %u), last_level: %u, nr_samples: %u, usage: %u\n",
- (unsigned long long)list->textures[i], pf_name(info->format),
+ (unsigned long long)list->textures[i], util_format_name(info->format),
info->width[0], info->height[0], info->depth[0],
info->blockw, info->blockh, info->blocksize,
info->last_level, info->nr_samples, info->tex_usage);