Skip to content

Commit

Permalink
Improve error message when a shader storage buffer format can't be pa…
Browse files Browse the repository at this point in the history
…rsed.
  • Loading branch information
slime73 committed Dec 23, 2024
1 parent 3aac7da commit 3a6a36e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ static bool AddFieldsToFormat(std::vector<Buffer::DataDeclaration> &format, int
DataFormat dataformat = getDataFormat(type->getBasicType(), type->getVectorSize(), type->getMatrixRows(), type->getMatrixCols(), type->isMatrix());
if (dataformat == DATAFORMAT_MAX_ENUM)
{
err = "Shader validation error:\n";
err = "Shader validation error:\nUnhandled data format for type " + (int)type->getBasicType() + std::string(" with name ") + basename;
return false;
}

Expand Down

2 comments on commit 3a6a36e

@turbo
Copy link

@turbo turbo commented on 3a6a36e Dec 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting a warning on this line (building with Xcode on macOS 15.2):

warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]

Is this intentional / safe to ignore?

@slime73
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wasn't intentional, it should be fixed now. Thanks!

Please sign in to comment.