You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that when we make bool type in SPIRV builder via Id Builder::makeBoolType(bool const compilerGenerated), it has a hidden argument of bool const compilerGenerated = true. And generating debug type for bool is always gated on that argument being false:
if (emitNonSemanticShaderDebugInfo && !compilerGenerated)
{
auto const debugResultId = makeBoolDebugType(32);
debugId[type->getResultId()] = debugResultId;
}
I believe this is redundant as there is no harm in creating a debug bool type regardless. It's a primitive type like int/float and those do not have this check. Currently all the usage of makeBoolType do not pass in a false argument and therefore bool debug type is never generated.
My suggested fix would be remove compilerGenerated from makeBoolType entirely. If you agree, I can create a PR for it.
To illustrate the problem, following shader would crash in glslang currently:
Yeah, I think the correct thing is to just always emit the boolean debug type and I would welcome a PR. Before you create the PR however, it would be a good idea to check that this works fine in renderdoc, since that is the ultimate consumer of this debug info.
Yeah, I think the correct thing is to just always emit the boolean debug type and I would welcome a PR. Before you create the PR however, it would be a good idea to check that this works fine in renderdoc, since that is the ultimate consumer of this debug info.
PR created. I'm not very familiar with renderDoc. Could you help give this a quick run on it if you have the setup?
It appears that when we make bool type in SPIRV builder via
Id Builder::makeBoolType(bool const compilerGenerated)
, it has a hidden argument ofbool const compilerGenerated = true
. And generating debug type for bool is always gated on that argument being false:I believe this is redundant as there is no harm in creating a debug bool type regardless. It's a primitive type like int/float and those do not have this check. Currently all the usage of makeBoolType do not pass in a false argument and therefore bool debug type is never generated.
My suggested fix would be remove
compilerGenerated
frommakeBoolType
entirely. If you agree, I can create a PR for it.To illustrate the problem, following shader would crash in glslang currently:
The text was updated successfully, but these errors were encountered: