Path: blob/21.2-virgl/src/gallium/frontends/nine/cubetexture9.h
4561 views
/*1* Copyright 2011 Joakim Sindholt <[email protected]>2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE. */2122#ifndef _NINE_CUBETEXTURE9_H_23#define _NINE_CUBETEXTURE9_H_2425#include "basetexture9.h"26#include "nine_memory_helper.h"27#include "surface9.h"2829struct NineCubeTexture930{31struct NineBaseTexture9 base;32struct NineSurface9 **surfaces;33struct pipe_box dirty_rect[6]; /* covers all mip levels */34struct nine_allocation *managed_buffer;35};36static inline struct NineCubeTexture9 *37NineCubeTexture9( void *data )38{39return (struct NineCubeTexture9 *)data;40}4142HRESULT43NineCubeTexture9_new( struct NineDevice9 *pDevice,44UINT EdgeLength, UINT Levels,45DWORD Usage,46D3DFORMAT Format,47D3DPOOL Pool,48struct NineCubeTexture9 **ppOut,49HANDLE *pSharedHandle );5051HRESULT NINE_WINAPI52NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,53UINT Level,54D3DSURFACE_DESC *pDesc );5556HRESULT NINE_WINAPI57NineCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,58D3DCUBEMAP_FACES FaceType,59UINT Level,60IDirect3DSurface9 **ppCubeMapSurface );6162HRESULT NINE_WINAPI63NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,64D3DCUBEMAP_FACES FaceType,65UINT Level,66D3DLOCKED_RECT *pLockedRect,67const RECT *pRect,68DWORD Flags );6970HRESULT NINE_WINAPI71NineCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,72D3DCUBEMAP_FACES FaceType,73UINT Level );7475HRESULT NINE_WINAPI76NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,77D3DCUBEMAP_FACES FaceType,78const RECT *pDirtyRect );7980#endif /* _NINE_CUBETEXTURE9_H_ */818283