[2/2] wined3d: Advertise VTF support
H. Verbeet
hverbeet at gmail.com
Sun Jul 8 15:57:46 CDT 2007
Unfortunately it's not currently possible to detect what formats
support hardware accelerated VTF, but as far as I know GL_RGBA32F_ARB
is supports hardware acceleration on all cards that implement VTF. In
the longer term we should probably figure out a way to detect what
formats are supported for filtering, FBO attachment, VTF, etc. and
store those capabilities in the format table somewhere.
Changelog:
- Advertise VTF support
-------------- next part --------------
---
dlls/wined3d/directx.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 8351b94..ae924c4 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1550,8 +1550,24 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
* See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/IDirect3D9__CheckDeviceFormat.asp
* and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/D3DUSAGE_QUERY.asp */
if (Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) {
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE; /* Enable when fully supported */
+ if (!GL_LIMITS(vertex_samplers)) {
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return WINED3DERR_NOTAVAILABLE;
+ }
+
+ switch (CheckFormat) {
+ case WINED3DFMT_A32B32G32R32F:
+ if (!GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return WINED3DERR_NOTAVAILABLE;
+ }
+ TRACE_(d3d_caps)("[OK]\n");
+ return WINED3D_OK;
+
+ default:
+ TRACE_(d3d_caps)("[FAILED]\n");
+ return WINED3DERR_NOTAVAILABLE;
+ }
}
if(Usage & WINED3DUSAGE_DEPTHSTENCIL) {
More information about the wine-patches
mailing list