st/nine: Switch {Set/Get/Free}PrivateData functions
authorPatrick Rudolph <siro@das-labor.org>
Fri, 16 Sep 2016 15:29:47 +0000 (17:29 +0200)
committerAxel Davy <axel.davy@ens.fr>
Mon, 10 Oct 2016 21:43:51 +0000 (23:43 +0200)
Switch {Set/Get/Free}PrivateData function to introduced IUnknown functions.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/cubetexture9.c
src/gallium/state_trackers/nine/indexbuffer9.c
src/gallium/state_trackers/nine/nine_lock.c
src/gallium/state_trackers/nine/surface9.c
src/gallium/state_trackers/nine/texture9.c
src/gallium/state_trackers/nine/vertexbuffer9.c
src/gallium/state_trackers/nine/volume9.c
src/gallium/state_trackers/nine/volumetexture9.c

index dd1a43023dcd9705e3b498f94059a9ed7efb7e84..912d5087c396c3a71e329de27dbdc18ca683b2d3 100644 (file)
@@ -302,9 +302,9 @@ IDirect3DCubeTexture9Vtbl NineCubeTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineBaseTexture9_PreLoad,
index 0a31d7e97167239507506a0e26341ecb555e9010..4e65ed7bc085201c794dd9e31a0a6f2708210877 100644 (file)
@@ -115,9 +115,9 @@ IDirect3DIndexBuffer9Vtbl NineIndexBuffer9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineResource9_PreLoad,
index 6e15cc190e8364aebaaea82ced936068b9483824..228abec6333a0990a6c20217bb4982547272b0cf 100644 (file)
@@ -122,56 +122,56 @@ IDirect3DAuthenticatedChannel9Vtbl LockAuthenticatedChannel9_vtable = {
     (void *)LockAuthenticatedChannel9_Configure
 };
 
-#if 0
 static HRESULT NINE_WINAPI
-LockResource9_GetDevice( struct NineResource9 *This,
-                         IDirect3DDevice9 **ppDevice )
+LockUnknown_SetPrivateData( struct NineUnknown *This,
+                            REFGUID refguid,
+                            const void *pData,
+                            DWORD SizeOfData,
+                            DWORD Flags )
 {
     HRESULT r;
     pipe_mutex_lock(d3dlock_global);
-    r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
+    r = NineUnknown_SetPrivateData(This, refguid, pData, SizeOfData, Flags);
     pipe_mutex_unlock(d3dlock_global);
     return r;
 }
-#endif
 
 static HRESULT NINE_WINAPI
-LockResource9_SetPrivateData( struct NineResource9 *This,
-                              REFGUID refguid,
-                              const void *pData,
-                              DWORD SizeOfData,
-                              DWORD Flags )
+LockUnknown_GetPrivateData( struct NineUnknown *This,
+                            REFGUID refguid,
+                            void *pData,
+                            DWORD *pSizeOfData )
 {
     HRESULT r;
     pipe_mutex_lock(d3dlock_global);
-    r = NineResource9_SetPrivateData(This, refguid, pData, SizeOfData, Flags);
+    r = NineUnknown_GetPrivateData(This, refguid, pData, pSizeOfData);
     pipe_mutex_unlock(d3dlock_global);
     return r;
 }
 
 static HRESULT NINE_WINAPI
-LockResource9_GetPrivateData( struct NineResource9 *This,
-                              REFGUID refguid,
-                              void *pData,
-                              DWORD *pSizeOfData )
+LockUnknown_FreePrivateData( struct NineUnknown *This,
+                             REFGUID refguid )
 {
     HRESULT r;
     pipe_mutex_lock(d3dlock_global);
-    r = NineResource9_GetPrivateData(This, refguid, pData, pSizeOfData);
+    r = NineUnknown_FreePrivateData(This, refguid);
     pipe_mutex_unlock(d3dlock_global);
     return r;
 }
 
+#if 0
 static HRESULT NINE_WINAPI
-LockResource9_FreePrivateData( struct NineResource9 *This,
-                               REFGUID refguid )
+LockResource9_GetDevice( struct NineResource9 *This,
+                         IDirect3DDevice9 **ppDevice )
 {
     HRESULT r;
     pipe_mutex_lock(d3dlock_global);
-    r = NineResource9_FreePrivateData(This, refguid);
+    r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
     pipe_mutex_unlock(d3dlock_global);
     return r;
 }
