From 777cd4cd646651469387a0426f4197585f2be6f7 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 18 Dec 2019 22:45:50 +0000 Subject: [PATCH] [d3d9] Add operator overloads for D3DVIEWPORT9 --- src/d3d9/d3d9_util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/d3d9/d3d9_util.h b/src/d3d9/d3d9_util.h index 3a1447c3..d6aa7c6d 100644 --- a/src/d3d9/d3d9_util.h +++ b/src/d3d9/d3d9_util.h @@ -191,6 +191,19 @@ namespace dxvk { bool IsDepthFormat(D3D9Format Format); + inline bool operator == (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { + return a.X == b.X && + a.Y == b.Y && + a.Width == b.Width && + a.Height == b.Height && + a.MinZ == b.MinZ && + a.MaxZ == b.MaxZ; + } + + inline bool operator != (const D3DVIEWPORT9& a, const D3DVIEWPORT9& b) { + return !(a == b); + } + inline bool IsPoolManaged(D3DPOOL Pool) { return Pool == D3DPOOL_MANAGED || Pool == D3DPOOL_MANAGED_EX; }