Fix output data alignment and avoid copy
Change the output data container of libshaderc compilation result from std::string to std::vector<uint32_t> to guarantee the output data alignment. Change the libshaderc_util::Compiler::Compile() signature and implementation to avoid extra copies of SPIR-V binary. Also store the string data of text output in vector<uint32_t>.
Showing
- libshaderc/src/shaderc.cc 26 additions, 19 deletionslibshaderc/src/shaderc.cc
- libshaderc/src/shaderc_cpp_test.cc 1 addition, 1 deletionlibshaderc/src/shaderc_cpp_test.cc
- libshaderc/src/shaderc_private.h 8 additions, 2 deletionslibshaderc/src/shaderc_private.h
- libshaderc_util/include/libshaderc_util/compiler.h 22 additions, 12 deletionslibshaderc_util/include/libshaderc_util/compiler.h
- libshaderc_util/src/compiler.cc 55 additions, 23 deletionslibshaderc_util/src/compiler.cc
- libshaderc_util/src/compiler_test.cc 41 additions, 4 deletionslibshaderc_util/src/compiler_test.cc
Loading
Please register or sign in to comment