+#endif
 
 static DWORD NINE_WINAPI
 LockResource9_SetPriority( struct NineResource9 *This,
@@ -483,9 +483,9 @@ IDirect3DCubeTexture9Vtbl LockCubeTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)LockBaseTexture9_PreLoad,
@@ -2495,9 +2495,9 @@ IDirect3DIndexBuffer9Vtbl LockIndexBuffer9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)NineResource9_PreLoad, /* nop */
@@ -2729,9 +2729,9 @@ IDirect3DSurface9Vtbl LockSurface9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)NineResource9_PreLoad, /* nop */
@@ -2961,9 +2961,9 @@ IDirect3DTexture9Vtbl LockTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)LockBaseTexture9_PreLoad,
@@ -3023,9 +3023,9 @@ IDirect3DVertexBuffer9Vtbl LockVertexBuffer9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)NineResource9_PreLoad, /* nop */
@@ -3205,9 +3205,9 @@ IDirect3DVolume9Vtbl LockVolume9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Volume9 iface */
-    (void *)LockVolume9_SetPrivateData,
-    (void *)LockVolume9_GetPrivateData,
-    (void *)LockVolume9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)LockVolume9_GetContainer,
     (void *)NineVolume9_GetDesc, /* immutable */
     (void *)LockVolume9_LockBox,
@@ -3283,9 +3283,9 @@ IDirect3DVolumeTexture9Vtbl LockVolumeTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)LockResource9_SetPrivateData,
-    (void *)LockResource9_GetPrivateData,
-    (void *)LockResource9_FreePrivateData,
+    (void *)LockUnknown_SetPrivateData,
+    (void *)LockUnknown_GetPrivateData,
+    (void *)LockUnknown_FreePrivateData,
     (void *)LockResource9_SetPriority,
     (void *)LockResource9_GetPriority,
     (void *)LockBaseTexture9_PreLoad,
index bf485bb4375bd54eb80fd1ffade2c8bca6b32982..ffa8c2af1bdcf7965793bc7ca7f1cf9a20c2a3a1 100644 (file)
@@ -545,9 +545,9 @@ IDirect3DSurface9Vtbl NineSurface9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineResource9_PreLoad,
index 4f16e60f8d2405acf44567572fcb783f4d40c5e0..a13d7f4e48c79de1ec34eb61dda147c7aee79331 100644 (file)
@@ -345,9 +345,9 @@ IDirect3DTexture9Vtbl NineTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineBaseTexture9_PreLoad,
index 7c00b2d17e21743b1f01cbeb0c5e2581cc1f812f..b0eebfb48f3b281a503173b5947c440535070738 100644 (file)
@@ -98,9 +98,9 @@ IDirect3DVertexBuffer9Vtbl NineVertexBuffer9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineResource9_PreLoad,
index eb712f5a324f109464ac39ea578145948d5b3624..f597849e4a2235fc651e75943a028bf131be95cb 100644 (file)
@@ -513,9 +513,9 @@ IDirect3DVolume9Vtbl NineVolume9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Volume9 iface */
-    (void *)NineVolume9_SetPrivateData,
-    (void *)NineVolume9_GetPrivateData,
-    (void *)NineVolume9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineVolume9_GetContainer,
     (void *)NineVolume9_GetDesc,
     (void *)NineVolume9_LockBox,
index e5db6fc426dadae9448850acae5c30cf545b798a..4908ed7b5ef505ddd5466886bf6159b54b9db96f 100644 (file)
@@ -243,9 +243,9 @@ IDirect3DVolumeTexture9Vtbl NineVolumeTexture9_vtable = {
     (void *)NineUnknown_AddRef,
     (void *)NineUnknown_Release,
     (void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
-    (void *)NineResource9_SetPrivateData,
-    (void *)NineResource9_GetPrivateData,
-    (void *)NineResource9_FreePrivateData,
+    (void *)NineUnknown_SetPrivateData,
+    (void *)NineUnknown_GetPrivateData,
+    (void *)NineUnknown_FreePrivateData,
     (void *)NineResource9_SetPriority,
     (void *)NineResource9_GetPriority,
     (void *)NineBaseTexture9_PreLoad,