diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-30 08:20:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 08:20:09 +0100 |
commit | d5fe722a30947c5c808717ad8940077e95a3a81c (patch) | |
tree | f6f5d6d6379b0404147969e7d1f548ed3d49ca01 /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | Merge pull request #5247 from comex/xx-concepts (diff) | |
parent | video_core: Rewrite the texture cache (diff) | |
download | yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar.gz yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar.bz2 yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar.lz yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar.xz yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.tar.zst yuzu-d5fe722a30947c5c808717ad8940077e95a3a81c.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/maxwell_to_gl.h')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index dd4ee3361..cbccfdeb4 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -475,6 +475,19 @@ inline GLenum PolygonMode(Maxwell::PolygonMode polygon_mode) { return GL_FILL; } +inline GLenum ReductionFilter(Tegra::Texture::SamplerReduction filter) { + switch (filter) { + case Tegra::Texture::SamplerReduction::WeightedAverage: + return GL_WEIGHTED_AVERAGE_ARB; + case Tegra::Texture::SamplerReduction::Min: + return GL_MIN; + case Tegra::Texture::SamplerReduction::Max: + return GL_MAX; + } + UNREACHABLE_MSG("Invalid reduction filter={}", static_cast<int>(filter)); + return GL_WEIGHTED_AVERAGE_ARB; +} + inline GLenum ViewportSwizzle(Maxwell::ViewportSwizzle swizzle) { // Enumeration order matches register order. We can convert it arithmetically. return GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV + static_cast<GLenum>(swizzle); |