diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-09-09 12:09:44 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-09-11 13:29:29 +0100 |
commit | dcc5d7f67220bc93aa7a351658649877c7e4cf69 (patch) | |
tree | 720424cecef9793f994cccbf61c6fd840aed50c4 /src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | |
parent | c0d41d0404285df4f3a8728ddc3b451e54011c7a (diff) | |
download | external_mesa3d-dcc5d7f67220bc93aa7a351658649877c7e4cf69.zip external_mesa3d-dcc5d7f67220bc93aa7a351658649877c7e4cf69.tar.gz external_mesa3d-dcc5d7f67220bc93aa7a351658649877c7e4cf69.tar.bz2 |
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.c | 14 |
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 92123e0..6b9189e 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(). */ |