Commit 0d2ecb4e by Olli Etuaho Committed by Commit Bot

Output mapped name of shader variables in shader_translator

This makes understanding and debugging the mapped names in the translator interface easier. TEST=shader_translator -u Change-Id: I2457142a6f0a8baa623e80b00cc86c8df90e6718 Reviewed-on: https://chromium-review.googlesource.com/579968 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 0ca93f26
...@@ -546,8 +546,9 @@ void PrintVariable(const std::string &prefix, size_t index, const sh::ShaderVari ...@@ -546,8 +546,9 @@ void PrintVariable(const std::string &prefix, size_t index, const sh::ShaderVari
default: typeName = "UNKNOWN"; break; default: typeName = "UNKNOWN"; break;
} }
printf("%s %u : name=%s, type=%s, arraySize=%u\n", prefix.c_str(), printf("%s %u : name=%s, mappedName=%s, type=%s, arraySize=%u\n", prefix.c_str(),
static_cast<unsigned int>(index), var.name.c_str(), typeName.c_str(), var.arraySize); static_cast<unsigned int>(index), var.name.c_str(), var.mappedName.c_str(),
typeName.c_str(), var.arraySize);
if (var.fields.size()) if (var.fields.size())
{ {
std::string structPrefix; std::string structPrefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment