add mipLevels info
This commit is contained in:
@@ -35,6 +35,8 @@ VkImageAspectFlags vkGryphnGetAspectFlags(gnImageFormat format) {
|
|||||||
|
|
||||||
gnBool vkGryphnIsDepthStencil(gnImageFormat format) { return (format == GN_FORMAT_D32S8_UINT || format == GN_FORMAT_D24S8_UINT); }
|
gnBool vkGryphnIsDepthStencil(gnImageFormat format) { return (format == GN_FORMAT_D32S8_UINT || format == GN_FORMAT_D24S8_UINT); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void VkTransitionImageLayout(gnDevice device, VkImage image, gnImageFormat format, VkImageLayout oldLayout, VkImageLayout newLayout) {
|
void VkTransitionImageLayout(gnDevice device, VkImage image, gnImageFormat format, VkImageLayout oldLayout, VkImageLayout newLayout) {
|
||||||
VkCommandBuffer transferBuffer = gnBeginVulkanTransferOperation(device);
|
VkCommandBuffer transferBuffer = gnBeginVulkanTransferOperation(device);
|
||||||
|
|
||||||
@@ -125,8 +127,6 @@ void VkCopyBufferToImage(VkGryphnBuffer buffer, VkGryphnImage image, gnExtent3D
|
|||||||
gnEndVulkanTransferOperation(device, transferBuffer);
|
gnEndVulkanTransferOperation(device, transferBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "stdio.h"
|
|
||||||
|
|
||||||
gnReturnCode createTexture(gnTexture texture, gnDevice device, const gnTextureInfo info) {
|
gnReturnCode createTexture(gnTexture texture, gnDevice device, const gnTextureInfo info) {
|
||||||
texture->texture = malloc(sizeof(struct gnPlatformTexture_t));
|
texture->texture = malloc(sizeof(struct gnPlatformTexture_t));
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <output_device/gryphn_physical_output_device.h>
|
#include <output_device/gryphn_physical_output_device.h>
|
||||||
#include <utils/gryphn_error_code.h>
|
#include <utils/gryphn_error_code.h>
|
||||||
#include "loader/src/gryphn_device_functions.h"
|
|
||||||
|
|
||||||
typedef struct gnDeviceQueueInfo {
|
typedef struct gnDeviceQueueInfo {
|
||||||
int queueIndex;
|
int queueIndex;
|
||||||
|
@@ -17,10 +17,10 @@ typedef struct gnPhysicalDeviceFeatures {
|
|||||||
} gnPhysicalDeviceFeatures;
|
} gnPhysicalDeviceFeatures;
|
||||||
|
|
||||||
typedef enum gnQueueTypeFlags {
|
typedef enum gnQueueTypeFlags {
|
||||||
GN_QUEUE_GRAPHICS = 0x00000001,
|
GN_QUEUE_GRAPHICS = 1,
|
||||||
GN_QUEUE_COMPUTE = 0x00000002,
|
GN_QUEUE_COMPUTE = 2,
|
||||||
GN_QUEUE_TRANSFER = 0x00000004,
|
GN_QUEUE_TRANSFER = 4,
|
||||||
GN_QUEUE_SPARSE_BINDING = 0x00000008
|
GN_QUEUE_SPARSE_BINDING = 8
|
||||||
} gnQueueTypeFlags;
|
} gnQueueTypeFlags;
|
||||||
|
|
||||||
typedef struct gnQueueProperties {
|
typedef struct gnQueueProperties {
|
||||||
|
@@ -18,6 +18,7 @@ typedef enum gnTextureWrap {
|
|||||||
|
|
||||||
typedef struct gnTextureInfo {
|
typedef struct gnTextureInfo {
|
||||||
gnExtent3D extent;
|
gnExtent3D extent;
|
||||||
|
uint32_t mipmapLevels;
|
||||||
gnTextureType type;
|
gnTextureType type;
|
||||||
gnImageFormat format;
|
gnImageFormat format;
|
||||||
gnTextureFilter minFilter, magFilter;
|
gnTextureFilter minFilter, magFilter;
|
||||||
|
Reference in New Issue
Block a user