Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture Filtering v2 #5166

Merged
merged 10 commits into from Apr 3, 2020
Merged

Conversation

BreadFish64
Copy link
Contributor

@BreadFish64 BreadFish64 commented Apr 2, 2020

Follow-up to #5017

I was having some trouble getting texture filtering and format reinterpretation working together. I decided I wasn't happy with the current texture filtering design, so I did a complete self-review and made some major changes. Hopefully, this should also fix some of the reported bugs with texture filtering that I haven't reproduced

For more info check the commit messages.


This change is Reviewable

BreadFish64 added 8 commits Apr 2, 2020
Some of its enums are needed outside of the rasterizer cache
and trying to use it caused circular dependencies.
This should make it less intrusive.
Now texture filtering doesn't have any mutable global state.
The texture filters now always upscale to the internal rendering resolution.
This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function.
This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size.
The filtered guest mipmaps often looked terrible.
MacOS doesn't allow this
src/video_core/renderer_opengl/gl_rasterizer_cache.h Outdated Show resolved Hide resolved
static constexpr std::string_view NONE = "none";

explicit TextureFilterer(std::string_view filter_name, u16 scale_factor);
// returns true if the filter actually changed
Copy link
Member

@lioncash lioncash Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a destructor is defaulted within the cpp file,

#include "video_core/renderer_opengl/texture_filters/texture_filter_base.h"

can be replaced with a forward declaration of TextureFilterBase.

Copy link
Contributor Author

@BreadFish64 BreadFish64 Apr 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this, but unfortunately the compiler errors with a message about deleting an incomplete type.

@BreadFish64 BreadFish64 merged commit f14e973 into citra-emu:master Apr 3, 2020
3 checks passed
@BreadFish64
Copy link
Contributor Author

BreadFish64 commented Apr 3, 2020

I'm merging this quickly in the interest of unblocking texture format reinterpretation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants