Define static constexpr members in .cpp files

Members of classes that are declared as static constexpr are not defined as part of their declaration. Thus they must be defined elsewhere. And they can't be defined in the header file, or there will be multiple definitions for each file that includes the header. So define these contexprs in Constants.cpp Bug: b/177220369 Change-Id: I9ffc63867948bc72061ddb8b0b586a46d840196c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51628 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarSean Risser <srisser@google.com> Commit-Queue: Sean Risser <srisser@google.com>
parent 6a59d064
......@@ -21,6 +21,10 @@
namespace sw {
constexpr float Constants::VkSampleLocations4[][2];
constexpr float Constants::SampleLocationsX[4];
constexpr float Constants::SampleLocationsY[4];
const Constants &Constants::Get()
{
static const Constants constants;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment