mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 06:00:05 +00:00
rasterizer_cache: Always create TextureDownloaderES
* It's used when dumping textures on desktop, so create it upfront to avoid null checks
This commit is contained in:
parent
1579f96397
commit
9b5230c60e
@ -260,11 +260,6 @@ void CachedSurface::DumpTexture(GLuint target_tex, u64 tex_hash) {
|
||||
GetTexImageOES conveniently only dumps the specified region, and works on both
|
||||
desktop and ES.
|
||||
*/
|
||||
// if the backend isn't OpenGL ES, this won't be initialized yet
|
||||
if (!owner.texture_downloader_es) {
|
||||
owner.texture_downloader_es = std::make_unique<TextureDownloaderES>(false);
|
||||
}
|
||||
|
||||
owner.texture_downloader_es->GetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
height, width, &decoded_texture[0]);
|
||||
state.texture_units[0].texture_2d = old_texture;
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "video_core/renderer_opengl/texture_filters/texture_filterer.h"
|
||||
#include "video_core/renderer_opengl/texture_downloader_es.h"
|
||||
#include "video_core/renderer_opengl/gl_format_reinterpreter.h"
|
||||
#include "video_core/renderer_opengl/gl_vars.h"
|
||||
|
||||
namespace OpenGL {
|
||||
|
||||
@ -244,9 +243,7 @@ RasterizerCacheOpenGL::RasterizerCacheOpenGL() {
|
||||
texture_filterer = std::make_unique<TextureFilterer>(Settings::values.texture_filter_name,
|
||||
resolution_scale_factor);
|
||||
format_reinterpreter = std::make_unique<FormatReinterpreterOpenGL>();
|
||||
if (GLES) {
|
||||
texture_downloader_es = std::make_unique<TextureDownloaderES>(false);
|
||||
}
|
||||
texture_downloader_es = std::make_unique<TextureDownloaderES>(false);
|
||||
}
|
||||
|
||||
RasterizerCacheOpenGL::~RasterizerCacheOpenGL() {
|
||||
|
Loading…
Reference in New Issue
Block a user