From 299d19dcea8dc5ae6e02d2631cdfd34d55eb2ca0 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 18 Jan 2016 08:56:09 +1300 Subject: layers: MR140, Pass whole shader_module to build_type_def_index --- layers/draw_state.cpp | 12 ++++++------ 1 file 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 const &words, std::unordered_map &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 const &words, std::unordered_map &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 const &words, std::unordered_maptype_def_index[code[word+1]] = word; break; default: -- cgit v1.2.3