Skip to content

Commit

Permalink
Always enable the generation of OpDebugBasicType for bool type
Browse files Browse the repository at this point in the history
  • Loading branch information
chaocNV committed Oct 25, 2023
1 parent 979423d commit 25ab13a
Show file tree
Hide file tree
Showing 16 changed files with 7,271 additions and 7,147 deletions.
2 changes: 1 addition & 1 deletion SPIRV/GlslangToSpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4404,7 +4404,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
4 changes: 2 additions & 2 deletions SPIRV/SpvBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Id Builder::makeVoidType()
return type->getResultId();
}

Id Builder::makeBoolType(bool const compilerGenerated)
Id Builder::makeBoolType()
{
Instruction* type;
if (groupedTypes[OpTypeBool].size() == 0) {
Expand All @@ -193,7 +193,7 @@ Id Builder::makeBoolType(bool const compilerGenerated)
} else
type = groupedTypes[OpTypeBool].back();

if (emitNonSemanticShaderDebugInfo && !compilerGenerated)
if (emitNonSemanticShaderDebugInfo)
{
auto const debugResultId = makeBoolDebugType(32);
debugId[type->getResultId()] = debugResultId;
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
2,028 changes: 1,029 additions & 999 deletions Test/baseResults/spv.debuginfo.glsl.comp.out

Large diffs are not rendered by default.

1,827 changes: 921 additions & 906 deletions Test/baseResults/spv.debuginfo.glsl.frag.out

Large diffs are not rendered by default.

557 changes: 280 additions & 277 deletions Test/baseResults/spv.debuginfo.glsl.geom.out

Large diffs are not rendered by default.

1,193 changes: 602 additions & 591 deletions Test/baseResults/spv.debuginfo.glsl.tesc.out

Large diffs are not rendered by default.

312 changes: 157 additions & 155 deletions Test/baseResults/spv.debuginfo.glsl.tese.out

Large diffs are not rendered by default.

847 changes: 425 additions & 422 deletions Test/baseResults/spv.debuginfo.glsl.vert.out

Large diffs are not rendered by default.

2,012 changes: 1,019 additions & 993 deletions Test/baseResults/spv.debuginfo.hlsl.comp.out

Large diffs are not rendered by default.

1,913 changes: 963 additions & 950 deletions Test/baseResults/spv.debuginfo.hlsl.frag.out

Large diffs are not rendered by default.

641 changes: 322 additions & 319 deletions Test/baseResults/spv.debuginfo.hlsl.geom.out

Large diffs are not rendered by default.

1,298 changes: 654 additions & 644 deletions Test/baseResults/spv.debuginfo.hlsl.tesc.out

Large diffs are not rendered by default.

600 changes: 301 additions & 299 deletions Test/baseResults/spv.debuginfo.hlsl.tese.out

Large diffs are not rendered by default.

913 changes: 458 additions & 455 deletions Test/baseResults/spv.debuginfo.hlsl.vert.out

Large diffs are not rendered by default.

269 changes: 136 additions & 133 deletions Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out

Large diffs are not rendered by default.

0 comments on commit 25ab13a

Please sign in to comment.