summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/iunknown.h
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-09-16 17:26:07 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:51 +0200
commit4117f5e1ab3e87313a0ec9ad2358aa6614a99d63 (patch)
treea3f92c0c7421bddcad7df361a384edc89e9f6236 /src/gallium/state_trackers/nine/iunknown.h
parentc1c8e852c158759ac8c551ab104ff05d683acf19 (diff)
st/nine: Implement {Set/Get/Free}PrivateData in iunknown
Implement {Set/Get/Free}PrivateData in iunknown to get rid of duplicated code in resource9 and volume9. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/iunknown.h')
-rw-r--r--src/gallium/state_trackers/nine/iunknown.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/iunknown.h b/src/gallium/state_trackers/nine/iunknown.h
index bcd0b8bce9d..63b16bd7cc8 100644
--- a/src/gallium/state_trackers/nine/iunknown.h
+++ b/src/gallium/state_trackers/nine/iunknown.h
@@ -53,6 +53,9 @@ struct NineUnknown
const GUID **guids; /* for QueryInterface */
+ /* for [GS]etPrivateData/FreePrivateData */
+ struct util_hash_table *pdata;
+
void (*dtor)(void *data); /* top-level dtor */
};
static inline struct NineUnknown *
@@ -95,6 +98,23 @@ HRESULT NINE_WINAPI
NineUnknown_GetDevice( struct NineUnknown *This,
IDirect3DDevice9 **ppDevice );
+HRESULT NINE_WINAPI
+NineUnknown_SetPrivateData( struct NineUnknown *This,
+ REFGUID refguid,
+ const void *pData,
+ DWORD SizeOfData,
+ DWORD Flags );
+
+HRESULT NINE_WINAPI
+NineUnknown_GetPrivateData( struct NineUnknown *This,
+ REFGUID refguid,
+ void *pData,
+ DWORD *pSizeOfData );
+
+HRESULT NINE_WINAPI
+NineUnknown_FreePrivateData( struct NineUnknown *This,
+ REFGUID refguid );
+
/*** Nine private methods ***/
static inline void