[07/10] wined3d: Add WINED3DPBLENDCAPS flags and use them

Mirek thunder.m at czela.net
Thu Feb 15 01:44:36 CST 2007


Hi, this patch has bad attachment, it has same attachment as "[08/10] 
wined3d: Add WINED3DPMISCCAPS flags and use them".

Mirek Slugen

H. Verbeet napsal(a):
> Changelog:
>  - Add WINED3DPBLENDCAPS flags and use them
> 
> 
> ------------------------------------------------------------------------
> 
> ---
> 
>  dlls/wined3d/directx.c      |   34 +++++++++++++++++-----------------
>  include/wine/wined3d_caps.h |   19 +++++++++++++++++++
>  2 files changed, 36 insertions(+), 17 deletions(-)
> 
> diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
> index 1753ef9..cc1e0f6 100644
> --- a/dlls/wined3d/directx.c
> +++ b/dlls/wined3d/directx.c
> @@ -1872,29 +1872,29 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
>                                        WINED3DDEVCAPS_DRAWPRIMITIVES2     |
>                                        WINED3DDEVCAPS_DRAWPRIMITIVES2EX;
>  
> -    *pCaps->PrimitiveMiscCaps       = D3DPMISCCAPS_CULLNONE              |
> -                                      D3DPMISCCAPS_CULLCCW               |
> -                                      D3DPMISCCAPS_CULLCW                |
> -                                      D3DPMISCCAPS_COLORWRITEENABLE      |
> -                                      D3DPMISCCAPS_CLIPTLVERTS           |
> -                                      D3DPMISCCAPS_CLIPPLANESCALEDPOINTS |
> -                                      D3DPMISCCAPS_MASKZ                 |
> -                                      D3DPMISCCAPS_BLENDOP;
> +    *pCaps->PrimitiveMiscCaps       = WINED3DPMISCCAPS_CULLNONE              |
> +                                      WINED3DPMISCCAPS_CULLCCW               |
> +                                      WINED3DPMISCCAPS_CULLCW                |
> +                                      WINED3DPMISCCAPS_COLORWRITEENABLE      |
> +                                      WINED3DPMISCCAPS_CLIPTLVERTS           |
> +                                      WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS |
> +                                      WINED3DPMISCCAPS_MASKZ                 |
> +                                      WINED3DPMISCCAPS_BLENDOP;
>                                      /* TODO:
> -                                        D3DPMISCCAPS_NULLREFERENCE
> -                                        D3DPMISCCAPS_INDEPENDENTWRITEMASKS
> -                                        D3DPMISCCAPS_FOGANDSPECULARALPHA
> -                                        D3DPMISCCAPS_SEPARATEALPHABLEND
> -                                        D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS
> -                                        D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
> -                                        D3DPMISCCAPS_FOGVERTEXCLAMPED */
> +                                        WINED3DPMISCCAPS_NULLREFERENCE
> +                                        WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS
> +                                        WINED3DPMISCCAPS_FOGANDSPECULARALPHA
> +                                        WINED3DPMISCCAPS_SEPARATEALPHABLEND
> +                                        WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS
> +                                        WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
> +                                        WINED3DPMISCCAPS_FOGVERTEXCLAMPED */
>  
>  /* 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_SUPPORT(NV_REGISTER_COMBINERS))
> -        *pCaps->PrimitiveMiscCaps |=  D3DPMISCCAPS_TSSARGTEMP;
> +        *pCaps->PrimitiveMiscCaps |=  WINED3DPMISCCAPS_TSSARGTEMP;
>      if (GL_SUPPORT(NV_REGISTER_COMBINERS2))
> -        *pCaps->PrimitiveMiscCaps |=  D3DPMISCCAPS_PERSTAGECONSTANT;
> +        *pCaps->PrimitiveMiscCaps |=  WINED3DPMISCCAPS_PERSTAGECONSTANT;
>  #endif
>  
>      *pCaps->RasterCaps              = WINED3DPRASTERCAPS_DITHER    |
> diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h
> index 1cedae7..98a655d 100644
> --- a/include/wine/wined3d_caps.h
> +++ b/include/wine/wined3d_caps.h
> @@ -34,6 +34,25 @@
>  #define WINED3DPBLENDCAPS_BOTHINVSRCALPHA                   0x00001000
>  #define WINED3DPBLENDCAPS_BLENDFACTOR                       0x00002000
>  
> +#define WINED3DPMISCCAPS_MASKZ                              0x00000002
> +#define WINED3DPMISCCAPS_LINEPATTERNREP                     0x00000004
> +#define WINED3DPMISCCAPS_CULLNONE                           0x00000010
> +#define WINED3DPMISCCAPS_CULLCW                             0x00000020
> +#define WINED3DPMISCCAPS_CULLCCW                            0x00000040
> +#define WINED3DPMISCCAPS_COLORWRITEENABLE                   0x00000080
> +#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS              0x00000100
> +#define WINED3DPMISCCAPS_CLIPTLVERTS                        0x00000200
> +#define WINED3DPMISCCAPS_TSSARGTEMP                         0x00000400
> +#define WINED3DPMISCCAPS_BLENDOP                            0x00000800
> +#define WINED3DPMISCCAPS_NULLREFERENCE                      0x00001000
> +#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS              0x00004000
> +#define WINED3DPMISCCAPS_PERSTAGECONSTANT                   0x00008000
> +#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA                0x00010000
> +#define WINED3DPMISCCAPS_SEPARATEALPHABLEND                 0x00020000
> +#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS            0x00040000
> +#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING         0x00080000
> +#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED                   0x00100000
> +
>  #define WINED3DSTENCILCAPS_KEEP                             0x00000001
>  #define WINED3DSTENCILCAPS_ZERO                             0x00000002
>  #define WINED3DSTENCILCAPS_REPLACE                          0x00000004
> 
> 
> ------------------------------------------------------------------------
> 
> 



More information about the wine-devel mailing list