xref: /aosp_15_r20/external/mesa3d/src/gallium/frontends/nine/volumetexture9.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright 2011 Joakim Sindholt <[email protected]>
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #ifndef _NINE_VOLUMETEXTURE9_H_
7 #define _NINE_VOLUMETEXTURE9_H_
8 
9 #include "basetexture9.h"
10 #include "volume9.h"
11 
12 struct NineVolumeTexture9
13 {
14     struct NineBaseTexture9 base;
15     struct NineVolume9 **volumes;
16     struct pipe_box dirty_box;
17 };
18 static inline struct NineVolumeTexture9 *
NineVolumeTexture9(void * data)19 NineVolumeTexture9( void *data )
20 {
21     return (struct NineVolumeTexture9 *)data;
22 }
23 
24 HRESULT
25 NineVolumeTexture9_new( struct NineDevice9 *pDevice,
26                         UINT Width, UINT Height, UINT Depth, UINT Levels,
27                         DWORD Usage,
28                         D3DFORMAT Format,
29                         D3DPOOL Pool,
30                         struct NineVolumeTexture9 **ppOut,
31                         HANDLE *pSharedHandle );
32 
33 HRESULT NINE_WINAPI
34 NineVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
35                                  UINT Level,
36                                  D3DVOLUME_DESC *pDesc );
37 
38 HRESULT NINE_WINAPI
39 NineVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
40                                    UINT Level,
41                                    IDirect3DVolume9 **ppVolumeLevel );
42 
43 HRESULT NINE_WINAPI
44 NineVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
45                             UINT Level,
46                             D3DLOCKED_BOX *pLockedVolume,
47                             const D3DBOX *pBox,
48                             DWORD Flags );
49 
50 HRESULT NINE_WINAPI
51 NineVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
52                               UINT Level );
53 
54 HRESULT NINE_WINAPI
55 NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
56                                 const D3DBOX *pDirtyBox );
57 
58 #endif /* _NINE_VOLUMETEXTURE9_H_ */
59