2 * Copyright (c) 2008-2016 VMware, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #ifndef U_DEBUG_IMAGE_H
28 #define U_DEBUG_IMAGE_H
31 #include "pipe/p_compiler.h"
32 #include "pipe/p_format.h"
41 void debug_dump_image(const char *prefix
,
42 enum pipe_format format
, unsigned cpp
,
43 unsigned width
, unsigned height
,
46 void debug_dump_surface(struct pipe_context
*pipe
,
48 struct pipe_surface
*surface
);
49 void debug_dump_texture(struct pipe_context
*pipe
,
51 struct pipe_resource
*texture
);
52 void debug_dump_surface_bmp(struct pipe_context
*pipe
,
54 struct pipe_surface
*surface
);
55 void debug_dump_transfer_bmp(struct pipe_context
*pipe
,
57 struct pipe_transfer
*transfer
, void *ptr
);
58 void debug_dump_float_rgba_bmp(const char *filename
,
59 unsigned width
, unsigned height
,
60 float *rgba
, unsigned stride
);
61 void debug_dump_ubyte_rgba_bmp(const char *filename
,
62 unsigned width
, unsigned height
,
63 const ubyte
*rgba
, unsigned stride
);
65 #define debug_dump_image(prefix, format, cpp, width, height, stride, data) ((void)0)
66 #define debug_dump_surface(pipe, prefix, surface) ((void)0)
67 #define debug_dump_surface_bmp(pipe, filename, surface) ((void)0)
68 #define debug_dump_transfer_bmp(filename, transfer, ptr) ((void)0)
69 #define debug_dump_float_rgba_bmp(filename, width, height, rgba, stride) ((void)0)
70 #define debug_dump_ubyte_rgba_bmp(filename, width, height, rgba, stride) ((void)0)