mesa/swr-debug.patch
Alexander Stefanov 5d3b4b4753 20.0.1
2020-03-08 00:10:52 +00:00

37 lines
1.8 KiB
Diff

diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp
index 2f4c47a..9726cae 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp
@@ -36,12 +36,14 @@
% endfor
#include <regex>
#include <core/utils.h>
+#include <iostream>
//========================================================
// Implementation
//========================================================
void KnobBase::autoExpandEnvironmentVariables(std::string &text)
{
+ std::cerr << "SWR_DEBUG env " << text << std::endl;
#if 1 //(__GNUC__) && (GCC_VERSION < 409000)
// <regex> isn't implemented prior to gcc-4.9.0
// unix style variable replacement
@@ -51,6 +53,8 @@ void KnobBase::autoExpandEnvironmentVariables(std::string &text)
if (end == std::string::npos)
break;
const std::string var = GetEnv(text.substr(start + 2, end - start - 2));
+ std::cerr << "SWR_DEBUG1 var " << text.substr(start + 2, end - start - 2) << std::endl;
+ std::cerr << "SWR_DEBUG1 val " << var << std::endl;
text.replace(start, end - start + 1, var);
}
// win32 style variable replacement
@@ -71,6 +75,8 @@ void KnobBase::autoExpandEnvironmentVariables(std::string &text)
const std::string var = GetEnv(match[1].str());
// certain combinations of gcc/libstd++ have problems with this
// text.replace(match[0].first, match[0].second, var);
+ std::cerr << "SWR_DEBUG2 var " << match[1].str() << std::endl;
+ std::cerr << "SWR_DEBUG2 val " << var << std::endl;
text.replace(match.prefix().length(), match[0].length(), var);
}
}