From b1ed72ebe2599ec178f51d86fd42f26486b9a19b Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 17 Dec 2009 23:41:57 +0100 Subject: Move the remaining format pf_get_* functions to u_format.h. Previously they depended on format blocks, but after removing those they started depending on format encoding. --- progs/rbug/bin_to_bmp.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'progs/rbug') diff --git a/progs/rbug/bin_to_bmp.c b/progs/rbug/bin_to_bmp.c index cdae3486ce..03ff622fee 100644 --- a/progs/rbug/bin_to_bmp.c +++ b/progs/rbug/bin_to_bmp.c @@ -25,6 +25,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_format.h" #include "pipe/p_state.h" +#include "util/u_format.h" #include "util/u_memory.h" #include "util/u_debug.h" #include "util/u_network.h" @@ -54,10 +55,7 @@ static void dump(unsigned width, unsigned height, unsigned src_stride, enum pipe_format src_format, uint8_t *data, unsigned src_size) { - struct pipe_format_block src_block; - enum pipe_format dst_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - struct pipe_format_block dst_block; unsigned dst_stride; unsigned dst_size; float *rgba; @@ -65,14 +63,11 @@ static void dump(unsigned width, unsigned height, char filename[512]; { - pf_get_block(src_format, &src_block); - assert(src_stride >= pf_get_stride(&src_block, width)); - assert(src_size >= pf_get_2d_size(&src_block, src_stride, width)); + assert(src_stride >= util_format_get_stride(src_format, width)); } { - pf_get_block(dst_format, &dst_block); - dst_stride = pf_get_stride(&dst_block, width); - dst_size = pf_get_2d_size(&dst_block, dst_stride, width); + dst_stride = util_format_get_stride(dst_format, width); + dst_size = util_format_get_2d_size(dst_format, dst_stride, width); rgba = MALLOC(dst_size); } -- cgit v1.2.3 From faae0e5da3c955ef98d87d127fda671de4bdb4a4 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 23 Dec 2009 16:55:16 +0100 Subject: rbug: rename pf_is_compressed to util_format_is_compressed --- progs/rbug/bin_to_bmp.c | 3 ++- progs/rbug/tex_dump.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'progs/rbug') diff --git a/progs/rbug/bin_to_bmp.c b/progs/rbug/bin_to_bmp.c index 03ff622fee..49a5416787 100644 --- a/progs/rbug/bin_to_bmp.c +++ b/progs/rbug/bin_to_bmp.c @@ -28,6 +28,7 @@ #include "util/u_format.h" #include "util/u_memory.h" #include "util/u_debug.h" +#include "util/u_format.h" #include "util/u_network.h" #include "util/u_tile.h" @@ -73,7 +74,7 @@ static void dump(unsigned width, unsigned height, util_snprintf(filename, 512, "%s.bmp", pf_name(src_format)); - if (pf_is_compressed(src_format)) { + if (util_format_is_compressed(src_format)) { debug_printf("skipping: %s\n", filename); return; } diff --git a/progs/rbug/tex_dump.c b/progs/rbug/tex_dump.c index f9e06ee994..963f8eeede 100644 --- a/progs/rbug/tex_dump.c +++ b/progs/rbug/tex_dump.c @@ -27,6 +27,7 @@ #include "pipe/p_state.h" #include "util/u_memory.h" #include "util/u_debug.h" +#include "util/u_format.h" #include "util/u_network.h" #include "util/u_tile.h" #include "rbug/rbug.h" @@ -49,7 +50,7 @@ static void dump(rbug_texture_t tex, util_snprintf(filename, 512, "%llu_%s_%u.bmp", (unsigned long long)tex, pf_name(info->format), mip); - if (pf_is_compressed(info->format)) { + if (util_format_is_compressed(info->format)) { debug_printf("skipping: %s\n", filename); return; } -- cgit v1.2.3 From ad9defdd9c5c7a18c833cdacebe012604190f167 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 1 Jan 2010 16:25:37 -0800 Subject: progs/rbug: s/wait/rbug_wait/ wait conflicts with wait in /usr/include/sys/wait.h. --- progs/rbug/simple_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'progs/rbug') diff --git a/progs/rbug/simple_server.c b/progs/rbug/simple_server.c index 04380c3310..3a842c06c4 100644 --- a/progs/rbug/simple_server.c +++ b/progs/rbug/simple_server.c @@ -29,7 +29,7 @@ #include "rbug/rbug.h" -static void wait() +static void rbug_wait() { int s = u_socket_listen_on_port(13370); int c = u_socket_accept(s); @@ -57,6 +57,6 @@ static void wait() int main(int argc, char** argv) { - wait(); + rbug_wait(); return 0; } -- cgit v1.2.3