fix a lot of things
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "buffers/gryphn_buffer.h"
|
||||
#include "output_device/gryphn_output_device.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
#include "output_device/vulkan_physical_device.h"
|
||||
#include <vulkan_result_converter.h>
|
||||
|
||||
VkBufferUsageFlags vkGryphnBufferType(gnBufferType type) {
|
||||
@@ -49,7 +48,7 @@ gnReturnCode VkCreateBuffer(
|
||||
VkMemoryAllocateInfo memoryAllocateInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
|
||||
.allocationSize = bufferRequirements.size,
|
||||
.memoryTypeIndex = VkMemoryIndex(device->physicalDevice->physicalDevice->device, bufferRequirements.memoryTypeBits, flags, &foundMemory)
|
||||
.memoryTypeIndex = VkMemoryIndex(device->outputDevice->physicalDevice, bufferRequirements.memoryTypeBits, flags, &foundMemory)
|
||||
};
|
||||
if (!foundMemory) return GN_FAILED_TO_ALLOCATE_MEMORY;
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue, const gnDevice device, gnPresentationQueueInfo presentationInfo) {
|
||||
presentationQueue->presentationQueue = malloc(sizeof(struct gnPlatformPresentationQueue_t));
|
||||
|
||||
vkSwapchainSupportDetails details = vkGetSwapchainSupport(device->physicalDevice->physicalDevice->device, presentationInfo.surface->windowSurface->surface);
|
||||
vkSwapchainSupportDetails details = vkGetSwapchainSupport(device->outputDevice->physicalDevice, presentationInfo.surface->windowSurface->surface);
|
||||
VkFormat convertedFormat = vkGryphnFormatToVulkanFormat(presentationInfo.format.format);
|
||||
VkColorSpaceKHR convertedColorSpace = vkGryphnColorSpaceToVulkanColorSpace(presentationInfo.format.colorSpace);
|
||||
|
||||
|
@@ -182,7 +182,7 @@ gnReturnCode createTexture(gnTexture texture, gnDevice device, const gnTextureIn
|
||||
VkMemoryAllocateInfo allocInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
|
||||
.allocationSize = memRequirements.size,
|
||||
.memoryTypeIndex = VkMemoryIndex(device->physicalDevice->physicalDevice->device, memRequirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &foundMemory)
|
||||
.memoryTypeIndex = VkMemoryIndex(device->outputDevice->physicalDevice, memRequirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &foundMemory)
|
||||
};
|
||||
if (!foundMemory) return GN_FAILED_TO_ALLOCATE_MEMORY;
|
||||
|
||||
@@ -209,7 +209,7 @@ gnReturnCode createTexture(gnTexture texture, gnDevice device, const gnTextureIn
|
||||
if (image_view != VK_SUCCESS) return VkResultToGnReturnCode(image_view);
|
||||
|
||||
VkPhysicalDeviceProperties properties = {};
|
||||
vkGetPhysicalDeviceProperties(device->physicalDevice->physicalDevice->device, &properties);
|
||||
vkGetPhysicalDeviceProperties(device->outputDevice->physicalDevice, &properties);
|
||||
|
||||
VkSamplerCreateInfo samplerInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
|
||||
|
Reference in New Issue
Block a user