1
0
Fork 0
forked from suyu/suyu

Correct Pitch in Fermi2D

This commit is contained in:
Fernando Sahmkow 2019-04-15 12:24:29 -04:00
parent 1f4dfb3998
commit bf561e4340

View file

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