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 {
|
2018-04-11 16:21:59 +02:00
|
|
|
BlockCompressed = 0, ///< Image format is block compressed
|
2018-06-23 13:06:42 +02:00
|
|
|
SampledUInt = 1, ///< Sampled type is an unsigned integer type
|
|
|
|
SampledSInt = 2, ///< Sampled type is a signed integer type
|
|
|
|
ColorSpaceSrgb = 3, ///< Non-linear SRGB color format
|
2017-12-10 18:14:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|