summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-09-09 12:09:44 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-09-11 13:29:29 +0100
commitdcc5d7f67220bc93aa7a351658649877c7e4cf69 (patch)
tree720424cecef9793f994cccbf61c6fd840aed50c4 /src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
parentc0d41d0404285df4f3a8728ddc3b451e54011c7a (diff)
gallivm: Add a new debug flag to warn about performance issues.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_aos.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index 92123e09d3..6b9189e1da 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -46,6 +46,7 @@
#include "lp_bld_conv.h"
#include "lp_bld_swizzle.h"
#include "lp_bld_gather.h"
+#include "lp_bld_debug.h"
#include "lp_bld_format.h"
@@ -449,6 +450,11 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
* integer conversions.
*/
+ if (gallivm_debug & GALLIVM_DEBUG_PERF && !type.floating) {
+ debug_printf("%s: unpacking %s with floating point\n",
+ __FUNCTION__, format_desc->short_name);
+ }
+
lp_build_conv(builder,
lp_float32_vec4_type(),
type,
@@ -513,6 +519,10 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_8unorm",
format_desc->short_name);
+ if (gallivm_debug & GALLIVM_DEBUG_PERF) {
+ debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
+ }
+
/*
* Declare and bind format_desc->fetch_rgba_8unorm().
*/
@@ -612,6 +622,10 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_float",
format_desc->short_name);
+ if (gallivm_debug & GALLIVM_DEBUG_PERF) {
+ debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
+ }
+
/*
* Declare and bind format_desc->fetch_rgba_float().
*/