Skip to content

Commit

Permalink
Merge branch 'main' into add-debugtypepointer
Browse files Browse the repository at this point in the history
  • Loading branch information
sajjadmirzanv committed Dec 12, 2023
2 parents b66fe83 + 6de514b commit 307aa99
Show file tree
Hide file tree
Showing 24 changed files with 5,952 additions and 5,990 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- name: Install Ubuntu Package Dependencies
Expand Down Expand Up @@ -106,8 +106,8 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- run: ./update_glslang_sources.py
Expand Down Expand Up @@ -163,8 +163,8 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- run: python update_glslang_sources.py
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- name: Setup ccache
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
flags: ['-fsanitize=address', '-fsanitize=thread']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- name: Setup ccache
Expand Down Expand Up @@ -89,10 +89,10 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
with:
cmakeVersion: 3.17.2
- name: Setup ccache
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- run: ./update_glslang_sources.py
- run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON
env:
Expand All @@ -148,8 +148,8 @@ jobs:
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- run: python update_glslang_sources.py
Expand All @@ -166,7 +166,7 @@ jobs:
runs-on: macos-13
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
LEGACY: [ON, OFF]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
Expand All @@ -218,10 +218,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@4865386b66955d11be0abf8c112d0230023e742a # v3.27.9
- uses: lukka/get-cmake@98fde40bf98bdc391abe7227e6b1052d9b36a22f # v3.28.0
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
Expand Down
2 changes: 1 addition & 1 deletion SPIRV/GlslangToSpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4407,7 +4407,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
if (explicitLayout != glslang::ElpNone)
spvType = builder.makeUintType(32);
else
spvType = builder.makeBoolType(false);
spvType = builder.makeBoolType();
break;
case glslang::EbtInt:
spvType = builder.makeIntType(32);
Expand Down
13 changes: 7 additions & 6 deletions SPIRV/SpvBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,23 @@ Id Builder::makeVoidType()
return type->getResultId();
}

Id Builder::makeBoolType(bool const compilerGenerated)
Id Builder::makeBoolType()
{
Instruction* type;
if (groupedTypes[OpTypeBool].size() == 0) {
type = new Instruction(getUniqueId(), NoType, OpTypeBool);
groupedTypes[OpTypeBool].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);

if (emitNonSemanticShaderDebugInfo) {
auto const debugResultId = makeBoolDebugType(32);
debugId[type->getResultId()] = debugResultId;
}

} else
type = groupedTypes[OpTypeBool].back();

if (emitNonSemanticShaderDebugInfo && !compilerGenerated)
{
auto const debugResultId = makeBoolDebugType(32);
debugId[type->getResultId()] = debugResultId;
}

return type->getResultId();
}
Expand Down
2 changes: 1 addition & 1 deletion SPIRV/SpvBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class Builder {

// For creating new types (will return old type if the requested one was already made).
Id makeVoidType();
Id makeBoolType(bool const compilerGenerated = true);
Id makeBoolType();
Id makePointer(StorageClass, Id pointee);
Id makeForwardPointer(StorageClass);
Id makePointerFromForwardPointer(StorageClass, Id forwardPointerType, Id pointee);
Expand Down
4 changes: 3 additions & 1 deletion Test/baseResults/cppBad.vert.out
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
cppBad.vert
WARNING: 0:1: '#define' : missing space after macro name
ERROR: 0:1: '#' : (#) can be preceded in its line only by spaces or horizontal tabs
ERROR: 0:2: '#' : (#) can be preceded in its line only by spaces or horizontal tabs
ERROR: 0:3: 'preprocessor evaluation' : bad expression
ERROR: 0:3: '#if' : unexpected tokens following directive
ERROR: 0:6: 'string' : End of line in string
ERROR: 0:6: 'string literal' : required extension not requested: Possible extensions include:
GL_EXT_debug_printf
GL_EXT_spirv_intrinsics
ERROR: 0:6: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON
ERROR: 5 compilation errors. No code generated.
ERROR: 7 compilation errors. No code generated.


Shader version: 100
Expand Down
3 changes: 2 additions & 1 deletion Test/baseResults/cppBad4.vert.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cppBad4.vert
ERROR: 0:2: '#' : (#) can be preceded in its line only by spaces or horizontal tabs
ERROR: 0:4: 'macro expansion' : unexpected '#' g
ERROR: 0:5: '' : syntax error, unexpected SEMICOLON, expecting LEFT_PAREN
ERROR: 2 compilation errors. No code generated.
ERROR: 3 compilation errors. No code generated.


Shader version: 100
Expand Down
Loading

0 comments on commit 307aa99

Please sign in to comment.