wined3d: Rename "pCaps" to "caps".
This commit is contained in:
parent
a247c7fd49
commit
a05841bd1a
|
@ -4858,7 +4858,7 @@ static BOOL shader_arb_dirty_const(void)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps)
|
||||
static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps)
|
||||
{
|
||||
if (gl_info->supported[ARB_VERTEX_PROGRAM])
|
||||
{
|
||||
|
@ -4875,26 +4875,26 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh
|
|||
|
||||
if (gl_info->supported[NV_VERTEX_PROGRAM3])
|
||||
{
|
||||
pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
|
||||
caps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
|
||||
TRACE_(d3d_caps)("Hardware vertex shader version 3.0 enabled (NV_VERTEX_PROGRAM3)\n");
|
||||
}
|
||||
else if (vs_consts >= 256)
|
||||
{
|
||||
/* Shader Model 2.0 requires at least 256 vertex shader constants */
|
||||
pCaps->VertexShaderVersion = WINED3DVS_VERSION(2,0);
|
||||
caps->VertexShaderVersion = WINED3DVS_VERSION(2,0);
|
||||
TRACE_(d3d_caps)("Hardware vertex shader version 2.0 enabled (ARB_PROGRAM)\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
pCaps->VertexShaderVersion = WINED3DVS_VERSION(1,1);
|
||||
caps->VertexShaderVersion = WINED3DVS_VERSION(1,1);
|
||||
TRACE_(d3d_caps)("Hardware vertex shader version 1.1 enabled (ARB_PROGRAM)\n");
|
||||
}
|
||||
pCaps->MaxVertexShaderConst = vs_consts;
|
||||
caps->MaxVertexShaderConst = vs_consts;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCaps->VertexShaderVersion = 0;
|
||||
pCaps->MaxVertexShaderConst = 0;
|
||||
caps->VertexShaderVersion = 0;
|
||||
caps->MaxVertexShaderConst = 0;
|
||||
}
|
||||
|
||||
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
|
||||
|
@ -4910,31 +4910,31 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh
|
|||
|
||||
if (gl_info->supported[NV_FRAGMENT_PROGRAM2])
|
||||
{
|
||||
pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
|
||||
caps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
|
||||
TRACE_(d3d_caps)("Hardware pixel shader version 3.0 enabled (NV_FRAGMENT_PROGRAM2)\n");
|
||||
}
|
||||
else if (ps_consts >= 32)
|
||||
{
|
||||
/* Shader Model 2.0 requires at least 32 pixel shader constants */
|
||||
pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
|
||||
caps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
|
||||
TRACE_(d3d_caps)("Hardware pixel shader version 2.0 enabled (ARB_PROGRAM)\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
pCaps->PixelShaderVersion = WINED3DPS_VERSION(1,4);
|
||||
caps->PixelShaderVersion = WINED3DPS_VERSION(1,4);
|
||||
TRACE_(d3d_caps)("Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)\n");
|
||||
}
|
||||
pCaps->PixelShader1xMaxValue = 8.0f;
|
||||
pCaps->MaxPixelShaderConst = ps_consts;
|
||||
caps->PixelShader1xMaxValue = 8.0f;
|
||||
caps->MaxPixelShaderConst = ps_consts;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCaps->PixelShaderVersion = 0;
|
||||
pCaps->PixelShader1xMaxValue = 0.0f;
|
||||
pCaps->MaxPixelShaderConst = 0;
|
||||
caps->PixelShaderVersion = 0;
|
||||
caps->PixelShader1xMaxValue = 0.0f;
|
||||
caps->MaxPixelShaderConst = 0;
|
||||
}
|
||||
|
||||
pCaps->VSClipping = use_nv_clip(gl_info);
|
||||
caps->VSClipping = use_nv_clip(gl_info);
|
||||
}
|
||||
|
||||
static BOOL shader_arb_color_fixup_supported(struct color_fixup_desc fixup)
|
||||
|
|
|
@ -4922,7 +4922,7 @@ static BOOL shader_glsl_dirty_const(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps)
|
||||
static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps)
|
||||
{
|
||||
/* NVIDIA GeForce 6 / 7 or ATI R4xx / R5xx cards with GLSL support
|
||||
* support SM3, but older NVIDIA / ATI models with GLSL support only
|
||||
|
@ -4944,17 +4944,17 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
|||
|| gl_info->supported[ARB_SHADER_TEXTURE_LOD]
|
||||
|| gl_info->supported[EXT_GPU_SHADER4])
|
||||
{
|
||||
pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
|
||||
pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
|
||||
caps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
|
||||
caps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCaps->VertexShaderVersion = WINED3DVS_VERSION(2,0);
|
||||
pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
|
||||
caps->VertexShaderVersion = WINED3DVS_VERSION(2,0);
|
||||
caps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
|
||||
}
|
||||
|
||||
pCaps->MaxVertexShaderConst = gl_info->limits.glsl_vs_float_constants;
|
||||
pCaps->MaxPixelShaderConst = gl_info->limits.glsl_ps_float_constants;
|
||||
caps->MaxVertexShaderConst = gl_info->limits.glsl_vs_float_constants;
|
||||
caps->MaxPixelShaderConst = gl_info->limits.glsl_ps_float_constants;
|
||||
|
||||
/* FIXME: The following line is card dependent. -8.0 to 8.0 is the
|
||||
* Direct3D minimum requirement.
|
||||
|
@ -4968,14 +4968,14 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
|||
* the shader will generate incorrect results too. Unfortunately, GL deliberately doesn't
|
||||
* offer a way to query this.
|
||||
*/
|
||||
pCaps->PixelShader1xMaxValue = 8.0;
|
||||
caps->PixelShader1xMaxValue = 8.0;
|
||||
|
||||
pCaps->VSClipping = TRUE;
|
||||
caps->VSClipping = TRUE;
|
||||
|
||||
TRACE_(d3d_caps)("Hardware vertex shader version %u.%u enabled (GLSL).\n",
|
||||
(pCaps->VertexShaderVersion >> 8) & 0xff, pCaps->VertexShaderVersion & 0xff);
|
||||
(caps->VertexShaderVersion >> 8) & 0xff, caps->VertexShaderVersion & 0xff);
|
||||
TRACE_(d3d_caps)("Hardware pixel shader version %u.%u enabled (GLSL).\n",
|
||||
(pCaps->PixelShaderVersion >> 8) & 0xff, pCaps->PixelShaderVersion & 0xff);
|
||||
(caps->PixelShaderVersion >> 8) & 0xff, caps->PixelShaderVersion & 0xff);
|
||||
}
|
||||
|
||||
static BOOL shader_glsl_color_fixup_supported(struct color_fixup_desc fixup)
|
||||
|
|
|
@ -637,60 +637,59 @@ static void nvts_enable(BOOL enable)
|
|||
LEAVE_GL();
|
||||
}
|
||||
|
||||
static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
|
||||
static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
|
||||
{
|
||||
pCaps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP;
|
||||
caps->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;
|
||||
caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT;
|
||||
#endif
|
||||
|
||||
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
|
||||
WINED3DTEXOPCAPS_ADDSIGNED |
|
||||
WINED3DTEXOPCAPS_ADDSIGNED2X |
|
||||
WINED3DTEXOPCAPS_MODULATE |
|
||||
WINED3DTEXOPCAPS_MODULATE2X |
|
||||
WINED3DTEXOPCAPS_MODULATE4X |
|
||||
WINED3DTEXOPCAPS_SELECTARG1 |
|
||||
WINED3DTEXOPCAPS_SELECTARG2 |
|
||||
WINED3DTEXOPCAPS_DISABLE |
|
||||
WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDTEXTUREALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDFACTORALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDCURRENTALPHA |
|
||||
WINED3DTEXOPCAPS_LERP |
|
||||
WINED3DTEXOPCAPS_SUBTRACT |
|
||||
WINED3DTEXOPCAPS_ADDSMOOTH |
|
||||
WINED3DTEXOPCAPS_MULTIPLYADD |
|
||||
WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR |
|
||||
WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM |
|
||||
WINED3DTEXOPCAPS_DOTPRODUCT3 |
|
||||
WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR |
|
||||
WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA;
|
||||
caps->TextureOpCaps = WINED3DTEXOPCAPS_ADD
|
||||
| WINED3DTEXOPCAPS_ADDSIGNED
|
||||
| WINED3DTEXOPCAPS_ADDSIGNED2X
|
||||
| WINED3DTEXOPCAPS_MODULATE
|
||||
| WINED3DTEXOPCAPS_MODULATE2X
|
||||
| WINED3DTEXOPCAPS_MODULATE4X
|
||||
| WINED3DTEXOPCAPS_SELECTARG1
|
||||
| WINED3DTEXOPCAPS_SELECTARG2
|
||||
| WINED3DTEXOPCAPS_DISABLE
|
||||
| WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDTEXTUREALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDFACTORALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDCURRENTALPHA
|
||||
| WINED3DTEXOPCAPS_LERP
|
||||
| WINED3DTEXOPCAPS_SUBTRACT
|
||||
| WINED3DTEXOPCAPS_ADDSMOOTH
|
||||
| WINED3DTEXOPCAPS_MULTIPLYADD
|
||||
| WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
|
||||
| WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM
|
||||
| WINED3DTEXOPCAPS_DOTPRODUCT3
|
||||
| WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
|
||||
| WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA;
|
||||
|
||||
if (gl_info->supported[NV_TEXTURE_SHADER2])
|
||||
{
|
||||
/* Bump mapping is supported already in NV_TEXTURE_SHADER, but that extension does
|
||||
* not support 3D textures. This asks for trouble if an app uses both bump mapping
|
||||
* and 3D textures. It also allows us to keep the code simpler by having texture
|
||||
* shaders constantly enabled.
|
||||
*/
|
||||
pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAP;
|
||||
* shaders constantly enabled. */
|
||||
caps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAP;
|
||||
/* TODO: Luminance bump map? */
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* FIXME: Add
|
||||
pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE
|
||||
caps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE
|
||||
WINED3DTEXOPCAPS_PREMODULATE */
|
||||
#endif
|
||||
|
||||
pCaps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners);
|
||||
pCaps->MaxSimultaneousTextures = gl_info->limits.textures;
|
||||
caps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners);
|
||||
caps->MaxSimultaneousTextures = gl_info->limits.textures;
|
||||
}
|
||||
|
||||
static HRESULT nvrc_fragment_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
|
||||
|
|
|
@ -5645,44 +5645,44 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
|
|||
/* Context activation is done by the caller. */
|
||||
static void ffp_enable(BOOL enable) {}
|
||||
|
||||
static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
|
||||
static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
|
||||
{
|
||||
pCaps->PrimitiveMiscCaps = 0;
|
||||
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
|
||||
WINED3DTEXOPCAPS_ADDSIGNED |
|
||||
WINED3DTEXOPCAPS_ADDSIGNED2X |
|
||||
WINED3DTEXOPCAPS_MODULATE |
|
||||
WINED3DTEXOPCAPS_MODULATE2X |
|
||||
WINED3DTEXOPCAPS_MODULATE4X |
|
||||
WINED3DTEXOPCAPS_SELECTARG1 |
|
||||
WINED3DTEXOPCAPS_SELECTARG2 |
|
||||
WINED3DTEXOPCAPS_DISABLE;
|
||||
caps->PrimitiveMiscCaps = 0;
|
||||
caps->TextureOpCaps = WINED3DTEXOPCAPS_ADD
|
||||
| WINED3DTEXOPCAPS_ADDSIGNED
|
||||
| WINED3DTEXOPCAPS_ADDSIGNED2X
|
||||
| WINED3DTEXOPCAPS_MODULATE
|
||||
| WINED3DTEXOPCAPS_MODULATE2X
|
||||
| WINED3DTEXOPCAPS_MODULATE4X
|
||||
| WINED3DTEXOPCAPS_SELECTARG1
|
||||
| WINED3DTEXOPCAPS_SELECTARG2
|
||||
| WINED3DTEXOPCAPS_DISABLE;
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_ENV_COMBINE]
|
||||
|| gl_info->supported[EXT_TEXTURE_ENV_COMBINE]
|
||||
|| gl_info->supported[NV_TEXTURE_ENV_COMBINE4])
|
||||
{
|
||||
pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDTEXTUREALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDFACTORALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDCURRENTALPHA |
|
||||
WINED3DTEXOPCAPS_LERP |
|
||||
WINED3DTEXOPCAPS_SUBTRACT;
|
||||
caps->TextureOpCaps |= WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDTEXTUREALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDFACTORALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDCURRENTALPHA
|
||||
| WINED3DTEXOPCAPS_LERP
|
||||
| WINED3DTEXOPCAPS_SUBTRACT;
|
||||
}
|
||||
if (gl_info->supported[ATI_TEXTURE_ENV_COMBINE3]
|
||||
|| gl_info->supported[NV_TEXTURE_ENV_COMBINE4])
|
||||
{
|
||||
pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_ADDSMOOTH |
|
||||
WINED3DTEXOPCAPS_MULTIPLYADD |
|
||||
WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR |
|
||||
WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA |
|
||||
WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM;
|
||||
caps->TextureOpCaps |= WINED3DTEXOPCAPS_ADDSMOOTH
|
||||
| WINED3DTEXOPCAPS_MULTIPLYADD
|
||||
| WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
|
||||
| WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
|
||||
| WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM;
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_ENV_DOT3])
|
||||
pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_DOTPRODUCT3;
|
||||
caps->TextureOpCaps |= WINED3DTEXOPCAPS_DOTPRODUCT3;
|
||||
|
||||
pCaps->MaxTextureBlendStages = gl_info->limits.textures;
|
||||
pCaps->MaxSimultaneousTextures = gl_info->limits.textures;
|
||||
caps->MaxTextureBlendStages = gl_info->limits.textures;
|
||||
caps->MaxSimultaneousTextures = gl_info->limits.textures;
|
||||
}
|
||||
|
||||
static HRESULT ffp_fragment_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
|
||||
|
|
Loading…
Reference in New Issue