From b5b96ee222d0d7e3e2c71589bd58d3634238f513 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 12 Oct 2016 13:49:12 +0200 Subject: [PATCH] Add a little bit more debug information --- src/r_compiler/llvmdrawers.h | 14 ++++++++++++++ src/r_draw_rgba.cpp | 7 +++++-- src/r_drawt_rgba.cpp | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/r_compiler/llvmdrawers.h b/src/r_compiler/llvmdrawers.h index afb3cadf1..7f5f6658e 100644 --- a/src/r_compiler/llvmdrawers.h +++ b/src/r_compiler/llvmdrawers.h @@ -83,6 +83,13 @@ struct DrawSpanArgs simple_shade = 1, nearest_filter = 2 }; + + FString ToString() + { + FString info; + info.Format("x1 = %i, x2 = %i, y = %i, flags = %i", x1, x2, y, flags); + return info; + } }; struct DrawColumnArgs @@ -117,6 +124,13 @@ struct DrawColumnArgs { simple_shade = 1 }; + + FString ToString() + { + FString info; + info.Format("dest_y = %i, count = %i, flags = %i", dest_y, count, flags); + return info; + } }; class LLVMDrawers diff --git a/src/r_draw_rgba.cpp b/src/r_draw_rgba.cpp index eb840fa3b..5114b95f0 100644 --- a/src/r_draw_rgba.cpp +++ b/src/r_draw_rgba.cpp @@ -104,7 +104,10 @@ public: LLVMDrawers::Instance()->DrawSpan(&args); } - FString DebugInfo() override { return "DrawSpanLLVMCommand"; } + FString DebugInfo() override + { + return "DrawSpanLLVMCommand\n" + args.ToString(); + } protected: DrawSpanArgs args; @@ -332,7 +335,7 @@ protected: FString DebugInfo() override { - return "DrawColumnLLVMCommand"; + return "DrawColumnLLVMCommand\n" + args.ToString(); } public: diff --git a/src/r_drawt_rgba.cpp b/src/r_drawt_rgba.cpp index b4f70592e..bf957df3d 100644 --- a/src/r_drawt_rgba.cpp +++ b/src/r_drawt_rgba.cpp @@ -107,7 +107,7 @@ public: FString DebugInfo() override { - return "DrawColumnRt1LLVMCommand"; + return "DrawColumnRt1LLVMCommand\n" + args.ToString(); } };