mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 19:40:06 +00:00
Bug fixes and formatting
This commit is contained in:
parent
5bc82d124c
commit
e9d84ef22c
@ -549,6 +549,8 @@ CachedSurface::CachedSurface(const SurfaceParams& params)
|
||||
// alternatives. This signals a bug on those functions.
|
||||
const auto width = static_cast<GLsizei>(params.MipWidth(0));
|
||||
const auto height = static_cast<GLsizei>(params.MipHeight(0));
|
||||
memory_size = params.MemorySize();
|
||||
reinterpreted = false;
|
||||
|
||||
const auto& format_tuple = GetFormatTuple(params.pixel_format, params.component_type);
|
||||
gl_internal_format = format_tuple.internal_format;
|
||||
@ -995,6 +997,7 @@ void RasterizerCacheOpenGL::LoadSurface(const Surface& surface) {
|
||||
surface->LoadGLBuffer();
|
||||
surface->UploadGLTexture(read_framebuffer.handle, draw_framebuffer.handle);
|
||||
surface->MarkAsModified(false, *this);
|
||||
surface->MarkForReload(false);
|
||||
}
|
||||
|
||||
Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params, bool preserve_contents) {
|
||||
@ -1388,7 +1391,6 @@ bool RasterizerCacheOpenGL::PartialReinterpretSurface(Surface triggering_surface
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) {
|
||||
if (triggering_surface == nullptr)
|
||||
return;
|
||||
|
@ -150,7 +150,7 @@ struct SurfaceParams {
|
||||
}
|
||||
|
||||
u32 MipWidthGobAligned(u32 mip_level) const {
|
||||
return std::max(64U*8U / GetFormatBpp(), width >> mip_level);
|
||||
return Common::AlignUp(std::max(1U, width >> mip_level), 64U * 8U / GetFormatBpp());
|
||||
}
|
||||
|
||||
u32 MipHeight(u32 mip_level) const {
|
||||
@ -564,7 +564,6 @@ protected:
|
||||
}
|
||||
RasterizerCache<Surface>::Unregister(object);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace OpenGL
|
||||
|
Loading…
Reference in New Issue
Block a user