Module: Mesa
Branch: master
Commit: 7145cd6e7357a48aa4b124714593e49e8c8744e2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7145cd6e7357a48aa4b124714593e49e8c8744e2

Author: Erik Faye-Lund <[email protected]>
Date:   Wed Apr  8 14:59:00 2020 +0200

mesa/st: Introduce WINSYS_HANDLE_TYPE_D3D12_RES

This is analogous to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
from Vulkan, and GL_HANDLE_TYPE_D3D12_RESOURCE_EXT from
GL_EXT_external_objects_win32.

Reviewed-by: Charmaine Lee <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

---

 src/gallium/include/frontend/winsys_handle.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/gallium/include/frontend/winsys_handle.h 
b/src/gallium/include/frontend/winsys_handle.h
index 78f5f4b36f2..9135983fc17 100644
--- a/src/gallium/include/frontend/winsys_handle.h
+++ b/src/gallium/include/frontend/winsys_handle.h
@@ -11,6 +11,11 @@ extern "C" {
 #define WINSYS_HANDLE_TYPE_FD     2
 #define WINSYS_HANDLE_TYPE_SHMID   3
 
+#ifdef _WIN32
+#include <unknwn.h>
+#define WINSYS_HANDLE_TYPE_D3D12_RES 4
+#endif
+
 /**
  * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
  */
@@ -60,6 +65,14 @@ struct winsys_handle
     * Output from resource_get_handle.
     */
    uint64_t modifier;
+
+#ifdef _WIN32
+   /**
+    * Input to resource_from_handle.
+    * Output for resource_get_handle.
+    */
+   IUnknown *com_obj;
+#endif
 };
 
 #ifdef __cplusplus

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to