mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
GL: Added functions to convert Maxwell tex filters and wrap modes to OpenGL.
This commit is contained in:
parent
ad1810e895
commit
f73a280eeb
@ -47,4 +47,27 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) {
|
||||||
|
switch (filter_mode) {
|
||||||
|
case Tegra::Texture::TextureFilter::Linear:
|
||||||
|
return GL_LINEAR;
|
||||||
|
case Tegra::Texture::TextureFilter::Nearest:
|
||||||
|
return GL_NEAREST;
|
||||||
|
}
|
||||||
|
LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode=%u",
|
||||||
|
static_cast<u32>(filter_mode));
|
||||||
|
UNREACHABLE();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
|
||||||
|
switch (wrap_mode) {
|
||||||
|
case Tegra::Texture::WrapMode::ClampToEdge:
|
||||||
|
return GL_CLAMP_TO_EDGE;
|
||||||
|
}
|
||||||
|
LOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode=%u", static_cast<u32>(wrap_mode));
|
||||||
|
UNREACHABLE();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace MaxwellToGL
|
} // namespace MaxwellToGL
|
||||||
|
Loading…
Reference in New Issue
Block a user