From d5422a4b96d43614507df2bb0c248d04bbe6683a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 6 Feb 2013 11:36:59 +0000 Subject: [PATCH] d3dtrace: Recognize YV12 format. --- dispatch/d3d9imports.hpp | 4 ++++ helpers/d3dcommonsize.hpp | 1 + specs/d3d9types.py | 1 + 3 files changed, 6 insertions(+) diff --git a/dispatch/d3d9imports.hpp b/dispatch/d3d9imports.hpp index a07d768..b4e8187 100644 --- a/dispatch/d3d9imports.hpp +++ b/dispatch/d3d9imports.hpp @@ -73,6 +73,10 @@ #define D3DFMT_NV12 ((D3DFORMAT)MAKEFOURCC('N','V','1','2')) #endif +#ifndef D3DFMT_YV12 +#define D3DFMT_YV12 ((D3DFORMAT)MAKEFOURCC('Y','V','1','2')) +#endif + #ifndef D3DFMT_RAWZ #define D3DFMT_RAWZ ((D3DFORMAT)MAKEFOURCC('R','A','W','Z')) #endif diff --git a/helpers/d3dcommonsize.hpp b/helpers/d3dcommonsize.hpp index d4c4862..b1f7b28 100644 --- a/helpers/d3dcommonsize.hpp +++ b/helpers/d3dcommonsize.hpp @@ -163,6 +163,7 @@ _getLockSize(D3DFORMAT Format, UINT Width, UINT Height, INT RowPitch, UINT Depth #if DIRECT3D_VERSION >= 0x900 case D3DFMT_NV12: + case D3DFMT_YV12: return (Height + ((Height + 1) / 2)) * RowPitch; case D3DFMT_NULL: diff --git a/specs/d3d9types.py b/specs/d3d9types.py index 8979734..dc9e852 100644 --- a/specs/d3d9types.py +++ b/specs/d3d9types.py @@ -728,6 +728,7 @@ D3DFORMAT = Enum("D3DFORMAT", [ "D3DFMT_INTZ", "D3DFMT_NULL", "D3DFMT_NV12", + "D3DFMT_YV12", "D3DFMT_RAWZ", ]) -- 2.43.0