summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures/texture.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-08 04:28:35 +0100
committerGitHub <noreply@github.com>2020-03-08 04:28:35 +0100
commit84e9f9f39599b7af69c02ea17a95aa7216489fc5 (patch)
tree3a5d70ee520db322151d722874288451a4350a22 /src/video_core/textures/texture.h
parentMerge pull request #3481 from ReinUsesLisp/abgr5-storage (diff)
parentCreate an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels. (diff)
downloadyuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar.gz
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar.bz2
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar.lz
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar.xz
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.tar.zst
yuzu-84e9f9f39599b7af69c02ea17a95aa7216489fc5.zip
Diffstat (limited to 'src/video_core/textures/texture.h')
-rw-r--r--src/video_core/textures/texture.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index 8e82c6748..07098c70d 100644
--- a/src/video_core/textures/texture.h
+++ b/src/video_core/textures/texture.h
@@ -8,6 +8,7 @@
#include "common/assert.h"
#include "common/bit_field.h"
#include "common/common_types.h"
+#include "core/settings.h"
namespace Tegra::Texture {
@@ -294,6 +295,14 @@ enum class TextureMipmapFilter : u32 {
Linear = 3,
};
+enum class Anisotropy {
+ Default,
+ Filter2x,
+ Filter4x,
+ Filter8x,
+ Filter16x,
+};
+
struct TSCEntry {
union {
struct {
@@ -328,7 +337,20 @@ struct TSCEntry {
};
float GetMaxAnisotropy() const {
- return static_cast<float>(1U << max_anisotropy);
+ switch (static_cast<Anisotropy>(Settings::values.max_anisotropy)) {
+ case Anisotropy::Default:
+ return static_cast<float>(1U << max_anisotropy);
+ case Anisotropy::Filter2x:
+ return static_cast<float>(2U << max_anisotropy);
+ case Anisotropy::Filter4x:
+ return static_cast<float>(4U << max_anisotropy);
+ case Anisotropy::Filter8x:
+ return static_cast<float>(8U << max_anisotropy);
+ case Anisotropy::Filter16x:
+ return static_cast<float>(16U << max_anisotropy);
+ default:
+ return static_cast<float>(1U << max_anisotropy);
+ }
}
float GetMinLod() const {