mirror of https://github.com/xemu-project/xemu.git
nv2a: Fallback to recreating texture on surface size mismatch.
There is no requirement that a surface and texture using the same VRAM address match with respect to size (in particular pitch). This change prevents incorrect reuse of a surface binding in the event that the texture size does not match. Fixes #1127
This commit is contained in:
parent
ea0a906707
commit
1e221e8da9
|
@ -5354,6 +5354,12 @@ static bool pgraph_check_surface_to_texture_compatibility(
|
|||
{
|
||||
// FIXME: Better checks/handling on formats and surface-texture compat
|
||||
|
||||
if (surface->pitch != shape->pitch ||
|
||||
surface->width != shape->width ||
|
||||
surface->height != shape->height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int surface_fmt = surface->shape.color_format;
|
||||
int texture_fmt = shape->color_format;
|
||||
|
||||
|
|
Loading…
Reference in New Issue