[Vulkan] Non-seamless cube map filtering
This commit is contained in:
parent
e9f7a8bd48
commit
a90f83d44c
|
@ -28,6 +28,13 @@ DEFINE_bool(
|
|||
"the real reason why they're invalid is found.",
|
||||
"GPU");
|
||||
|
||||
DEFINE_bool(
|
||||
non_seamless_cube_map, true,
|
||||
"Disable filtering between cube map faces near edges where possible "
|
||||
"(Vulkan with VK_EXT_non_seamless_cube_map) to reproduce the Direct3D 9 "
|
||||
"behavior.",
|
||||
"GPU");
|
||||
|
||||
// Extremely bright screen borders in 4D5307E6.
|
||||
// Reading between texels with half-pixel offset in 58410954.
|
||||
DEFINE_bool(
|
||||
|
|
|
@ -20,6 +20,8 @@ DECLARE_bool(vsync);
|
|||
|
||||
DECLARE_bool(gpu_allow_invalid_fetch_constants);
|
||||
|
||||
DECLARE_bool(non_seamless_cube_map);
|
||||
|
||||
DECLARE_bool(half_pixel_offset);
|
||||
|
||||
DECLARE_int32(query_occlusion_fake_sample_count);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/math.h"
|
||||
#include "xenia/base/profiling.h"
|
||||
#include "xenia/gpu/gpu_flags.h"
|
||||
#include "xenia/gpu/texture_info.h"
|
||||
#include "xenia/gpu/texture_util.h"
|
||||
#include "xenia/gpu/vulkan/deferred_command_buffer.h"
|
||||
|
@ -760,9 +761,11 @@ VkSampler VulkanTextureCache::UseSampler(SamplerParameters parameters,
|
|||
// GetSamplerParameters.
|
||||
VkSamplerCreateInfo sampler_create_info = {};
|
||||
sampler_create_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
|
||||
// TODO(Triang3l): VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT if
|
||||
// VK_EXT_non_seamless_cube_map and the nonSeamlessCubeMap feature are
|
||||
// supported.
|
||||
if (provider.device_info().nonSeamlessCubeMap &&
|
||||
cvars::non_seamless_cube_map) {
|
||||
sampler_create_info.flags |=
|
||||
VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT;
|
||||
}
|
||||
sampler_create_info.magFilter =
|
||||
parameters.mag_linear ? VK_FILTER_LINEAR : VK_FILTER_NEAREST;
|
||||
sampler_create_info.minFilter =
|
||||
|
|
Loading…
Reference in New Issue