Tell Vulkan about the engine name and version;

This commit is contained in:
bjorn 2022-04-27 00:21:04 -07:00
parent d8701df780
commit 43f56c223c
3 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,8 @@ typedef struct {
bool debug;
void* userdata;
void (*callback)(void* userdata, const char* message, bool error);
const char* engineName;
uint32_t engineVersion[3];
gpu_device_info* device;
gpu_features* features;
gpu_limits* limits;

View File

@ -298,6 +298,8 @@ bool gpu_init(gpu_config* config) {
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.pApplicationInfo = &(VkApplicationInfo) {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pEngineName = config->engineName,
.engineVersion = VK_MAKE_VERSION(config->engineVersion[0], config->engineVersion[1], config->engineVersion[3]),
.apiVersion = VK_MAKE_VERSION(1, 1, 0)
},
.enabledLayerCount = state.config.debug ? 1 : 0,

View File

@ -41,6 +41,8 @@ bool lovrGraphicsInit(bool debug) {
gpu_config config = {
.debug = debug,
.callback = onMessage,
.engineName = "LOVR",
.engineVersion = { LOVR_VERSION_MAJOR, LOVR_VERSION_MINOR, LOVR_VERSION_PATCH },
.device = &state.device,
.features = &state.features,
.limits = &state.limits