]> git.cworth.org Git - apitrace/commitdiff
Trace unofficial D3D9 formats
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 13 Apr 2011 16:36:36 +0000 (17:36 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 13 Apr 2011 16:36:36 +0000 (17:36 +0100)
compat.h
d3d9.py
d3d9imports.hpp [new file with mode: 0644]
d3d9types.py

index e98f746b30b65042a54c123bd38757627fd56196..cc6f70e7dfca02ebd16b4fc82d2e5e65a43b49d8 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -20,8 +20,6 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
- * Copyright 2007-2009 VMware, Inc.
- * All rights reserved.
  *
  **************************************************************************/
 
diff --git a/d3d9.py b/d3d9.py
index 057fad6906671780132176cd4f0929f06b8c00a6..dbec2f89430090a0afe09a01297d2185aebdc215 100644 (file)
--- a/d3d9.py
+++ b/d3d9.py
@@ -411,12 +411,7 @@ class D3D9Tracer(DllTracer):
 
 
 if __name__ == '__main__':
-    print '#include <windows.h>'
-    print '#include <tchar.h>'
-    print
-    print '#include "compat.h"'
-    print
-    print '#include <d3d9.h>'
+    print '#include "d3d9imports.hpp"'
     print
     print '#include "trace_write.hpp"'
     print '#include "os.hpp"'
diff --git a/d3d9imports.hpp b/d3d9imports.hpp
new file mode 100644 (file)
index 0000000..f598f97
--- /dev/null
@@ -0,0 +1,74 @@
+/**************************************************************************
+ *
+ * Copyright 2011 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/*
+ * Central place for all D3D9 includes, and respective OS dependent headers.
+ */
+
+#ifndef _D3D9IMPORTS_HPP_
+#define _D3D9IMPORTS_HPP_
+
+#include <windows.h>
+#include <tchar.h>
+
+#include "compat.h"
+
+#include <d3d9.h>
+
+
+#ifndef D3DFMT_ATI1
+#define D3DFMT_ATI1 ((D3DFORMAT)MAKEFOURCC('A','T','I','1'))
+#endif
+
+#ifndef D3DFMT_ATI2
+#define D3DFMT_ATI2 ((D3DFORMAT)MAKEFOURCC('A','T','I','2'))
+#endif
+
+#ifndef D3DFMT_AYUV
+#define D3DFMT_AYUV ((D3DFORMAT)MAKEFOURCC('A','Y','U','V'))
+#endif
+
+#ifndef D3DFMT_DF16
+#define D3DFMT_DF16 ((D3DFORMAT)MAKEFOURCC('D','F','1','6'))
+#endif
+
+#ifndef D3DFMT_DF24
+#define D3DFMT_DF24 ((D3DFORMAT)MAKEFOURCC('D','F','2','4'))
+#endif
+
+#ifndef D3DFMT_INTZ
+#define D3DFMT_INTZ ((D3DFORMAT)MAKEFOURCC('I','N','T','Z'))
+#endif
+
+#ifndef D3DFMT_NV12
+#define D3DFMT_NV12 ((D3DFORMAT)MAKEFOURCC('N','V','1','2'))
+#endif
+
+#ifndef D3DFMT_NULL
+#define D3DFMT_NULL ((D3DFORMAT)MAKEFOURCC('N','U','L','L'))
+#endif
+
+
+#endif /* _D3D9IMPORTS_HPP_ */
index b5dff50f7f1e4c37e0ca0534e4e5856838fdf45f..1531321fbe5fbadfef9995cddde208559c4f5f43 100644 (file)
@@ -928,6 +928,16 @@ D3DFORMAT = Enum("D3DFORMAT", [
     "D3DFMT_CxV8U8",
     "D3DFMT_A1",
     "D3DFMT_BINARYBUFFER",
+
+    # Unofficial formats
+    "D3DFMT_ATI1",
+    "D3DFMT_ATI2",
+    "D3DFMT_AYUV",
+    "D3DFMT_DF16",
+    "D3DFMT_DF24",
+    "D3DFMT_INTZ",
+    "D3DFMT_NV12",
+    "D3DFMT_NULL",
 ])
 
 D3DDISPLAYMODE = Struct("D3DDISPLAYMODE", [