rasterizer_cache: Handle null surface id in GetTextureSurface

* Pokemon X tries to use a texture with zero width. The previous code handled this so will we
This commit is contained in:
GPUCode
2023-03-05 16:36:19 +02:00
parent 3b050668bb
commit 8f194b5fff

View File

@@ -617,7 +617,7 @@ auto RasterizerCache<T>::GetTextureSurface(const Pica::Texture::TextureInfo& inf
}
SurfaceId surface_id = GetSurface(params, ScaleMatch::Ignore, true);
return slot_surfaces[surface_id];
return surface_id ? slot_surfaces[surface_id] : slot_surfaces[NULL_SURFACE_ID];
}
template <class T>