treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible
This is achieved by the following steps: #ifndef DEBUG => #if !MESA_DEBUG defined(DEBUG) => MESA_DEBUG #ifdef DEBUG => #if MESA_DEBUG This is done by replace in vscode excludes docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu These are safe because those files should keep DEBUG macro is already excluded; and not directly replace DEBUG, as we have some symbols around it. Use debug or NDEBUG instead of DEBUG in comments when proper This for reduce the usage of DEBUG, so it's easier migrating to MESA_DEBUG These are found when migrating DEBUG to MESA_DEBUG, these are all comment update, so it's safe Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG !DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG) Replace the DEBUG present in comment with proper new MESA_DEBUG manually Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
This commit is contained in:
@@ -397,7 +397,7 @@ qpu_validate(struct v3d_compile *c)
|
|||||||
* keep compiling the validation code to make sure it doesn't get
|
* keep compiling the validation code to make sure it doesn't get
|
||||||
* broken.
|
* broken.
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2170,7 +2170,7 @@ try_opt_ldunif(struct v3d_compile *c, uint32_t index, struct qreg *unif)
|
|||||||
struct qinst *prev_inst = NULL;
|
struct qinst *prev_inst = NULL;
|
||||||
assert(c->cur_block);
|
assert(c->cur_block);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* We can only reuse a uniform if it was emitted in the same block,
|
/* We can only reuse a uniform if it was emitted in the same block,
|
||||||
* so callers must make sure the current instruction is being emitted
|
* so callers must make sure the current instruction is being emitted
|
||||||
* in the current block.
|
* in the current block.
|
||||||
|
@@ -1808,7 +1808,7 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||||||
perf_debug("Device created with Robust Image Access enabled.\n");
|
perf_debug("Device created with Robust Image Access enabled.\n");
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
v3dv_X(device, device_check_prepacked_sizes)();
|
v3dv_X(device, device_check_prepacked_sizes)();
|
||||||
#endif
|
#endif
|
||||||
init_device_meta(device);
|
init_device_meta(device);
|
||||||
|
@@ -104,7 +104,7 @@
|
|||||||
#include "wsi_common.h"
|
#include "wsi_common.h"
|
||||||
|
|
||||||
/* A non-fatal assert. Useful for debugging. */
|
/* A non-fatal assert. Useful for debugging. */
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define v3dv_assert(x) ({ \
|
#define v3dv_assert(x) ({ \
|
||||||
if (unlikely(!(x))) \
|
if (unlikely(!(x))) \
|
||||||
fprintf(stderr, "%s:%d ASSERT: %s", __FILE__, __LINE__, #x); \
|
fprintf(stderr, "%s:%d ASSERT: %s", __FILE__, __LINE__, #x); \
|
||||||
|
@@ -615,7 +615,7 @@ v3dv_write_uniforms_wg_offsets(struct v3dv_cmd_buffer *cmd_buffer,
|
|||||||
} else {
|
} else {
|
||||||
assert(cmd_buffer->vk.level == VK_COMMAND_BUFFER_LEVEL_SECONDARY);
|
assert(cmd_buffer->vk.level == VK_COMMAND_BUFFER_LEVEL_SECONDARY);
|
||||||
num_layers = 2048;
|
num_layers = 2048;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
fprintf(stderr, "Skipping gl_LayerID shader sanity check for "
|
fprintf(stderr, "Skipping gl_LayerID shader sanity check for "
|
||||||
"secondary command buffer\n");
|
"secondary command buffer\n");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -387,7 +387,7 @@ v3dX(get_hw_clear_color)(const VkClearColorValue *color,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
void
|
void
|
||||||
v3dX(device_check_prepacked_sizes)(void)
|
v3dX(device_check_prepacked_sizes)(void)
|
||||||
{
|
{
|
||||||
|
@@ -152,7 +152,7 @@ v3dX(framebuffer_compute_internal_bpp_msaa)(const struct v3dv_framebuffer *frame
|
|||||||
uint8_t *total_color_bpp,
|
uint8_t *total_color_bpp,
|
||||||
bool *msaa);
|
bool *msaa);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
void
|
void
|
||||||
v3dX(device_check_prepacked_sizes)(void);
|
v3dX(device_check_prepacked_sizes)(void);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -643,7 +643,7 @@ private:
|
|||||||
* If the name length fits into name_storage, it's used, otherwise
|
* If the name length fits into name_storage, it's used, otherwise
|
||||||
* the name is ralloc'd. shader-db mining showed that 70% of variables
|
* the name is ralloc'd. shader-db mining showed that 70% of variables
|
||||||
* fit here. This is a win over ralloc where only ralloc_header has
|
* fit here. This is a win over ralloc where only ralloc_header has
|
||||||
* 20 bytes on 64-bit (28 bytes with DEBUG), and we can also skip malloc.
|
* 20 bytes on 64-bit (28 bytes with debug), and we can also skip malloc.
|
||||||
*/
|
*/
|
||||||
char name_storage[16];
|
char name_storage[16];
|
||||||
|
|
||||||
|
@@ -1247,7 +1247,7 @@ validate_ir_tree(exec_list *instructions)
|
|||||||
* and it's half composed of assert()s anyway which wouldn't do
|
* and it's half composed of assert()s anyway which wouldn't do
|
||||||
* anything.
|
* anything.
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
if (!debug_get_bool_option("GLSL_VALIDATE", false))
|
if (!debug_get_bool_option("GLSL_VALIDATE", false))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -172,7 +172,7 @@ find_output(nir_shader *shader, unsigned drvloc)
|
|||||||
nir_def *new_def = find_output_in_block(block, drvloc);
|
nir_def *new_def = find_output_in_block(block, drvloc);
|
||||||
assert(!(new_def && def));
|
assert(!(new_def && def));
|
||||||
def = new_def;
|
def = new_def;
|
||||||
#if !defined(DEBUG)
|
#if !MESA_DEBUG
|
||||||
/* for debug builds, scan entire shader to assert
|
/* for debug builds, scan entire shader to assert
|
||||||
* if output is written multiple times. For release
|
* if output is written multiple times. For release
|
||||||
* builds just assume all is well and bail when we
|
* builds just assume all is well and bail when we
|
||||||
|
@@ -53,7 +53,7 @@ extern "C" {
|
|||||||
#include "target-helpers/inline_sw_helper.h"
|
#include "target-helpers/inline_sw_helper.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define TRACE(x...) printf("egl_haiku: " x)
|
#define TRACE(x...) printf("egl_haiku: " x)
|
||||||
#define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__)
|
#define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__)
|
||||||
#else
|
#else
|
||||||
|
@@ -466,8 +466,8 @@ _eglMatchConfig(const _EGLConfig *conf, const _EGLConfig *criteria)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
/* only print the common errors when DEBUG is not defined */
|
/* only print the common errors when MESA_DEBUG is defined to 0 */
|
||||||
if (attr != EGL_RENDERABLE_TYPE)
|
if (attr != EGL_RENDERABLE_TYPE)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -504,7 +504,7 @@ struct ir3_block *
|
|||||||
ir3_block_create(struct ir3 *shader)
|
ir3_block_create(struct ir3 *shader)
|
||||||
{
|
{
|
||||||
struct ir3_block *block = ir3_alloc(shader, sizeof(*block));
|
struct ir3_block *block = ir3_alloc(shader, sizeof(*block));
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
block->serialno = ++shader->block_count;
|
block->serialno = ++shader->block_count;
|
||||||
#endif
|
#endif
|
||||||
block->shader = shader;
|
block->shader = shader;
|
||||||
@@ -633,7 +633,7 @@ instr_create(struct ir3_block *block, opc_t opc, int ndst, int nsrc)
|
|||||||
instr->dsts = (struct ir3_register **)ptr;
|
instr->dsts = (struct ir3_register **)ptr;
|
||||||
instr->srcs = instr->dsts + ndst;
|
instr->srcs = instr->dsts + ndst;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
instr->dsts_max = ndst;
|
instr->dsts_max = ndst;
|
||||||
instr->srcs_max = nsrc;
|
instr->srcs_max = nsrc;
|
||||||
#endif
|
#endif
|
||||||
@@ -737,7 +737,7 @@ struct ir3_register *
|
|||||||
ir3_src_create(struct ir3_instruction *instr, int num, int flags)
|
ir3_src_create(struct ir3_instruction *instr, int num, int flags)
|
||||||
{
|
{
|
||||||
struct ir3 *shader = instr->block->shader;
|
struct ir3 *shader = instr->block->shader;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
assert(instr->srcs_count < instr->srcs_max);
|
assert(instr->srcs_count < instr->srcs_max);
|
||||||
#endif
|
#endif
|
||||||
struct ir3_register *reg = reg_create(shader, num, flags);
|
struct ir3_register *reg = reg_create(shader, num, flags);
|
||||||
@@ -749,7 +749,7 @@ struct ir3_register *
|
|||||||
ir3_dst_create(struct ir3_instruction *instr, int num, int flags)
|
ir3_dst_create(struct ir3_instruction *instr, int num, int flags)
|
||||||
{
|
{
|
||||||
struct ir3 *shader = instr->block->shader;
|
struct ir3 *shader = instr->block->shader;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
assert(instr->dsts_count < instr->dsts_max);
|
assert(instr->dsts_count < instr->dsts_max);
|
||||||
#endif
|
#endif
|
||||||
struct ir3_register *reg = reg_create(shader, num, flags);
|
struct ir3_register *reg = reg_create(shader, num, flags);
|
||||||
|
@@ -354,7 +354,7 @@ struct ir3_instruction {
|
|||||||
BITMASK_ENUM(ir3_instruction_flags) flags;
|
BITMASK_ENUM(ir3_instruction_flags) flags;
|
||||||
uint8_t repeat;
|
uint8_t repeat;
|
||||||
uint8_t nop;
|
uint8_t nop;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
unsigned srcs_max, dsts_max;
|
unsigned srcs_max, dsts_max;
|
||||||
#endif
|
#endif
|
||||||
unsigned srcs_count, dsts_count;
|
unsigned srcs_count, dsts_count;
|
||||||
@@ -582,7 +582,7 @@ struct ir3 {
|
|||||||
/* List of ir3_array's: */
|
/* List of ir3_array's: */
|
||||||
struct list_head array_list;
|
struct list_head array_list;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
unsigned block_count;
|
unsigned block_count;
|
||||||
#endif
|
#endif
|
||||||
unsigned instr_count;
|
unsigned instr_count;
|
||||||
@@ -669,7 +669,7 @@ struct ir3_block {
|
|||||||
uint32_t loop_id;
|
uint32_t loop_id;
|
||||||
uint32_t loop_depth;
|
uint32_t loop_depth;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
uint32_t serialno;
|
uint32_t serialno;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -677,7 +677,7 @@ struct ir3_block {
|
|||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
block_id(struct ir3_block *block)
|
block_id(struct ir3_block *block)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
return block->serialno;
|
return block->serialno;
|
||||||
#else
|
#else
|
||||||
return (uint32_t)(unsigned long)block;
|
return (uint32_t)(unsigned long)block;
|
||||||
|
@@ -49,8 +49,8 @@ static const struct debug_named_value shader_debug_options[] = {
|
|||||||
{"nopreamble", IR3_DBG_NOPREAMBLE, "Disable the preamble pass"},
|
{"nopreamble", IR3_DBG_NOPREAMBLE, "Disable the preamble pass"},
|
||||||
{"fullsync", IR3_DBG_FULLSYNC, "Add (sy) + (ss) after each cat5/cat6"},
|
{"fullsync", IR3_DBG_FULLSYNC, "Add (sy) + (ss) after each cat5/cat6"},
|
||||||
{"fullnop", IR3_DBG_FULLNOP, "Add nops before each instruction"},
|
{"fullnop", IR3_DBG_FULLNOP, "Add nops before each instruction"},
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* DEBUG-only options: */
|
/* MESA_DEBUG-only options: */
|
||||||
{"schedmsgs", IR3_DBG_SCHEDMSGS, "Enable scheduler debug messages"},
|
{"schedmsgs", IR3_DBG_SCHEDMSGS, "Enable scheduler debug messages"},
|
||||||
{"ramsgs", IR3_DBG_RAMSGS, "Enable register-allocation debug messages"},
|
{"ramsgs", IR3_DBG_RAMSGS, "Enable register-allocation debug messages"},
|
||||||
#endif
|
#endif
|
||||||
|
@@ -317,7 +317,7 @@ enum ir3_shader_debug {
|
|||||||
IR3_DBG_FULLSYNC = BITFIELD_BIT(15),
|
IR3_DBG_FULLSYNC = BITFIELD_BIT(15),
|
||||||
IR3_DBG_FULLNOP = BITFIELD_BIT(16),
|
IR3_DBG_FULLNOP = BITFIELD_BIT(16),
|
||||||
|
|
||||||
/* DEBUG-only options: */
|
/* MESA_DEBUG-only options: */
|
||||||
IR3_DBG_SCHEDMSGS = BITFIELD_BIT(20),
|
IR3_DBG_SCHEDMSGS = BITFIELD_BIT(20),
|
||||||
IR3_DBG_RAMSGS = BITFIELD_BIT(21),
|
IR3_DBG_RAMSGS = BITFIELD_BIT(21),
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "ir3_compiler.h"
|
#include "ir3_compiler.h"
|
||||||
#include "ir3_context.h"
|
#include "ir3_context.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define SCHED_DEBUG (ir3_shader_debug & IR3_DBG_SCHEDMSGS)
|
#define SCHED_DEBUG (ir3_shader_debug & IR3_DBG_SCHEDMSGS)
|
||||||
#else
|
#else
|
||||||
#define SCHED_DEBUG 0
|
#define SCHED_DEBUG 0
|
||||||
|
@@ -72,7 +72,7 @@ print_instr_name(struct log_stream *stream, struct ir3_instruction *instr,
|
|||||||
{
|
{
|
||||||
if (!instr)
|
if (!instr)
|
||||||
return;
|
return;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
mesa_log_stream_printf(stream, "%04u:", instr->serialno);
|
mesa_log_stream_printf(stream, "%04u:", instr->serialno);
|
||||||
#endif
|
#endif
|
||||||
mesa_log_stream_printf(stream, "%04u:", instr->ip);
|
mesa_log_stream_printf(stream, "%04u:", instr->ip);
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include "ir3.h"
|
#include "ir3.h"
|
||||||
#include "ir3_compiler.h"
|
#include "ir3_compiler.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define RA_DEBUG (ir3_shader_debug & IR3_DBG_RAMSGS)
|
#define RA_DEBUG (ir3_shader_debug & IR3_DBG_RAMSGS)
|
||||||
#else
|
#else
|
||||||
#define RA_DEBUG 0
|
#define RA_DEBUG 0
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "ir3.h"
|
#include "ir3.h"
|
||||||
#include "ir3_compiler.h"
|
#include "ir3_compiler.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define SCHED_DEBUG (ir3_shader_debug & IR3_DBG_SCHEDMSGS)
|
#define SCHED_DEBUG (ir3_shader_debug & IR3_DBG_SCHEDMSGS)
|
||||||
#else
|
#else
|
||||||
#define SCHED_DEBUG 0
|
#define SCHED_DEBUG 0
|
||||||
|
@@ -489,7 +489,7 @@ static void
|
|||||||
tu_bo_set_kernel_name(struct tu_device *dev, struct tu_bo *bo, const char *name)
|
tu_bo_set_kernel_name(struct tu_device *dev, struct tu_bo *bo, const char *name)
|
||||||
{
|
{
|
||||||
bool kernel_bo_names = dev->bo_sizes != NULL;
|
bool kernel_bo_names = dev->bo_sizes != NULL;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
kernel_bo_names = true;
|
kernel_bo_names = true;
|
||||||
#endif
|
#endif
|
||||||
if (!kernel_bo_names)
|
if (!kernel_bo_names)
|
||||||
|
@@ -534,7 +534,7 @@ static void
|
|||||||
tu_bo_set_kernel_name(struct tu_device *dev, struct tu_bo *bo, const char *name)
|
tu_bo_set_kernel_name(struct tu_device *dev, struct tu_bo *bo, const char *name)
|
||||||
{
|
{
|
||||||
bool kernel_bo_names = dev->bo_sizes != NULL;
|
bool kernel_bo_names = dev->bo_sizes != NULL;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
kernel_bo_names = true;
|
kernel_bo_names = true;
|
||||||
#endif
|
#endif
|
||||||
if (!kernel_bo_names)
|
if (!kernel_bo_names)
|
||||||
|
@@ -173,7 +173,7 @@ TAG(do_cliptest)(struct pt_post_vs *pvs,
|
|||||||
position[2] = position[2] * w * scale[2] + trans[2];
|
position[2] = position[2] * w * scale[2] + trans[2];
|
||||||
position[3] = w;
|
position[3] = w;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* For debug builds, set the clipped vertex's window coordinate
|
/* For debug builds, set the clipped vertex's window coordinate
|
||||||
* to NaN to help catch potential errors later.
|
* to NaN to help catch potential errors later.
|
||||||
*/
|
*/
|
||||||
|
@@ -245,7 +245,7 @@ draw_pipeline_run(struct draw_context *draw,
|
|||||||
start += prim_info->primitive_lengths[i], i++) {
|
start += prim_info->primitive_lengths[i], i++) {
|
||||||
const unsigned count = prim_info->primitive_lengths[i];
|
const unsigned count = prim_info->primitive_lengths[i];
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Warn if one of the element indexes go outside the vertex buffer */
|
/* Warn if one of the element indexes go outside the vertex buffer */
|
||||||
{
|
{
|
||||||
unsigned max_index = 0x0;
|
unsigned max_index = 0x0;
|
||||||
|
@@ -334,7 +334,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
|
|||||||
if (!aaline_fs.tokens)
|
if (!aaline_fs.tokens)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if 0 /* DEBUG */
|
#if 0 /* debug */
|
||||||
debug_printf("draw_aaline, orig shader:\n");
|
debug_printf("draw_aaline, orig shader:\n");
|
||||||
tgsi_dump(orig_fs->tokens, 0);
|
tgsi_dump(orig_fs->tokens, 0);
|
||||||
debug_printf("draw_aaline, new shader:\n");
|
debug_printf("draw_aaline, new shader:\n");
|
||||||
|
@@ -387,7 +387,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
|||||||
if (!aapoint_fs.tokens)
|
if (!aapoint_fs.tokens)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if 0 /* DEBUG */
|
#if 0 /* debug */
|
||||||
debug_printf("draw_aapoint, orig shader:\n");
|
debug_printf("draw_aapoint, orig shader:\n");
|
||||||
tgsi_dump(orig_fs->tokens, 0);
|
tgsi_dump(orig_fs->tokens, 0);
|
||||||
debug_printf("draw_aapoint, new shader:\n");
|
debug_printf("draw_aapoint, new shader:\n");
|
||||||
|
@@ -73,7 +73,7 @@ static inline struct trace_context *
|
|||||||
trace_context(struct pipe_context *pipe)
|
trace_context(struct pipe_context *pipe)
|
||||||
{
|
{
|
||||||
assert(pipe);
|
assert(pipe);
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
trace_context_check(pipe);
|
trace_context_check(pipe);
|
||||||
#endif
|
#endif
|
||||||
return (struct trace_context *)pipe;
|
return (struct trace_context *)pipe;
|
||||||
|
@@ -62,7 +62,7 @@ extern unsigned gallivm_debug;
|
|||||||
static inline void
|
static inline void
|
||||||
lp_build_name(LLVMValueRef val, const char *format, ...)
|
lp_build_name(LLVMValueRef val, const char *format, ...)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
char name[32];
|
char name[32];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
@@ -76,7 +76,7 @@ static const struct debug_named_value lp_bld_debug_flags[] = {
|
|||||||
{ "perf", GALLIVM_DEBUG_PERF, NULL },
|
{ "perf", GALLIVM_DEBUG_PERF, NULL },
|
||||||
{ "gc", GALLIVM_DEBUG_GC, NULL },
|
{ "gc", GALLIVM_DEBUG_GC, NULL },
|
||||||
/* Don't allow setting DUMP_BC for release builds, since writing the files may be an issue with setuid. */
|
/* Don't allow setting DUMP_BC for release builds, since writing the files may be an issue with setuid. */
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
{ "dumpbc", GALLIVM_DEBUG_DUMP_BC, NULL },
|
{ "dumpbc", GALLIVM_DEBUG_DUMP_BC, NULL },
|
||||||
#endif
|
#endif
|
||||||
DEBUG_NAMED_VALUE_END
|
DEBUG_NAMED_VALUE_END
|
||||||
@@ -525,7 +525,7 @@ gallivm_verify_function(struct gallivm_state *gallivm,
|
|||||||
LLVMValueRef func)
|
LLVMValueRef func)
|
||||||
{
|
{
|
||||||
/* Verify the LLVM IR. If invalid, dump and abort */
|
/* Verify the LLVM IR. If invalid, dump and abort */
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (LLVMVerifyFunction(func, LLVMPrintMessageAction)) {
|
if (LLVMVerifyFunction(func, LLVMPrintMessageAction)) {
|
||||||
lp_debug_dump_value(func);
|
lp_debug_dump_value(func);
|
||||||
assert(0);
|
assert(0);
|
||||||
@@ -634,7 +634,7 @@ gallivm_compile_module(struct gallivm_state *gallivm)
|
|||||||
|
|
||||||
/* Disable frame pointer omission on debug/profile builds */
|
/* Disable frame pointer omission on debug/profile builds */
|
||||||
/* XXX: And workaround http://llvm.org/PR21435 */
|
/* XXX: And workaround http://llvm.org/PR21435 */
|
||||||
#if defined(DEBUG) || defined(PROFILE) || DETECT_ARCH_X86 || DETECT_ARCH_X86_64
|
#if MESA_DEBUG || defined(PROFILE) || DETECT_ARCH_X86 || DETECT_ARCH_X86_64
|
||||||
LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim", "true");
|
LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim", "true");
|
||||||
LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim-non-leaf", "true");
|
LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim-non-leaf", "true");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -130,7 +130,7 @@ static void init_native_targets()
|
|||||||
llvm::InitializeNativeTargetAsmPrinter();
|
llvm::InitializeNativeTargetAsmPrinter();
|
||||||
|
|
||||||
llvm::InitializeNativeTargetDisassembler();
|
llvm::InitializeNativeTargetDisassembler();
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
{
|
{
|
||||||
char *env_llc_options = getenv("GALLIVM_LLC_OPTIONS");
|
char *env_llc_options = getenv("GALLIVM_LLC_OPTIONS");
|
||||||
if (env_llc_options) {
|
if (env_llc_options) {
|
||||||
|
@@ -91,7 +91,7 @@ lp_build_array_get_ptr2(struct gallivm_state *gallivm,
|
|||||||
indices[0] = lp_build_const_int32(gallivm, 0);
|
indices[0] = lp_build_const_int32(gallivm, 0);
|
||||||
indices[1] = index;
|
indices[1] = index;
|
||||||
element_ptr = LLVMBuildGEP2(gallivm->builder, array_type, ptr, indices, ARRAY_SIZE(indices), "");
|
element_ptr = LLVMBuildGEP2(gallivm->builder, array_type, ptr, indices, ARRAY_SIZE(indices), "");
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
lp_build_name(element_ptr, "&%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
lp_build_name(element_ptr, "&%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
||||||
#endif
|
#endif
|
||||||
return element_ptr;
|
return element_ptr;
|
||||||
@@ -111,7 +111,7 @@ lp_build_array_get2(struct gallivm_state *gallivm,
|
|||||||
element_ptr = lp_build_array_get_ptr2(gallivm, array_type, ptr, index);
|
element_ptr = lp_build_array_get_ptr2(gallivm, array_type, ptr, index);
|
||||||
LLVMTypeRef element_type = LLVMGetElementType(array_type);
|
LLVMTypeRef element_type = LLVMGetElementType(array_type);
|
||||||
res = LLVMBuildLoad2(gallivm->builder, element_type, element_ptr, "");
|
res = LLVMBuildLoad2(gallivm->builder, element_type, element_ptr, "");
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
||||||
#endif
|
#endif
|
||||||
return res;
|
return res;
|
||||||
@@ -131,7 +131,7 @@ lp_build_pointer_get_unaligned2(LLVMBuilderRef builder,
|
|||||||
res = LLVMBuildLoad2(builder, ptr_type, element_ptr, "");
|
res = LLVMBuildLoad2(builder, ptr_type, element_ptr, "");
|
||||||
if (alignment)
|
if (alignment)
|
||||||
LLVMSetAlignment(res, alignment);
|
LLVMSetAlignment(res, alignment);
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
|
||||||
#endif
|
#endif
|
||||||
return res;
|
return res;
|
||||||
|
@@ -196,7 +196,7 @@ fenced_buffer_copy_storage_to_cpu_locked(struct fenced_buffer *fenced_buf);
|
|||||||
static void
|
static void
|
||||||
fenced_manager_dump_locked(struct fenced_manager *fenced_mgr)
|
fenced_manager_dump_locked(struct fenced_manager *fenced_mgr)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
struct pb_fence_ops *ops = fenced_mgr->ops;
|
struct pb_fence_ops *ops = fenced_mgr->ops;
|
||||||
struct list_head *curr, *next;
|
struct list_head *curr, *next;
|
||||||
struct fenced_buffer *fenced_buf;
|
struct fenced_buffer *fenced_buf;
|
||||||
@@ -987,7 +987,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* assert(!fenced_mgr->num_unfenced); */
|
/* assert(!fenced_mgr->num_unfenced); */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
#include "pb_bufmgr.h"
|
#include "pb_bufmgr.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
|
|
||||||
#define PB_DEBUG_CREATE_BACKTRACE 8
|
#define PB_DEBUG_CREATE_BACKTRACE 8
|
||||||
@@ -483,7 +483,7 @@ pb_debug_manager_create(struct pb_manager *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else /* !DEBUG */
|
#else /* !MESA_DEBUG */
|
||||||
|
|
||||||
|
|
||||||
struct pb_manager *
|
struct pb_manager *
|
||||||
@@ -494,4 +494,4 @@ pb_debug_manager_create(struct pb_manager *provider,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* !DEBUG */
|
#endif /* MESA_DEBUG */
|
||||||
|
@@ -411,7 +411,7 @@ static void
|
|||||||
micro_exp2(union tgsi_exec_channel *dst,
|
micro_exp2(union tgsi_exec_channel *dst,
|
||||||
const union tgsi_exec_channel *src)
|
const union tgsi_exec_channel *src)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Inf is okay for this instruction, so clamp it to silence assertions. */
|
/* Inf is okay for this instruction, so clamp it to silence assertions. */
|
||||||
unsigned i;
|
unsigned i;
|
||||||
union tgsi_exec_channel clamped;
|
union tgsi_exec_channel clamped;
|
||||||
@@ -426,7 +426,7 @@ micro_exp2(union tgsi_exec_channel *dst,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
src = &clamped;
|
src = &clamped;
|
||||||
#endif /* DEBUG */
|
#endif /* MESA_DEBUG */
|
||||||
|
|
||||||
dst->f[0] = powf(2.0f, src->f[0]);
|
dst->f[0] = powf(2.0f, src->f[0]);
|
||||||
dst->f[1] = powf(2.0f, src->f[1]);
|
dst->f[1] = powf(2.0f, src->f[1]);
|
||||||
@@ -973,7 +973,7 @@ static const union tgsi_exec_channel M128Vec = {
|
|||||||
{-128.0f, -128.0f, -128.0f, -128.0f}
|
{-128.0f, -128.0f, -128.0f, -128.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
static void
|
static void
|
||||||
print_chan(const char *msg, const union tgsi_exec_channel *chan)
|
print_chan(const char *msg, const union tgsi_exec_channel *chan)
|
||||||
{
|
{
|
||||||
@@ -983,7 +983,7 @@ print_chan(const char *msg, const union tgsi_exec_channel *chan)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
static void
|
static void
|
||||||
print_temp(const struct tgsi_exec_machine *mach, unsigned index)
|
print_temp(const struct tgsi_exec_machine *mach, unsigned index)
|
||||||
{
|
{
|
||||||
@@ -1233,7 +1233,7 @@ tgsi_exec_machine_create(enum pipe_shader_type shader_type)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* silence warnings */
|
/* silence warnings */
|
||||||
(void) print_chan;
|
(void) print_chan;
|
||||||
(void) print_temp;
|
(void) print_temp;
|
||||||
|
@@ -2144,7 +2144,7 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
|
|||||||
tgsi_dump( tokens, 0 );
|
tgsi_dump( tokens, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* tgsi_sanity doesn't seem to return if there are too many constants. */
|
/* tgsi_sanity doesn't seem to return if there are too many constants. */
|
||||||
bool too_many_constants = false;
|
bool too_many_constants = false;
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(ureg->const_decls); i++) {
|
for (unsigned i = 0; i < ARRAY_SIZE(ureg->const_decls); i++) {
|
||||||
|
@@ -54,7 +54,7 @@ struct util_cache_entry
|
|||||||
void *key;
|
void *key;
|
||||||
void *value;
|
void *value;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
unsigned count;
|
unsigned count;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -212,7 +212,7 @@ util_cache_set(struct util_cache *cache,
|
|||||||
|
|
||||||
util_cache_entry_destroy(cache, entry);
|
util_cache_entry_destroy(cache, entry);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
++entry->count;
|
++entry->count;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ util_cache_destroy(struct util_cache *cache)
|
|||||||
if (!cache)
|
if (!cache)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (cache->count >= 20*cache->size) {
|
if (cache->count >= 20*cache->size) {
|
||||||
/* Normal approximation of the Poisson distribution */
|
/* Normal approximation of the Poisson distribution */
|
||||||
double mean = (double)cache->count/(double)cache->size;
|
double mean = (double)cache->count/(double)cache->size;
|
||||||
@@ -340,7 +340,7 @@ util_cache_remove(struct util_cache *cache,
|
|||||||
static void
|
static void
|
||||||
ensure_sanity(const struct util_cache *cache)
|
ensure_sanity(const struct util_cache *cache)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
unsigned i, cnt = 0;
|
unsigned i, cnt = 0;
|
||||||
|
|
||||||
assert(cache);
|
assert(cache);
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
* @author Thomas Hellstrom <thellstrom@vmware.com>
|
* @author Thomas Hellstrom <thellstrom@vmware.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#include "util/compiler.h"
|
#include "util/compiler.h"
|
||||||
#include "util/simple_mtx.h"
|
#include "util/simple_mtx.h"
|
||||||
#include "util/u_debug_stack.h"
|
#include "util/u_debug_stack.h"
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
* @author Thomas Hellstrom <thellstrom@vmware.com>
|
* @author Thomas Hellstrom <thellstrom@vmware.com>
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
#ifndef U_DEBUG_FLUSH_H_
|
#ifndef U_DEBUG_FLUSH_H_
|
||||||
#define U_DEBUG_FLUSH_H_
|
#define U_DEBUG_FLUSH_H_
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dump an image to .ppm file.
|
* Dump an image to .ppm file.
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include "util/format/u_formats.h"
|
#include "util/format/u_formats.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
struct pipe_context;
|
struct pipe_context;
|
||||||
struct pipe_surface;
|
struct pipe_surface;
|
||||||
struct pipe_transfer;
|
struct pipe_transfer;
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if MESA_DEBUG
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the GALLIUM_REFCNT_LOG env var is defined as a filename, gallium
|
* If the GALLIUM_REFCNT_LOG env var is defined as a filename, gallium
|
||||||
@@ -188,4 +188,4 @@ debug_reference_slowpath(const struct pipe_reference *p,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* DEBUG */
|
#endif /* MESA_DEBUG */
|
||||||
|
@@ -36,7 +36,7 @@ extern "C" {
|
|||||||
|
|
||||||
typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
|
typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if MESA_DEBUG
|
||||||
|
|
||||||
extern int debug_refcnt_state;
|
extern int debug_refcnt_state;
|
||||||
|
|
||||||
|
@@ -402,7 +402,7 @@ util_pstipple_create_fragment_shader(const struct tgsi_token *tokens,
|
|||||||
if (!new_tokens)
|
if (!new_tokens)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#if 0 /* DEBUG */
|
#if 0 /* debug */
|
||||||
tgsi_dump(fs->tokens, 0);
|
tgsi_dump(fs->tokens, 0);
|
||||||
tgsi_dump(new_fs->tokens, 0);
|
tgsi_dump(new_fs->tokens, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1014,7 +1014,7 @@ _crocus_batch_flush(struct crocus_batch *batch, const char *file, int line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
const bool color = INTEL_DEBUG(DEBUG_COLOR);
|
const bool color = INTEL_DEBUG(DEBUG_COLOR);
|
||||||
fprintf(stderr, "%scrocus: Failed to submit batchbuffer: %-80s%s\n",
|
fprintf(stderr, "%scrocus: Failed to submit batchbuffer: %-80s%s\n",
|
||||||
color ? "\e[1;41m" : "", strerror(-ret), color ? "\e[0m" : "");
|
color ? "\e[1;41m" : "", strerror(-ret), color ? "\e[0m" : "");
|
||||||
|
@@ -55,7 +55,7 @@ get_dxgi_factory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
UINT flags = 0;
|
UINT flags = 0;
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
if (d3d12_debug & D3D12_DEBUG_DEBUG_LAYER)
|
if (d3d12_debug & D3D12_DEBUG_DEBUG_LAYER)
|
||||||
#endif
|
#endif
|
||||||
flags |= DXGI_CREATE_FACTORY_DEBUG;
|
flags |= DXGI_CREATE_FACTORY_DEBUG;
|
||||||
|
@@ -438,7 +438,7 @@ convert_planar_resource(struct d3d12_resource *res)
|
|||||||
plane_res->base.b.width0 = util_format_get_plane_width(res->base.b.format, plane, res->base.b.width0);
|
plane_res->base.b.width0 = util_format_get_plane_width(res->base.b.format, plane, res->base.b.width0);
|
||||||
plane_res->base.b.height0 = util_format_get_plane_height(res->base.b.format, plane, res->base.b.height0);
|
plane_res->base.b.height0 = util_format_get_plane_height(res->base.b.format, plane, res->base.b.height0);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
struct d3d12_screen *screen = d3d12_screen(res->base.b.screen);
|
struct d3d12_screen *screen = d3d12_screen(res->base.b.screen);
|
||||||
D3D12_RESOURCE_DESC desc = GetDesc(res->bo->res);
|
D3D12_RESOURCE_DESC desc = GetDesc(res->bo->res);
|
||||||
desc.Flags &= ~D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
desc.Flags &= ~D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
||||||
|
@@ -1521,7 +1521,7 @@ d3d12_init_screen(struct d3d12_screen *screen, IUnknown *adapter)
|
|||||||
#ifndef _GAMING_XBOX
|
#ifndef _GAMING_XBOX
|
||||||
ID3D12DeviceFactory *factory = try_create_device_factory(screen->d3d12_mod);
|
ID3D12DeviceFactory *factory = try_create_device_factory(screen->d3d12_mod);
|
||||||
|
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
if (d3d12_debug & D3D12_DEBUG_DEBUG_LAYER)
|
if (d3d12_debug & D3D12_DEBUG_DEBUG_LAYER)
|
||||||
#endif
|
#endif
|
||||||
enable_d3d12_debug_layer(screen->d3d12_mod, factory);
|
enable_d3d12_debug_layer(screen->d3d12_mod, factory);
|
||||||
|
@@ -2094,7 +2094,7 @@ d3d12_video_encoder_encode_bitstream(struct pipe_video_codec * codec,
|
|||||||
|
|
||||||
CD3DX12_RESOURCE_DESC referencesTexArrayDesc(GetDesc(referenceFramesDescriptor.ppTexture2Ds[0]));
|
CD3DX12_RESOURCE_DESC referencesTexArrayDesc(GetDesc(referenceFramesDescriptor.ppTexture2Ds[0]));
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
// the reconpic output should be all the same texarray allocation
|
// the reconpic output should be all the same texarray allocation
|
||||||
if((reconPicOutputTextureDesc.pReconstructedPicture) && (referenceFramesDescriptor.NumTexture2Ds > 0))
|
if((reconPicOutputTextureDesc.pReconstructedPicture) && (referenceFramesDescriptor.NumTexture2Ds > 0))
|
||||||
assert(referenceFramesDescriptor.ppTexture2Ds[0] == reconPicOutputTextureDesc.pReconstructedPicture);
|
assert(referenceFramesDescriptor.ppTexture2Ds[0] == reconPicOutputTextureDesc.pReconstructedPicture);
|
||||||
|
@@ -96,7 +96,7 @@ d3d12_video_encoder_references_manager_av1::begin_frame(D3D12_VIDEO_ENCODER_PICT
|
|||||||
reconPic.ReconstructedPictureSubresource;
|
reconPic.ReconstructedPictureSubresource;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
assert(m_PhysicalAllocationsStorage.get_number_of_tracked_allocations() <=
|
assert(m_PhysicalAllocationsStorage.get_number_of_tracked_allocations() <=
|
||||||
(NUM_REF_FRAMES + 1)); // pool is not extended beyond maximum expected usage
|
(NUM_REF_FRAMES + 1)); // pool is not extended beyond maximum expected usage
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ d3d12_video_encoder_references_manager_av1::get_current_frame_picture_control_da
|
|||||||
m_CurrentFramePicParams.ReferenceFramesReconPictureDescriptors[i] =
|
m_CurrentFramePicParams.ReferenceFramesReconPictureDescriptors[i] =
|
||||||
m_CurrentFrameReferencesData.pVirtualDPBEntries[i];
|
m_CurrentFrameReferencesData.pVirtualDPBEntries[i];
|
||||||
|
|
||||||
#ifdef DEBUG // Otherwise may iterate over structures and do no-op debug_printf
|
#if MESA_DEBUG // Otherwise may iterate over structures and do no-op debug_printf
|
||||||
print_ref_frame_idx();
|
print_ref_frame_idx();
|
||||||
print_virtual_dpb_entries();
|
print_virtual_dpb_entries();
|
||||||
print_physical_resource_references();
|
print_physical_resource_references();
|
||||||
|
@@ -408,7 +408,7 @@ create_variant(struct etna_shader *shader,
|
|||||||
|
|
||||||
etna_disk_cache_store(shader->compiler, v);
|
etna_disk_cache_store(shader->compiler, v);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (DBG_ENABLED(ETNA_DBG_DUMP_SHADERS))
|
if (DBG_ENABLED(ETNA_DBG_DUMP_SHADERS))
|
||||||
etna_dump_shader(v);
|
etna_dump_shader(v);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -293,7 +293,7 @@ setup_border_colors(struct fd_texture_stateobj *tex,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
memset(&e->__pad0, 0, sizeof(e->__pad0));
|
memset(&e->__pad0, 0, sizeof(e->__pad0));
|
||||||
memset(&e->__pad1, 0, sizeof(e->__pad1));
|
memset(&e->__pad1, 0, sizeof(e->__pad1));
|
||||||
#endif
|
#endif
|
||||||
|
@@ -111,7 +111,7 @@ fd6_emit_shader(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Name should generally match what you get with MESA_SHADER_CAPTURE_PATH: */
|
/* Name should generally match what you get with MESA_SHADER_CAPTURE_PATH: */
|
||||||
const char *name = so->name;
|
const char *name = so->name;
|
||||||
if (name)
|
if (name)
|
||||||
@@ -1306,7 +1306,7 @@ fd6_program_create(void *data, const struct ir3_shader_variant *bs,
|
|||||||
state->binning_stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);
|
state->binning_stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);
|
||||||
state->stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);
|
state->stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (!ds) {
|
if (!ds) {
|
||||||
for (unsigned i = 0; i < bs->inputs_count; i++) {
|
for (unsigned i = 0; i < bs->inputs_count; i++) {
|
||||||
if (vs->inputs[i].sysval)
|
if (vs->inputs[i].sysval)
|
||||||
|
@@ -510,7 +510,7 @@ batch_from_key(struct fd_context *ctx, struct fd_batch_key *key) assert_dt
|
|||||||
}
|
}
|
||||||
|
|
||||||
batch = alloc_batch_locked(cache, ctx, false);
|
batch = alloc_batch_locked(cache, ctx, false);
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
DBG("%p: hash=0x%08x, %ux%u, %u layers, %u samples", batch, hash, key->width,
|
DBG("%p: hash=0x%08x, %ux%u, %u layers, %u samples", batch, hash, key->width,
|
||||||
key->height, key->layers, key->samples);
|
key->height, key->layers, key->samples);
|
||||||
for (unsigned idx = 0; idx < key->num_surfs; idx++) {
|
for (unsigned idx = 0; idx < key->num_surfs; idx++) {
|
||||||
|
@@ -184,7 +184,7 @@ enum fd_dirty_3d_state {
|
|||||||
static inline void
|
static inline void
|
||||||
fd_print_dirty_state(BITMASK_ENUM(fd_dirty_3d_state) dirty)
|
fd_print_dirty_state(BITMASK_ENUM(fd_dirty_3d_state) dirty)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (!FD_DBG(MSGS))
|
if (!FD_DBG(MSGS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -333,7 +333,7 @@ gmem_stateobj_init(struct fd_screen *screen, struct gmem_key *key)
|
|||||||
tpp_x += 1;
|
tpp_x += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
tpp_x = debug_get_num_option("TPP_X", tpp_x);
|
tpp_x = debug_get_num_option("TPP_X", tpp_x);
|
||||||
tpp_y = debug_get_num_option("TPP_Y", tpp_x);
|
tpp_y = debug_get_num_option("TPP_Y", tpp_x);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -401,7 +401,7 @@ __OUT_IB5(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
|
|||||||
*/
|
*/
|
||||||
#define HW_QUERY_BASE_REG REG_AXXX_CP_SCRATCH_REG4
|
#define HW_QUERY_BASE_REG REG_AXXX_CP_SCRATCH_REG4
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define __EMIT_MARKER 1
|
#define __EMIT_MARKER 1
|
||||||
#else
|
#else
|
||||||
#define __EMIT_MARKER 0
|
#define __EMIT_MARKER 0
|
||||||
|
@@ -984,7 +984,7 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
const bool color = INTEL_DEBUG(DEBUG_COLOR);
|
const bool color = INTEL_DEBUG(DEBUG_COLOR);
|
||||||
fprintf(stderr, "%siris: Failed to submit batchbuffer: %-80s%s\n",
|
fprintf(stderr, "%siris: Failed to submit batchbuffer: %-80s%s\n",
|
||||||
color ? "\e[1;41m" : "", strerror(-ret), color ? "\e[0m" : "");
|
color ? "\e[1;41m" : "", strerror(-ret), color ? "\e[0m" : "");
|
||||||
|
@@ -75,7 +75,7 @@ extern struct lp_counters lp_count;
|
|||||||
|
|
||||||
|
|
||||||
/** Increment the named counter (only for debug builds) */
|
/** Increment the named counter (only for debug builds) */
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#define LP_COUNT(counter) lp_count.counter++
|
#define LP_COUNT(counter) lp_count.counter++
|
||||||
#define LP_COUNT_ADD(counter, incr) lp_count.counter += (incr)
|
#define LP_COUNT_ADD(counter, incr) lp_count.counter += (incr)
|
||||||
#define LP_COUNT_GET(counter) (lp_count.counter)
|
#define LP_COUNT_GET(counter) (lp_count.counter)
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
int jit_line = 0;
|
int jit_line = 0;
|
||||||
const struct lp_rast_state *jit_state = NULL;
|
const struct lp_rast_state *jit_state = NULL;
|
||||||
const struct lp_rasterizer_task *jit_task = NULL;
|
const struct lp_rasterizer_task *jit_task = NULL;
|
||||||
@@ -1005,7 +1005,7 @@ rasterize_bin(struct lp_rasterizer_task *task,
|
|||||||
|
|
||||||
lp_rast_tile_end(task);
|
lp_rast_tile_end(task);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Debug/Perf flags:
|
/* Debug/Perf flags:
|
||||||
*/
|
*/
|
||||||
if (bin->head->count == 1) {
|
if (bin->head->count == 1) {
|
||||||
|
@@ -147,7 +147,7 @@ struct lp_rast_plane {
|
|||||||
* Objects of this type are put into the lp_setup_context::data buffer.
|
* Objects of this type are put into the lp_setup_context::data buffer.
|
||||||
*/
|
*/
|
||||||
struct lp_rast_triangle {
|
struct lp_rast_triangle {
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
float v[3][2];
|
float v[3][2];
|
||||||
float pad0;
|
float pad0;
|
||||||
float pad1;
|
float pad1;
|
||||||
@@ -171,7 +171,7 @@ struct lp_rast_triangle {
|
|||||||
* Objects of this type are put into the lp_setup_context::data buffer.
|
* Objects of this type are put into the lp_setup_context::data buffer.
|
||||||
*/
|
*/
|
||||||
struct lp_rast_rectangle {
|
struct lp_rast_rectangle {
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
float v[2][2]; /**< diagonal corners */
|
float v[2][2]; /**< diagonal corners */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
/* If we crash in a jitted function, we can examine jit_line and jit_state
|
/* If we crash in a jitted function, we can examine jit_line and jit_state
|
||||||
* to get some info. This is not thread-safe, however.
|
* to get some info. This is not thread-safe, however.
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
struct lp_rasterizer_task;
|
struct lp_rasterizer_task;
|
||||||
extern int jit_line;
|
extern int jit_line;
|
||||||
|
@@ -75,7 +75,7 @@ lp_scene_create(struct lp_setup_context *setup)
|
|||||||
|
|
||||||
(void) mtx_init(&scene->mutex, mtx_plain);
|
(void) mtx_init(&scene->mutex, mtx_plain);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Do some scene limit sanity checks here */
|
/* Do some scene limit sanity checks here */
|
||||||
{
|
{
|
||||||
size_t maxBins = TILES_X * TILES_Y;
|
size_t maxBins = TILES_X * TILES_Y;
|
||||||
|
@@ -629,7 +629,7 @@ try_setup_line(struct lp_setup_context *setup,
|
|||||||
if (!line)
|
if (!line)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
line->v[0][0] = v1[0][0];
|
line->v[0][0] = v1[0][0];
|
||||||
line->v[1][0] = v2[0][0];
|
line->v[1][0] = v2[0][0];
|
||||||
line->v[0][1] = v1[0][1];
|
line->v[0][1] = v1[0][1];
|
||||||
|
@@ -475,7 +475,7 @@ try_setup_point(struct lp_setup_context *setup,
|
|||||||
if (!point)
|
if (!point)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
point->v[0][0] = v0[0][0];
|
point->v[0][0] = v0[0][0];
|
||||||
point->v[0][1] = v0[0][1];
|
point->v[0][1] = v0[0][1];
|
||||||
#endif
|
#endif
|
||||||
@@ -554,7 +554,7 @@ try_setup_point(struct lp_setup_context *setup,
|
|||||||
lp_setup_alloc_rectangle(scene, key->num_inputs);
|
lp_setup_alloc_rectangle(scene, key->num_inputs);
|
||||||
if (!point)
|
if (!point)
|
||||||
return false;
|
return false;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
point->v[0][0] = v0[0][0];
|
point->v[0][0] = v0[0][0];
|
||||||
point->v[0][1] = v0[0][1];
|
point->v[0][1] = v0[0][1];
|
||||||
#endif
|
#endif
|
||||||
|
@@ -315,7 +315,7 @@ try_rect_cw(struct lp_setup_context *setup,
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
rect->v[0][0] = v0[0][0];
|
rect->v[0][0] = v0[0][0];
|
||||||
rect->v[0][1] = v0[0][1];
|
rect->v[0][1] = v0[0][1];
|
||||||
rect->v[1][0] = v1[0][0];
|
rect->v[1][0] = v1[0][0];
|
||||||
|
@@ -361,7 +361,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
|
|||||||
if (!tri)
|
if (!tri)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
tri->v[0][0] = v0[0][0];
|
tri->v[0][0] = v0[0][0];
|
||||||
tri->v[1][0] = v1[0][0];
|
tri->v[1][0] = v1[0][0];
|
||||||
tri->v[2][0] = v2[0][0];
|
tri->v[2][0] = v2[0][0];
|
||||||
|
@@ -241,7 +241,7 @@ llvmpipe_create_sampler_view(struct pipe_context *pipe,
|
|||||||
pipe_resource_reference(&view->texture, texture);
|
pipe_resource_reference(&view->texture, texture);
|
||||||
view->context = pipe;
|
view->context = pipe;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/*
|
/*
|
||||||
* This is possibly too lenient, but the primary reason is just
|
* This is possibly too lenient, but the primary reason is just
|
||||||
* to catch gallium frontends which forget to initialize this, so
|
* to catch gallium frontends which forget to initialize this, so
|
||||||
|
@@ -391,7 +391,7 @@ main(int argc, char **argv)
|
|||||||
n = atoi(argv[i]);
|
n = atoi(argv[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (verbose >= 2) {
|
if (verbose >= 2) {
|
||||||
gallivm_debug |= GALLIVM_DEBUG_IR;
|
gallivm_debug |= GALLIVM_DEBUG_IR;
|
||||||
gallivm_debug |= GALLIVM_DEBUG_ASM;
|
gallivm_debug |= GALLIVM_DEBUG_ASM;
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
static struct llvmpipe_resource resource_list;
|
static struct llvmpipe_resource resource_list;
|
||||||
static simple_mtx_t resource_list_mutex = SIMPLE_MTX_INITIALIZER;
|
static simple_mtx_t resource_list_mutex = SIMPLE_MTX_INITIALIZER;
|
||||||
#endif
|
#endif
|
||||||
@@ -303,7 +303,7 @@ llvmpipe_resource_create_all(struct pipe_screen *_screen,
|
|||||||
|
|
||||||
lpr->id = id_counter++;
|
lpr->id = id_counter++;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
simple_mtx_lock(&resource_list_mutex);
|
simple_mtx_lock(&resource_list_mutex);
|
||||||
list_addtail(&lpr->list, &resource_list.list);
|
list_addtail(&lpr->list, &resource_list.list);
|
||||||
simple_mtx_unlock(&resource_list_mutex);
|
simple_mtx_unlock(&resource_list_mutex);
|
||||||
@@ -437,7 +437,7 @@ llvmpipe_resource_from_memobj(struct pipe_screen *pscreen,
|
|||||||
lpr->id = id_counter++;
|
lpr->id = id_counter++;
|
||||||
lpr->imported_memory = true;
|
lpr->imported_memory = true;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
simple_mtx_lock(&resource_list_mutex);
|
simple_mtx_lock(&resource_list_mutex);
|
||||||
list_addtail(&lpr->list, &resource_list.list);
|
list_addtail(&lpr->list, &resource_list.list);
|
||||||
simple_mtx_unlock(&resource_list_mutex);
|
simple_mtx_unlock(&resource_list_mutex);
|
||||||
@@ -474,7 +474,7 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen,
|
|||||||
align_free(lpr->data);
|
align_free(lpr->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
simple_mtx_lock(&resource_list_mutex);
|
simple_mtx_lock(&resource_list_mutex);
|
||||||
if (!list_is_empty(&lpr->list))
|
if (!list_is_empty(&lpr->list))
|
||||||
list_del(&lpr->list);
|
list_del(&lpr->list);
|
||||||
@@ -611,7 +611,7 @@ llvmpipe_resource_from_handle(struct pipe_screen *_screen,
|
|||||||
|
|
||||||
lpr->id = id_counter++;
|
lpr->id = id_counter++;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
simple_mtx_lock(&resource_list_mutex);
|
simple_mtx_lock(&resource_list_mutex);
|
||||||
list_addtail(&lpr->list, &resource_list.list);
|
list_addtail(&lpr->list, &resource_list.list);
|
||||||
simple_mtx_unlock(&resource_list_mutex);
|
simple_mtx_unlock(&resource_list_mutex);
|
||||||
@@ -670,7 +670,7 @@ llvmpipe_resource_from_user_memory(struct pipe_screen *_screen,
|
|||||||
} else
|
} else
|
||||||
lpr->data = user_memory;
|
lpr->data = user_memory;
|
||||||
lpr->user_ptr = true;
|
lpr->user_ptr = true;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
simple_mtx_lock(&resource_list_mutex);
|
simple_mtx_lock(&resource_list_mutex);
|
||||||
list_addtail(&lpr->list, &resource_list.list);
|
list_addtail(&lpr->list, &resource_list.list);
|
||||||
simple_mtx_unlock(&resource_list_mutex);
|
simple_mtx_unlock(&resource_list_mutex);
|
||||||
@@ -1060,7 +1060,7 @@ llvmpipe_unmap_memory(struct pipe_screen *screen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
void
|
void
|
||||||
llvmpipe_print_resources(void)
|
llvmpipe_print_resources(void)
|
||||||
{
|
{
|
||||||
@@ -1161,7 +1161,7 @@ llvmpipe_resource_get_param(struct pipe_screen *screen,
|
|||||||
void
|
void
|
||||||
llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen)
|
llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* init linked list for tracking resources */
|
/* init linked list for tracking resources */
|
||||||
{
|
{
|
||||||
static bool first_call = true;
|
static bool first_call = true;
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
#include "util/u_debug.h"
|
#include "util/u_debug.h"
|
||||||
#include "lp_limits.h"
|
#include "lp_limits.h"
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#include "util/list.h"
|
#include "util/list.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ struct llvmpipe_resource
|
|||||||
uint64_t backing_offset;
|
uint64_t backing_offset;
|
||||||
bool backable;
|
bool backable;
|
||||||
bool imported_memory;
|
bool imported_memory;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@@ -923,7 +923,7 @@ panfrost_load_tiled_images(struct panfrost_transfer *transfer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
get_superblock_size(uint32_t *hdr, unsigned uncompressed_size)
|
get_superblock_size(uint32_t *hdr, unsigned uncompressed_size)
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
* Command buffer setup.
|
* Command buffer setup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
#define CB_LOCALS \
|
#define CB_LOCALS \
|
||||||
int cs_count = 0; \
|
int cs_count = 0; \
|
||||||
|
@@ -503,7 +503,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
|||||||
rc_init_regalloc_state(&r300->vs_regalloc_state, RC_VERTEX_PROGRAM);
|
rc_init_regalloc_state(&r300->vs_regalloc_state, RC_VERTEX_PROGRAM);
|
||||||
|
|
||||||
/* Print driver info. */
|
/* Print driver info. */
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
if (DBG_ON(r300, DBG_INFO)) {
|
if (DBG_ON(r300, DBG_INFO)) {
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
struct radeon_winsys *cs_winsys = (context)->rws; \
|
struct radeon_winsys *cs_winsys = (context)->rws; \
|
||||||
int cs_count = 0; (void) cs_count; (void) cs_winsys;
|
int cs_count = 0; (void) cs_count; (void) cs_winsys;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
#define BEGIN_CS(size) do { \
|
#define BEGIN_CS(size) do { \
|
||||||
assert(size <= (cs_copy->current.max_dw - cs_copy->current.cdw)); \
|
assert(size <= (cs_copy->current.max_dw - cs_copy->current.cdw)); \
|
||||||
|
@@ -3596,7 +3596,7 @@ softpipe_create_sampler_view(struct pipe_context *pipe,
|
|||||||
pipe_resource_reference(&view->texture, resource);
|
pipe_resource_reference(&view->texture, resource);
|
||||||
view->context = pipe;
|
view->context = pipe;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/*
|
/*
|
||||||
* This is possibly too lenient, but the primary reason is just
|
* This is possibly too lenient, but the primary reason is just
|
||||||
* to catch gallium frontends which forget to initialize this, so
|
* to catch gallium frontends which forget to initialize this, so
|
||||||
|
@@ -1057,7 +1057,7 @@ svga_get_time(struct svga_context *svga)
|
|||||||
* function call with an error value, the purpose is to trigger and test
|
* function call with an error value, the purpose is to trigger and test
|
||||||
* retry path handling.
|
* retry path handling.
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optionally replace a function call with a PIPE_ERROR_OUT_OF_MEMORY
|
* Optionally replace a function call with a PIPE_ERROR_OUT_OF_MEMORY
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
#define DEBUG_UAV 0x80000
|
#define DEBUG_UAV 0x80000
|
||||||
#define DEBUG_RETRY 0x100000
|
#define DEBUG_RETRY 0x100000
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
extern int SVGA_DEBUG;
|
extern int SVGA_DEBUG;
|
||||||
#define DBSTR(x) x
|
#define DBSTR(x) x
|
||||||
#else
|
#else
|
||||||
@@ -61,7 +61,7 @@ extern int SVGA_DEBUG;
|
|||||||
static inline void
|
static inline void
|
||||||
SVGA_DBG( unsigned flag, const char *fmt, ... )
|
SVGA_DBG( unsigned flag, const char *fmt, ... )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (SVGA_DEBUG & flag)
|
if (SVGA_DEBUG & flag)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@@ -1376,7 +1376,7 @@ svga_hwtnl_prim(struct svga_hwtnl *hwtnl,
|
|||||||
else {
|
else {
|
||||||
/* batch up drawing commands */
|
/* batch up drawing commands */
|
||||||
assert(indirect == NULL);
|
assert(indirect == NULL);
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
check_draw_params(hwtnl, range, min_index, max_index, ib);
|
check_draw_params(hwtnl, range, min_index, max_index, ib);
|
||||||
assert(start_instance == 0);
|
assert(start_instance == 0);
|
||||||
assert(instance_count <= 1);
|
assert(instance_count <= 1);
|
||||||
|
@@ -1682,7 +1682,7 @@ svga_get_format_cap(struct svga_screen *ss,
|
|||||||
SVGA3dDevCapResult result;
|
SVGA3dDevCapResult result;
|
||||||
const struct format_cap *entry;
|
const struct format_cap *entry;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
check_format_tables();
|
check_format_tables();
|
||||||
#else
|
#else
|
||||||
(void) check_format_tables;
|
(void) check_format_tables;
|
||||||
@@ -1713,7 +1713,7 @@ svga_get_dx_format_cap(struct svga_screen *ss,
|
|||||||
struct svga_winsys_screen *sws = ss->sws;
|
struct svga_winsys_screen *sws = ss->sws;
|
||||||
const struct format_cap *entry;
|
const struct format_cap *entry;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
check_format_tables();
|
check_format_tables();
|
||||||
#else
|
#else
|
||||||
(void) check_format_tables;
|
(void) check_format_tables;
|
||||||
|
@@ -178,7 +178,7 @@ svga_set_shader_images(struct pipe_context *pipe,
|
|||||||
/* number of bound image views */
|
/* number of bound image views */
|
||||||
svga->curr.num_image_views[shader] = start + num;
|
svga->curr.num_image_views[shader] = start + num;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
SVGA_DBG(DEBUG_UAV, "%s: num_image_views=%d start=%d num=%d unbind_num_trailing_slots=%d\n",
|
SVGA_DBG(DEBUG_UAV, "%s: num_image_views=%d start=%d num=%d unbind_num_trailing_slots=%d\n",
|
||||||
__func__, svga->curr.num_image_views[shader], start, num,
|
__func__, svga->curr.num_image_views[shader], start, num,
|
||||||
unbind_num_trailing_slots);
|
unbind_num_trailing_slots);
|
||||||
|
@@ -1460,7 +1460,7 @@ svga_texture_transfer_map_upload(struct svga_context *svga,
|
|||||||
upload_size = st->base.layer_stride * st->base.box.depth;
|
upload_size = st->base.layer_stride * st->base.box.depth;
|
||||||
upload_size = align(upload_size, 16);
|
upload_size = align(upload_size, 16);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (util_format_is_compressed(texture->format)) {
|
if (util_format_is_compressed(texture->format)) {
|
||||||
unsigned blockw, blockh, bytesPerBlock;
|
unsigned blockw, blockh, bytesPerBlock;
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
#define MESA_GIT_SHA1 "(unknown git revision)"
|
#define MESA_GIT_SHA1 "(unknown git revision)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
int SVGA_DEBUG = 0;
|
int SVGA_DEBUG = 0;
|
||||||
|
|
||||||
static const struct debug_named_value svga_debug_flags[] = {
|
static const struct debug_named_value svga_debug_flags[] = {
|
||||||
@@ -93,8 +93,8 @@ svga_get_name( struct pipe_screen *pscreen )
|
|||||||
{
|
{
|
||||||
const char *build = "", *llvm = "", *mutex = "";
|
const char *build = "", *llvm = "", *mutex = "";
|
||||||
static char name[100];
|
static char name[100];
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/* Only return internal details in the DEBUG version:
|
/* Only return internal details in the MESA_DEBUG version:
|
||||||
*/
|
*/
|
||||||
build = "build: DEBUG;";
|
build = "build: DEBUG;";
|
||||||
mutex = "mutex: " PIPE_ATOMIC ";";
|
mutex = "mutex: " PIPE_ATOMIC ";";
|
||||||
@@ -1051,7 +1051,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
|
|||||||
struct svga_screen *svgascreen;
|
struct svga_screen *svgascreen;
|
||||||
struct pipe_screen *screen;
|
struct pipe_screen *screen;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
SVGA_DEBUG = debug_get_flags_option("SVGA_DEBUG", svga_debug_flags, 0 );
|
SVGA_DEBUG = debug_get_flags_option("SVGA_DEBUG", svga_debug_flags, 0 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1328,7 +1328,7 @@ svga_winsys_screen(struct pipe_screen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
struct svga_screen *
|
struct svga_screen *
|
||||||
svga_screen(struct pipe_screen *screen)
|
svga_screen(struct pipe_screen *screen)
|
||||||
{
|
{
|
||||||
|
@@ -100,7 +100,7 @@ struct svga_screen
|
|||||||
} hud;
|
} hud;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
/** cast wrapper */
|
/** cast wrapper */
|
||||||
static inline struct svga_screen *
|
static inline struct svga_screen *
|
||||||
svga_screen(struct pipe_screen *pscreen)
|
svga_screen(struct pipe_screen *pscreen)
|
||||||
|
@@ -95,7 +95,7 @@ svga_set_shader_buffers(struct pipe_context *pipe,
|
|||||||
|
|
||||||
assert(start + num <= SVGA_MAX_SHADER_BUFFERS);
|
assert(start + num <= SVGA_MAX_SHADER_BUFFERS);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
const struct pipe_shader_buffer *b = buffers;
|
const struct pipe_shader_buffer *b = buffers;
|
||||||
SVGA_DBG(DEBUG_UAV, "%s: shader=%d start=%d num=%d ",
|
SVGA_DBG(DEBUG_UAV, "%s: shader=%d start=%d num=%d ",
|
||||||
__func__, shader, start, num);
|
__func__, shader, start, num);
|
||||||
@@ -141,7 +141,7 @@ svga_set_shader_buffers(struct pipe_context *pipe,
|
|||||||
svga->curr.num_shader_buffers[shader] = start;
|
svga->curr.num_shader_buffers[shader] = start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
SVGA_DBG(DEBUG_UAV,
|
SVGA_DBG(DEBUG_UAV,
|
||||||
"%s: current num_shader_buffers=%d start=%d num=%d buffers=",
|
"%s: current num_shader_buffers=%d start=%d num=%d buffers=",
|
||||||
__func__, svga->curr.num_shader_buffers[shader],
|
__func__, svga->curr.num_shader_buffers[shader],
|
||||||
@@ -177,7 +177,7 @@ svga_set_hw_atomic_buffers(struct pipe_context *pipe,
|
|||||||
|
|
||||||
assert(start + num <= SVGA_MAX_ATOMIC_BUFFERS);
|
assert(start + num <= SVGA_MAX_ATOMIC_BUFFERS);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
SVGA_DBG(DEBUG_UAV, "%s: start=%d num=%d \n", __func__, start, num);
|
SVGA_DBG(DEBUG_UAV, "%s: start=%d num=%d \n", __func__, start, num);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ svga_set_hw_atomic_buffers(struct pipe_context *pipe,
|
|||||||
svga->curr.num_atomic_buffers = start;
|
svga->curr.num_atomic_buffers = start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
SVGA_DBG(DEBUG_UAV, "%s: current num_atomic_buffers=%d start=%d num=%d ",
|
SVGA_DBG(DEBUG_UAV, "%s: current num_atomic_buffers=%d start=%d num=%d ",
|
||||||
__func__, svga->curr.num_atomic_buffers,
|
__func__, svga->curr.num_atomic_buffers,
|
||||||
start, num);
|
start, num);
|
||||||
|
@@ -216,7 +216,7 @@ update_state(struct svga_context *svga,
|
|||||||
const struct svga_tracked_state *atoms[],
|
const struct svga_tracked_state *atoms[],
|
||||||
uint64_t *state)
|
uint64_t *state)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
bool debug = true;
|
bool debug = true;
|
||||||
#else
|
#else
|
||||||
bool debug = false;
|
bool debug = false;
|
||||||
|
@@ -428,7 +428,7 @@ emit_const_range(struct svga_context *svga,
|
|||||||
shader == PIPE_SHADER_FRAGMENT);
|
shader == PIPE_SHADER_FRAGMENT);
|
||||||
assert(!svga_have_vgpu10(svga));
|
assert(!svga_have_vgpu10(svga));
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (offset + count > SVGA3D_CONSTREG_MAX) {
|
if (offset + count > SVGA3D_CONSTREG_MAX) {
|
||||||
debug_printf("svga: too many constants (offset %u + count %u = %u (max = %u))\n",
|
debug_printf("svga: too many constants (offset %u + count %u = %u (max = %u))\n",
|
||||||
offset, count, offset + count, SVGA3D_CONSTREG_MAX);
|
offset, count, offset + count, SVGA3D_CONSTREG_MAX);
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
static const struct tgsi_token *
|
static const struct tgsi_token *
|
||||||
get_dummy_fragment_shader(void)
|
get_dummy_fragment_shader(void)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
static const float color[4] = { 1.0, 0.0, 0.0, 0.0 }; /* red */
|
static const float color[4] = { 1.0, 0.0, 0.0, 0.0 }; /* red */
|
||||||
#else
|
#else
|
||||||
static const float color[4] = { 0.0, 0.0, 0.0, 0.0 }; /* black */
|
static const float color[4] = { 0.0, 0.0, 0.0, 0.0 }; /* black */
|
||||||
@@ -200,7 +200,7 @@ make_fs_key(const struct svga_context *svga,
|
|||||||
|
|
||||||
key->fs.alpha_to_one = svga->curr.blend->alpha_to_one;
|
key->fs.alpha_to_one = svga->curr.blend->alpha_to_one;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
/*
|
/*
|
||||||
* We expect a consistent set of samplers and sampler views.
|
* We expect a consistent set of samplers and sampler views.
|
||||||
* Do some debug checks/warnings here.
|
* Do some debug checks/warnings here.
|
||||||
|
@@ -130,7 +130,7 @@ update_need_pipeline(struct svga_context *svga, uint64_t dirty)
|
|||||||
svga->dirty |= SVGA_NEW_NEED_PIPELINE;
|
svga->dirty |= SVGA_NEW_NEED_PIPELINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DEBUG */
|
/* debug */
|
||||||
if (0 && svga->state.sw.need_pipeline)
|
if (0 && svga->state.sw.need_pipeline)
|
||||||
debug_printf("sw.need_pipeline = %d\n", svga->state.sw.need_pipeline);
|
debug_printf("sw.need_pipeline = %d\n", svga->state.sw.need_pipeline);
|
||||||
|
|
||||||
|
@@ -785,7 +785,7 @@ update_uav(struct svga_context *svga, uint64_t dirty)
|
|||||||
SVGA_DBG(DEBUG_UAV, "%s: SetUAViews uavSpliceIndex=%d", __func__,
|
SVGA_DBG(DEBUG_UAV, "%s: SetUAViews uavSpliceIndex=%d", __func__,
|
||||||
uavSpliceIndex);
|
uavSpliceIndex);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(uaViewIds); i++) {
|
for (unsigned i = 0; i < ARRAY_SIZE(uaViewIds); i++) {
|
||||||
SVGA_DBG(DEBUG_UAV, " %d ", uaViewIds[i]);
|
SVGA_DBG(DEBUG_UAV, " %d ", uaViewIds[i]);
|
||||||
}
|
}
|
||||||
@@ -891,7 +891,7 @@ update_cs_uav(struct svga_context *svga, uint64_t dirty)
|
|||||||
|
|
||||||
SVGA_DBG(DEBUG_UAV, "%s: SetCSUAViews", __func__);
|
SVGA_DBG(DEBUG_UAV, "%s: SetCSUAViews", __func__);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(uaViewIds); i++) {
|
for (unsigned i = 0; i < ARRAY_SIZE(uaViewIds); i++) {
|
||||||
SVGA_DBG(DEBUG_UAV, " %d ", uaViewIds[i]);
|
SVGA_DBG(DEBUG_UAV, " %d ", uaViewIds[i]);
|
||||||
}
|
}
|
||||||
|
@@ -55,7 +55,7 @@ vc4_bo_label(struct vc4_screen *screen, struct vc4_bo *bo, const char *fmt, ...)
|
|||||||
* whole-system allocation information), or if VC4_DEBUG=surf is set
|
* whole-system allocation information), or if VC4_DEBUG=surf is set
|
||||||
* (for debugging a single app's allocation).
|
* (for debugging a single app's allocation).
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
if (!VC4_DBG(SURFACE))
|
if (!VC4_DBG(SURFACE))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -42,7 +42,7 @@ void qir_validate(struct vc4_compile *c)
|
|||||||
* keep compiling the validation code to make sure it doesn't get
|
* keep compiling the validation code to make sure it doesn't get
|
||||||
* broken.
|
* broken.
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -121,7 +121,7 @@ vc4_qpu_validate(uint64_t *insts, uint32_t num_inst)
|
|||||||
* keep compiling the validation code to make sure it doesn't get
|
* keep compiling the validation code to make sure it doesn't get
|
||||||
* broken.
|
* broken.
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#if !MESA_DEBUG
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
|
|
||||||
unsigned st_debug = 0;
|
unsigned st_debug = 0;
|
||||||
|
|
||||||
|
@@ -13,14 +13,14 @@ extern "C" {
|
|||||||
#define ST_DEBUG_TGSI (1 << 1)
|
#define ST_DEBUG_TGSI (1 << 1)
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
extern unsigned st_debug;
|
extern unsigned st_debug;
|
||||||
#else
|
#else
|
||||||
#define st_debug 0
|
#define st_debug 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
void st_debug_parse(void);
|
void st_debug_parse(void);
|
||||||
#else
|
#else
|
||||||
#define st_debug_parse() ((void)0)
|
#define st_debug_parse() ((void)0)
|
||||||
|
@@ -924,7 +924,7 @@ CreateDepthStencilState(
|
|||||||
face1->zfail_op = translateStencilOp(pDepthStencilDesc->BackFace.StencilDepthFailOp);
|
face1->zfail_op = translateStencilOp(pDepthStencilDesc->BackFace.StencilDepthFailOp);
|
||||||
face1->valuemask = pDepthStencilDesc->StencilReadMask;
|
face1->valuemask = pDepthStencilDesc->StencilReadMask;
|
||||||
face1->writemask = pDepthStencilDesc->StencilWriteMask;
|
face1->writemask = pDepthStencilDesc->StencilWriteMask;
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (!pDepthStencilDesc->FrontEnable) {
|
if (!pDepthStencilDesc->FrontEnable) {
|
||||||
ASSERT(face0->func == PIPE_FUNC_ALWAYS);
|
ASSERT(face0->func == PIPE_FUNC_ALWAYS);
|
||||||
ASSERT(face0->fail_op == PIPE_STENCIL_OP_KEEP);
|
ASSERT(face0->fail_op == PIPE_STENCIL_OP_KEEP);
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
/* Some debugging info. */
|
/* Some debugging info. */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
int debug_xfonts = 0;
|
int debug_xfonts = 0;
|
||||||
@@ -95,7 +95,7 @@ dump_bitmap(unsigned int width, unsigned int height, GLubyte * bitmap)
|
|||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* MESA_DEBUG */
|
||||||
|
|
||||||
|
|
||||||
/* Implementation. */
|
/* Implementation. */
|
||||||
@@ -286,7 +286,7 @@ glXUseXFont(Font font, int first, int count, int listbase)
|
|||||||
gc = XCreateGC(dpy, pixmap, valuemask, &values);
|
gc = XCreateGC(dpy, pixmap, valuemask, &values);
|
||||||
XFreePixmap(dpy, pixmap);
|
XFreePixmap(dpy, pixmap);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (debug_xfonts)
|
if (debug_xfonts)
|
||||||
dump_font_struct(fs);
|
dump_font_struct(fs);
|
||||||
#endif
|
#endif
|
||||||
@@ -310,7 +310,7 @@ glXUseXFont(Font font, int first, int count, int listbase)
|
|||||||
valid = 1;
|
valid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (debug_xfonts) {
|
if (debug_xfonts) {
|
||||||
char s[7];
|
char s[7];
|
||||||
sprintf(s, isprint(c) ? "%c> " : "\\%03o> ", c);
|
sprintf(s, isprint(c) ? "%c> " : "\\%03o> ", c);
|
||||||
@@ -345,7 +345,7 @@ glXUseXFont(Font font, int first, int count, int listbase)
|
|||||||
fill_bitmap(dpy, win, gc, bm_width, bm_height, x, y, c, bm);
|
fill_bitmap(dpy, win, gc, bm_width, bm_height, x, y, c, bm);
|
||||||
|
|
||||||
glBitmap(width, height, x0, y0, dx, dy, bm);
|
glBitmap(width, height, x0, y0, dx, dy, bm);
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
if (debug_xfonts) {
|
if (debug_xfonts) {
|
||||||
printf("width/height = %u/%u\n", width, height);
|
printf("width/height = %u/%u\n", width, height);
|
||||||
printf("bm_width/bm_height = %u/%u\n", bm_width, bm_height);
|
printf("bm_width/bm_height = %u/%u\n", bm_width, bm_height);
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include "state_tracker/st_context.h"
|
#include "state_tracker/st_context.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if MESA_DEBUG
|
||||||
# define TRACE(x...) printf("hgl:frontend: " x)
|
# define TRACE(x...) printf("hgl:frontend: " x)
|
||||||
# define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__)
|
# define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__)
|
||||||
#else
|
#else
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include "volumetexture9.h"
|
#include "volumetexture9.h"
|
||||||
#include "nine_pipe.h"
|
#include "nine_pipe.h"
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#include "nine_dump.h"
|
#include "nine_dump.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -587,7 +587,7 @@ NineBaseTexture9_UnLoad( struct NineBaseTexture9 *This )
|
|||||||
BASETEX_REGISTER_UPDATE(This);
|
BASETEX_REGISTER_UPDATE(This);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
void
|
void
|
||||||
NineBaseTexture9_Dump( struct NineBaseTexture9 *This )
|
NineBaseTexture9_Dump( struct NineBaseTexture9 *This )
|
||||||
{
|
{
|
||||||
@@ -602,4 +602,4 @@ NineBaseTexture9_Dump( struct NineBaseTexture9 *This )
|
|||||||
This->base.info.array_size, This->base.info.last_level,
|
This->base.info.array_size, This->base.info.last_level,
|
||||||
This->managed.lod, This->managed.lod_resident);
|
This->managed.lod, This->managed.lod_resident);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG || !NDEBUG */
|
#endif /* MESA_DEBUG || !NDEBUG */
|
||||||
|
@@ -139,7 +139,7 @@ NineBindTextureToDevice( struct NineDevice9 *device,
|
|||||||
nine_bind(slot, tex);
|
nine_bind(slot, tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
void
|
void
|
||||||
NineBaseTexture9_Dump( struct NineBaseTexture9 *This );
|
NineBaseTexture9_Dump( struct NineBaseTexture9 *This );
|
||||||
#else
|
#else
|
||||||
|
@@ -17,7 +17,7 @@ _nine_debug_printf( unsigned long flag,
|
|||||||
|
|
||||||
#define ERR(fmt, ...) _nine_debug_printf(DBG_ERROR, __func__, fmt, ## __VA_ARGS__)
|
#define ERR(fmt, ...) _nine_debug_printf(DBG_ERROR, __func__, fmt, ## __VA_ARGS__)
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#define WARN(fmt, ...) _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__)
|
#define WARN(fmt, ...) _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__)
|
||||||
#define WARN_ONCE(fmt, ...) \
|
#define WARN_ONCE(fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
@@ -32,7 +32,7 @@ _nine_debug_printf( unsigned long flag,
|
|||||||
#define WARN_ONCE(fmt, ...) do {} while(0)
|
#define WARN_ONCE(fmt, ...) do {} while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#define DBG_FLAG(flag, fmt, ...) \
|
#define DBG_FLAG(flag, fmt, ...) \
|
||||||
_nine_debug_printf(flag, __func__, fmt, ## __VA_ARGS__)
|
_nine_debug_printf(flag, __func__, fmt, ## __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
@@ -74,7 +74,7 @@ _nine_stub( const char *file,
|
|||||||
const char *func,
|
const char *func,
|
||||||
unsigned line );
|
unsigned line );
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#define STUB(ret) \
|
#define STUB(ret) \
|
||||||
do { \
|
do { \
|
||||||
_nine_stub(__FILE__, __func__, __LINE__); \
|
_nine_stub(__FILE__, __func__, __LINE__); \
|
||||||
@@ -88,7 +88,7 @@ _nine_stub( const char *file,
|
|||||||
* macro is designed to be used in conditionals ala
|
* macro is designed to be used in conditionals ala
|
||||||
* if (user_error(required condition)) { assertion failed }
|
* if (user_error(required condition)) { assertion failed }
|
||||||
* It also prints debug message if the assertion fails. */
|
* It also prints debug message if the assertion fails. */
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#define user_error(x) \
|
#define user_error(x) \
|
||||||
(!(x) ? (DBG_FLAG(DBG_USER, "User assertion failed: `%s'\n", #x), true) \
|
(!(x) ? (DBG_FLAG(DBG_USER, "User assertion failed: `%s'\n", #x), true) \
|
||||||
: false)
|
: false)
|
||||||
@@ -96,7 +96,7 @@ _nine_stub( const char *file,
|
|||||||
#define user_error(x) (!(x) ? TRUE : FALSE)
|
#define user_error(x) (!(x) ? TRUE : FALSE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DEBUG) || !defined(NDEBUG)
|
#if MESA_DEBUG || !defined(NDEBUG)
|
||||||
#define user_warn(x) \
|
#define user_warn(x) \
|
||||||
if ((x)) { DBG_FLAG(DBG_USER, "User warning: `%s'\n", #x); }
|
if ((x)) { DBG_FLAG(DBG_USER, "User warning: `%s'\n", #x); }
|
||||||
#else
|
#else
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user