gl_texture_runtime: Fix custom allocation recycling
This commit is contained in:
@@ -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;
|
||||
|
@@ -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(),
|
||||
};
|
||||
}
|
||||
|
@@ -59,6 +59,7 @@ struct Allocation {
|
||||
u32 height;
|
||||
u32 levels;
|
||||
u32 res_scale;
|
||||
bool is_custom;
|
||||
|
||||
operator bool() const noexcept {
|
||||
return textures[0].handle;
|
||||
|
Reference in New Issue
Block a user