Commit 30a3bc26 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Add dynamic locking support to CheckDeviceFormat.

parent 7fd87f10
......@@ -2245,6 +2245,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
/* Always report dynamic locking */
if(Usage & WINED3DUSAGE_DYNAMIC)
UsageCaps |= WINED3DUSAGE_DYNAMIC;
if(Usage & WINED3DUSAGE_RENDERTARGET) {
if(CheckRenderTargetCapability(AdapterFormat, CheckFormat)) {
UsageCaps |= WINED3DUSAGE_RENDERTARGET;
......@@ -2333,6 +2337,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
/* Always report dynamic locking */
if(Usage & WINED3DUSAGE_DYNAMIC)
UsageCaps |= WINED3DUSAGE_DYNAMIC;
if(Usage & WINED3DUSAGE_RENDERTARGET) {
if(CheckRenderTargetCapability(AdapterFormat, CheckFormat)) {
UsageCaps |= WINED3DUSAGE_RENDERTARGET;
......@@ -2386,6 +2394,12 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
}
} else if(RType == WINED3DRTYPE_VOLUMETEXTURE) {
/* Volumetexture allows:
* - D3DUSAGE_DYNAMIC
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_SOFTWAREPROCESSING
*/
/* Check volume texture and volume usage caps */
if(GL_SUPPORT(EXT_TEXTURE3D)) {
if(CheckTextureCapability(Adapter, CheckFormat) == FALSE) {
......@@ -2393,6 +2407,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
}
/* Always report dynamic locking */
if(Usage & WINED3DUSAGE_DYNAMIC)
UsageCaps |= WINED3DUSAGE_DYNAMIC;
/* Check QUERY_FILTER support */
if(Usage & WINED3DUSAGE_QUERY_FILTER) {
if(CheckFilterCapability(CheckFormat)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment