summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2016-02-24 12:50:27 -0800
committerKristian Høgsberg Kristensen <[email protected]>2016-02-24 13:04:54 -0800
commit59f57289959702e528b68bdd0d06488089517a00 (patch)
treea266656ac6129f5ad14b9d0d0c69c7077466c3f3 /src/gallium/state_trackers/nine
parent25c2470b24ce8411f6747eb887137b2511b6d529 (diff)
parentc95d5c5f6fbfe4a96276e67ed279562b33432fb5 (diff)
Merge remote-tracking branch 'origin/master' into vulkan
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/Makefile.sources1
-rw-r--r--src/gallium/state_trackers/nine/adapter9.c44
-rw-r--r--src/gallium/state_trackers/nine/adapter9.h18
-rw-r--r--src/gallium/state_trackers/nine/authenticatedchannel9.c10
-rw-r--r--src/gallium/state_trackers/nine/authenticatedchannel9.h10
-rw-r--r--src/gallium/state_trackers/nine/basetexture9.c14
-rw-r--r--src/gallium/state_trackers/nine/basetexture9.h14
-rw-r--r--src/gallium/state_trackers/nine/buffer9.c81
-rw-r--r--src/gallium/state_trackers/nine/buffer9.h32
-rw-r--r--src/gallium/state_trackers/nine/cryptosession9.c18
-rw-r--r--src/gallium/state_trackers/nine/cryptosession9.h18
-rw-r--r--src/gallium/state_trackers/nine/cubetexture9.c25
-rw-r--r--src/gallium/state_trackers/nine/cubetexture9.h10
-rw-r--r--src/gallium/state_trackers/nine/device9.c261
-rw-r--r--src/gallium/state_trackers/nine/device9.h234
-rw-r--r--src/gallium/state_trackers/nine/device9ex.c34
-rw-r--r--src/gallium/state_trackers/nine/device9ex.h36
-rw-r--r--src/gallium/state_trackers/nine/device9video.c6
-rw-r--r--src/gallium/state_trackers/nine/device9video.h6
-rw-r--r--src/gallium/state_trackers/nine/indexbuffer9.c6
-rw-r--r--src/gallium/state_trackers/nine/indexbuffer9.h6
-rw-r--r--src/gallium/state_trackers/nine/iunknown.c8
-rw-r--r--src/gallium/state_trackers/nine/iunknown.h9
-rw-r--r--src/gallium/state_trackers/nine/nine_ff.c32
-rw-r--r--src/gallium/state_trackers/nine/nine_flags.h14
-rw-r--r--src/gallium/state_trackers/nine/nine_lock.c444
-rw-r--r--src/gallium/state_trackers/nine/nine_pipe.h8
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c12
-rw-r--r--src/gallium/state_trackers/nine/nineexoverlayextension.c2
-rw-r--r--src/gallium/state_trackers/nine/nineexoverlayextension.h2
-rw-r--r--src/gallium/state_trackers/nine/pixelshader9.c2
-rw-r--r--src/gallium/state_trackers/nine/pixelshader9.h2
-rw-r--r--src/gallium/state_trackers/nine/query9.c8
-rw-r--r--src/gallium/state_trackers/nine/query9.h8
-rw-r--r--src/gallium/state_trackers/nine/resource9.c14
-rw-r--r--src/gallium/state_trackers/nine/resource9.h14
-rw-r--r--src/gallium/state_trackers/nine/stateblock9.c44
-rw-r--r--src/gallium/state_trackers/nine/stateblock9.h4
-rw-r--r--src/gallium/state_trackers/nine/surface9.c26
-rw-r--r--src/gallium/state_trackers/nine/surface9.h12
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c20
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.h12
-rw-r--r--src/gallium/state_trackers/nine/swapchain9ex.c6
-rw-r--r--src/gallium/state_trackers/nine/swapchain9ex.h6
-rw-r--r--src/gallium/state_trackers/nine/texture9.c48
-rw-r--r--src/gallium/state_trackers/nine/texture9.h10
-rw-r--r--src/gallium/state_trackers/nine/vertexbuffer9.c6
-rw-r--r--src/gallium/state_trackers/nine/vertexbuffer9.h6
-rw-r--r--src/gallium/state_trackers/nine/vertexdeclaration9.c2
-rw-r--r--src/gallium/state_trackers/nine/vertexdeclaration9.h2
-rw-r--r--src/gallium/state_trackers/nine/vertexshader9.c2
-rw-r--r--src/gallium/state_trackers/nine/vertexshader9.h2
-rw-r--r--src/gallium/state_trackers/nine/volume9.c20
-rw-r--r--src/gallium/state_trackers/nine/volume9.h14
-rw-r--r--src/gallium/state_trackers/nine/volumetexture9.c23
-rw-r--r--src/gallium/state_trackers/nine/volumetexture9.h10
56 files changed, 935 insertions, 803 deletions
diff --git a/src/gallium/state_trackers/nine/Makefile.sources b/src/gallium/state_trackers/nine/Makefile.sources
index 8d178d4b18f..05eb1655376 100644
--- a/src/gallium/state_trackers/nine/Makefile.sources
+++ b/src/gallium/state_trackers/nine/Makefile.sources
@@ -32,6 +32,7 @@ C_SOURCES := \
nineexoverlayextension.h \
nine_ff.c \
nine_ff.h \
+ nine_flags.h \
nine_helpers.c \
nine_helpers.h \
nine_lock.c \
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c
index 8428b1bd7eb..48e1e44c1bf 100644
--- a/src/gallium/state_trackers/nine/adapter9.c
+++ b/src/gallium/state_trackers/nine/adapter9.c
@@ -146,7 +146,7 @@ NineAdapter9_GetScreen( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This,
DWORD Flags,
D3DADAPTER_IDENTIFIER9 *pIdentifier )
@@ -182,7 +182,7 @@ backbuffer_format( D3DFORMAT dfmt,
return FALSE;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceType( struct NineAdapter9 *This,
D3DDEVTYPE DevType,
D3DFORMAT AdapterFormat,
@@ -207,11 +207,11 @@ NineAdapter9_CheckDeviceType( struct NineAdapter9 *This,
dfmt = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D,
1,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
bfmt = d3d9_to_pipe_format_checked(screen, BackBufferFormat, PIPE_TEXTURE_2D,
1,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
if (dfmt == PIPE_FORMAT_NONE || bfmt == PIPE_FORMAT_NONE) {
DBG("Unsupported Adapter/BackBufferFormat.\n");
return D3DERR_NOTAVAILABLE;
@@ -241,7 +241,7 @@ display_format( D3DFORMAT fmt,
return FALSE;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT AdapterFormat,
@@ -270,7 +270,7 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
return hr;
pf = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D, 0,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
if (pf == PIPE_FORMAT_NONE) {
DBG("AdapterFormat %s not available.\n",
d3dformat_to_string(AdapterFormat));
@@ -332,14 +332,16 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
srgb = (Usage & (D3DUSAGE_QUERY_SRGBREAD | D3DUSAGE_QUERY_SRGBWRITE)) != 0;
- pf = d3d9_to_pipe_format_checked(screen, CheckFormat, target, 0, bind, srgb);
+ pf = d3d9_to_pipe_format_checked(screen, CheckFormat, target,
+ 0, bind, srgb, FALSE);
if (pf == PIPE_FORMAT_NONE) {
DBG("NOT AVAILABLE\n");
return D3DERR_NOTAVAILABLE;
}
- /* we support ATI1 and ATI2 hack only for 2D textures */
- if (RType != D3DRTYPE_TEXTURE && (CheckFormat == D3DFMT_ATI1 || CheckFormat == D3DFMT_ATI2))
+ /* we support ATI1 and ATI2 hack only for 2D and Cube textures */
+ if (RType != D3DRTYPE_TEXTURE && RType != D3DRTYPE_CUBETEXTURE &&
+ (CheckFormat == D3DFMT_ATI1 || CheckFormat == D3DFMT_ATI2))
return D3DERR_NOTAVAILABLE;
/* if (Usage & D3DUSAGE_NONSECURE) { don't know the implications of this } */
/* if (Usage & D3DUSAGE_SOFTWAREPROCESSING) { we can always support this } */
@@ -349,7 +351,7 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT SurfaceFormat,
@@ -378,7 +380,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_RENDER_TARGET;
pf = d3d9_to_pipe_format_checked(screen, SurfaceFormat, PIPE_TEXTURE_2D,
- MultiSampleType, bind, FALSE);
+ MultiSampleType, bind, FALSE, FALSE);
if (pf == PIPE_FORMAT_NONE) {
DBG("%s with %u samples not available.\n",
@@ -392,7 +394,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT AdapterFormat,
@@ -417,16 +419,16 @@ NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,
dfmt = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D, 0,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
bfmt = d3d9_to_pipe_format_checked(screen, RenderTargetFormat,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, FALSE);
+ PIPE_BIND_RENDER_TARGET, FALSE, FALSE);
if (RenderTargetFormat == D3DFMT_NULL)
bfmt = dfmt;
zsfmt = d3d9_to_pipe_format_checked(screen, DepthStencilFormat,
PIPE_TEXTURE_2D, 0,
d3d9_get_pipe_depth_format_bindings(DepthStencilFormat),
- FALSE);
+ FALSE, FALSE);
if (dfmt == PIPE_FORMAT_NONE ||
bfmt == PIPE_FORMAT_NONE ||
zsfmt == PIPE_FORMAT_NONE) {
@@ -436,7 +438,7 @@ NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT SourceFormat,
@@ -461,10 +463,10 @@ NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,
dfmt = d3d9_to_pipe_format_checked(screen, TargetFormat, PIPE_TEXTURE_2D, 1,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
bfmt = d3d9_to_pipe_format_checked(screen, SourceFormat, PIPE_TEXTURE_2D, 1,
PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SHARED, FALSE);
+ PIPE_BIND_SHARED, FALSE, FALSE);
if (dfmt == PIPE_FORMAT_NONE || bfmt == PIPE_FORMAT_NONE) {
DBG("%s to %s not supported.\n",
@@ -476,7 +478,7 @@ NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DCAPS9 *pCaps )
@@ -932,7 +934,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CreateDevice( struct NineAdapter9 *This,
UINT RealAdapter,
D3DDEVTYPE DeviceType,
@@ -992,7 +994,7 @@ NineAdapter9_CreateDevice( struct NineAdapter9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CreateDeviceEx( struct NineAdapter9 *This,
UINT RealAdapter,
D3DDEVTYPE DeviceType,
diff --git a/src/gallium/state_trackers/nine/adapter9.h b/src/gallium/state_trackers/nine/adapter9.h
index 2129ec8edc0..aaf7435fcda 100644
--- a/src/gallium/state_trackers/nine/adapter9.h
+++ b/src/gallium/state_trackers/nine/adapter9.h
@@ -67,19 +67,19 @@ NineAdapter9_ctor( struct NineAdapter9 *This,
void
NineAdapter9_dtor( struct NineAdapter9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This,
DWORD Flags,
D3DADAPTER_IDENTIFIER9 *pIdentifier );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceType( struct NineAdapter9 *This,
D3DDEVTYPE DevType,
D3DFORMAT AdapterFormat,
D3DFORMAT BackBufferFormat,
BOOL bWindowed );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT AdapterFormat,
@@ -87,7 +87,7 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
D3DRESOURCETYPE RType,
D3DFORMAT CheckFormat );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT SurfaceFormat,
@@ -95,25 +95,25 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
D3DMULTISAMPLE_TYPE MultiSampleType,
DWORD *pQualityLevels );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT AdapterFormat,
D3DFORMAT RenderTargetFormat,
D3DFORMAT DepthStencilFormat );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DFORMAT SourceFormat,
D3DFORMAT TargetFormat );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
D3DDEVTYPE DeviceType,
D3DCAPS9 *pCaps );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CreateDevice( struct NineAdapter9 *This,
UINT RealAdapter,
D3DDEVTYPE DeviceType,
@@ -124,7 +124,7 @@ NineAdapter9_CreateDevice( struct NineAdapter9 *This,
ID3DPresentGroup *pPresentationGroup,
IDirect3DDevice9 **ppReturnedDeviceInterface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAdapter9_CreateDeviceEx( struct NineAdapter9 *This,
UINT RealAdapter,
D3DDEVTYPE DeviceType,
diff --git a/src/gallium/state_trackers/nine/authenticatedchannel9.c b/src/gallium/state_trackers/nine/authenticatedchannel9.c
index 44ad87c956f..45fca3a2975 100644
--- a/src/gallium/state_trackers/nine/authenticatedchannel9.c
+++ b/src/gallium/state_trackers/nine/authenticatedchannel9.c
@@ -24,14 +24,14 @@
#define DBG_CHANNEL DBG_AUTHENTICATEDCHANNEL
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 *This,
UINT *pCertificateSize )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This,
UINT CertifacteSize,
BYTE *ppCertificate )
@@ -39,7 +39,7 @@ NineAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9 *This,
UINT DataSize,
void *pData )
@@ -47,7 +47,7 @@ NineAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
@@ -57,7 +57,7 @@ NineAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_Configure( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
diff --git a/src/gallium/state_trackers/nine/authenticatedchannel9.h b/src/gallium/state_trackers/nine/authenticatedchannel9.h
index 63cb2269db4..b18848235c8 100644
--- a/src/gallium/state_trackers/nine/authenticatedchannel9.h
+++ b/src/gallium/state_trackers/nine/authenticatedchannel9.h
@@ -35,28 +35,28 @@ NineAuthenticatedChannel9( void *data )
return (struct NineAuthenticatedChannel9 *)data;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 *This,
UINT *pCertificateSize );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This,
UINT CertifacteSize,
BYTE *ppCertificate );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9 *This,
UINT DataSize,
void *pData );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
UINT OutputSize,
void *pOutput );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineAuthenticatedChannel9_Configure( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c
index 7a0959a8f3e..c4eb813e9f8 100644
--- a/src/gallium/state_trackers/nine/basetexture9.c
+++ b/src/gallium/state_trackers/nine/basetexture9.c
@@ -109,7 +109,7 @@ NineBaseTexture9_dtor( struct NineBaseTexture9 *This )
NineResource9_dtor(&This->base);
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
DWORD LODNew )
{
@@ -130,7 +130,7 @@ NineBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
return old;
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
{
DBG("This=%p\n", This);
@@ -138,7 +138,7 @@ NineBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
return This->managed.lod;
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
{
DBG("This=%p\n", This);
@@ -148,7 +148,7 @@ NineBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
return This->base.info.last_level + 1;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
D3DTEXTUREFILTERTYPE FilterType )
{
@@ -165,7 +165,7 @@ NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
return D3D_OK;
}
-D3DTEXTUREFILTERTYPE WINAPI
+D3DTEXTUREFILTERTYPE NINE_WINAPI
NineBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This )
{
DBG("This=%p\n", This);
@@ -383,7 +383,7 @@ NineBaseTexture9_UploadSelf( struct NineBaseTexture9 *This )
return D3D_OK;
}
-void WINAPI
+void NINE_WINAPI
NineBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This )
{
struct pipe_resource *resource;
@@ -580,7 +580,7 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
return This->view ? D3D_OK : D3DERR_DRIVERINTERNALERROR;
}
-void WINAPI
+void NINE_WINAPI
NineBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
{
DBG("This=%p\n", This);
diff --git a/src/gallium/state_trackers/nine/basetexture9.h b/src/gallium/state_trackers/nine/basetexture9.h
index b19a62195fc..980c4a556b2 100644
--- a/src/gallium/state_trackers/nine/basetexture9.h
+++ b/src/gallium/state_trackers/nine/basetexture9.h
@@ -72,27 +72,27 @@ NineBaseTexture9_ctor( struct NineBaseTexture9 *This,
void
NineBaseTexture9_dtor( struct NineBaseTexture9 *This );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
DWORD LODNew );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_GetLOD( struct NineBaseTexture9 *This );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
D3DTEXTUREFILTERTYPE FilterType );
-D3DTEXTUREFILTERTYPE WINAPI
+D3DTEXTUREFILTERTYPE NINE_WINAPI
NineBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This );
-void WINAPI
+void NINE_WINAPI
NineBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This );
-void WINAPI
+void NINE_WINAPI
NineBaseTexture9_PreLoad( struct NineBaseTexture9 *This );
void
diff --git a/src/gallium/state_trackers/nine/buffer9.c b/src/gallium/state_trackers/nine/buffer9.c
index b4b91ec2a02..e066fc59f45 100644
--- a/src/gallium/state_trackers/nine/buffer9.c
+++ b/src/gallium/state_trackers/nine/buffer9.c
@@ -93,7 +93,26 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
hr = NineResource9_ctor(&This->base, pParams, NULL, TRUE,
Type, Pool, Usage);
- return hr;
+
+ if (FAILED(hr))
+ return hr;
+
+ if (Pool == D3DPOOL_MANAGED) {
+ This->managed.data = align_malloc(
+ nine_format_get_level_alloc_size(This->base.info.format,
+ Size, 1, 0), 32);
+ if (!This->managed.data)
+ return E_OUTOFMEMORY;
+ memset(This->managed.data, 0, Size);
+ This->managed.dirty = TRUE;
+ u_box_1d(0, Size, &This->managed.dirty_box);
+ list_inithead(&This->managed.list);
+ list_inithead(&This->managed.list2);
+ list_add(&This->managed.list, &pParams->device->update_buffers);
+ list_add(&This->managed.list2, &pParams->device->managed_buffers);
+ }
+
+ return D3D_OK;
}
void
@@ -106,6 +125,15 @@ NineBuffer9_dtor( struct NineBuffer9 *This )
FREE(This->maps);
}
+ if (This->base.pool == D3DPOOL_MANAGED) {
+ if (This->managed.data)
+ align_free(This->managed.data);
+ if (This->managed.list.prev != NULL && This->managed.list.next != NULL)
+ list_del(&This->managed.list);
+ if (This->managed.list2.prev != NULL && This->managed.list2.next != NULL)
+ list_del(&This->managed.list2);
+ }
+
NineResource9_dtor(&This->base);
}
@@ -115,7 +143,7 @@ NineBuffer9_GetResource( struct NineBuffer9 *This )
return NineResource9_GetResource(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBuffer9_Lock( struct NineBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
@@ -138,6 +166,28 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
D3DLOCK_READONLY |
D3DLOCK_NOOVERWRITE)), D3DERR_INVALIDCALL);
+ if (SizeToLock == 0) {
+ SizeToLock = This->size - OffsetToLock;
+ user_warn(OffsetToLock != 0);
+ }
+
+ u_box_1d(OffsetToLock, SizeToLock, &box);
+
+ if (This->base.pool == D3DPOOL_MANAGED) {
+ if (!This->managed.dirty) {
+ assert(LIST_IS_EMPTY(&This->managed.list));
+ list_add(&This->managed.list, &This->base.base.device->update_buffers);
+ This->managed.dirty = TRUE;
+ This->managed.dirty_box = box;
+ } else {
+ u_box_union_2d(&This->managed.dirty_box, &This->managed.dirty_box, &box);
+ }
+ *ppbData = (char *)This->managed.data + OffsetToLock;
+ DBG("returning pointer %p\n", *ppbData);
+ This->nmaps++;
+ return D3D_OK;
+ }
+
if (This->nmaps == This->maxmaps) {
struct pipe_transfer **newmaps =
REALLOC(This->maps, sizeof(struct pipe_transfer *)*This->maxmaps,
@@ -149,13 +199,6 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
This->maps = newmaps;
}
- if (SizeToLock == 0) {
- SizeToLock = This->size - OffsetToLock;
- user_warn(OffsetToLock != 0);
- }
-
- u_box_1d(OffsetToLock, SizeToLock, &box);
-
data = This->pipe->transfer_map(This->pipe, This->base.resource, 0,
usage, &box, &This->maps[This->nmaps]);
@@ -178,12 +221,28 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBuffer9_Unlock( struct NineBuffer9 *This )
{
DBG("This=%p\n", This);
user_assert(This->nmaps > 0, D3DERR_INVALIDCALL);
- This->pipe->transfer_unmap(This->pipe, This->maps[--(This->nmaps)]);
+ if (This->base.pool != D3DPOOL_MANAGED)
+ This->pipe->transfer_unmap(This->pipe, This->maps[--(This->nmaps)]);
+ else
+ This->nmaps--;
return D3D_OK;
}
+
+void
+NineBuffer9_SetDirty( struct NineBuffer9 *This )
+{
+ assert(This->base.pool == D3DPOOL_MANAGED);
+
+ if (!This->managed.dirty) {
+ assert(LIST_IS_EMPTY(&This->managed.list));
+ list_add(&This->managed.list, &This->base.base.device->update_buffers);
+ This->managed.dirty = TRUE;
+ }
+ u_box_1d(0, This->size, &This->managed.dirty_box);
+}
diff --git a/src/gallium/state_trackers/nine/buffer9.h b/src/gallium/state_trackers/nine/buffer9.h
index 1afd9a996ea..8bdb4326a4c 100644
--- a/src/gallium/state_trackers/nine/buffer9.h
+++ b/src/gallium/state_trackers/nine/buffer9.h
@@ -25,6 +25,9 @@
#define _NINE_BUFFER9_H_
#include "resource9.h"
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/list.h"
struct pipe_screen;
struct pipe_context;
@@ -39,6 +42,15 @@ struct NineBuffer9
struct pipe_transfer **maps;
int nmaps, maxmaps;
UINT size;
+
+ /* Specific to managed buffers */
+ struct {
+ void *data;
+ boolean dirty;
+ struct pipe_box dirty_box;
+ struct list_head list; /* for update_buffers */
+ struct list_head list2; /* for managed_buffers */
+ } managed;
};
static inline struct NineBuffer9 *
NineBuffer9( void *data )
@@ -60,14 +72,30 @@ NineBuffer9_dtor( struct NineBuffer9 *This );
struct pipe_resource *
NineBuffer9_GetResource( struct NineBuffer9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBuffer9_Lock( struct NineBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
void **ppbData,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineBuffer9_Unlock( struct NineBuffer9 *This );
+static inline void
+NineBuffer9_Upload( struct NineBuffer9 *This )
+{
+ struct pipe_context *pipe = This->pipe;
+
+ assert(This->base.pool == D3DPOOL_MANAGED && This->managed.dirty);
+ pipe->transfer_inline_write(pipe, This->base.resource, 0, 0,
+ &This->managed.dirty_box,
+ (char *)This->managed.data + This->managed.dirty_box.x,
+ This->size, This->size);
+ This->managed.dirty = FALSE;
+}
+
+void
+NineBuffer9_SetDirty( struct NineBuffer9 *This );
+
#endif /* _NINE_BUFFER9_H_ */
diff --git a/src/gallium/state_trackers/nine/cryptosession9.c b/src/gallium/state_trackers/nine/cryptosession9.c
index 2622f2b32e4..c656f72a215 100644
--- a/src/gallium/state_trackers/nine/cryptosession9.c
+++ b/src/gallium/state_trackers/nine/cryptosession9.c
@@ -24,14 +24,14 @@
#define DBG_CHANNEL DBG_CRYPTOSESSION
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This,
UINT *pCertificateSize )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
UINT CertifacteSize,
BYTE *ppCertificate )
@@ -39,7 +39,7 @@ NineCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
UINT DataSize,
void *pData )
@@ -47,7 +47,7 @@ NineCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
@@ -57,7 +57,7 @@ NineCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
@@ -69,7 +69,7 @@ NineCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
UINT *pSurfacePitch )
@@ -77,7 +77,7 @@ NineCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
void *pRandomNumber,
UINT RandomNumberSize )
@@ -85,13 +85,13 @@ NineCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetEncryptionBltKey( struct NineCryptoSession9 *This,
void *pReadbackKey,
UINT KeySize )
diff --git a/src/gallium/state_trackers/nine/cryptosession9.h b/src/gallium/state_trackers/nine/cryptosession9.h
index d1eab72eb37..9904455a000 100644
--- a/src/gallium/state_trackers/nine/cryptosession9.h
+++ b/src/gallium/state_trackers/nine/cryptosession9.h
@@ -35,28 +35,28 @@ NineCryptoSession9( void *data )
return (struct NineCryptoSession9 *)data;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This,
UINT *pCertificateSize );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
UINT CertifacteSize,
BYTE *ppCertificate );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
UINT DataSize,
void *pData );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
UINT DstSurfaceSize,
void *pIV );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
@@ -65,20 +65,20 @@ NineCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
void *pContentKey,
void *pIV );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
UINT *pSurfacePitch );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
void *pRandomNumber,
UINT RandomNumberSize );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCryptoSession9_GetEncryptionBltKey( struct NineCryptoSession9 *This,
void *pReadbackKey,
UINT KeySize );
diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c
index 460cc853942..11000942d3a 100644
--- a/src/gallium/state_trackers/nine/cubetexture9.c
+++ b/src/gallium/state_trackers/nine/cubetexture9.c
@@ -53,21 +53,22 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
This, pParams, EdgeLength, Levels, Usage,
Format, Pool, pSharedHandle);
- user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
- (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+ user_assert(EdgeLength, D3DERR_INVALIDCALL);
+ /* user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL); */
user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
+ user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
+ (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
Levels = 0;
pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_CUBE, 0,
- PIPE_BIND_SAMPLER_VIEW, FALSE);
- if (pf == PIPE_FORMAT_NONE)
- return D3DERR_INVALIDCALL;
+ PIPE_BIND_SAMPLER_VIEW, FALSE,
+ Pool == D3DPOOL_SCRATCH);
- /* We support ATI1 and ATI2 hacks only for 2D textures */
- if (Format == D3DFMT_ATI1 || Format == D3DFMT_ATI2)
+ if (pf == PIPE_FORMAT_NONE)
return D3DERR_INVALIDCALL;
if (compressed_format(Format)) {
@@ -186,7 +187,7 @@ NineCubeTexture9_dtor( struct NineCubeTexture9 *This )
NineBaseTexture9_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc )
@@ -202,7 +203,7 @@ NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
@@ -224,7 +225,7 @@ NineCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
@@ -245,7 +246,7 @@ NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,
return NineSurface9_LockRect(This->surfaces[s], pLockedRect, pRect, Flags);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level )
@@ -260,7 +261,7 @@ NineCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
return NineSurface9_UnlockRect(This->surfaces[s]);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
const RECT *pDirtyRect )
diff --git a/src/gallium/state_trackers/nine/cubetexture9.h b/src/gallium/state_trackers/nine/cubetexture9.h
index 999715c0a74..129789d0d69 100644
--- a/src/gallium/state_trackers/nine/cubetexture9.h
+++ b/src/gallium/state_trackers/nine/cubetexture9.h
@@ -48,18 +48,18 @@ NineCubeTexture9_new( struct NineDevice9 *pDevice,
struct NineCubeTexture9 **ppOut,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
IDirect3DSurface9 **ppCubeMapSurface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
@@ -67,12 +67,12 @@ NineCubeTexture9_LockRect( struct NineCubeTexture9 *This,
const RECT *pRect,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
const RECT *pDirtyRect );
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 475ef96788e..e4403f0db03 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -147,7 +147,9 @@ NineDevice9_ctor( struct NineDevice9 *This,
if (FAILED(hr)) { return hr; }
+ list_inithead(&This->update_buffers);
list_inithead(&This->update_textures);
+ list_inithead(&This->managed_buffers);
list_inithead(&This->managed_textures);
This->screen = pScreen;
@@ -540,7 +542,7 @@ NineDevice9_ResumeRecording( struct NineDevice9 *This )
}
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_TestCooperativeLevel( struct NineDevice9 *This )
{
if (NineSwapChain9_GetOccluded(This->swapchains[0])) {
@@ -553,26 +555,35 @@ NineDevice9_TestCooperativeLevel( struct NineDevice9 *This )
return D3D_OK;
}
-UINT WINAPI
+UINT NINE_WINAPI
NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This )
{
return This->available_texture_mem;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EvictManagedResources( struct NineDevice9 *This )
{
struct NineBaseTexture9 *tex;
+ struct NineBuffer9 *buf;
DBG("This=%p\n", This);
LIST_FOR_EACH_ENTRY(tex, &This->managed_textures, list2) {
NineBaseTexture9_UnLoad(tex);
}
+ /* Vertex/index buffers don't take a lot of space and aren't accounted
+ * for d3d memory usage. Instead of actually freeing from memory,
+ * just mark the buffer dirty to trigger a re-upload later. We
+ * could just ignore, but some bad behaving apps could rely on it (if
+ * they write outside the locked regions typically). */
+ LIST_FOR_EACH_ENTRY(buf, &This->managed_buffers, managed.list2) {
+ NineBuffer9_SetDirty(buf);
+ }
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDirect3D( struct NineDevice9 *This,
IDirect3D9 **ppD3D9 )
{
@@ -582,7 +593,7 @@ NineDevice9_GetDirect3D( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDeviceCaps( struct NineDevice9 *This,
D3DCAPS9 *pCaps )
{
@@ -591,7 +602,7 @@ NineDevice9_GetDeviceCaps( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDisplayMode( struct NineDevice9 *This,
UINT iSwapChain,
D3DDISPLAYMODE *pMode )
@@ -603,7 +614,7 @@ NineDevice9_GetDisplayMode( struct NineDevice9 *This,
return NineSwapChain9_GetDisplayMode(This->swapchains[iSwapChain], pMode);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetCreationParameters( struct NineDevice9 *This,
D3DDEVICE_CREATION_PARAMETERS *pParameters )
{
@@ -612,7 +623,7 @@ NineDevice9_GetCreationParameters( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetCursorProperties( struct NineDevice9 *This,
UINT XHotSpot,
UINT YHotSpot,
@@ -688,7 +699,7 @@ NineDevice9_SetCursorProperties( struct NineDevice9 *This,
return D3D_OK;
}
-void WINAPI
+void NINE_WINAPI
NineDevice9_SetCursorPosition( struct NineDevice9 *This,
int X,
int Y,
@@ -705,7 +716,7 @@ NineDevice9_SetCursorPosition( struct NineDevice9 *This,
This->cursor.software = ID3DPresent_SetCursorPos(swap->present, &This->cursor.pos) != D3D_OK;
}
-BOOL WINAPI
+BOOL NINE_WINAPI
NineDevice9_ShowCursor( struct NineDevice9 *This,
BOOL bShow )
{
@@ -720,7 +731,7 @@ NineDevice9_ShowCursor( struct NineDevice9 *This,
return old;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3DSwapChain9 **pSwapChain )
@@ -755,7 +766,7 @@ NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetSwapChain( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSwapChain9 **pSwapChain )
@@ -771,13 +782,13 @@ NineDevice9_GetSwapChain( struct NineDevice9 *This,
return D3D_OK;
}
-UINT WINAPI
+UINT NINE_WINAPI
NineDevice9_GetNumberOfSwapChains( struct NineDevice9 *This )
{
return This->nswapchains;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Reset( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters )
{
@@ -810,7 +821,7 @@ NineDevice9_Reset( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Present( struct NineDevice9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -833,7 +844,7 @@ NineDevice9_Present( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetBackBuffer( struct NineDevice9 *This,
UINT iSwapChain,
UINT iBackBuffer,
@@ -849,7 +860,7 @@ NineDevice9_GetBackBuffer( struct NineDevice9 *This,
iBackBuffer, Type, ppBackBuffer);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRasterStatus( struct NineDevice9 *This,
UINT iSwapChain,
D3DRASTER_STATUS *pRasterStatus )
@@ -861,14 +872,14 @@ NineDevice9_GetRasterStatus( struct NineDevice9 *This,
pRasterStatus);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetDialogBoxMode( struct NineDevice9 *This,
BOOL bEnableDialogs )
{
STUB(D3DERR_INVALIDCALL);
}
-void WINAPI
+void NINE_WINAPI
NineDevice9_SetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
DWORD Flags,
@@ -887,7 +898,7 @@ NineDevice9_SetGammaRamp( struct NineDevice9 *This,
}
}
-void WINAPI
+void NINE_WINAPI
NineDevice9_GetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
D3DGAMMARAMP *pRamp )
@@ -901,7 +912,7 @@ NineDevice9_GetGammaRamp( struct NineDevice9 *This,
*pRamp = This->swapchains[iSwapChain]->gamma;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -925,15 +936,6 @@ NineDevice9_CreateTexture( struct NineDevice9 *This,
D3DUSAGE_SOFTWAREPROCESSING | D3DUSAGE_TEXTAPI;
*ppTexture = NULL;
- user_assert(Width && Height, D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || This->ex, D3DERR_INVALIDCALL);
- /* When is used shared handle, Pool must be
- * SYSTEMMEM with Levels 1 or DEFAULT with any Levels */
- user_assert(!pSharedHandle || Pool != D3DPOOL_SYSTEMMEM || Levels == 1,
- D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_SYSTEMMEM || Pool == D3DPOOL_DEFAULT,
- D3DERR_INVALIDCALL);
- user_assert((Usage != D3DUSAGE_AUTOGENMIPMAP || Levels <= 1), D3DERR_INVALIDCALL);
hr = NineTexture9_new(This, Width, Height, Levels, Usage, Format, Pool,
&tex, pSharedHandle);
@@ -943,7 +945,7 @@ NineDevice9_CreateTexture( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -967,8 +969,6 @@ NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
D3DUSAGE_SOFTWAREPROCESSING;
*ppVolumeTexture = NULL;
- user_assert(Width && Height && Depth, D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
hr = NineVolumeTexture9_new(This, Width, Height, Depth, Levels,
Usage, Format, Pool, &tex, pSharedHandle);
@@ -978,7 +978,7 @@ NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
UINT EdgeLength,
UINT Levels,
@@ -1001,8 +1001,6 @@ NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
D3DUSAGE_SOFTWAREPROCESSING;
*ppCubeTexture = NULL;
- user_assert(EdgeLength, D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
hr = NineCubeTexture9_new(This, EdgeLength, Levels, Usage, Format, Pool,
&tex, pSharedHandle);
@@ -1012,7 +1010,7 @@ NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -1050,7 +1048,7 @@ NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateIndexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -1137,7 +1135,10 @@ create_zs_or_rt_surface(struct NineDevice9 *This,
}
templ.format = d3d9_to_pipe_format_checked(screen, Format, templ.target,
templ.nr_samples, templ.bind,
- FALSE);
+ FALSE, Pool == D3DPOOL_SCRATCH);
+
+ if (templ.format == PIPE_FORMAT_NONE && Format != D3DFMT_NULL)
+ return D3DERR_INVALIDCALL;
desc.Format = Format;
desc.Type = D3DRTYPE_SURFACE;
@@ -1178,7 +1179,7 @@ create_zs_or_rt_surface(struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateRenderTarget( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -1196,7 +1197,7 @@ NineDevice9_CreateRenderTarget( struct NineDevice9 *This,
Lockable, ppSurface, pSharedHandle);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -1216,7 +1217,7 @@ NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
Discard, ppSurface, pSharedHandle);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_UpdateSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
@@ -1309,7 +1310,7 @@ NineDevice9_UpdateSurface( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_UpdateTexture( struct NineDevice9 *This,
IDirect3DBaseTexture9 *pSourceTexture,
IDirect3DBaseTexture9 *pDestinationTexture )
@@ -1438,7 +1439,7 @@ NineDevice9_UpdateTexture( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderTargetData( struct NineDevice9 *This,
IDirect3DSurface9 *pRenderTarget,
IDirect3DSurface9 *pDestSurface )
@@ -1463,7 +1464,7 @@ NineDevice9_GetRenderTargetData( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetFrontBufferData( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSurface9 *pDestSurface )
@@ -1478,7 +1479,7 @@ NineDevice9_GetFrontBufferData( struct NineDevice9 *This,
pDestSurface);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_StretchRect( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
@@ -1682,7 +1683,7 @@ NineDevice9_StretchRect( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ColorFill( struct NineDevice9 *This,
IDirect3DSurface9 *pSurface,
const RECT *pRect,
@@ -1749,7 +1750,7 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -1782,7 +1783,7 @@ NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 *pRenderTarget )
@@ -1821,7 +1822,7 @@ NineDevice9_SetRenderTarget( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 **ppRenderTarget )
@@ -1839,7 +1840,7 @@ NineDevice9_GetRenderTarget( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pNewZStencil )
{
@@ -1852,7 +1853,7 @@ NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 **ppZStencilSurface )
{
@@ -1866,7 +1867,7 @@ NineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_BeginScene( struct NineDevice9 *This )
{
DBG("This=%p\n", This);
@@ -1876,7 +1877,7 @@ NineDevice9_BeginScene( struct NineDevice9 *This )
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EndScene( struct NineDevice9 *This )
{
DBG("This=%p\n", This);
@@ -1885,7 +1886,7 @@ NineDevice9_EndScene( struct NineDevice9 *This )
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Clear( struct NineDevice9 *This,
DWORD Count,
const D3DRECT *pRects,
@@ -2047,7 +2048,7 @@ NineDevice9_Clear( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix )
@@ -2066,7 +2067,7 @@ NineDevice9_SetTransform( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
D3DMATRIX *pMatrix )
@@ -2077,7 +2078,7 @@ NineDevice9_GetTransform( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_MultiplyTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix )
@@ -2094,7 +2095,7 @@ NineDevice9_MultiplyTransform( struct NineDevice9 *This,
return NineDevice9_SetTransform(This, State, &T);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetViewport( struct NineDevice9 *This,
const D3DVIEWPORT9 *pViewport )
{
@@ -2110,7 +2111,7 @@ NineDevice9_SetViewport( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetViewport( struct NineDevice9 *This,
D3DVIEWPORT9 *pViewport )
{
@@ -2118,7 +2119,7 @@ NineDevice9_GetViewport( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetMaterial( struct NineDevice9 *This,
const D3DMATERIAL9 *pMaterial )
{
@@ -2136,7 +2137,7 @@ NineDevice9_SetMaterial( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetMaterial( struct NineDevice9 *This,
D3DMATERIAL9 *pMaterial )
{
@@ -2145,7 +2146,7 @@ NineDevice9_GetMaterial( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetLight( struct NineDevice9 *This,
DWORD Index,
const D3DLIGHT9 *pLight )
@@ -2194,7 +2195,7 @@ NineDevice9_SetLight( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetLight( struct NineDevice9 *This,
DWORD Index,
D3DLIGHT9 *pLight )
@@ -2211,7 +2212,7 @@ NineDevice9_GetLight( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_LightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL Enable )
@@ -2261,7 +2262,7 @@ NineDevice9_LightEnable( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetLightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL *pEnable )
@@ -2282,7 +2283,7 @@ NineDevice9_GetLightEnable( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetClipPlane( struct NineDevice9 *This,
DWORD Index,
const float *pPlane )
@@ -2303,7 +2304,7 @@ NineDevice9_SetClipPlane( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetClipPlane( struct NineDevice9 *This,
DWORD Index,
float *pPlane )
@@ -2374,7 +2375,7 @@ NineDevice9_ResolveZ( struct NineDevice9 *This )
#define ALPHA_TO_COVERAGE_ENABLE MAKEFOURCC('A', '2', 'M', '1')
#define ALPHA_TO_COVERAGE_DISABLE MAKEFOURCC('A', '2', 'M', '0')
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD Value )
@@ -2420,7 +2421,7 @@ NineDevice9_SetRenderState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD *pValue )
@@ -2431,7 +2432,7 @@ NineDevice9_GetRenderState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateStateBlock( struct NineDevice9 *This,
D3DSTATEBLOCKTYPE Type,
IDirect3DStateBlock9 **ppSB )
@@ -2531,7 +2532,7 @@ NineDevice9_CreateStateBlock( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_BeginStateBlock( struct NineDevice9 *This )
{
HRESULT hr;
@@ -2551,7 +2552,7 @@ NineDevice9_BeginStateBlock( struct NineDevice9 *This )
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EndStateBlock( struct NineDevice9 *This,
IDirect3DStateBlock9 **ppSB )
{
@@ -2570,21 +2571,21 @@ NineDevice9_EndStateBlock( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetClipStatus( struct NineDevice9 *This,
const D3DCLIPSTATUS9 *pClipStatus )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetClipStatus( struct NineDevice9 *This,
D3DCLIPSTATUS9 *pClipStatus )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 **ppTexture )
@@ -2605,7 +2606,7 @@ NineDevice9_GetTexture( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 *pTexture )
@@ -2650,7 +2651,7 @@ NineDevice9_SetTexture( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
@@ -2666,7 +2667,7 @@ NineDevice9_GetTextureStageState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
@@ -2719,7 +2720,7 @@ NineDevice9_SetTextureStageState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
@@ -2737,7 +2738,7 @@ NineDevice9_GetSamplerState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
@@ -2765,7 +2766,7 @@ NineDevice9_SetSamplerState( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ValidateDevice( struct NineDevice9 *This,
DWORD *pNumPasses )
{
@@ -2805,7 +2806,7 @@ NineDevice9_ValidateDevice( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
const PALETTEENTRY *pEntries )
@@ -2813,7 +2814,7 @@ NineDevice9_SetPaletteEntries( struct NineDevice9 *This,
STUB(D3D_OK); /* like wine */
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
PALETTEENTRY *pEntries )
@@ -2821,21 +2822,21 @@ NineDevice9_GetPaletteEntries( struct NineDevice9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
UINT PaletteNumber )
{
STUB(D3D_OK); /* like wine */
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
UINT *PaletteNumber )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetScissorRect( struct NineDevice9 *This,
const RECT *pRect )
{
@@ -2854,7 +2855,7 @@ NineDevice9_SetScissorRect( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetScissorRect( struct NineDevice9 *This,
RECT *pRect )
{
@@ -2866,27 +2867,27 @@ NineDevice9_GetScissorRect( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
BOOL bSoftware )
{
STUB(D3DERR_INVALIDCALL);
}
-BOOL WINAPI
+BOOL NINE_WINAPI
NineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This )
{
return !!(This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetNPatchMode( struct NineDevice9 *This,
float nSegments )
{
STUB(D3DERR_INVALIDCALL);
}
-float WINAPI
+float NINE_WINAPI
NineDevice9_GetNPatchMode( struct NineDevice9 *This )
{
STUB(0);
@@ -2908,7 +2909,7 @@ init_draw_info(struct pipe_draw_info *info,
info->indirect = NULL;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
@@ -2933,7 +2934,7 @@ NineDevice9_DrawPrimitive( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
INT BaseVertexIndex,
@@ -2967,7 +2968,7 @@ NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT PrimitiveCount,
@@ -3023,7 +3024,7 @@ NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT MinVertexIndex,
@@ -3115,7 +3116,7 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
/* TODO: Write to pDestBuffer directly if vertex declaration contains
* only f32 formats.
*/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ProcessVertices( struct NineDevice9 *This,
UINT SrcStartIndex,
UINT DestIndex,
@@ -3208,7 +3209,7 @@ out:
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
const D3DVERTEXELEMENT9 *pVertexElements,
IDirect3DVertexDeclaration9 **ppDecl )
@@ -3225,7 +3226,7 @@ NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 *pDecl )
{
@@ -3250,7 +3251,7 @@ NineDevice9_SetVertexDeclaration( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 **ppDecl )
{
@@ -3262,7 +3263,7 @@ NineDevice9_GetVertexDeclaration( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetFVF( struct NineDevice9 *This,
DWORD FVF )
{
@@ -3286,7 +3287,7 @@ NineDevice9_SetFVF( struct NineDevice9 *This,
This, (IDirect3DVertexDeclaration9 *)vdecl);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetFVF( struct NineDevice9 *This,
DWORD *pFVF )
{
@@ -3294,7 +3295,7 @@ NineDevice9_GetFVF( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DVertexShader9 **ppShader )
@@ -3311,7 +3312,7 @@ NineDevice9_CreateVertexShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 *pShader )
{
@@ -3336,7 +3337,7 @@ NineDevice9_SetVertexShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 **ppShader )
{
@@ -3345,7 +3346,7 @@ NineDevice9_GetVertexShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
@@ -3382,7 +3383,7 @@ NineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
@@ -3401,7 +3402,7 @@ NineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
@@ -3441,7 +3442,7 @@ NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
@@ -3470,7 +3471,7 @@ NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
@@ -3506,7 +3507,7 @@ NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
@@ -3525,7 +3526,7 @@ NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 *pStreamData,
@@ -3562,7 +3563,7 @@ NineDevice9_SetStreamSource( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 **ppStreamData,
@@ -3582,7 +3583,7 @@ NineDevice9_GetStreamSource( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT Setting )
@@ -3616,7 +3617,7 @@ NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT *pSetting )
@@ -3626,7 +3627,7 @@ NineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 *pIndexData )
{
@@ -3647,7 +3648,7 @@ NineDevice9_SetIndices( struct NineDevice9 *This,
/* XXX: wine/d3d9 doesn't have pBaseVertexIndex, and it doesn't make sense
* here because it's an argument passed to the Draw calls.
*/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 **ppIndexData /*,
UINT *pBaseVertexIndex */ )
@@ -3657,7 +3658,7 @@ NineDevice9_GetIndices( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreatePixelShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DPixelShader9 **ppShader )
@@ -3674,7 +3675,7 @@ NineDevice9_CreatePixelShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 *pShader )
{
@@ -3704,7 +3705,7 @@ NineDevice9_SetPixelShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 **ppShader )
{
@@ -3713,7 +3714,7 @@ NineDevice9_GetPixelShader( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
@@ -3750,7 +3751,7 @@ NineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
@@ -3769,7 +3770,7 @@ NineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
@@ -3808,7 +3809,7 @@ NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
@@ -3837,7 +3838,7 @@ NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
@@ -3873,7 +3874,7 @@ NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
@@ -3892,7 +3893,7 @@ NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawRectPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
@@ -3901,7 +3902,7 @@ NineDevice9_DrawRectPatch( struct NineDevice9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawTriPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
@@ -3910,14 +3911,14 @@ NineDevice9_DrawTriPatch( struct NineDevice9 *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DeletePatch( struct NineDevice9 *This,
UINT Handle )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateQuery( struct NineDevice9 *This,
D3DQUERYTYPE Type,
IDirect3DQuery9 **ppQuery )
diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h
index 34edf0cfa48..73a43cf08ff 100644
--- a/src/gallium/state_trackers/nine/device9.h
+++ b/src/gallium/state_trackers/nine/device9.h
@@ -68,7 +68,9 @@ struct NineDevice9
struct nine_state *update; /* state to update (&state / &record->state) */
struct nine_state state; /* device state */
+ struct list_head update_buffers;
struct list_head update_textures;
+ struct list_head managed_buffers;
struct list_head managed_textures;
boolean is_recording;
@@ -196,100 +198,100 @@ NineDevice9_GetCaps( struct NineDevice9 *This );
/*** Direct3D public ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_TestCooperativeLevel( struct NineDevice9 *This );
-UINT WINAPI
+UINT NINE_WINAPI
NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EvictManagedResources( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDirect3D( struct NineDevice9 *This,
IDirect3D9 **ppD3D9 );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDeviceCaps( struct NineDevice9 *This,
D3DCAPS9 *pCaps );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDisplayMode( struct NineDevice9 *This,
UINT iSwapChain,
D3DDISPLAYMODE *pMode );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetCreationParameters( struct NineDevice9 *This,
D3DDEVICE_CREATION_PARAMETERS *pParameters );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetCursorProperties( struct NineDevice9 *This,
UINT XHotSpot,
UINT YHotSpot,
IDirect3DSurface9 *pCursorBitmap );
-void WINAPI
+void NINE_WINAPI
NineDevice9_SetCursorPosition( struct NineDevice9 *This,
int X,
int Y,
DWORD Flags );
-BOOL WINAPI
+BOOL NINE_WINAPI
NineDevice9_ShowCursor( struct NineDevice9 *This,
BOOL bShow );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3DSwapChain9 **pSwapChain );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetSwapChain( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSwapChain9 **pSwapChain );
-UINT WINAPI
+UINT NINE_WINAPI
NineDevice9_GetNumberOfSwapChains( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Reset( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Present( struct NineDevice9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
HWND hDestWindowOverride,
const RGNDATA *pDirtyRegion );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetBackBuffer( struct NineDevice9 *This,
UINT iSwapChain,
UINT iBackBuffer,
D3DBACKBUFFER_TYPE Type,
IDirect3DSurface9 **ppBackBuffer );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRasterStatus( struct NineDevice9 *This,
UINT iSwapChain,
D3DRASTER_STATUS *pRasterStatus );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetDialogBoxMode( struct NineDevice9 *This,
BOOL bEnableDialogs );
-void WINAPI
+void NINE_WINAPI
NineDevice9_SetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
DWORD Flags,
const D3DGAMMARAMP *pRamp );
-void WINAPI
+void NINE_WINAPI
NineDevice9_GetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
D3DGAMMARAMP *pRamp );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -300,7 +302,7 @@ NineDevice9_CreateTexture( struct NineDevice9 *This,
IDirect3DTexture9 **ppTexture,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -312,7 +314,7 @@ NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
IDirect3DVolumeTexture9 **ppVolumeTexture,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
UINT EdgeLength,
UINT Levels,
@@ -322,7 +324,7 @@ NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
IDirect3DCubeTexture9 **ppCubeTexture,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -331,7 +333,7 @@ NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
IDirect3DVertexBuffer9 **ppVertexBuffer,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateIndexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -340,7 +342,7 @@ NineDevice9_CreateIndexBuffer( struct NineDevice9 *This,
IDirect3DIndexBuffer9 **ppIndexBuffer,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateRenderTarget( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -351,7 +353,7 @@ NineDevice9_CreateRenderTarget( struct NineDevice9 *This,
IDirect3DSurface9 **ppSurface,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -362,29 +364,29 @@ NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 **ppSurface,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_UpdateSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
IDirect3DSurface9 *pDestinationSurface,
const POINT *pDestPoint );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_UpdateTexture( struct NineDevice9 *This,
IDirect3DBaseTexture9 *pSourceTexture,
IDirect3DBaseTexture9 *pDestinationTexture );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderTargetData( struct NineDevice9 *This,
IDirect3DSurface9 *pRenderTarget,
IDirect3DSurface9 *pDestSurface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetFrontBufferData( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSurface9 *pDestSurface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_StretchRect( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
@@ -392,13 +394,13 @@ NineDevice9_StretchRect( struct NineDevice9 *This,
const RECT *pDestRect,
D3DTEXTUREFILTERTYPE Filter );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ColorFill( struct NineDevice9 *This,
IDirect3DSurface9 *pSurface,
const RECT *pRect,
D3DCOLOR color );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -407,31 +409,31 @@ NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
IDirect3DSurface9 **ppSurface,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 *pRenderTarget );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 **ppRenderTarget );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pNewZStencil );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 **ppZStencilSurface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_BeginScene( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EndScene( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_Clear( struct NineDevice9 *This,
DWORD Count,
const D3DRECT *pRects,
@@ -440,182 +442,182 @@ NineDevice9_Clear( struct NineDevice9 *This,
float Z,
DWORD Stencil );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
D3DMATRIX *pMatrix );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_MultiplyTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetViewport( struct NineDevice9 *This,
const D3DVIEWPORT9 *pViewport );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetViewport( struct NineDevice9 *This,
D3DVIEWPORT9 *pViewport );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetMaterial( struct NineDevice9 *This,
const D3DMATERIAL9 *pMaterial );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetMaterial( struct NineDevice9 *This,
D3DMATERIAL9 *pMaterial );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetLight( struct NineDevice9 *This,
DWORD Index,
const D3DLIGHT9 *pLight );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetLight( struct NineDevice9 *This,
DWORD Index,
D3DLIGHT9 *pLight );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_LightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL Enable );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetLightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL *pEnable );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetClipPlane( struct NineDevice9 *This,
DWORD Index,
const float *pPlane );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetClipPlane( struct NineDevice9 *This,
DWORD Index,
float *pPlane );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD Value );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD *pValue );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateStateBlock( struct NineDevice9 *This,
D3DSTATEBLOCKTYPE Type,
IDirect3DStateBlock9 **ppSB );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_BeginStateBlock( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_EndStateBlock( struct NineDevice9 *This,
IDirect3DStateBlock9 **ppSB );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetClipStatus( struct NineDevice9 *This,
const D3DCLIPSTATUS9 *pClipStatus );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetClipStatus( struct NineDevice9 *This,
D3DCLIPSTATUS9 *pClipStatus );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 **ppTexture );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 *pTexture );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
DWORD *pValue );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
DWORD Value );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
DWORD *pValue );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
DWORD Value );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ValidateDevice( struct NineDevice9 *This,
DWORD *pNumPasses );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
const PALETTEENTRY *pEntries );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
PALETTEENTRY *pEntries );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
UINT PaletteNumber );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
UINT *PaletteNumber );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetScissorRect( struct NineDevice9 *This,
const RECT *pRect );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetScissorRect( struct NineDevice9 *This,
RECT *pRect );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
BOOL bSoftware );
-BOOL WINAPI
+BOOL NINE_WINAPI
NineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetNPatchMode( struct NineDevice9 *This,
float nSegments );
-float WINAPI
+float NINE_WINAPI
NineDevice9_GetNPatchMode( struct NineDevice9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
UINT PrimitiveCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
INT BaseVertexIndex,
@@ -624,14 +626,14 @@ NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
UINT startIndex,
UINT primCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT PrimitiveCount,
const void *pVertexStreamZeroData,
UINT VertexStreamZeroStride );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT MinVertexIndex,
@@ -642,7 +644,7 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
const void *pVertexStreamZeroData,
UINT VertexStreamZeroStride );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_ProcessVertices( struct NineDevice9 *This,
UINT SrcStartIndex,
UINT DestIndex,
@@ -651,175 +653,175 @@ NineDevice9_ProcessVertices( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 *pVertexDecl,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
const D3DVERTEXELEMENT9 *pVertexElements,
IDirect3DVertexDeclaration9 **ppDecl );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 *pDecl );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 **ppDecl );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetFVF( struct NineDevice9 *This,
DWORD FVF );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetFVF( struct NineDevice9 *This,
DWORD *pFVF );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateVertexShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DVertexShader9 **ppShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 *pShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 **ppShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
UINT Vector4fCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
UINT Vector4fCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
UINT Vector4iCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
UINT Vector4iCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
UINT BoolCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
UINT BoolCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 *pStreamData,
UINT OffsetInBytes,
UINT Stride );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 **ppStreamData,
UINT *pOffsetInBytes,
UINT *pStride );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT Setting );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT *pSetting );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 *pIndexData );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 **ppIndexData /*,
UINT *pBaseVertexIndex */ );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreatePixelShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DPixelShader9 **ppShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 *pShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 **ppShader );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
UINT Vector4fCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
UINT Vector4fCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
UINT Vector4iCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
UINT Vector4iCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
UINT BoolCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
UINT BoolCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawRectPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
const D3DRECTPATCH_INFO *pRectPatchInfo );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DrawTriPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
const D3DTRIPATCH_INFO *pTriPatchInfo );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_DeletePatch( struct NineDevice9 *This,
UINT Handle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9_CreateQuery( struct NineDevice9 *This,
D3DQUERYTYPE Type,
IDirect3DQuery9 **ppQuery );
diff --git a/src/gallium/state_trackers/nine/device9ex.c b/src/gallium/state_trackers/nine/device9ex.c
index 11244b1bedf..fd4272468cb 100644
--- a/src/gallium/state_trackers/nine/device9ex.c
+++ b/src/gallium/state_trackers/nine/device9ex.c
@@ -62,7 +62,7 @@ NineDevice9Ex_dtor( struct NineDevice9Ex *This )
NineDevice9_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
UINT width,
UINT height,
@@ -72,7 +72,7 @@ NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
IDirect3DSurface9 *pSrc,
IDirect3DSurface9 *pDst,
@@ -86,7 +86,7 @@ NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -111,28 +111,28 @@ NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
INT *pPriority )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
INT Priority )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
UINT iSwapChain )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
IDirect3DResource9 **pResourceArray,
UINT32 NumResources )
@@ -140,21 +140,21 @@ NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT MaxLatency )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT *pMaxLatency )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
HWND hDestinationWindow )
{
@@ -173,7 +173,7 @@ NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -188,7 +188,7 @@ NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -201,7 +201,7 @@ NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -216,7 +216,7 @@ NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
D3DDISPLAYMODEEX *pFullscreenDisplayMode )
@@ -241,7 +241,7 @@ NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_Reset( struct NineDevice9Ex *This,
D3DPRESENT_PARAMETERS *pPresentationParameters )
{
@@ -267,7 +267,7 @@ NineDevice9Ex_Reset( struct NineDevice9Ex *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
UINT iSwapChain,
D3DDISPLAYMODEEX *pMode,
@@ -284,7 +284,7 @@ NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
return NineSwapChain9Ex_GetDisplayModeEx(swapchain, pMode, pRotation);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex *This )
{
return D3D_OK;
diff --git a/src/gallium/state_trackers/nine/device9ex.h b/src/gallium/state_trackers/nine/device9ex.h
index 1c7e57e0974..3306f238b59 100644
--- a/src/gallium/state_trackers/nine/device9ex.h
+++ b/src/gallium/state_trackers/nine/device9ex.h
@@ -47,14 +47,14 @@ NineDevice9Ex_new( struct pipe_screen *pScreen,
struct NineDevice9Ex **ppOut,
int minorVersionNum );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
UINT width,
UINT height,
float *rows,
float *columns );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
IDirect3DSurface9 *pSrc,
IDirect3DSurface9 *pDst,
@@ -65,7 +65,7 @@ NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
int Xoffset,
int Yoffset );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -73,43 +73,43 @@ NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
const RGNDATA *pDirtyRegion,
DWORD dwFlags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_Present( struct NineDevice9Ex *This,
const RECT *pSourceRect,
const RECT *pDestRect,
HWND hDestWindowOverride,
const RGNDATA *pDirtyRegion );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
INT *pPriority );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
INT Priority );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
UINT iSwapChain );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
IDirect3DResource9 **pResourceArray,
UINT32 NumResources );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT MaxLatency );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT *pMaxLatency );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
HWND hDestinationWindow );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -121,7 +121,7 @@ NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
HANDLE *pSharedHandle,
DWORD Usage );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -131,7 +131,7 @@ NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
HANDLE *pSharedHandle,
DWORD Usage );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -143,22 +143,22 @@ NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
HANDLE *pSharedHandle,
DWORD Usage );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
D3DDISPLAYMODEEX *pFullscreenDisplayMode );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_Reset( struct NineDevice9Ex *This,
D3DPRESENT_PARAMETERS *pPresentationParameters );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
UINT iSwapChain,
D3DDISPLAYMODEEX *pMode,
D3DDISPLAYROTATION *pRotation );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex *This );
#endif /* _NINE_DEVICE9EX_H_ */
diff --git a/src/gallium/state_trackers/nine/device9video.c b/src/gallium/state_trackers/nine/device9video.c
index 65cc6a05c68..2e8e94a26e7 100644
--- a/src/gallium/state_trackers/nine/device9video.c
+++ b/src/gallium/state_trackers/nine/device9video.c
@@ -24,7 +24,7 @@
#define DBG_CHANNEL DBG_DEVICEVIDEO
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
@@ -33,7 +33,7 @@ NineDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This,
D3DAUTHENTICATEDCHANNELTYPE ChannelType,
IDirect3DAuthenticatedChannel9 **ppAuthenticatedChannel,
@@ -42,7 +42,7 @@ NineDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This,
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_CreateCryptoSession( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
diff --git a/src/gallium/state_trackers/nine/device9video.h b/src/gallium/state_trackers/nine/device9video.h
index fc2faeb624a..d77fd5ec57a 100644
--- a/src/gallium/state_trackers/nine/device9video.h
+++ b/src/gallium/state_trackers/nine/device9video.h
@@ -35,19 +35,19 @@ NineDevice9Video( void *data )
return (struct NineDevice9Video *)data;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
D3DCONTENTPROTECTIONCAPS *pCaps );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This,
D3DAUTHENTICATEDCHANNELTYPE ChannelType,
IDirect3DAuthenticatedChannel9 **ppAuthenticatedChannel,
HANDLE *pChannelHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineDevice9Video_CreateCryptoSession( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
diff --git a/src/gallium/state_trackers/nine/indexbuffer9.c b/src/gallium/state_trackers/nine/indexbuffer9.c
index 401fe75e95f..0a31d7e9716 100644
--- a/src/gallium/state_trackers/nine/indexbuffer9.c
+++ b/src/gallium/state_trackers/nine/indexbuffer9.c
@@ -85,7 +85,7 @@ NineIndexBuffer9_GetResource( struct NineIndexBuffer9 *This )
return NineBuffer9_GetResource(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_Lock( struct NineIndexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
@@ -95,13 +95,13 @@ NineIndexBuffer9_Lock( struct NineIndexBuffer9 *This,
return NineBuffer9_Lock(&This->base, OffsetToLock, SizeToLock, ppbData, Flags);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_Unlock( struct NineIndexBuffer9 *This )
{
return NineBuffer9_Unlock(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_GetDesc( struct NineIndexBuffer9 *This,
D3DINDEXBUFFER_DESC *pDesc )
{
diff --git a/src/gallium/state_trackers/nine/indexbuffer9.h b/src/gallium/state_trackers/nine/indexbuffer9.h
index f3274b71224..4802105c952 100644
--- a/src/gallium/state_trackers/nine/indexbuffer9.h
+++ b/src/gallium/state_trackers/nine/indexbuffer9.h
@@ -70,17 +70,17 @@ struct pipe_resource *
NineIndexBuffer9_GetResource( struct NineIndexBuffer9 *This );
/*** Direct3D public ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_Lock( struct NineIndexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
void **ppbData,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_Unlock( struct NineIndexBuffer9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineIndexBuffer9_GetDesc( struct NineIndexBuffer9 *This,
D3DINDEXBUFFER_DESC *pDesc );
diff --git a/src/gallium/state_trackers/nine/iunknown.c b/src/gallium/state_trackers/nine/iunknown.c
index aaf17bfeda7..a28c8b2de8b 100644
--- a/src/gallium/state_trackers/nine/iunknown.c
+++ b/src/gallium/state_trackers/nine/iunknown.c
@@ -51,7 +51,7 @@ NineUnknown_dtor( struct NineUnknown *This )
FREE(This);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineUnknown_QueryInterface( struct NineUnknown *This,
REFIID riid,
void **ppvObject )
@@ -75,7 +75,7 @@ NineUnknown_QueryInterface( struct NineUnknown *This,
return E_NOINTERFACE;
}
-ULONG WINAPI
+ULONG NINE_WINAPI
NineUnknown_AddRef( struct NineUnknown *This )
{
ULONG r;
@@ -94,7 +94,7 @@ NineUnknown_AddRef( struct NineUnknown *This )
return r;
}
-ULONG WINAPI
+ULONG NINE_WINAPI
NineUnknown_Release( struct NineUnknown *This )
{
if (This->forward)
@@ -117,7 +117,7 @@ NineUnknown_Release( struct NineUnknown *This )
return r;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineUnknown_GetDevice( struct NineUnknown *This,
IDirect3DDevice9 **ppDevice )
{
diff --git a/src/gallium/state_trackers/nine/iunknown.h b/src/gallium/state_trackers/nine/iunknown.h
index 628d984553e..b8de6be9663 100644
--- a/src/gallium/state_trackers/nine/iunknown.h
+++ b/src/gallium/state_trackers/nine/iunknown.h
@@ -28,6 +28,7 @@
#include "util/u_memory.h"
#include "guid.h"
+#include "nine_flags.h"
#include "nine_debug.h"
#include "nine_quirk.h"
@@ -77,18 +78,18 @@ NineUnknown_dtor( struct NineUnknown *This );
/*** Direct3D public methods ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineUnknown_QueryInterface( struct NineUnknown *This,
REFIID riid,
void **ppvObject );
-ULONG WINAPI
+ULONG NINE_WINAPI
NineUnknown_AddRef( struct NineUnknown *This );
-ULONG WINAPI
+ULONG NINE_WINAPI
NineUnknown_Release( struct NineUnknown *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineUnknown_GetDevice( struct NineUnknown *This,
IDirect3DDevice9 **ppDevice );
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c
index a5466a7bdd4..d5daabd6661 100644
--- a/src/gallium/state_trackers/nine/nine_ff.c
+++ b/src/gallium/state_trackers/nine/nine_ff.c
@@ -24,8 +24,6 @@
#include "util/u_hash_table.h"
#include "util/u_upload_mgr.h"
-#define NINE_TGSI_LAZY_DEVS 1
-
#define DBG_CHANNEL DBG_FF
#define NINE_FF_NUM_VS_CONST 256
@@ -319,15 +317,11 @@ ureg_normalize3(struct ureg_program *ureg,
struct ureg_dst dst, struct ureg_src src,
struct ureg_dst tmp)
{
-#ifdef NINE_TGSI_LAZY_DEVS
struct ureg_dst tmp_x = ureg_writemask(tmp, TGSI_WRITEMASK_X);
ureg_DP3(ureg, tmp_x, src, src);
ureg_RSQ(ureg, tmp_x, _X(tmp));
ureg_MUL(ureg, dst, src, _X(tmp));
-#else
- ureg_NRM(ureg, dst, src);
-#endif
}
static void *
@@ -549,34 +543,22 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs)
*/
if (key->vertexpointsize) {
struct ureg_src cPsz1 = ureg_DECL_constant(ureg, 26);
-#ifdef NINE_TGSI_LAZY_DEVS
- struct ureg_dst tmp_clamp = ureg_DECL_temporary(ureg);
-
- ureg_MAX(ureg, tmp_clamp, vs->aPsz, _XXXX(cPsz1));
- ureg_MIN(ureg, oPsz, ureg_src(tmp_clamp), _YYYY(cPsz1));
- ureg_release_temporary(ureg, tmp_clamp);
-#else
- ureg_CLAMP(ureg, oPsz, vs->aPsz, _XXXX(cPsz1), _YYYY(cPsz1));
-#endif
+ ureg_MAX(ureg, tmp_x, _XXXX(vs->aPsz), _XXXX(cPsz1));
+ ureg_MIN(ureg, oPsz, _X(tmp), _YYYY(cPsz1));
} else if (key->pointscale) {
struct ureg_src cPsz1 = ureg_DECL_constant(ureg, 26);
struct ureg_src cPsz2 = ureg_DECL_constant(ureg, 27);
ureg_DP3(ureg, tmp_x, ureg_src(r[1]), ureg_src(r[1]));
- ureg_SQRT(ureg, tmp_y, _X(tmp));
+ ureg_RSQ(ureg, tmp_y, _X(tmp));
+ ureg_MUL(ureg, tmp_y, _Y(tmp), _X(tmp));
+ ureg_CMP(ureg, tmp_y, ureg_negate(_Y(tmp)), _Y(tmp), ureg_imm1f(ureg, 0.0f));
ureg_MAD(ureg, tmp_x, _Y(tmp), _YYYY(cPsz2), _XXXX(cPsz2));
ureg_MAD(ureg, tmp_x, _Y(tmp), _X(tmp), _WWWW(cPsz1));
ureg_RCP(ureg, tmp_x, ureg_src(tmp));
ureg_MUL(ureg, tmp_x, ureg_src(tmp), _ZZZZ(cPsz1));
-#ifdef NINE_TGSI_LAZY_DEVS
- struct ureg_dst tmp_clamp = ureg_DECL_temporary(ureg);
-
- ureg_MAX(ureg, tmp_clamp, _X(tmp), _XXXX(cPsz1));
- ureg_MIN(ureg, oPsz, ureg_src(tmp_clamp), _YYYY(cPsz1));
- ureg_release_temporary(ureg, tmp_clamp);
-#else
- ureg_CLAMP(ureg, oPsz, _X(tmp), _XXXX(cPsz1), _YYYY(cPsz1));
-#endif
+ ureg_MAX(ureg, tmp_x, _X(tmp), _XXXX(cPsz1));
+ ureg_MIN(ureg, oPsz, _X(tmp), _YYYY(cPsz1));
}
for (i = 0; i < 8; ++i) {
diff --git a/src/gallium/state_trackers/nine/nine_flags.h b/src/gallium/state_trackers/nine/nine_flags.h
new file mode 100644
index 00000000000..61686a7f60f
--- /dev/null
+++ b/src/gallium/state_trackers/nine/nine_flags.h
@@ -0,0 +1,14 @@
+
+
+#ifndef _NINE_FLAGS_H_
+#define _NINE_FLAGS_H_
+
+#include "pipe/p_compiler.h"
+
+/* Incoming 32 bits calls are 4-byte aligned.
+ * We need to realign them to be able to use
+ * SSE and to work with other libraries (llvm, etc)
+ */
+#define NINE_WINAPI WINAPI PIPE_ALIGN_STACK
+
+#endif /* _NINE_FLAGS_H_ */ \ No newline at end of file
diff --git a/src/gallium/state_trackers/nine/nine_lock.c b/src/gallium/state_trackers/nine/nine_lock.c
index 42cbb0589c4..6e15cc190e8 100644
--- a/src/gallium/state_trackers/nine/nine_lock.c
+++ b/src/gallium/state_trackers/nine/nine_lock.c
@@ -49,7 +49,7 @@
/* Global mutex as described by MSDN */
pipe_static_mutex(d3dlock_global);
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 *This,
UINT *pCertificateSize )
{
@@ -60,7 +60,7 @@ LockAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 *
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This,
UINT CertifacteSize,
BYTE *ppCertificate )
@@ -72,7 +72,7 @@ LockAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9 *This,
UINT DataSize,
void *pData )
@@ -84,7 +84,7 @@ LockAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
@@ -98,7 +98,7 @@ LockAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_Configure( struct NineAuthenticatedChannel9 *This,
UINT InputSize,
const void *pInput,
@@ -123,7 +123,7 @@ IDirect3DAuthenticatedChannel9Vtbl LockAuthenticatedChannel9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockResource9_GetDevice( struct NineResource9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -135,7 +135,7 @@ LockResource9_GetDevice( struct NineResource9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockResource9_SetPrivateData( struct NineResource9 *This,
REFGUID refguid,
const void *pData,
@@ -149,7 +149,7 @@ LockResource9_SetPrivateData( struct NineResource9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockResource9_GetPrivateData( struct NineResource9 *This,
REFGUID refguid,
void *pData,
@@ -162,7 +162,7 @@ LockResource9_GetPrivateData( struct NineResource9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockResource9_FreePrivateData( struct NineResource9 *This,
REFGUID refguid )
{
@@ -173,7 +173,7 @@ LockResource9_FreePrivateData( struct NineResource9 *This,
return r;
}
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockResource9_SetPriority( struct NineResource9 *This,
DWORD PriorityNew )
{
@@ -184,7 +184,7 @@ LockResource9_SetPriority( struct NineResource9 *This,
return r;
}
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockResource9_GetPriority( struct NineResource9 *This )
{
DWORD r;
@@ -195,7 +195,7 @@ LockResource9_GetPriority( struct NineResource9 *This )
}
#if 0
-static void WINAPI
+static void NINE_WINAPI
LockResource9_PreLoad( struct NineResource9 *This )
{
pipe_mutex_lock(d3dlock_global);
@@ -205,7 +205,7 @@ LockResource9_PreLoad( struct NineResource9 *This )
#endif
#if 0
-static D3DRESOURCETYPE WINAPI
+static D3DRESOURCETYPE NINE_WINAPI
LockResource9_GetType( struct NineResource9 *This )
{
D3DRESOURCETYPE r;
@@ -216,7 +216,7 @@ LockResource9_GetType( struct NineResource9 *This )
}
#endif
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
DWORD LODNew )
{
@@ -227,7 +227,7 @@ LockBaseTexture9_SetLOD( struct NineBaseTexture9 *This,
return r;
}
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
{
DWORD r;
@@ -237,7 +237,7 @@ LockBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
return r;
}
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
{
DWORD r;
@@ -247,7 +247,7 @@ LockBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
D3DTEXTUREFILTERTYPE FilterType )
{
@@ -258,7 +258,7 @@ LockBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
return r;
}
-static D3DTEXTUREFILTERTYPE WINAPI
+static D3DTEXTUREFILTERTYPE NINE_WINAPI
LockBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This )
{
D3DTEXTUREFILTERTYPE r;
@@ -268,7 +268,7 @@ LockBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This )
return r;
}
-static void WINAPI
+static void NINE_WINAPI
LockBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
{
pipe_mutex_lock(d3dlock_global);
@@ -276,7 +276,7 @@ LockBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
pipe_mutex_unlock(d3dlock_global);
}
-static void WINAPI
+static void NINE_WINAPI
LockBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This )
{
pipe_mutex_lock(d3dlock_global);
@@ -284,7 +284,7 @@ LockBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This )
pipe_mutex_unlock(d3dlock_global);
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This,
UINT *pCertificateSize )
{
@@ -295,7 +295,7 @@ LockCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
UINT CertifacteSize,
BYTE *ppCertificate )
@@ -307,7 +307,7 @@ LockCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
UINT DataSize,
void *pData )
@@ -319,7 +319,7 @@ LockCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
@@ -333,7 +333,7 @@ LockCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
@@ -349,7 +349,7 @@ LockCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
IDirect3DSurface9 *pSrcSurface,
UINT *pSurfacePitch )
@@ -361,7 +361,7 @@ LockCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
void *pRandomNumber,
UINT RandomNumberSize )
@@ -373,7 +373,7 @@ LockCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This )
{
HRESULT r;
@@ -383,7 +383,7 @@ LockCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCryptoSession9_GetEncryptionBltKey( struct NineCryptoSession9 *This,
void *pReadbackKey,
UINT KeySize )
@@ -411,7 +411,7 @@ IDirect3DCryptoSession9Vtbl LockCryptoSession9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc )
@@ -425,7 +425,7 @@ LockCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
#endif
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
@@ -439,7 +439,7 @@ LockCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCubeTexture9_LockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level,
@@ -454,7 +454,7 @@ LockCubeTexture9_LockRect( struct NineCubeTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
UINT Level )
@@ -466,7 +466,7 @@ LockCubeTexture9_UnlockRect( struct NineCubeTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This,
D3DCUBEMAP_FACES FaceType,
const RECT *pDirtyRect )
@@ -503,7 +503,7 @@ IDirect3DCubeTexture9Vtbl LockCubeTexture9_vtable = {
(void *)LockCubeTexture9_AddDirtyRect
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_TestCooperativeLevel( struct NineDevice9 *This )
{
HRESULT r;
@@ -513,7 +513,7 @@ LockDevice9_TestCooperativeLevel( struct NineDevice9 *This )
return r;
}
-static UINT WINAPI
+static UINT NINE_WINAPI
LockDevice9_GetAvailableTextureMem( struct NineDevice9 *This )
{
UINT r;
@@ -523,7 +523,7 @@ LockDevice9_GetAvailableTextureMem( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_EvictManagedResources( struct NineDevice9 *This )
{
HRESULT r;
@@ -533,7 +533,7 @@ LockDevice9_EvictManagedResources( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetDirect3D( struct NineDevice9 *This,
IDirect3D9 **ppD3D9 )
{
@@ -545,7 +545,7 @@ LockDevice9_GetDirect3D( struct NineDevice9 *This,
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetDeviceCaps( struct NineDevice9 *This,
D3DCAPS9 *pCaps )
{
@@ -557,7 +557,7 @@ LockDevice9_GetDeviceCaps( struct NineDevice9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetDisplayMode( struct NineDevice9 *This,
UINT iSwapChain,
D3DDISPLAYMODE *pMode )
@@ -570,7 +570,7 @@ LockDevice9_GetDisplayMode( struct NineDevice9 *This,
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetCreationParameters( struct NineDevice9 *This,
D3DDEVICE_CREATION_PARAMETERS *pParameters )
{
@@ -582,7 +582,7 @@ LockDevice9_GetCreationParameters( struct NineDevice9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetCursorProperties( struct NineDevice9 *This,
UINT XHotSpot,
UINT YHotSpot,
@@ -595,7 +595,7 @@ LockDevice9_SetCursorProperties( struct NineDevice9 *This,
return r;
}
-static void WINAPI
+static void NINE_WINAPI
LockDevice9_SetCursorPosition( struct NineDevice9 *This,
int X,
int Y,
@@ -606,7 +606,7 @@ LockDevice9_SetCursorPosition( struct NineDevice9 *This,
pipe_mutex_unlock(d3dlock_global);
}
-static BOOL WINAPI
+static BOOL NINE_WINAPI
LockDevice9_ShowCursor( struct NineDevice9 *This,
BOOL bShow )
{
@@ -617,7 +617,7 @@ LockDevice9_ShowCursor( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3DSwapChain9 **pSwapChain )
@@ -629,7 +629,7 @@ LockDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetSwapChain( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSwapChain9 **pSwapChain )
@@ -641,7 +641,7 @@ LockDevice9_GetSwapChain( struct NineDevice9 *This,
return r;
}
-static UINT WINAPI
+static UINT NINE_WINAPI
LockDevice9_GetNumberOfSwapChains( struct NineDevice9 *This )
{
UINT r;
@@ -651,7 +651,7 @@ LockDevice9_GetNumberOfSwapChains( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_Reset( struct NineDevice9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters )
{
@@ -662,7 +662,7 @@ LockDevice9_Reset( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_Present( struct NineDevice9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -676,7 +676,7 @@ LockDevice9_Present( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetBackBuffer( struct NineDevice9 *This,
UINT iSwapChain,
UINT iBackBuffer,
@@ -690,7 +690,7 @@ LockDevice9_GetBackBuffer( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetRasterStatus( struct NineDevice9 *This,
UINT iSwapChain,
D3DRASTER_STATUS *pRasterStatus )
@@ -702,7 +702,7 @@ LockDevice9_GetRasterStatus( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetDialogBoxMode( struct NineDevice9 *This,
BOOL bEnableDialogs )
{
@@ -713,7 +713,7 @@ LockDevice9_SetDialogBoxMode( struct NineDevice9 *This,
return r;
}
-static void WINAPI
+static void NINE_WINAPI
LockDevice9_SetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
DWORD Flags,
@@ -724,7 +724,7 @@ LockDevice9_SetGammaRamp( struct NineDevice9 *This,
pipe_mutex_unlock(d3dlock_global);
}
-static void WINAPI
+static void NINE_WINAPI
LockDevice9_GetGammaRamp( struct NineDevice9 *This,
UINT iSwapChain,
D3DGAMMARAMP *pRamp )
@@ -734,7 +734,7 @@ LockDevice9_GetGammaRamp( struct NineDevice9 *This,
pipe_mutex_unlock(d3dlock_global);
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -752,7 +752,7 @@ LockDevice9_CreateTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateVolumeTexture( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -771,7 +771,7 @@ LockDevice9_CreateVolumeTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateCubeTexture( struct NineDevice9 *This,
UINT EdgeLength,
UINT Levels,
@@ -788,7 +788,7 @@ LockDevice9_CreateCubeTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateVertexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -804,7 +804,7 @@ LockDevice9_CreateVertexBuffer( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateIndexBuffer( struct NineDevice9 *This,
UINT Length,
DWORD Usage,
@@ -820,7 +820,7 @@ LockDevice9_CreateIndexBuffer( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateRenderTarget( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -838,7 +838,7 @@ LockDevice9_CreateRenderTarget( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -856,7 +856,7 @@ LockDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_UpdateSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
@@ -870,7 +870,7 @@ LockDevice9_UpdateSurface( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_UpdateTexture( struct NineDevice9 *This,
IDirect3DBaseTexture9 *pSourceTexture,
IDirect3DBaseTexture9 *pDestinationTexture )
@@ -882,7 +882,7 @@ LockDevice9_UpdateTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetRenderTargetData( struct NineDevice9 *This,
IDirect3DSurface9 *pRenderTarget,
IDirect3DSurface9 *pDestSurface )
@@ -894,7 +894,7 @@ LockDevice9_GetRenderTargetData( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetFrontBufferData( struct NineDevice9 *This,
UINT iSwapChain,
IDirect3DSurface9 *pDestSurface )
@@ -906,7 +906,7 @@ LockDevice9_GetFrontBufferData( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_StretchRect( struct NineDevice9 *This,
IDirect3DSurface9 *pSourceSurface,
const RECT *pSourceRect,
@@ -921,7 +921,7 @@ LockDevice9_StretchRect( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_ColorFill( struct NineDevice9 *This,
IDirect3DSurface9 *pSurface,
const RECT *pRect,
@@ -934,7 +934,7 @@ LockDevice9_ColorFill( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
UINT Width,
UINT Height,
@@ -950,7 +950,7 @@ LockDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 *pRenderTarget )
@@ -962,7 +962,7 @@ LockDevice9_SetRenderTarget( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetRenderTarget( struct NineDevice9 *This,
DWORD RenderTargetIndex,
IDirect3DSurface9 **ppRenderTarget )
@@ -974,7 +974,7 @@ LockDevice9_GetRenderTarget( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 *pNewZStencil )
{
@@ -985,7 +985,7 @@ LockDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
IDirect3DSurface9 **ppZStencilSurface )
{
@@ -996,7 +996,7 @@ LockDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_BeginScene( struct NineDevice9 *This )
{
HRESULT r;
@@ -1006,7 +1006,7 @@ LockDevice9_BeginScene( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_EndScene( struct NineDevice9 *This )
{
HRESULT r;
@@ -1016,7 +1016,7 @@ LockDevice9_EndScene( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_Clear( struct NineDevice9 *This,
DWORD Count,
const D3DRECT *pRects,
@@ -1032,7 +1032,7 @@ LockDevice9_Clear( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix )
@@ -1044,7 +1044,7 @@ LockDevice9_SetTransform( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
D3DMATRIX *pMatrix )
@@ -1056,7 +1056,7 @@ LockDevice9_GetTransform( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_MultiplyTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix )
@@ -1068,7 +1068,7 @@ LockDevice9_MultiplyTransform( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetViewport( struct NineDevice9 *This,
const D3DVIEWPORT9 *pViewport )
{
@@ -1079,7 +1079,7 @@ LockDevice9_SetViewport( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetViewport( struct NineDevice9 *This,
D3DVIEWPORT9 *pViewport )
{
@@ -1090,7 +1090,7 @@ LockDevice9_GetViewport( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetMaterial( struct NineDevice9 *This,
const D3DMATERIAL9 *pMaterial )
{
@@ -1101,7 +1101,7 @@ LockDevice9_SetMaterial( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetMaterial( struct NineDevice9 *This,
D3DMATERIAL9 *pMaterial )
{
@@ -1112,7 +1112,7 @@ LockDevice9_GetMaterial( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetLight( struct NineDevice9 *This,
DWORD Index,
const D3DLIGHT9 *pLight )
@@ -1124,7 +1124,7 @@ LockDevice9_SetLight( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetLight( struct NineDevice9 *This,
DWORD Index,
D3DLIGHT9 *pLight )
@@ -1136,7 +1136,7 @@ LockDevice9_GetLight( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_LightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL Enable )
@@ -1148,7 +1148,7 @@ LockDevice9_LightEnable( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetLightEnable( struct NineDevice9 *This,
DWORD Index,
BOOL *pEnable )
@@ -1160,7 +1160,7 @@ LockDevice9_GetLightEnable( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetClipPlane( struct NineDevice9 *This,
DWORD Index,
const float *pPlane )
@@ -1172,7 +1172,7 @@ LockDevice9_SetClipPlane( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetClipPlane( struct NineDevice9 *This,
DWORD Index,
float *pPlane )
@@ -1184,7 +1184,7 @@ LockDevice9_GetClipPlane( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD Value )
@@ -1196,7 +1196,7 @@ LockDevice9_SetRenderState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetRenderState( struct NineDevice9 *This,
D3DRENDERSTATETYPE State,
DWORD *pValue )
@@ -1208,7 +1208,7 @@ LockDevice9_GetRenderState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateStateBlock( struct NineDevice9 *This,
D3DSTATEBLOCKTYPE Type,
IDirect3DStateBlock9 **ppSB )
@@ -1220,7 +1220,7 @@ LockDevice9_CreateStateBlock( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_BeginStateBlock( struct NineDevice9 *This )
{
HRESULT r;
@@ -1230,7 +1230,7 @@ LockDevice9_BeginStateBlock( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_EndStateBlock( struct NineDevice9 *This,
IDirect3DStateBlock9 **ppSB )
{
@@ -1241,7 +1241,7 @@ LockDevice9_EndStateBlock( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetClipStatus( struct NineDevice9 *This,
const D3DCLIPSTATUS9 *pClipStatus )
{
@@ -1252,7 +1252,7 @@ LockDevice9_SetClipStatus( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetClipStatus( struct NineDevice9 *This,
D3DCLIPSTATUS9 *pClipStatus )
{
@@ -1263,7 +1263,7 @@ LockDevice9_GetClipStatus( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 **ppTexture )
@@ -1275,7 +1275,7 @@ LockDevice9_GetTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 *pTexture )
@@ -1287,7 +1287,7 @@ LockDevice9_SetTexture( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
@@ -1300,7 +1300,7 @@ LockDevice9_GetTextureStageState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetTextureStageState( struct NineDevice9 *This,
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
@@ -1313,7 +1313,7 @@ LockDevice9_SetTextureStageState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
@@ -1326,7 +1326,7 @@ LockDevice9_GetSamplerState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetSamplerState( struct NineDevice9 *This,
DWORD Sampler,
D3DSAMPLERSTATETYPE Type,
@@ -1339,7 +1339,7 @@ LockDevice9_SetSamplerState( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_ValidateDevice( struct NineDevice9 *This,
DWORD *pNumPasses )
{
@@ -1350,7 +1350,7 @@ LockDevice9_ValidateDevice( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
const PALETTEENTRY *pEntries )
@@ -1362,7 +1362,7 @@ LockDevice9_SetPaletteEntries( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetPaletteEntries( struct NineDevice9 *This,
UINT PaletteNumber,
PALETTEENTRY *pEntries )
@@ -1374,7 +1374,7 @@ LockDevice9_GetPaletteEntries( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
UINT PaletteNumber )
{
@@ -1385,7 +1385,7 @@ LockDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
UINT *PaletteNumber )
{
@@ -1396,7 +1396,7 @@ LockDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetScissorRect( struct NineDevice9 *This,
const RECT *pRect )
{
@@ -1407,7 +1407,7 @@ LockDevice9_SetScissorRect( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetScissorRect( struct NineDevice9 *This,
RECT *pRect )
{
@@ -1418,7 +1418,7 @@ LockDevice9_GetScissorRect( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
BOOL bSoftware )
{
@@ -1429,7 +1429,7 @@ LockDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
return r;
}
-static BOOL WINAPI
+static BOOL NINE_WINAPI
LockDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This )
{
BOOL r;
@@ -1439,7 +1439,7 @@ LockDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetNPatchMode( struct NineDevice9 *This,
float nSegments )
{
@@ -1450,7 +1450,7 @@ LockDevice9_SetNPatchMode( struct NineDevice9 *This,
return r;
}
-static float WINAPI
+static float NINE_WINAPI
LockDevice9_GetNPatchMode( struct NineDevice9 *This )
{
float r;
@@ -1460,7 +1460,7 @@ LockDevice9_GetNPatchMode( struct NineDevice9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
@@ -1473,7 +1473,7 @@ LockDevice9_DrawPrimitive( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
INT BaseVertexIndex,
@@ -1489,7 +1489,7 @@ LockDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT PrimitiveCount,
@@ -1503,7 +1503,7 @@ LockDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
D3DPRIMITIVETYPE PrimitiveType,
UINT MinVertexIndex,
@@ -1521,7 +1521,7 @@ LockDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_ProcessVertices( struct NineDevice9 *This,
UINT SrcStartIndex,
UINT DestIndex,
@@ -1537,7 +1537,7 @@ LockDevice9_ProcessVertices( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
const D3DVERTEXELEMENT9 *pVertexElements,
IDirect3DVertexDeclaration9 **ppDecl )
@@ -1549,7 +1549,7 @@ LockDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 *pDecl )
{
@@ -1560,7 +1560,7 @@ LockDevice9_SetVertexDeclaration( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetVertexDeclaration( struct NineDevice9 *This,
IDirect3DVertexDeclaration9 **ppDecl )
{
@@ -1571,7 +1571,7 @@ LockDevice9_GetVertexDeclaration( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetFVF( struct NineDevice9 *This,
DWORD FVF )
{
@@ -1582,7 +1582,7 @@ LockDevice9_SetFVF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetFVF( struct NineDevice9 *This,
DWORD *pFVF )
{
@@ -1593,7 +1593,7 @@ LockDevice9_GetFVF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateVertexShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DVertexShader9 **ppShader )
@@ -1605,7 +1605,7 @@ LockDevice9_CreateVertexShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 *pShader )
{
@@ -1616,7 +1616,7 @@ LockDevice9_SetVertexShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetVertexShader( struct NineDevice9 *This,
IDirect3DVertexShader9 **ppShader )
{
@@ -1627,7 +1627,7 @@ LockDevice9_GetVertexShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
@@ -1640,7 +1640,7 @@ LockDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
@@ -1653,7 +1653,7 @@ LockDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
@@ -1666,7 +1666,7 @@ LockDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
@@ -1679,7 +1679,7 @@ LockDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
@@ -1692,7 +1692,7 @@ LockDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
@@ -1705,7 +1705,7 @@ LockDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 *pStreamData,
@@ -1719,7 +1719,7 @@ LockDevice9_SetStreamSource( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetStreamSource( struct NineDevice9 *This,
UINT StreamNumber,
IDirect3DVertexBuffer9 **ppStreamData,
@@ -1733,7 +1733,7 @@ LockDevice9_GetStreamSource( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT Setting )
@@ -1745,7 +1745,7 @@ LockDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
UINT StreamNumber,
UINT *pSetting )
@@ -1757,7 +1757,7 @@ LockDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 *pIndexData )
{
@@ -1768,7 +1768,7 @@ LockDevice9_SetIndices( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetIndices( struct NineDevice9 *This,
IDirect3DIndexBuffer9 **ppIndexData )
{
@@ -1779,7 +1779,7 @@ LockDevice9_GetIndices( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreatePixelShader( struct NineDevice9 *This,
const DWORD *pFunction,
IDirect3DPixelShader9 **ppShader )
@@ -1791,7 +1791,7 @@ LockDevice9_CreatePixelShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 *pShader )
{
@@ -1802,7 +1802,7 @@ LockDevice9_SetPixelShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetPixelShader( struct NineDevice9 *This,
IDirect3DPixelShader9 **ppShader )
{
@@ -1813,7 +1813,7 @@ LockDevice9_GetPixelShader( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
const float *pConstantData,
@@ -1826,7 +1826,7 @@ LockDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
UINT StartRegister,
float *pConstantData,
@@ -1839,7 +1839,7 @@ LockDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
const int *pConstantData,
@@ -1852,7 +1852,7 @@ LockDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
UINT StartRegister,
int *pConstantData,
@@ -1865,7 +1865,7 @@ LockDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
const BOOL *pConstantData,
@@ -1878,7 +1878,7 @@ LockDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
UINT StartRegister,
BOOL *pConstantData,
@@ -1891,7 +1891,7 @@ LockDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawRectPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
@@ -1904,7 +1904,7 @@ LockDevice9_DrawRectPatch( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DrawTriPatch( struct NineDevice9 *This,
UINT Handle,
const float *pNumSegs,
@@ -1917,7 +1917,7 @@ LockDevice9_DrawTriPatch( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_DeletePatch( struct NineDevice9 *This,
UINT Handle )
{
@@ -1928,7 +1928,7 @@ LockDevice9_DeletePatch( struct NineDevice9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9_CreateQuery( struct NineDevice9 *This,
D3DQUERYTYPE Type,
IDirect3DQuery9 **ppQuery )
@@ -2062,7 +2062,7 @@ IDirect3DDevice9Vtbl LockDevice9_vtable = {
(void *)LockDevice9_CreateQuery
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
UINT width,
UINT height,
@@ -2076,7 +2076,7 @@ LockDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
IDirect3DSurface9 *pSrc,
IDirect3DSurface9 *pDst,
@@ -2094,7 +2094,7 @@ LockDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_PresentEx( struct NineDevice9Ex *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -2109,7 +2109,7 @@ LockDevice9Ex_PresentEx( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
INT *pPriority )
{
@@ -2120,7 +2120,7 @@ LockDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
INT Priority )
{
@@ -2131,7 +2131,7 @@ LockDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
UINT iSwapChain )
{
@@ -2142,7 +2142,7 @@ LockDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
IDirect3DResource9 **pResourceArray,
UINT32 NumResources )
@@ -2154,7 +2154,7 @@ LockDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT MaxLatency )
{
@@ -2165,7 +2165,7 @@ LockDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
UINT *pMaxLatency )
{
@@ -2176,7 +2176,7 @@ LockDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
HWND hDestinationWindow )
{
@@ -2187,7 +2187,7 @@ LockDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -2206,7 +2206,7 @@ LockDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -2223,7 +2223,7 @@ LockDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
UINT Width,
UINT Height,
@@ -2242,7 +2242,7 @@ LockDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_ResetEx( struct NineDevice9Ex *This,
D3DPRESENT_PARAMETERS *pPresentationParameters,
D3DDISPLAYMODEEX *pFullscreenDisplayMode )
@@ -2254,7 +2254,7 @@ LockDevice9Ex_ResetEx( struct NineDevice9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
UINT iSwapChain,
D3DDISPLAYMODEEX *pMode,
@@ -2404,7 +2404,7 @@ IDirect3DDevice9ExVtbl LockDevice9Ex_vtable = {
(void *)LockDevice9Ex_GetDisplayModeEx
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
@@ -2417,7 +2417,7 @@ LockDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This,
D3DAUTHENTICATEDCHANNELTYPE ChannelType,
IDirect3DAuthenticatedChannel9 **ppAuthenticatedChannel,
@@ -2430,7 +2430,7 @@ LockDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockDevice9Video_CreateCryptoSession( struct NineDevice9Video *This,
const GUID *pCryptoType,
const GUID *pDecodeProfile,
@@ -2453,7 +2453,7 @@ IDirect3DDevice9VideoVtbl LockDevice9Video_vtable = {
(void *)LockDevice9Video_CreateCryptoSession
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockIndexBuffer9_Lock( struct NineIndexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
@@ -2467,7 +2467,7 @@ LockIndexBuffer9_Lock( struct NineIndexBuffer9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockIndexBuffer9_Unlock( struct NineIndexBuffer9 *This )
{
HRESULT r;
@@ -2478,7 +2478,7 @@ LockIndexBuffer9_Unlock( struct NineIndexBuffer9 *This )
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockIndexBuffer9_GetDesc( struct NineIndexBuffer9 *This,
D3DINDEXBUFFER_DESC *pDesc )
{
@@ -2508,7 +2508,7 @@ IDirect3DIndexBuffer9Vtbl LockIndexBuffer9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockPixelShader9_GetDevice( struct NinePixelShader9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -2520,7 +2520,7 @@ LockPixelShader9_GetDevice( struct NinePixelShader9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockPixelShader9_GetFunction( struct NinePixelShader9 *This,
void *pData,
UINT *pSizeOfData )
@@ -2541,7 +2541,7 @@ IDirect3DPixelShader9Vtbl LockPixelShader9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockQuery9_GetDevice( struct NineQuery9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -2554,7 +2554,7 @@ LockQuery9_GetDevice( struct NineQuery9 *This,
#endif
#if 0
-static D3DQUERYTYPE WINAPI
+static D3DQUERYTYPE NINE_WINAPI
LockQuery9_GetType( struct NineQuery9 *This )
{
D3DQUERYTYPE r;
@@ -2566,7 +2566,7 @@ LockQuery9_GetType( struct NineQuery9 *This )
#endif
#if 0
-static DWORD WINAPI
+static DWORD NINE_WINAPI
LockQuery9_GetDataSize( struct NineQuery9 *This )
{
DWORD r;
@@ -2577,7 +2577,7 @@ LockQuery9_GetDataSize( struct NineQuery9 *This )
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockQuery9_Issue( struct NineQuery9 *This,
DWORD dwIssueFlags )
{
@@ -2588,7 +2588,7 @@ LockQuery9_Issue( struct NineQuery9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockQuery9_GetData( struct NineQuery9 *This,
void *pData,
DWORD dwSize,
@@ -2613,7 +2613,7 @@ IDirect3DQuery9Vtbl LockQuery9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockStateBlock9_GetDevice( struct NineStateBlock9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -2625,7 +2625,7 @@ LockStateBlock9_GetDevice( struct NineStateBlock9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockStateBlock9_Capture( struct NineStateBlock9 *This )
{
HRESULT r;
@@ -2635,7 +2635,7 @@ LockStateBlock9_Capture( struct NineStateBlock9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockStateBlock9_Apply( struct NineStateBlock9 *This )
{
HRESULT r;
@@ -2654,7 +2654,7 @@ IDirect3DStateBlock9Vtbl LockStateBlock9_vtable = {
(void *)LockStateBlock9_Apply
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_GetContainer( struct NineSurface9 *This,
REFIID riid,
void **ppContainer )
@@ -2667,7 +2667,7 @@ LockSurface9_GetContainer( struct NineSurface9 *This,
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_GetDesc( struct NineSurface9 *This,
D3DSURFACE_DESC *pDesc )
{
@@ -2679,7 +2679,7 @@ LockSurface9_GetDesc( struct NineSurface9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_LockRect( struct NineSurface9 *This,
D3DLOCKED_RECT *pLockedRect,
const RECT *pRect,
@@ -2692,7 +2692,7 @@ LockSurface9_LockRect( struct NineSurface9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_UnlockRect( struct NineSurface9 *This )
{
HRESULT r;
@@ -2702,7 +2702,7 @@ LockSurface9_UnlockRect( struct NineSurface9 *This )
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_GetDC( struct NineSurface9 *This,
HDC *phdc )
{
@@ -2713,7 +2713,7 @@ LockSurface9_GetDC( struct NineSurface9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSurface9_ReleaseDC( struct NineSurface9 *This,
HDC hdc )
{
@@ -2744,7 +2744,7 @@ IDirect3DSurface9Vtbl LockSurface9_vtable = {
(void *)LockSurface9_ReleaseDC
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_Present( struct NineSwapChain9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -2759,7 +2759,7 @@ LockSwapChain9_Present( struct NineSwapChain9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This,
IDirect3DSurface9 *pDestSurface )
{
@@ -2770,7 +2770,7 @@ LockSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetBackBuffer( struct NineSwapChain9 *This,
UINT iBackBuffer,
D3DBACKBUFFER_TYPE Type,
@@ -2783,7 +2783,7 @@ LockSwapChain9_GetBackBuffer( struct NineSwapChain9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetRasterStatus( struct NineSwapChain9 *This,
D3DRASTER_STATUS *pRasterStatus )
{
@@ -2794,7 +2794,7 @@ LockSwapChain9_GetRasterStatus( struct NineSwapChain9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetDisplayMode( struct NineSwapChain9 *This,
D3DDISPLAYMODE *pMode )
{
@@ -2806,7 +2806,7 @@ LockSwapChain9_GetDisplayMode( struct NineSwapChain9 *This,
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetDevice( struct NineSwapChain9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -2818,7 +2818,7 @@ LockSwapChain9_GetDevice( struct NineSwapChain9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9_GetPresentParameters( struct NineSwapChain9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters )
{
@@ -2842,7 +2842,7 @@ IDirect3DSwapChain9Vtbl LockSwapChain9_vtable = {
(void *)LockSwapChain9_GetPresentParameters
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9Ex_GetLastPresentCount( struct NineSwapChain9Ex *This,
UINT *pLastPresentCount )
{
@@ -2853,7 +2853,7 @@ LockSwapChain9Ex_GetLastPresentCount( struct NineSwapChain9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9Ex_GetPresentStats( struct NineSwapChain9Ex *This,
D3DPRESENTSTATS *pPresentationStatistics )
{
@@ -2864,7 +2864,7 @@ LockSwapChain9Ex_GetPresentStats( struct NineSwapChain9Ex *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockSwapChain9Ex_GetDisplayModeEx( struct NineSwapChain9Ex *This,
D3DDISPLAYMODEEX *pMode,
D3DDISPLAYROTATION *pRotation )
@@ -2893,7 +2893,7 @@ IDirect3DSwapChain9ExVtbl LockSwapChain9Ex_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockTexture9_GetLevelDesc( struct NineTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc )
@@ -2907,7 +2907,7 @@ LockTexture9_GetLevelDesc( struct NineTexture9 *This,
#endif
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockTexture9_GetSurfaceLevel( struct NineTexture9 *This,
UINT Level,
IDirect3DSurface9 **ppSurfaceLevel )
@@ -2920,7 +2920,7 @@ LockTexture9_GetSurfaceLevel( struct NineTexture9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockTexture9_LockRect( struct NineTexture9 *This,
UINT Level,
D3DLOCKED_RECT *pLockedRect,
@@ -2934,7 +2934,7 @@ LockTexture9_LockRect( struct NineTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockTexture9_UnlockRect( struct NineTexture9 *This,
UINT Level )
{
@@ -2945,7 +2945,7 @@ LockTexture9_UnlockRect( struct NineTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockTexture9_AddDirtyRect( struct NineTexture9 *This,
const RECT *pDirtyRect )
{
@@ -2981,7 +2981,7 @@ IDirect3DTexture9Vtbl LockTexture9_vtable = {
(void *)LockTexture9_AddDirtyRect
};
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexBuffer9_Lock( struct NineVertexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
@@ -2995,7 +2995,7 @@ LockVertexBuffer9_Lock( struct NineVertexBuffer9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexBuffer9_Unlock( struct NineVertexBuffer9 *This )
{
HRESULT r;
@@ -3006,7 +3006,7 @@ LockVertexBuffer9_Unlock( struct NineVertexBuffer9 *This )
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexBuffer9_GetDesc( struct NineVertexBuffer9 *This,
D3DVERTEXBUFFER_DESC *pDesc )
{
@@ -3036,7 +3036,7 @@ IDirect3DVertexBuffer9Vtbl LockVertexBuffer9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexDeclaration9_GetDevice( struct NineVertexDeclaration9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -3048,7 +3048,7 @@ LockVertexDeclaration9_GetDevice( struct NineVertexDeclaration9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexDeclaration9_GetDeclaration( struct NineVertexDeclaration9 *This,
D3DVERTEXELEMENT9 *pElement,
UINT *pNumElements )
@@ -3069,7 +3069,7 @@ IDirect3DVertexDeclaration9Vtbl LockVertexDeclaration9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexShader9_GetDevice( struct NineVertexShader9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -3081,7 +3081,7 @@ LockVertexShader9_GetDevice( struct NineVertexShader9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVertexShader9_GetFunction( struct NineVertexShader9 *This,
void *pData,
UINT *pSizeOfData )
@@ -3102,7 +3102,7 @@ IDirect3DVertexShader9Vtbl LockVertexShader9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_GetDevice( struct NineVolume9 *This,
IDirect3DDevice9 **ppDevice )
{
@@ -3114,7 +3114,7 @@ LockVolume9_GetDevice( struct NineVolume9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_SetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
const void *pData,
@@ -3128,7 +3128,7 @@ LockVolume9_SetPrivateData( struct NineVolume9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_GetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
void *pData,
@@ -3141,7 +3141,7 @@ LockVolume9_GetPrivateData( struct NineVolume9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_FreePrivateData( struct NineVolume9 *This,
REFGUID refguid )
{
@@ -3152,7 +3152,7 @@ LockVolume9_FreePrivateData( struct NineVolume9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_GetContainer( struct NineVolume9 *This,
REFIID riid,
void **ppContainer )
@@ -3165,7 +3165,7 @@ LockVolume9_GetContainer( struct NineVolume9 *This,
}
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_GetDesc( struct NineVolume9 *This,
D3DVOLUME_DESC *pDesc )
{
@@ -3177,7 +3177,7 @@ LockVolume9_GetDesc( struct NineVolume9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_LockBox( struct NineVolume9 *This,
D3DLOCKED_BOX *pLockedVolume,
const D3DBOX *pBox,
@@ -3190,7 +3190,7 @@ LockVolume9_LockBox( struct NineVolume9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolume9_UnlockBox( struct NineVolume9 *This )
{
HRESULT r;
@@ -3215,7 +3215,7 @@ IDirect3DVolume9Vtbl LockVolume9_vtable = {
};
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
UINT Level,
D3DVOLUME_DESC *pDesc )
@@ -3229,7 +3229,7 @@ LockVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
#endif
#if 0
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
UINT Level,
IDirect3DVolume9 **ppVolumeLevel )
@@ -3242,7 +3242,7 @@ LockVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
}
#endif
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
UINT Level,
D3DLOCKED_BOX *pLockedVolume,
@@ -3256,7 +3256,7 @@ LockVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
UINT Level )
{
@@ -3267,7 +3267,7 @@ LockVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
return r;
}
-static HRESULT WINAPI
+static HRESULT NINE_WINAPI
LockVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
const D3DBOX *pDirtyBox )
{
diff --git a/src/gallium/state_trackers/nine/nine_pipe.h b/src/gallium/state_trackers/nine/nine_pipe.h
index 86117866ed5..1ffce7dc1d7 100644
--- a/src/gallium/state_trackers/nine/nine_pipe.h
+++ b/src/gallium/state_trackers/nine/nine_pipe.h
@@ -324,7 +324,8 @@ d3d9_to_pipe_format_checked(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
unsigned bindings,
- boolean srgb)
+ boolean srgb,
+ boolean bypass_check)
{
enum pipe_format result;
@@ -335,7 +336,10 @@ d3d9_to_pipe_format_checked(struct pipe_screen *screen,
if (srgb)
result = util_format_srgb(result);
- if (format_check_internal(result))
+ /* bypass_check: Used for D3DPOOL_SCRATCH, which
+ * isn't limited to the formats supported by the
+ * device. */
+ if (bypass_check || format_check_internal(result))
return result;
/* fallback to another format for formats
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 6f94e378984..f8af969f283 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -23,6 +23,7 @@
#include "device9.h"
#include "basetexture9.h"
+#include "buffer9.h"
#include "indexbuffer9.h"
#include "surface9.h"
#include "vertexdeclaration9.h"
@@ -935,6 +936,16 @@ validate_textures(struct NineDevice9 *device)
}
}
+static void
+update_managed_buffers(struct NineDevice9 *device)
+{
+ struct NineBuffer9 *buf, *ptr;
+ LIST_FOR_EACH_ENTRY_SAFE(buf, ptr, &device->update_buffers, managed.list) {
+ list_delinit(&buf->managed.list);
+ NineBuffer9_Upload(buf);
+ }
+}
+
void
nine_update_state_framebuffer_clear(struct NineDevice9 *device)
{
@@ -962,6 +973,7 @@ nine_update_state(struct NineDevice9 *device)
* may be dirty anyway, even if no texture bindings changed.
*/
validate_textures(device); /* may clobber state */
+ update_managed_buffers(device);
/* ff_update may change VS/PS dirty bits */
if (unlikely(!state->programmable_vs || !state->ps))
diff --git a/src/gallium/state_trackers/nine/nineexoverlayextension.c b/src/gallium/state_trackers/nine/nineexoverlayextension.c
index 2253f8d9789..6a4f287e9a3 100644
--- a/src/gallium/state_trackers/nine/nineexoverlayextension.c
+++ b/src/gallium/state_trackers/nine/nineexoverlayextension.c
@@ -24,7 +24,7 @@
#define DBG_CHANNEL DBG_OVERLAYEXTENSION
-HRESULT WINAPI
+HRESULT NINE_WINAPI
Nine9ExOverlayExtension_CheckDeviceOverlayType( struct Nine9ExOverlayExtension *This,
UINT Adapter,
D3DDEVTYPE DevType,
diff --git a/src/gallium/state_trackers/nine/nineexoverlayextension.h b/src/gallium/state_trackers/nine/nineexoverlayextension.h
index 1616ed0532c..f528f1d3ca9 100644
--- a/src/gallium/state_trackers/nine/nineexoverlayextension.h
+++ b/src/gallium/state_trackers/nine/nineexoverlayextension.h
@@ -35,7 +35,7 @@ Nine9ExOverlayExtension( void *data )
return (struct Nine9ExOverlayExtension *)data;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
Nine9ExOverlayExtension_CheckDeviceOverlayType( struct Nine9ExOverlayExtension *This,
UINT Adapter,
D3DDEVTYPE DevType,
diff --git a/src/gallium/state_trackers/nine/pixelshader9.c b/src/gallium/state_trackers/nine/pixelshader9.c
index 00be67f8955..541919c130c 100644
--- a/src/gallium/state_trackers/nine/pixelshader9.c
+++ b/src/gallium/state_trackers/nine/pixelshader9.c
@@ -116,7 +116,7 @@ NinePixelShader9_dtor( struct NinePixelShader9 *This )
NineUnknown_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NinePixelShader9_GetFunction( struct NinePixelShader9 *This,
void *pData,
UINT *pSizeOfData )
diff --git a/src/gallium/state_trackers/nine/pixelshader9.h b/src/gallium/state_trackers/nine/pixelshader9.h
index 6b431813a81..1fef1c47dd1 100644
--- a/src/gallium/state_trackers/nine/pixelshader9.h
+++ b/src/gallium/state_trackers/nine/pixelshader9.h
@@ -126,7 +126,7 @@ NinePixelShader9_ctor( struct NinePixelShader9 *,
void
NinePixelShader9_dtor( struct NinePixelShader9 * );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NinePixelShader9_GetFunction( struct NinePixelShader9 *This,
void *pData,
UINT *pSizeOfData );
diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c
index 3afa9007f61..39ac831ba77 100644
--- a/src/gallium/state_trackers/nine/query9.c
+++ b/src/gallium/state_trackers/nine/query9.c
@@ -143,19 +143,19 @@ NineQuery9_dtor( struct NineQuery9 *This )
NineUnknown_dtor(&This->base);
}
-D3DQUERYTYPE WINAPI
+D3DQUERYTYPE NINE_WINAPI
NineQuery9_GetType( struct NineQuery9 *This )
{
return This->type;
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineQuery9_GetDataSize( struct NineQuery9 *This )
{
return This->result_size;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineQuery9_Issue( struct NineQuery9 *This,
DWORD dwIssueFlags )
{
@@ -197,7 +197,7 @@ union nine_query_result
UINT64 u64;
};
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineQuery9_GetData( struct NineQuery9 *This,
void *pData,
DWORD dwSize,
diff --git a/src/gallium/state_trackers/nine/query9.h b/src/gallium/state_trackers/nine/query9.h
index 9cc1e317055..6397a4c0f6c 100644
--- a/src/gallium/state_trackers/nine/query9.h
+++ b/src/gallium/state_trackers/nine/query9.h
@@ -63,17 +63,17 @@ NineQuery9_ctor( struct NineQuery9 *,
void
NineQuery9_dtor( struct NineQuery9 * );
-D3DQUERYTYPE WINAPI
+D3DQUERYTYPE NINE_WINAPI
NineQuery9_GetType( struct NineQuery9 *This );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineQuery9_GetDataSize( struct NineQuery9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineQuery9_Issue( struct NineQuery9 *This,
DWORD dwIssueFlags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineQuery9_GetData( struct NineQuery9 *This,
void *pData,
DWORD dwSize,
diff --git a/src/gallium/state_trackers/nine/resource9.c b/src/gallium/state_trackers/nine/resource9.c
index b929c50a83c..d01c2225520 100644
--- a/src/gallium/state_trackers/nine/resource9.c
+++ b/src/gallium/state_trackers/nine/resource9.c
@@ -138,7 +138,7 @@ NineResource9_GetPool( struct NineResource9 *This )
return This->pool;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_SetPrivateData( struct NineResource9 *This,
REFGUID refguid,
const void *pData,
@@ -187,7 +187,7 @@ NineResource9_SetPrivateData( struct NineResource9 *This,
return D3DERR_DRIVERINTERNALERROR;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_GetPrivateData( struct NineResource9 *This,
REFGUID refguid,
void *pData,
@@ -220,7 +220,7 @@ NineResource9_GetPrivateData( struct NineResource9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_FreePrivateData( struct NineResource9 *This,
REFGUID refguid )
{
@@ -239,7 +239,7 @@ NineResource9_FreePrivateData( struct NineResource9 *This,
return D3D_OK;
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineResource9_SetPriority( struct NineResource9 *This,
DWORD PriorityNew )
{
@@ -254,7 +254,7 @@ NineResource9_SetPriority( struct NineResource9 *This,
return prev;
}
-DWORD WINAPI
+DWORD NINE_WINAPI
NineResource9_GetPriority( struct NineResource9 *This )
{
if (This->pool != D3DPOOL_MANAGED || This->type == D3DRTYPE_SURFACE)
@@ -264,7 +264,7 @@ NineResource9_GetPriority( struct NineResource9 *This )
}
/* NOTE: Don't forget to adjust locked vtable if you change this ! */
-void WINAPI
+void NINE_WINAPI
NineResource9_PreLoad( struct NineResource9 *This )
{
if (This->pool != D3DPOOL_MANAGED)
@@ -275,7 +275,7 @@ NineResource9_PreLoad( struct NineResource9 *This )
*/
}
-D3DRESOURCETYPE WINAPI
+D3DRESOURCETYPE NINE_WINAPI
NineResource9_GetType( struct NineResource9 *This )
{
return This->type;
diff --git a/src/gallium/state_trackers/nine/resource9.h b/src/gallium/state_trackers/nine/resource9.h
index 8122257b7a7..24a241c00cd 100644
--- a/src/gallium/state_trackers/nine/resource9.h
+++ b/src/gallium/state_trackers/nine/resource9.h
@@ -76,34 +76,34 @@ NineResource9_GetPool( struct NineResource9 *This );
/*** Direct3D public methods ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_SetPrivateData( struct NineResource9 *This,
REFGUID refguid,
const void *pData,
DWORD SizeOfData,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_GetPrivateData( struct NineResource9 *This,
REFGUID refguid,
void *pData,
DWORD *pSizeOfData );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineResource9_FreePrivateData( struct NineResource9 *This,
REFGUID refguid );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineResource9_SetPriority( struct NineResource9 *This,
DWORD PriorityNew );
-DWORD WINAPI
+DWORD NINE_WINAPI
NineResource9_GetPriority( struct NineResource9 *This );
-void WINAPI
+void NINE_WINAPI
NineResource9_PreLoad( struct NineResource9 *This );
-D3DRESOURCETYPE WINAPI
+D3DRESOURCETYPE NINE_WINAPI
NineResource9_GetType( struct NineResource9 *This );
#endif /* _NINE_RESOURCE9_H_ */
diff --git a/src/gallium/state_trackers/nine/stateblock9.c b/src/gallium/state_trackers/nine/stateblock9.c
index 0d1a04b657a..cc368b7f725 100644
--- a/src/gallium/state_trackers/nine/stateblock9.c
+++ b/src/gallium/state_trackers/nine/stateblock9.c
@@ -86,7 +86,7 @@ NineStateBlock9_dtor( struct NineStateBlock9 *This )
*/
static void
nine_state_copy_common(struct nine_state *dst,
- const struct nine_state *src,
+ struct nine_state *src,
struct nine_state *mask, /* aliases either src or dst */
const boolean apply,
struct nine_range_pool *pool)
@@ -267,17 +267,41 @@ nine_state_copy_common(struct nine_state *dst,
}
}
if (mask->changed.group & NINE_STATE_FF_LIGHTING) {
- if (dst->ff.num_lights < mask->ff.num_lights) {
+ unsigned num_lights = MAX2(dst->ff.num_lights, src->ff.num_lights);
+ /* Can happen in Capture() if device state has created new lights after
+ * the stateblock was created.
+ * Can happen in Apply() if the stateblock had recorded the creation of
+ * new lights. */
+ if (dst->ff.num_lights < num_lights) {
dst->ff.light = REALLOC(dst->ff.light,
dst->ff.num_lights * sizeof(D3DLIGHT9),
- mask->ff.num_lights * sizeof(D3DLIGHT9));
- for (i = dst->ff.num_lights; i < mask->ff.num_lights; ++i) {
- memset(&dst->ff.light[i], 0, sizeof(D3DLIGHT9));
- dst->ff.light[i].Type = (D3DLIGHTTYPE)NINED3DLIGHT_INVALID;
+ num_lights * sizeof(D3DLIGHT9));
+ memset(&dst->ff.light[dst->ff.num_lights], 0, (num_lights - dst->ff.num_lights) * sizeof(D3DLIGHT9));
+ /* if mask == dst, a Type of 0 will trigger
+ * "dst->ff.light[i] = src->ff.light[i];" later,
+ * which is what we want in that case. */
+ if (mask != dst) {
+ for (i = src->ff.num_lights; i < num_lights; ++i)
+ src->ff.light[i].Type = (D3DLIGHTTYPE)NINED3DLIGHT_INVALID;
}
- dst->ff.num_lights = mask->ff.num_lights;
+ dst->ff.num_lights = num_lights;
}
- for (i = 0; i < mask->ff.num_lights; ++i)
+ /* Can happen in Capture() if the stateblock had recorded the creation of
+ * new lights.
+ * Can happen in Apply() if device state has created new lights after
+ * the stateblock was created. */
+ if (src->ff.num_lights < num_lights) {
+ src->ff.light = REALLOC(src->ff.light,
+ src->ff.num_lights * sizeof(D3DLIGHT9),
+ num_lights * sizeof(D3DLIGHT9));
+ memset(&src->ff.light[src->ff.num_lights], 0, (num_lights - src->ff.num_lights) * sizeof(D3DLIGHT9));
+ for (i = src->ff.num_lights; i < num_lights; ++i)
+ src->ff.light[i].Type = (D3DLIGHTTYPE)NINED3DLIGHT_INVALID;
+ src->ff.num_lights = num_lights;
+ }
+ /* Note: mask is either src or dst, so at this point src, dst and mask
+ * have num_lights lights. */
+ for (i = 0; i < num_lights; ++i)
if (mask->ff.light[i].Type != NINED3DLIGHT_INVALID)
dst->ff.light[i] = src->ff.light[i];
@@ -446,7 +470,7 @@ nine_state_copy_common_all(struct nine_state *dst,
/* Capture those bits of current device state that have been changed between
* BeginStateBlock and EndStateBlock.
*/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineStateBlock9_Capture( struct NineStateBlock9 *This )
{
struct nine_state *dst = &This->state;
@@ -476,7 +500,7 @@ NineStateBlock9_Capture( struct NineStateBlock9 *This )
}
/* Set state managed by this StateBlock as current device state. */
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineStateBlock9_Apply( struct NineStateBlock9 *This )
{
struct nine_state *dst = &This->base.device->state;
diff --git a/src/gallium/state_trackers/nine/stateblock9.h b/src/gallium/state_trackers/nine/stateblock9.h
index a580c6a2302..ffcc2d99a53 100644
--- a/src/gallium/state_trackers/nine/stateblock9.h
+++ b/src/gallium/state_trackers/nine/stateblock9.h
@@ -62,10 +62,10 @@ NineStateBlock9_ctor( struct NineStateBlock9 *,
void
NineStateBlock9_dtor( struct NineStateBlock9 * );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineStateBlock9_Capture( struct NineStateBlock9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineStateBlock9_Apply( struct NineStateBlock9 *This );
#endif /* _NINE_STATEBLOCK9_H_ */
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index f88b75c3dd7..4c4234bfe27 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -97,7 +97,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
This->base.info.target,
This->base.info.nr_samples,
This->base.info.bind,
- FALSE);
+ FALSE,
+ pDesc->Pool == D3DPOOL_SCRATCH);
if (pDesc->Usage & D3DUSAGE_RENDERTARGET)
This->base.info.bind |= PIPE_BIND_RENDER_TARGET;
@@ -116,13 +117,10 @@ NineSurface9_ctor( struct NineSurface9 *This,
return E_OUTOFMEMORY;
}
- if (pDesc->Pool == D3DPOOL_SYSTEMMEM) {
- This->base.info.usage = PIPE_USAGE_STAGING;
- assert(!pResource);
- } else {
- if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
- pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
- }
+ assert(pDesc->Pool != D3DPOOL_SYSTEMMEM || !pResource);
+
+ if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
+ pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
hr = NineResource9_ctor(&This->base, pParams, pResource, FALSE, D3DRTYPE_SURFACE,
pDesc->Pool, pDesc->Usage);
@@ -227,7 +225,7 @@ NineSurface9_Dump( struct NineSurface9 *This )
}
#endif /* DEBUG */
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetContainer( struct NineSurface9 *This,
REFIID riid,
void **ppContainer )
@@ -260,7 +258,7 @@ NineSurface9_MarkContainerDirty( struct NineSurface9 *This )
}
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetDesc( struct NineSurface9 *This,
D3DSURFACE_DESC *pDesc )
{
@@ -315,7 +313,7 @@ NineSurface9_GetSystemMemPointer(struct NineSurface9 *This, int x, int y)
return This->data + (y * This->stride + x_offset);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_LockRect( struct NineSurface9 *This,
D3DLOCKED_RECT *pLockedRect,
const RECT *pRect,
@@ -426,7 +424,7 @@ NineSurface9_LockRect( struct NineSurface9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_UnlockRect( struct NineSurface9 *This )
{
DBG("This=%p lock_count=%u\n", This, This->lock_count);
@@ -439,14 +437,14 @@ NineSurface9_UnlockRect( struct NineSurface9 *This )
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetDC( struct NineSurface9 *This,
HDC *phdc )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_ReleaseDC( struct NineSurface9 *This,
HDC hdc )
{
diff --git a/src/gallium/state_trackers/nine/surface9.h b/src/gallium/state_trackers/nine/surface9.h
index 76156ae699c..7e8f2d35267 100644
--- a/src/gallium/state_trackers/nine/surface9.h
+++ b/src/gallium/state_trackers/nine/surface9.h
@@ -151,29 +151,29 @@ NineSurface9_Dump( struct NineSurface9 *This ) { }
/*** Direct3D public ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetContainer( struct NineSurface9 *This,
REFIID riid,
void **ppContainer );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetDesc( struct NineSurface9 *This,
D3DSURFACE_DESC *pDesc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_LockRect( struct NineSurface9 *This,
D3DLOCKED_RECT *pLockedRect,
const RECT *pRect,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_UnlockRect( struct NineSurface9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_GetDC( struct NineSurface9 *This,
HDC *phdc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSurface9_ReleaseDC( struct NineSurface9 *This,
HDC hdc );
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index 82d4173fbb2..1ab339c459c 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -202,7 +202,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
pf = d3d9_to_pipe_format_checked(This->screen, pParams->BackBufferFormat,
PIPE_TEXTURE_2D, pParams->MultiSampleType,
- PIPE_BIND_RENDER_TARGET, FALSE);
+ PIPE_BIND_RENDER_TARGET, FALSE, FALSE);
if (This->actx->linear_framebuffer ||
(pf != PIPE_FORMAT_B8G8R8X8_UNORM &&
@@ -304,7 +304,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
pParams->BackBufferFormat,
PIPE_TEXTURE_2D,
tmplt.nr_samples,
- tmplt.bind, FALSE);
+ tmplt.bind, FALSE, FALSE);
if (tmplt.format == PIPE_FORMAT_NONE)
return D3DERR_INVALIDCALL;
resource = This->screen->resource_create(This->screen, &tmplt);
@@ -360,7 +360,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
PIPE_TEXTURE_2D,
tmplt.nr_samples,
tmplt.bind,
- FALSE);
+ FALSE, FALSE);
if (tmplt.format == PIPE_FORMAT_NONE) {
tmplt.bind &= ~PIPE_BIND_SAMPLER_VIEW;
tmplt.format = d3d9_to_pipe_format_checked(This->screen,
@@ -368,7 +368,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
PIPE_TEXTURE_2D,
tmplt.nr_samples,
tmplt.bind,
- FALSE);
+ FALSE, FALSE);
}
if (tmplt.format == PIPE_FORMAT_NONE)
@@ -764,7 +764,7 @@ bypass_rendering:
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_Present( struct NineSwapChain9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -858,7 +858,7 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This,
IDirect3DSurface9 *pDestSurface )
{
@@ -911,7 +911,7 @@ NineSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetBackBuffer( struct NineSwapChain9 *This,
UINT iBackBuffer,
D3DBACKBUFFER_TYPE Type,
@@ -929,7 +929,7 @@ NineSwapChain9_GetBackBuffer( struct NineSwapChain9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetRasterStatus( struct NineSwapChain9 *This,
D3DRASTER_STATUS *pRasterStatus )
{
@@ -939,7 +939,7 @@ NineSwapChain9_GetRasterStatus( struct NineSwapChain9 *This,
return ID3DPresent_GetRasterStatus(This->present, pRasterStatus);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetDisplayMode( struct NineSwapChain9 *This,
D3DDISPLAYMODE *pMode )
{
@@ -961,7 +961,7 @@ NineSwapChain9_GetDisplayMode( struct NineSwapChain9 *This,
return hr;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetPresentParameters( struct NineSwapChain9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters )
{
diff --git a/src/gallium/state_trackers/nine/swapchain9.h b/src/gallium/state_trackers/nine/swapchain9.h
index 4bd74f7b6ec..7714cd52cdd 100644
--- a/src/gallium/state_trackers/nine/swapchain9.h
+++ b/src/gallium/state_trackers/nine/swapchain9.h
@@ -109,7 +109,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
D3DPRESENT_PARAMETERS *pParams,
D3DDISPLAYMODEEX *mode );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_Present( struct NineSwapChain9 *This,
const RECT *pSourceRect,
const RECT *pDestRect,
@@ -117,25 +117,25 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
const RGNDATA *pDirtyRegion,
DWORD dwFlags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This,
IDirect3DSurface9 *pDestSurface );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetBackBuffer( struct NineSwapChain9 *This,
UINT iBackBuffer,
D3DBACKBUFFER_TYPE Type,
IDirect3DSurface9 **ppBackBuffer );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetRasterStatus( struct NineSwapChain9 *This,
D3DRASTER_STATUS *pRasterStatus );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetDisplayMode( struct NineSwapChain9 *This,
D3DDISPLAYMODE *pMode );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9_GetPresentParameters( struct NineSwapChain9 *This,
D3DPRESENT_PARAMETERS *pPresentationParameters );
diff --git a/src/gallium/state_trackers/nine/swapchain9ex.c b/src/gallium/state_trackers/nine/swapchain9ex.c
index bcf627f4c22..309402cbb7b 100644
--- a/src/gallium/state_trackers/nine/swapchain9ex.c
+++ b/src/gallium/state_trackers/nine/swapchain9ex.c
@@ -51,21 +51,21 @@ NineSwapChain9Ex_dtor( struct NineSwapChain9Ex *This )
NineSwapChain9_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetLastPresentCount( struct NineSwapChain9Ex *This,
UINT *pLastPresentCount )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetPresentStats( struct NineSwapChain9Ex *This,
D3DPRESENTSTATS *pPresentationStatistics )
{
STUB(D3DERR_INVALIDCALL);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetDisplayModeEx( struct NineSwapChain9Ex *This,
D3DDISPLAYMODEEX *pMode,
D3DDISPLAYROTATION *pRotation )
diff --git a/src/gallium/state_trackers/nine/swapchain9ex.h b/src/gallium/state_trackers/nine/swapchain9ex.h
index 075f8835222..a15d9d2c01e 100644
--- a/src/gallium/state_trackers/nine/swapchain9ex.h
+++ b/src/gallium/state_trackers/nine/swapchain9ex.h
@@ -45,15 +45,15 @@ NineSwapChain9Ex_new( struct NineDevice9 *pDevice,
D3DDISPLAYMODEEX *mode,
struct NineSwapChain9Ex **ppOut );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetLastPresentCount( struct NineSwapChain9Ex *This,
UINT *pLastPresentCount );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetPresentStats( struct NineSwapChain9Ex *This,
D3DPRESENTSTATS *pPresentationStatistics );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineSwapChain9Ex_GetDisplayModeEx( struct NineSwapChain9Ex *This,
D3DDISPLAYMODEEX *pMode,
D3DDISPLAYROTATION *pRotation );
diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
index ada08cea90a..3b88e07e976 100644
--- a/src/gallium/state_trackers/nine/texture9.c
+++ b/src/gallium/state_trackers/nine/texture9.c
@@ -48,7 +48,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
{
struct pipe_screen *screen = pParams->device->screen;
struct pipe_resource *info = &This->base.base.info;
- struct pipe_resource *resource;
enum pipe_format pf;
unsigned *level_offsets;
unsigned l;
@@ -61,10 +60,23 @@ NineTexture9_ctor( struct NineTexture9 *This,
nine_D3DUSAGE_to_str(Usage),
d3dformat_to_string(Format), nine_D3DPOOL_to_str(Pool), pSharedHandle);
+ user_assert(Width && Height, D3DERR_INVALIDCALL);
+
+ /* pSharedHandle: can be non-null for ex only.
+ * D3DPOOL_SYSTEMMEM: Levels must be 1
+ * D3DPOOL_DEFAULT: no restriction for Levels
+ * Other Pools are forbidden. */
+ user_assert(!pSharedHandle || pParams->device->ex, D3DERR_INVALIDCALL);
+ user_assert(!pSharedHandle ||
+ (Pool == D3DPOOL_SYSTEMMEM && Levels == 1) ||
+ Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
+
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
- (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+ (Pool != D3DPOOL_SYSTEMMEM && Pool != D3DPOOL_SCRATCH && Levels <= 1),
+ D3DERR_INVALIDCALL);
- /* TODO: implement buffer sharing (should work with cross process too)
+ /* TODO: implement pSharedHandle for D3DPOOL_DEFAULT (cross process
+ * buffer sharing).
*
* Gem names may have fit but they're depreciated and won't work on render-nodes.
* One solution is to use shm buffers. We would use a /dev/shm file, fill the first
@@ -77,9 +89,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
* invalid handle, that we would fail to import. Please note that we don't advertise
* the flag indicating the support for that feature, but apps seem to not care.
*/
- user_assert(!pSharedHandle ||
- Pool == D3DPOOL_SYSTEMMEM ||
- Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
if (pSharedHandle && Pool == D3DPOOL_DEFAULT) {
if (!*pSharedHandle) {
@@ -97,7 +106,9 @@ NineTexture9_ctor( struct NineTexture9 *This,
Levels = 0;
pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, FALSE);
+ PIPE_BIND_SAMPLER_VIEW, FALSE,
+ Pool == D3DPOOL_SCRATCH);
+
if (Format != D3DFMT_NULL && pf == PIPE_FORMAT_NONE)
return D3DERR_INVALIDCALL;
@@ -140,12 +151,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
DBG("Application asked for Software Vertex Processing, "
"but this is unimplemented\n");
- if (pSharedHandle)
- info->bind |= PIPE_BIND_SHARED;
-
- if (Pool == D3DPOOL_SYSTEMMEM)
- info->usage = PIPE_USAGE_STAGING;
-
if (pSharedHandle && *pSharedHandle) { /* Pool == D3DPOOL_SYSTEMMEM */
user_buffer = (void *)*pSharedHandle;
level_offsets = alloca(sizeof(unsigned) * (info->last_level + 1));
@@ -188,11 +193,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
sfdesc.MultiSampleType = D3DMULTISAMPLE_NONE;
sfdesc.MultiSampleQuality = 0;
- if (Pool == D3DPOOL_SYSTEMMEM)
- resource = NULL;
- else
- resource = This->base.base.resource;
-
for (l = 0; l <= info->last_level; ++l) {
sfdesc.Width = u_minify(Width, l);
sfdesc.Height = u_minify(Height, l);
@@ -202,7 +202,7 @@ NineTexture9_ctor( struct NineTexture9 *This,
level_offsets[l] : NULL;
hr = NineSurface9_new(This->base.base.base.device, NineUnknown(This),
- resource, user_buffer_for_level,
+ This->base.base.resource, user_buffer_for_level,
D3DRTYPE_TEXTURE, l, 0,
&sfdesc, &This->surfaces[l]);
if (FAILED(hr))
@@ -240,7 +240,7 @@ NineTexture9_dtor( struct NineTexture9 *This )
NineBaseTexture9_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_GetLevelDesc( struct NineTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc )
@@ -254,7 +254,7 @@ NineTexture9_GetLevelDesc( struct NineTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_GetSurfaceLevel( struct NineTexture9 *This,
UINT Level,
IDirect3DSurface9 **ppSurfaceLevel )
@@ -269,7 +269,7 @@ NineTexture9_GetSurfaceLevel( struct NineTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_LockRect( struct NineTexture9 *This,
UINT Level,
D3DLOCKED_RECT *pLockedRect,
@@ -287,7 +287,7 @@ NineTexture9_LockRect( struct NineTexture9 *This,
pRect, Flags);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_UnlockRect( struct NineTexture9 *This,
UINT Level )
{
@@ -298,7 +298,7 @@ NineTexture9_UnlockRect( struct NineTexture9 *This,
return NineSurface9_UnlockRect(This->surfaces[Level]);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_AddDirtyRect( struct NineTexture9 *This,
const RECT *pDirtyRect )
{
diff --git a/src/gallium/state_trackers/nine/texture9.h b/src/gallium/state_trackers/nine/texture9.h
index 6f80be9ccde..3911f26d468 100644
--- a/src/gallium/state_trackers/nine/texture9.h
+++ b/src/gallium/state_trackers/nine/texture9.h
@@ -48,28 +48,28 @@ NineTexture9_new( struct NineDevice9 *pDevice,
struct NineTexture9 **ppOut,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_GetLevelDesc( struct NineTexture9 *This,
UINT Level,
D3DSURFACE_DESC *pDesc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_GetSurfaceLevel( struct NineTexture9 *This,
UINT Level,
IDirect3DSurface9 **ppSurfaceLevel );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_LockRect( struct NineTexture9 *This,
UINT Level,
D3DLOCKED_RECT *pLockedRect,
const RECT *pRect,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_UnlockRect( struct NineTexture9 *This,
UINT Level );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineTexture9_AddDirtyRect( struct NineTexture9 *This,
const RECT *pDirtyRect );
diff --git a/src/gallium/state_trackers/nine/vertexbuffer9.c b/src/gallium/state_trackers/nine/vertexbuffer9.c
index 10311b428fe..7c00b2d17e2 100644
--- a/src/gallium/state_trackers/nine/vertexbuffer9.c
+++ b/src/gallium/state_trackers/nine/vertexbuffer9.c
@@ -68,7 +68,7 @@ NineVertexBuffer9_GetResource( struct NineVertexBuffer9 *This )
return NineBuffer9_GetResource(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_Lock( struct NineVertexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
@@ -78,13 +78,13 @@ NineVertexBuffer9_Lock( struct NineVertexBuffer9 *This,
return NineBuffer9_Lock(&This->base, OffsetToLock, SizeToLock, ppbData, Flags);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_Unlock( struct NineVertexBuffer9 *This )
{
return NineBuffer9_Unlock(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_GetDesc( struct NineVertexBuffer9 *This,
D3DVERTEXBUFFER_DESC *pDesc )
{
diff --git a/src/gallium/state_trackers/nine/vertexbuffer9.h b/src/gallium/state_trackers/nine/vertexbuffer9.h
index 859402b925b..6caa9bfe326 100644
--- a/src/gallium/state_trackers/nine/vertexbuffer9.h
+++ b/src/gallium/state_trackers/nine/vertexbuffer9.h
@@ -62,17 +62,17 @@ NineVertexBuffer9_GetResource( struct NineVertexBuffer9 *This );
/*** Direct3D public ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_Lock( struct NineVertexBuffer9 *This,
UINT OffsetToLock,
UINT SizeToLock,
void **ppbData,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_Unlock( struct NineVertexBuffer9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexBuffer9_GetDesc( struct NineVertexBuffer9 *This,
D3DVERTEXBUFFER_DESC *pDesc );
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/vertexdeclaration9.c
index 36c594b5be3..e478c102b32 100644
--- a/src/gallium/state_trackers/nine/vertexdeclaration9.c
+++ b/src/gallium/state_trackers/nine/vertexdeclaration9.c
@@ -233,7 +233,7 @@ NineVertexDeclaration9_dtor( struct NineVertexDeclaration9 *This )
NineUnknown_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexDeclaration9_GetDeclaration( struct NineVertexDeclaration9 *This,
D3DVERTEXELEMENT9 *pElement,
UINT *pNumElements )
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.h b/src/gallium/state_trackers/nine/vertexdeclaration9.h
index e39f259440f..9d3b1bdca88 100644
--- a/src/gallium/state_trackers/nine/vertexdeclaration9.h
+++ b/src/gallium/state_trackers/nine/vertexdeclaration9.h
@@ -73,7 +73,7 @@ NineVertexDeclaration9_ctor( struct NineVertexDeclaration9 *This,
void
NineVertexDeclaration9_dtor( struct NineVertexDeclaration9 *This );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexDeclaration9_GetDeclaration( struct NineVertexDeclaration9 *This,
D3DVERTEXELEMENT9 *pElement,
UINT *pNumElements );
diff --git a/src/gallium/state_trackers/nine/vertexshader9.c b/src/gallium/state_trackers/nine/vertexshader9.c
index fdfb79a138e..7978ea8925b 100644
--- a/src/gallium/state_trackers/nine/vertexshader9.c
+++ b/src/gallium/state_trackers/nine/vertexshader9.c
@@ -123,7 +123,7 @@ NineVertexShader9_dtor( struct NineVertexShader9 *This )
NineUnknown_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexShader9_GetFunction( struct NineVertexShader9 *This,
void *pData,
UINT *pSizeOfData )
diff --git a/src/gallium/state_trackers/nine/vertexshader9.h b/src/gallium/state_trackers/nine/vertexshader9.h
index 15c3f4ff041..c89d4a1ee24 100644
--- a/src/gallium/state_trackers/nine/vertexshader9.h
+++ b/src/gallium/state_trackers/nine/vertexshader9.h
@@ -107,7 +107,7 @@ NineVertexShader9_ctor( struct NineVertexShader9 *,
void
NineVertexShader9_dtor( struct NineVertexShader9 * );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVertexShader9_GetFunction( struct NineVertexShader9 *This,
void *pData,
UINT *pSizeOfData );
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c
index f6988923caa..7d54a7ac8cf 100644
--- a/src/gallium/state_trackers/nine/volume9.c
+++ b/src/gallium/state_trackers/nine/volume9.c
@@ -106,7 +106,8 @@ NineVolume9_ctor( struct NineVolume9 *This,
pDesc->Format,
This->info.target,
This->info.nr_samples,
- This->info.bind, FALSE);
+ This->info.bind, FALSE,
+ pDesc->Pool == D3DPOOL_SCRATCH);
if (This->info.format == PIPE_FORMAT_NONE)
return D3DERR_DRIVERINTERNALERROR;
@@ -116,9 +117,6 @@ NineVolume9_ctor( struct NineVolume9 *This,
This->layer_stride = util_format_get_2d_size(This->info.format,
This->stride, pDesc->Height);
- if (pDesc->Pool == D3DPOOL_SYSTEMMEM)
- This->info.usage = PIPE_USAGE_STAGING;
-
if (!This->resource) {
hr = NineVolume9_AllocateData(This);
if (FAILED(hr))
@@ -143,7 +141,7 @@ NineVolume9_dtor( struct NineVolume9 *This )
NineUnknown_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetContainer( struct NineVolume9 *This,
REFIID riid,
void **ppContainer )
@@ -174,7 +172,7 @@ NineVolume9_MarkContainerDirty( struct NineVolume9 *This )
BASETEX_REGISTER_UPDATE(tex);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetDesc( struct NineVolume9 *This,
D3DVOLUME_DESC *pDesc )
{
@@ -214,7 +212,7 @@ NineVolume9_GetSystemMemPointer(struct NineVolume9 *This, int x, int y, int z)
return This->data + (z * This->layer_stride + y * This->stride + x_offset);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_LockBox( struct NineVolume9 *This,
D3DLOCKED_BOX *pLockedVolume,
const D3DBOX *pBox,
@@ -308,7 +306,7 @@ NineVolume9_LockBox( struct NineVolume9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_UnlockBox( struct NineVolume9 *This )
{
DBG("This=%p lock_count=%u\n", This, This->lock_count);
@@ -443,7 +441,7 @@ NineVolume9_new( struct NineDevice9 *pDevice,
/*** The boring stuff. TODO: Unify with Resource. ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_SetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
const void *pData,
@@ -490,7 +488,7 @@ NineVolume9_SetPrivateData( struct NineVolume9 *This,
return D3DERR_DRIVERINTERNALERROR;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
void *pData,
@@ -517,7 +515,7 @@ NineVolume9_GetPrivateData( struct NineVolume9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_FreePrivateData( struct NineVolume9 *This,
REFGUID refguid )
{
diff --git a/src/gallium/state_trackers/nine/volume9.h b/src/gallium/state_trackers/nine/volume9.h
index 26ca8a32605..2eb19a5b9e8 100644
--- a/src/gallium/state_trackers/nine/volume9.h
+++ b/src/gallium/state_trackers/nine/volume9.h
@@ -96,39 +96,39 @@ NineVolume9_UploadSelf( struct NineVolume9 *This,
/*** Direct3D public ***/
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_SetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
const void *pData,
DWORD SizeOfData,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetPrivateData( struct NineVolume9 *This,
REFGUID refguid,
void *pData,
DWORD *pSizeOfData );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_FreePrivateData( struct NineVolume9 *This,
REFGUID refguid );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetContainer( struct NineVolume9 *This,
REFIID riid,
void **ppContainer );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_GetDesc( struct NineVolume9 *This,
D3DVOLUME_DESC *pDesc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_LockBox( struct NineVolume9 *This,
D3DLOCKED_BOX *pLockedVolume,
const D3DBOX *pBox,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolume9_UnlockBox( struct NineVolume9 *This );
#endif /* _NINE_VOLUME9_H_ */
diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c
index e5b2b53148d..e70f3c12337 100644
--- a/src/gallium/state_trackers/nine/volumetexture9.c
+++ b/src/gallium/state_trackers/nine/volumetexture9.c
@@ -48,19 +48,24 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This,
This, pParams, Width, Height, Depth, Levels,
Usage, Format, Pool, pSharedHandle);
+ user_assert(Width && Height && Depth, D3DERR_INVALIDCALL);
+
+ /* user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL); */
+ user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
+
/* An IDirect3DVolume9 cannot be bound as a render target can it ? */
user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)),
D3DERR_INVALIDCALL);
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP), D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
-
pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_3D, 0,
- PIPE_BIND_SAMPLER_VIEW, FALSE);
+ PIPE_BIND_SAMPLER_VIEW, FALSE,
+ Pool == D3DPOOL_SCRATCH);
+
if (pf == PIPE_FORMAT_NONE)
return D3DERR_INVALIDCALL;
- /* We support ATI1 and ATI2 hacks only for 2D textures */
+ /* We support ATI1 and ATI2 hacks only for 2D and Cube textures */
if (Format == D3DFMT_ATI1 || Format == D3DFMT_ATI2)
return D3DERR_INVALIDCALL;
@@ -145,7 +150,7 @@ NineVolumeTexture9_dtor( struct NineVolumeTexture9 *This )
NineBaseTexture9_dtor(&This->base);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
UINT Level,
D3DVOLUME_DESC *pDesc )
@@ -157,7 +162,7 @@ NineVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
UINT Level,
IDirect3DVolume9 **ppVolumeLevel )
@@ -170,7 +175,7 @@ NineVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
return D3D_OK;
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
UINT Level,
D3DLOCKED_BOX *pLockedVolume,
@@ -186,7 +191,7 @@ NineVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
Flags);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
UINT Level )
{
@@ -197,7 +202,7 @@ NineVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
return NineVolume9_UnlockBox(This->volumes[Level]);
}
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
const D3DBOX *pDirtyBox )
{
diff --git a/src/gallium/state_trackers/nine/volumetexture9.h b/src/gallium/state_trackers/nine/volumetexture9.h
index b8f250ad72e..dfe564cfc18 100644
--- a/src/gallium/state_trackers/nine/volumetexture9.h
+++ b/src/gallium/state_trackers/nine/volumetexture9.h
@@ -47,28 +47,28 @@ NineVolumeTexture9_new( struct NineDevice9 *pDevice,
struct NineVolumeTexture9 **ppOut,
HANDLE *pSharedHandle );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This,
UINT Level,
D3DVOLUME_DESC *pDesc );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This,
UINT Level,
IDirect3DVolume9 **ppVolumeLevel );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_LockBox( struct NineVolumeTexture9 *This,
UINT Level,
D3DLOCKED_BOX *pLockedVolume,
const D3DBOX *pBox,
DWORD Flags );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
UINT Level );
-HRESULT WINAPI
+HRESULT NINE_WINAPI
NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
const D3DBOX *pDirtyBox );