2017-12-09 02:44:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "dxvk_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2017-12-10 18:14:28 +01:00
|
|
|
enum class DxvkFormatFlag {
|
|
|
|
BlockCompressed,
|
|
|
|
};
|
|
|
|
|
|
|
|
using DxvkFormatFlags = Flags<DxvkFormatFlag>;
|
|
|
|
|
2017-12-09 02:44:59 +01:00
|
|
|
/**
|
|
|
|
* \brief Format info structure
|
|
|
|
*
|
|
|
|
* Provides some useful information
|
|
|
|
* about a Vulkan image format.
|
|
|
|
*/
|
|
|
|
struct DxvkFormatInfo {
|
2017-12-10 18:14:28 +01:00
|
|
|
/// Size of an element in this format. For compressed
|
|
|
|
/// formats, this is the size of a block, in bytes.
|
|
|
|
VkDeviceSize elementSize = 0;
|
2017-12-09 02:44:59 +01:00
|
|
|
|
|
|
|
/// Available image aspect flags
|
2017-12-10 18:14:28 +01:00
|
|
|
VkImageAspectFlags aspectMask = 0;
|
|
|
|
|
|
|
|
/// Some other format info flags
|
|
|
|
DxvkFormatFlags flags = 0;
|
|
|
|
|
|
|
|
/// Size, in pixels, of a compressed block. For
|
|
|
|
/// non-block formats, all these values are 1.
|
|
|
|
VkExtent3D blockSize = { 1, 1, 1 };
|
2017-12-09 02:44:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-12-10 18:14:28 +01:00
|
|
|
|
2017-12-09 02:44:59 +01:00
|
|
|
const DxvkFormatInfo* imageFormatInfo(VkFormat format);
|
|
|
|
|
|
|
|
}
|