Commit d5b68e76 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Make sure all fields of the fragment pipe caps are always initialized.

parent 2661e9ab
......@@ -5332,6 +5332,7 @@ static void arbfp_free(IWineD3DDevice *iface) {
static void arbfp_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
{
caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP;
caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE |
WINED3DTEXOPCAPS_SELECTARG1 |
WINED3DTEXOPCAPS_SELECTARG2 |
......@@ -5362,8 +5363,6 @@ static void arbfp_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
caps->MaxTextureBlendStages = 8;
caps->MaxSimultaneousTextures = min(gl_info->limits.fragment_samplers, 8);
caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_TSSARGTEMP;
}
#undef GLINFO_LOCATION
......
......@@ -1062,6 +1062,7 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) {
static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
{
caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP;
caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE |
WINED3DTEXOPCAPS_SELECTARG1 |
WINED3DTEXOPCAPS_SELECTARG2 |
......@@ -1104,8 +1105,6 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
*/
caps->MaxTextureBlendStages = 8;
caps->MaxSimultaneousTextures = 6;
caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_TSSARGTEMP;
}
static HRESULT atifs_alloc(IWineD3DDevice *iface) {
......
......@@ -7092,7 +7092,6 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device->d3d_pshader_constantF = shader_caps.MaxPixelShaderConst;
device->vs_clipping = shader_caps.VSClipping;
memset(&ffp_caps, 0, sizeof(ffp_caps));
fragment_pipeline = adapter->fragment_pipe;
device->frag_pipe = fragment_pipeline;
fragment_pipeline->get_caps(&adapter->gl_info, &ffp_caps);
......
......@@ -4544,8 +4544,6 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
memset(&shader_caps, 0, sizeof(shader_caps));
adapter->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps);
memset(&fragment_caps, 0, sizeof(fragment_caps));
adapter->fragment_pipe->get_caps(&adapter->gl_info, &fragment_caps);
/* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */
......
......@@ -629,6 +629,15 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) {
static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
{
pCaps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP;
/* The caps below can be supported but aren't handled yet in utils.c
* 'd3dta_to_combiner_input', disable them until support is fixed */
#if 0
if (gl_info->supported[NV_REGISTER_COMBINERS2])
pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT;
#endif
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED |
WINED3DTEXOPCAPS_ADDSIGNED2X |
......@@ -672,14 +681,6 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
pCaps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners);
pCaps->MaxSimultaneousTextures = gl_info->limits.textures;
pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_TSSARGTEMP;
/* The caps below can be supported but aren't handled yet in utils.c 'd3dta_to_combiner_input', disable them until support is fixed */
#if 0
if (gl_info->supported[NV_REGISTER_COMBINERS2])
pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT;
#endif
}
static HRESULT nvrc_fragment_alloc(IWineD3DDevice *iface) { return WINED3D_OK; }
......
......@@ -5538,6 +5538,7 @@ static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { }
static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
{
pCaps->PrimitiveMiscCaps = 0;
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED |
WINED3DTEXOPCAPS_ADDSIGNED2X |
......
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