mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Vulkan: Initial support for aniso filtering.
This commit is contained in:
parent
da50370328
commit
82f3df1e06
@ -664,6 +664,9 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
|
||||
if (featuresAvailable_.depthBounds) {
|
||||
featuresEnabled_.depthBounds = true;
|
||||
}
|
||||
if (featuresAvailable_.samplerAnisotropy) {
|
||||
featuresEnabled_.samplerAnisotropy = true;
|
||||
}
|
||||
|
||||
VkDeviceCreateInfo device_info = {};
|
||||
device_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
||||
|
@ -457,6 +457,7 @@ enum {
|
||||
GPU_SUPPORTS_LOGIC_OP = FLAG_BIT(5),
|
||||
GPU_USE_DEPTH_RANGE_HACK = FLAG_BIT(6),
|
||||
GPU_SUPPORTS_WIDE_LINES = FLAG_BIT(7),
|
||||
GPU_SUPPORTS_ANISOTROPY = FLAG_BIT(8),
|
||||
GPU_SUPPORTS_LARGE_VIEWPORTS = FLAG_BIT(16),
|
||||
GPU_SUPPORTS_ACCURATE_DEPTH = FLAG_BIT(17),
|
||||
GPU_SUPPORTS_VAO = FLAG_BIT(18),
|
||||
|
@ -471,6 +471,9 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||
if (vulkan_->GetFeaturesEnabled().logicOp) {
|
||||
gstate_c.featureFlags |= GPU_SUPPORTS_LOGIC_OP;
|
||||
}
|
||||
if (vulkan_->GetFeaturesEnabled().samplerAnisotropy) {
|
||||
gstate_c.featureFlags |= GPU_SUPPORTS_ANISOTROPY;
|
||||
}
|
||||
// Mandatory features on Vulkan, which may be checked in "centralized" code
|
||||
gstate_c.featureFlags |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL;
|
||||
gstate_c.featureFlags |= GPU_SUPPORTS_FBO;
|
||||
|
@ -105,15 +105,14 @@ VkSampler SamplerCache::GetOrCreateSampler(const SamplerCacheKey &key) {
|
||||
samp.minFilter = key.minFilt ? VK_FILTER_LINEAR : VK_FILTER_NEAREST;
|
||||
samp.mipmapMode = key.mipFilt ? VK_SAMPLER_MIPMAP_MODE_LINEAR : VK_SAMPLER_MIPMAP_MODE_NEAREST;
|
||||
|
||||
// TODO: Need to check for device support before enabling aniso
|
||||
/*
|
||||
if (g_Config.iAnisotropyLevel > 1) {
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_ANISOTROPY) && g_Config.iAnisotropyLevel > 0) {
|
||||
samp.maxAnisotropy = g_Config.iAnisotropyLevel;
|
||||
samp.anisotropyEnable = true;
|
||||
} else {
|
||||
samp.maxAnisotropy = 1.0f;
|
||||
samp.anisotropyEnable = false;
|
||||
}
|
||||
*/
|
||||
samp.maxAnisotropy = 1.0f;
|
||||
samp.anisotropyEnable = false;
|
||||
|
||||
samp.maxLod = key.maxLevel;
|
||||
samp.minLod = 0.0f;
|
||||
samp.mipLodBias = 0.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user