Skip to content

Commit

Permalink
Improve handling of bools in shader storage buffer declarations.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Dec 23, 2024
1 parent a7be648 commit 3aac7da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ static DataFormat getDataFormat(glslang::TBasicType basictype, int components, i
else if (components == 4)
return DATAFORMAT_INT32_VEC4;
}
else if (basictype == glslang::EbtUint)
else if (basictype == glslang::EbtUint || basictype == glslang::EbtBool)
{
if (components == 1)
return DATAFORMAT_UINT32;
Expand Down Expand Up @@ -1196,6 +1196,7 @@ static T convertData(const glslang::TConstUnion &data)
case glslang::EbtUint8: return (T) data.getU8Const();
case glslang::EbtUint16: return (T) data.getU16Const();
case glslang::EbtUint64: return (T) data.getU64Const();
case glslang::EbtBool: return (T)data.getBConst();
default: return 0;
}
}
Expand Down

0 comments on commit 3aac7da

Please sign in to comment.