Skip to content

Commit

Permalink
Fix GCC 8.1 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKristian-Work committed May 7, 2018
1 parent 7b95168 commit 903b798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build_glslang_spirv_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cd ../..
echo "Building SPIRV-Tools."
mkdir -p external/spirv-tools-build
cd external/spirv-tools-build
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles"
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles" -DSPIRV_WERROR=OFF
make -j$NPROC
cd ../..

3 changes: 2 additions & 1 deletion spirv_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ struct SPIRConstant : IVariant
// Workaround for MSVC 2013, initializing an array breaks.
ConstantVector()
{
memset(r, 0, sizeof(r));
for (unsigned i = 0; i < 4; i++)
id[i] = 0;
}
Expand Down Expand Up @@ -1005,7 +1006,7 @@ struct SPIRConstant : IVariant

inline void make_null(const SPIRType &constant_type_)
{
std::memset(&m, 0, sizeof(m));
m = {};
m.columns = constant_type_.columns;
for (auto &c : m.c)
c.vecsize = constant_type_.vecsize;
Expand Down

0 comments on commit 903b798

Please sign in to comment.