|
@@ -42,6 +42,7 @@ static VkCommandBuffer command_buffer;
|
|
static VkBuffer buffers_to_destroy[256];
|
|
static VkBuffer buffers_to_destroy[256];
|
|
static VkDeviceMemory buffer_memories_to_destroy[256];
|
|
static VkDeviceMemory buffer_memories_to_destroy[256];
|
|
static int buffers_to_destroy_count = 0;
|
|
static int buffers_to_destroy_count = 0;
|
|
|
|
+static char device_name[256];
|
|
|
|
|
|
static VkInstance instance;
|
|
static VkInstance instance;
|
|
static VkPhysicalDevice gpu;
|
|
static VkPhysicalDevice gpu;
|
|
@@ -753,6 +754,7 @@ void gpu_init_internal(int depth_buffer_bits, bool vsync) {
|
|
VkPhysicalDeviceProperties properties;
|
|
VkPhysicalDeviceProperties properties;
|
|
vkGetPhysicalDeviceProperties(gpu, &properties);
|
|
vkGetPhysicalDeviceProperties(gpu, &properties);
|
|
iron_log("Chosen Vulkan device: %s", properties.deviceName);
|
|
iron_log("Chosen Vulkan device: %s", properties.deviceName);
|
|
|
|
+ strcpy(device_name, properties.deviceName);
|
|
is_amd = properties.vendorID == 0x1002;
|
|
is_amd = properties.vendorID == 0x1002;
|
|
free(physical_devices);
|
|
free(physical_devices);
|
|
}
|
|
}
|
|
@@ -1872,6 +1874,10 @@ void gpu_buffer_destroy_internal(gpu_buffer_t *buffer) {
|
|
vkDestroyBuffer(device, buffer->impl.buf, NULL);
|
|
vkDestroyBuffer(device, buffer->impl.buf, NULL);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+char *gpu_device_name() {
|
|
|
|
+ return device_name;
|
|
|
|
+}
|
|
|
|
+
|
|
typedef struct inst {
|
|
typedef struct inst {
|
|
iron_matrix4x4_t m;
|
|
iron_matrix4x4_t m;
|
|
int i;
|
|
int i;
|