summaryrefslogtreecommitdiffstats
path: root/progs/rbug
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-17 23:41:57 +0100
committerMichal Krol <[email protected]>2009-12-17 23:41:57 +0100
commitb1ed72ebe2599ec178f51d86fd42f26486b9a19b (patch)
treeb49428bb48d81bf1396ef14ee8a0a462f89d2d8e /progs/rbug
parentec5577a83da18890a4f334af2241aca41b6ed31b (diff)
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.
Diffstat (limited to 'progs/rbug')
-rw-r--r--progs/rbug/bin_to_bmp.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/progs/rbug/bin_to_bmp.c b/progs/rbug/bin_to_bmp.c
index cdae3486ce0..03ff622fee7 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);
}