Skip to content

Commit

Permalink
Store format flags as strings
Browse files Browse the repository at this point in the history
Should avoid problems with flag values larger than JSON's max number limit
See SaschaWillems/vulkan.gpuinfo.org#50
  • Loading branch information
SaschaWillems committed Mar 22, 2024
1 parent 2b374f4 commit b8c4ac6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vulkanDeviceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Device information class
*
* Copyright (C) 2016-2022 by Sascha Willems (www.saschawillems.de)
* Copyright (C) 2016-2024 by Sascha Willems (www.saschawillems.de)
*
* This code is free software, you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -883,9 +883,9 @@ QJsonObject VulkanDeviceInfo::toJson(QString submitter, QString comment)
QJsonArray jsonFormat;
jsonFormat.append((QJsonValue(format.format)));
QJsonObject jsonFormatFeatures;
jsonFormatFeatures["linearTilingFeatures"] = int(format.properties.linearTilingFeatures);
jsonFormatFeatures["optimalTilingFeatures"] = int(format.properties.optimalTilingFeatures);
jsonFormatFeatures["bufferFeatures"] = int(format.properties.bufferFeatures);
jsonFormatFeatures["linearTilingFeatures"] = QVariant::fromValue(format.properties.linearTilingFeatures).toString();
jsonFormatFeatures["optimalTilingFeatures"] = QVariant::fromValue(format.properties.optimalTilingFeatures).toString();
jsonFormatFeatures["bufferFeatures"] = QVariant::fromValue(format.properties.bufferFeatures).toString();
jsonFormatFeatures["supported"] = format.supported;
jsonFormat.append(jsonFormatFeatures);
jsonFormats.append(jsonFormat);
Expand Down

0 comments on commit b8c4ac6

Please sign in to comment.