Merge pull request #2372 from FernandoS27/fermi-fix

Correct Fermi Copy on Linear Textures.
master
bunnei 2019-04-10 21:17:03 +07:00 committed by GitHub
commit 0371650bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

@ -266,6 +266,10 @@ std::size_t SurfaceParams::InnerMemorySize(bool force_gl, bool layer_only,
params.component_type = ComponentTypeFromRenderTarget(config.format);
params.type = GetFormatType(params.pixel_format);
params.width = config.width;
if (!params.is_tiled) {
const u32 bpp = params.GetFormatBpp() / 8;
params.pitch = config.width * bpp;
}
params.height = config.height;
params.unaligned_height = config.height;
params.target = SurfaceTarget::Texture2D;