wined3d: Store the VTF format capability in the format table.

This commit is contained in:
Henri Verbeet 2010-04-29 00:09:03 +02:00 committed by Alexandre Julliard
parent be7b01589f
commit c1ea8fb6c7
3 changed files with 4 additions and 25 deletions

View File

@ -3636,30 +3636,8 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter,
static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter,
const struct wined3d_format_desc *format_desc)
{
const struct wined3d_gl_info *gl_info = &adapter->gl_info;
if (!gl_info->limits.vertex_samplers)
{
TRACE_(d3d_caps)("[FAILED]\n");
return FALSE;
}
switch (format_desc->format)
{
case WINED3DFMT_R32G32B32A32_FLOAT:
if (!gl_info->supported[ARB_TEXTURE_FLOAT])
{
TRACE_(d3d_caps)("[FAILED]\n");
return FALSE;
}
TRACE_(d3d_caps)("[OK]\n");
return TRUE;
default:
TRACE_(d3d_caps)("[FAILED]\n");
return FALSE;
}
return FALSE;
return adapter->gl_info.limits.vertex_samplers
&& (format_desc->Flags & WINED3DFMT_FLAG_VTF);
}
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,

View File

@ -619,7 +619,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
ARB_TEXTURE_RG, NULL},
{WINED3DFMT_R32G32B32A32_FLOAT, GL_RGBA32F_ARB, GL_RGBA32F_ARB, 0,
GL_RGBA, GL_FLOAT, 0,
WINED3DFMT_FLAG_RENDERTARGET,
WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_VTF,
ARB_TEXTURE_FLOAT, NULL},
/* Float */
{WINED3DFMT_R16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,

View File

@ -2991,6 +2991,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
#define WINED3DFMT_FLAG_BUMPMAP 0x00000400
#define WINED3DFMT_FLAG_SRGB_READ 0x00000800
#define WINED3DFMT_FLAG_SRGB_WRITE 0x00001000
#define WINED3DFMT_FLAG_VTF 0x00002000
struct wined3d_format_desc
{