Skip to content

Commit

Permalink
fallback when gcc13 is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
K1ngst0m committed Oct 24, 2023
1 parent 4a05138 commit c24cd5c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
24 changes: 16 additions & 8 deletions engine/api/vulkan/physicalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,22 @@ PhysicalDevice::PhysicalDevice(HandleType handle) : ResourceHandle(handle)
gpuSettings->geometryShaderSupported = gpuFeatures->features.geometryShader;
gpuSettings->samplerAnisotropySupported = gpuFeatures->features.samplerAnisotropy;

// save vendor and model Id as string
gpuSettings->GpuVendorPreset.modelId = std::format("{:#x}", gpuProperties2->properties.deviceID);
gpuSettings->GpuVendorPreset.vendorId = std::format("{:#x}", gpuProperties2->properties.vendorID);
gpuSettings->GpuVendorPreset.gpuName = gpuProperties2->properties.deviceName;

// driver info
gpuSettings->GpuVendorPreset.gpuDriverVersion =
std::format("{} - {}", m_driverProperties.driverInfo, m_driverProperties.driverName);
{
char buffer[1024];

std::snprintf(buffer, sizeof(buffer), "0x%08x", gpuProperties2->properties.deviceID);
gpuSettings->GpuVendorPreset.modelId = buffer;

std::snprintf(buffer, sizeof(buffer), "0x%08x", gpuProperties2->properties.vendorID);
gpuSettings->GpuVendorPreset.vendorId = buffer;

gpuSettings->GpuVendorPreset.gpuName = gpuProperties2->properties.deviceName;

// driver info
std::snprintf(buffer, sizeof(buffer), "%s - %s", m_driverProperties.driverInfo,
m_driverProperties.driverName);
gpuSettings->GpuVendorPreset.gpuDriverVersion = buffer;
}

// TODO: Fix once vulkan adds support for revision ID
gpuSettings->GpuVendorPreset.revisionId = "0x00";
Expand Down
5 changes: 1 addition & 4 deletions engine/renderer/api/vulkan/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
#include "api/gpuResource.h"
#include "common/assetManager.h"

#include <volk.h>
#include <imgui/imgui.h>
#include <imgui/imgui_impl_vulkan.h>
#include <imgui/imgui_impl_glfw.h>
#include "volk.h"

namespace aph::vk
{
Expand Down

0 comments on commit c24cd5c

Please sign in to comment.