rpcsx/rpcs3/Emu/RSX/VK/VKFormats.h
kd-11 299b98b30a vk: Disable mipmap sampling if sampling mode is does not have a mipmap filtering mode.
- GL_LINEAR and GL_NEAREST always sample LOD0 so make vulkan behave the same way
2019-10-18 14:46:37 +03:00

31 lines
1.2 KiB
C++

#pragma once
#include "VKHelpers.h"
#include <tuple>
namespace vk
{
struct minification_filter
{
VkFilter filter;
VkSamplerMipmapMode mipmap_mode;
bool sample_mipmaps;
};
VkBorderColor get_border_color(u32 color);
VkFormat get_compatible_depth_surface_format(const gpu_formats_support &support, rsx::surface_depth_format format);
VkFormat get_compatible_sampler_format(const gpu_formats_support &support, u32 format);
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);
std::pair<bool, u32> get_format_convert_flags(VkFormat format);
bool formats_are_bitcast_compatible(VkFormat format1, VkFormat format2);
minification_filter get_min_filter(rsx::texture_minify_filter min_filter);
VkFilter get_mag_filter(rsx::texture_magnify_filter mag_filter);
VkSamplerAddressMode vk_wrap_mode(rsx::texture_wrap_mode gcm_wrap);
float max_aniso(rsx::texture_max_anisotropy gcm_aniso);
std::array<VkComponentSwizzle, 4> get_component_mapping(u32 format);
VkPrimitiveTopology get_appropriate_topology(rsx::primitive_type mode, bool &requires_modification);
}