2020-12-05 13:08:24 +01:00
|
|
|
#pragma once
|
2020-12-24 11:49:08 +01:00
|
|
|
#include "VulkanAPI.h"
|
|
|
|
|
#include "../gcm_enums.h"
|
2016-03-16 00:42:40 +01:00
|
|
|
#include <tuple>
|
2016-03-12 01:13:30 +01:00
|
|
|
|
|
|
|
|
namespace vk
|
|
|
|
|
{
|
2020-12-24 11:49:08 +01:00
|
|
|
class image;
|
|
|
|
|
struct gpu_formats_support;
|
|
|
|
|
|
2019-10-18 14:07:30 +03:00
|
|
|
struct minification_filter
|
|
|
|
|
{
|
|
|
|
|
VkFilter filter;
|
|
|
|
|
VkSamplerMipmapMode mipmap_mode;
|
|
|
|
|
bool sample_mipmaps;
|
|
|
|
|
};
|
|
|
|
|
|
2018-04-15 01:53:38 +03:00
|
|
|
VkBorderColor get_border_color(u32 color);
|
2016-03-16 00:42:40 +01:00
|
|
|
|
2021-04-11 16:51:57 +02:00
|
|
|
VkFormat get_compatible_depth_surface_format(const gpu_formats_support& support, rsx::surface_depth_format2 format);
|
|
|
|
|
VkFormat get_compatible_sampler_format(const gpu_formats_support& support, u32 format);
|
2018-04-13 23:59:29 +03:00
|
|
|
VkFormat get_compatible_srgb_format(VkFormat rgb_format);
|
|
|
|
|
u8 get_format_texel_width(VkFormat format);
|
|
|
|
|
std::pair<u8, u8> get_format_element_size(VkFormat format);
|
2019-04-05 14:39:43 +03:00
|
|
|
std::pair<bool, u32> get_format_convert_flags(VkFormat format);
|
2020-08-16 00:33:34 +03:00
|
|
|
bool formats_are_bitcast_compatible(image* image1, image* image2);
|
2018-04-13 23:59:29 +03:00
|
|
|
|
2019-10-18 14:07:30 +03:00
|
|
|
minification_filter get_min_filter(rsx::texture_minify_filter min_filter);
|
2016-03-30 20:00:09 +02:00
|
|
|
VkFilter get_mag_filter(rsx::texture_magnify_filter mag_filter);
|
2016-03-30 18:55:43 +02:00
|
|
|
VkSamplerAddressMode vk_wrap_mode(rsx::texture_wrap_mode gcm_wrap);
|
2016-03-30 19:20:39 +02:00
|
|
|
float max_aniso(rsx::texture_max_anisotropy gcm_aniso);
|
2017-03-05 14:58:53 +03:00
|
|
|
std::array<VkComponentSwizzle, 4> get_component_mapping(u32 format);
|
2018-04-21 18:02:17 +03:00
|
|
|
VkPrimitiveTopology get_appropriate_topology(rsx::primitive_type mode, bool &requires_modification);
|
2016-03-20 02:26:51 +01:00
|
|
|
}
|