mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-20 18:33:24 +02:00
Merge pull request #4822 from wwylele/mipmap-cub
gl_rasterizer: correct supress_mipmap_for_cube logic
This commit is contained in:
commit
46d552b4d7
@ -1576,17 +1576,14 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(
|
||||
mag_filter = config.mag_filter;
|
||||
glSamplerParameteri(s, GL_TEXTURE_MAG_FILTER, PicaToGL::TextureMagFilterMode(mag_filter));
|
||||
}
|
||||
if (min_filter != config.min_filter || mip_filter != config.mip_filter) {
|
||||
min_filter = config.min_filter;
|
||||
mip_filter = config.mip_filter;
|
||||
glSamplerParameteri(s, GL_TEXTURE_MIN_FILTER,
|
||||
PicaToGL::TextureMinFilterMode(min_filter, mip_filter));
|
||||
}
|
||||
|
||||
// TODO(wwylele): remove this block once mipmap for cube is implemented
|
||||
// TODO(wwylele): remove new_supress_mipmap_for_cube logic once mipmap for cube is implemented
|
||||
bool new_supress_mipmap_for_cube =
|
||||
config.type == Pica::TexturingRegs::TextureConfig::TextureCube;
|
||||
if (supress_mipmap_for_cube != new_supress_mipmap_for_cube) {
|
||||
if (min_filter != config.min_filter || mip_filter != config.mip_filter ||
|
||||
supress_mipmap_for_cube != new_supress_mipmap_for_cube) {
|
||||
min_filter = config.min_filter;
|
||||
mip_filter = config.mip_filter;
|
||||
supress_mipmap_for_cube = new_supress_mipmap_for_cube;
|
||||
if (new_supress_mipmap_for_cube) {
|
||||
// HACK: use mag filter converter for min filter because they are the same anyway
|
||||
|
Loading…
Reference in New Issue
Block a user