mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user