diff --git a/src/video_core/custom_textures/custom_tex_manager.cpp b/src/video_core/custom_textures/custom_tex_manager.cpp index 2b76bca79..381cb180e 100644 --- a/src/video_core/custom_textures/custom_tex_manager.cpp +++ b/src/video_core/custom_textures/custom_tex_manager.cpp @@ -22,7 +22,7 @@ namespace { MICROPROFILE_DEFINE(CustomTexManager_TickFrame, "CustomTexManager", "TickFrame", MP_RGB(54, 16, 32)); -constexpr std::size_t MAX_UPLOADS_PER_TICK = 16; +constexpr std::size_t MAX_UPLOADS_PER_TICK = 8; bool IsPow2(u32 value) { return value != 0 && (value & (value - 1)) == 0; diff --git a/src/video_core/renderer_opengl/gl_texture_runtime.cpp b/src/video_core/renderer_opengl/gl_texture_runtime.cpp index 8e8051a92..3aaac00ec 100644 --- a/src/video_core/renderer_opengl/gl_texture_runtime.cpp +++ b/src/video_core/renderer_opengl/gl_texture_runtime.cpp @@ -184,8 +184,8 @@ Allocation TextureRuntime::Allocate(const VideoCore::SurfaceParams& params, const auto& tuple = is_custom ? GetFormatTuple(params.custom_format) : GetFormatTuple(params.pixel_format); const HostTextureTag key = { - .width = params.GetScaledWidth(), - .height = params.GetScaledHeight(), + .width = params.width, + .height = params.height, .levels = params.levels, .res_scale = params.res_scale, .tuple = tuple, @@ -230,10 +230,11 @@ Allocation TextureRuntime::Allocate(const VideoCore::SurfaceParams& params, .textures = std::move(textures), .handles = std::move(handles), .tuple = tuple, - .width = params.GetScaledWidth(), - .height = params.GetScaledHeight(), + .width = params.width, + .height = params.height, .levels = params.levels, .res_scale = params.res_scale, + .is_custom = is_custom, }; } @@ -614,7 +615,7 @@ HostTextureTag Surface::MakeTag() const noexcept { .res_scale = alloc.res_scale, .tuple = alloc.tuple, .type = texture_type, - .is_custom = True(flags & VideoCore::SurfaceFlagBits::Custom), + .is_custom = alloc.is_custom, .has_normal = HasNormalMap(), }; } diff --git a/src/video_core/renderer_opengl/gl_texture_runtime.h b/src/video_core/renderer_opengl/gl_texture_runtime.h index a0d155cd0..2ffd45a4b 100644 --- a/src/video_core/renderer_opengl/gl_texture_runtime.h +++ b/src/video_core/renderer_opengl/gl_texture_runtime.h @@ -59,6 +59,7 @@ struct Allocation { u32 height; u32 levels; u32 res_scale; + bool is_custom; operator bool() const noexcept { return textures[0].handle;