diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-01-18 08:56:09 +1300 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-01-18 15:59:35 -0700 |
| commit | 299d19dcea8dc5ae6e02d2631cdfd34d55eb2ca0 (patch) | |
| tree | bd84c164eb99c868d92f35b7084fa622c9ed6298 /layers/draw_state.cpp | |
| parent | 0bc0c6b1a8c8602ecdb8912e43145b9aa188429b (diff) | |
| download | usermoji-299d19dcea8dc5ae6e02d2631cdfd34d55eb2ca0.tar.xz | |
layers: MR140, Pass whole shader_module to build_type_def_index
Diffstat (limited to 'layers/draw_state.cpp')
| -rw-r--r-- | layers/draw_state.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index b1ee733f..4dbb56e1 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -135,7 +135,7 @@ struct layer_data { // Code imported from ShaderChecker static void -build_type_def_index(std::vector<unsigned> const &words, std::unordered_map<unsigned, unsigned> &type_def_index); +build_type_def_index(shader_module *); struct shader_module { /* the spirv image itself */ @@ -149,7 +149,7 @@ struct shader_module { words((uint32_t *)pCreateInfo->pCode, (uint32_t *)pCreateInfo->pCode + pCreateInfo->codeSize / sizeof(uint32_t)), type_def_index() { - build_type_def_index(words, type_def_index); + build_type_def_index(this); } }; @@ -289,10 +289,10 @@ static string cmdTypeToString(CMD_TYPE cmd) // SPIRV utility functions static void -build_type_def_index(std::vector<unsigned> const &words, std::unordered_map<unsigned, unsigned> &type_def_index) +build_type_def_index(shader_module *module) { - unsigned int const *code = (unsigned int const *)&words[0]; - size_t size = words.size(); + unsigned int const *code = (unsigned int const *)&module->words[0]; + size_t size = module->words.size(); unsigned word = 5; while (word < size) { @@ -320,7 +320,7 @@ build_type_def_index(std::vector<unsigned> const &words, std::unordered_map<unsi case spv::OpTypeReserveId: case spv::OpTypeQueue: case spv::OpTypePipe: - type_def_index[code[word+1]] = word; + module->type_def_index[code[word+1]] = word; break; default: |
