Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6e22f036
Commit
6e22f036
authored
May 07, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Remove all non-d3d7 capability flags.
parent
3a1a190f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
0 deletions
+102
-0
direct3d.c
dlls/ddraw/direct3d.c
+102
-0
No files found.
dlls/ddraw/direct3d.c
View file @
6e22f036
...
...
@@ -1315,6 +1315,108 @@ IDirect3DImpl_GetCaps(IWineD3D *WineD3D,
hr
=
IWineD3D_GetDeviceCaps
(
WineD3D
,
0
,
WINED3DDEVTYPE_HAL
,
&
WCaps
);
if
(
hr
!=
D3D_OK
)
return
hr
;
/* Remove all non-d3d7 caps */
Desc7
->
dwDevCaps
&=
(
D3DDEVCAPS_FLOATTLVERTEX
|
D3DDEVCAPS_SORTINCREASINGZ
|
D3DDEVCAPS_SORTDECREASINGZ
|
D3DDEVCAPS_SORTEXACT
|
D3DDEVCAPS_EXECUTESYSTEMMEMORY
|
D3DDEVCAPS_EXECUTEVIDEOMEMORY
|
D3DDEVCAPS_TLVERTEXSYSTEMMEMORY
|
D3DDEVCAPS_TLVERTEXVIDEOMEMORY
|
D3DDEVCAPS_TEXTURESYSTEMMEMORY
|
D3DDEVCAPS_TEXTUREVIDEOMEMORY
|
D3DDEVCAPS_DRAWPRIMTLVERTEX
|
D3DDEVCAPS_CANRENDERAFTERFLIP
|
D3DDEVCAPS_TEXTURENONLOCALVIDMEM
|
D3DDEVCAPS_DRAWPRIMITIVES2
|
D3DDEVCAPS_SEPARATETEXTUREMEMORIES
|
D3DDEVCAPS_DRAWPRIMITIVES2EX
|
D3DDEVCAPS_HWTRANSFORMANDLIGHT
|
D3DDEVCAPS_CANBLTSYSTONONLOCAL
|
D3DDEVCAPS_HWRASTERIZATION
);
Desc7
->
dwStencilCaps
&=
(
D3DSTENCILCAPS_KEEP
|
D3DSTENCILCAPS_ZERO
|
D3DSTENCILCAPS_REPLACE
|
D3DSTENCILCAPS_INCRSAT
|
D3DSTENCILCAPS_DECRSAT
|
D3DSTENCILCAPS_INVERT
|
D3DSTENCILCAPS_INCR
|
D3DSTENCILCAPS_DECR
|
D3DSTENCILCAPS_TWOSIDED
);
/* FVF caps ?*/
Desc7
->
dwTextureOpCaps
&=
(
D3DTEXOPCAPS_DISABLE
|
D3DTEXOPCAPS_SELECTARG1
|
D3DTEXOPCAPS_SELECTARG2
|
D3DTEXOPCAPS_MODULATE
|
D3DTEXOPCAPS_MODULATE2X
|
D3DTEXOPCAPS_MODULATE4X
|
D3DTEXOPCAPS_ADD
|
D3DTEXOPCAPS_ADDSIGNED
|
D3DTEXOPCAPS_ADDSIGNED2X
|
D3DTEXOPCAPS_SUBTRACT
|
D3DTEXOPCAPS_ADDSMOOTH
|
D3DTEXOPCAPS_BLENDTEXTUREALPHA
|
D3DTEXOPCAPS_BLENDFACTORALPHA
|
D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
|
D3DTEXOPCAPS_BLENDCURRENTALPHA
|
D3DTEXOPCAPS_PREMODULATE
|
D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
|
D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
|
D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
|
D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
|
D3DTEXOPCAPS_BUMPENVMAP
|
D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
|
D3DTEXOPCAPS_DOTPRODUCT3
);
Desc7
->
dwVertexProcessingCaps
&=
(
D3DVTXPCAPS_TEXGEN
|
D3DVTXPCAPS_MATERIALSOURCE7
|
D3DVTXPCAPS_VERTEXFOG
|
D3DVTXPCAPS_DIRECTIONALLIGHTS
|
D3DVTXPCAPS_POSITIONALLIGHTS
|
D3DVTXPCAPS_LOCALVIEWER
);
Desc7
->
dpcLineCaps
.
dwMiscCaps
&=
(
D3DPMISCCAPS_MASKPLANES
|
D3DPMISCCAPS_MASKZ
|
D3DPMISCCAPS_LINEPATTERNREP
|
D3DPMISCCAPS_CONFORMANT
|
D3DPMISCCAPS_CULLNONE
|
D3DPMISCCAPS_CULLCW
|
D3DPMISCCAPS_CULLCCW
);
Desc7
->
dpcLineCaps
.
dwRasterCaps
&=
(
D3DPRASTERCAPS_DITHER
|
D3DPRASTERCAPS_ROP2
|
D3DPRASTERCAPS_XOR
|
D3DPRASTERCAPS_PAT
|
D3DPRASTERCAPS_ZTEST
|
D3DPRASTERCAPS_SUBPIXEL
|
D3DPRASTERCAPS_SUBPIXELX
|
D3DPRASTERCAPS_FOGVERTEX
|
D3DPRASTERCAPS_FOGTABLE
|
D3DPRASTERCAPS_STIPPLE
|
D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT
|
D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT
|
D3DPRASTERCAPS_ANTIALIASEDGES
|
D3DPRASTERCAPS_MIPMAPLODBIAS
|
D3DPRASTERCAPS_ZBIAS
|
D3DPRASTERCAPS_ZBUFFERLESSHSR
|
D3DPRASTERCAPS_FOGRANGE
|
D3DPRASTERCAPS_ANISOTROPY
|
D3DPRASTERCAPS_WBUFFER
|
D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT
|
D3DPRASTERCAPS_WFOG
|
D3DPRASTERCAPS_ZFOG
);
Desc7
->
dpcLineCaps
.
dwZCmpCaps
&=
(
D3DPCMPCAPS_NEVER
|
D3DPCMPCAPS_LESS
|
D3DPCMPCAPS_EQUAL
|
D3DPCMPCAPS_LESSEQUAL
|
D3DPCMPCAPS_GREATER
|
D3DPCMPCAPS_NOTEQUAL
|
D3DPCMPCAPS_GREATEREQUAL
|
D3DPCMPCAPS_ALWAYS
);
Desc7
->
dpcLineCaps
.
dwSrcBlendCaps
&=
(
D3DPBLENDCAPS_ZERO
|
D3DPBLENDCAPS_ONE
|
D3DPBLENDCAPS_SRCCOLOR
|
D3DPBLENDCAPS_INVSRCCOLOR
|
D3DPBLENDCAPS_SRCALPHA
|
D3DPBLENDCAPS_INVSRCALPHA
|
D3DPBLENDCAPS_DESTALPHA
|
D3DPBLENDCAPS_INVDESTALPHA
|
D3DPBLENDCAPS_DESTCOLOR
|
D3DPBLENDCAPS_INVDESTCOLOR
|
D3DPBLENDCAPS_SRCALPHASAT
|
D3DPBLENDCAPS_BOTHSRCALPHA
|
D3DPBLENDCAPS_BOTHINVSRCALPHA
);
Desc7
->
dpcLineCaps
.
dwDestBlendCaps
&=
(
D3DPBLENDCAPS_ZERO
|
D3DPBLENDCAPS_ONE
|
D3DPBLENDCAPS_SRCCOLOR
|
D3DPBLENDCAPS_INVSRCCOLOR
|
D3DPBLENDCAPS_SRCALPHA
|
D3DPBLENDCAPS_INVSRCALPHA
|
D3DPBLENDCAPS_DESTALPHA
|
D3DPBLENDCAPS_INVDESTALPHA
|
D3DPBLENDCAPS_DESTCOLOR
|
D3DPBLENDCAPS_INVDESTCOLOR
|
D3DPBLENDCAPS_SRCALPHASAT
|
D3DPBLENDCAPS_BOTHSRCALPHA
|
D3DPBLENDCAPS_BOTHINVSRCALPHA
);
Desc7
->
dpcLineCaps
.
dwAlphaCmpCaps
&=
(
D3DPCMPCAPS_NEVER
|
D3DPCMPCAPS_LESS
|
D3DPCMPCAPS_EQUAL
|
D3DPCMPCAPS_LESSEQUAL
|
D3DPCMPCAPS_GREATER
|
D3DPCMPCAPS_NOTEQUAL
|
D3DPCMPCAPS_GREATEREQUAL
|
D3DPCMPCAPS_ALWAYS
);
Desc7
->
dpcLineCaps
.
dwShadeCaps
&=
(
D3DPSHADECAPS_COLORFLATMONO
|
D3DPSHADECAPS_COLORFLATRGB
|
D3DPSHADECAPS_COLORGOURAUDMONO
|
D3DPSHADECAPS_COLORGOURAUDRGB
|
D3DPSHADECAPS_COLORPHONGMONO
|
D3DPSHADECAPS_COLORPHONGRGB
|
D3DPSHADECAPS_SPECULARFLATMONO
|
D3DPSHADECAPS_SPECULARFLATRGB
|
D3DPSHADECAPS_SPECULARGOURAUDMONO
|
D3DPSHADECAPS_SPECULARGOURAUDRGB
|
D3DPSHADECAPS_SPECULARPHONGMONO
|
D3DPSHADECAPS_SPECULARPHONGRGB
|
D3DPSHADECAPS_ALPHAFLATBLEND
|
D3DPSHADECAPS_ALPHAFLATSTIPPLED
|
D3DPSHADECAPS_ALPHAGOURAUDBLEND
|
D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED
|
D3DPSHADECAPS_ALPHAPHONGBLEND
|
D3DPSHADECAPS_ALPHAPHONGSTIPPLED
|
D3DPSHADECAPS_FOGFLAT
|
D3DPSHADECAPS_FOGGOURAUD
|
D3DPSHADECAPS_FOGPHONG
);
Desc7
->
dpcLineCaps
.
dwTextureCaps
&=
(
D3DPTEXTURECAPS_PERSPECTIVE
|
D3DPTEXTURECAPS_POW2
|
D3DPTEXTURECAPS_ALPHA
|
D3DPTEXTURECAPS_TRANSPARENCY
|
D3DPTEXTURECAPS_BORDER
|
D3DPTEXTURECAPS_SQUAREONLY
|
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
|
D3DPTEXTURECAPS_ALPHAPALETTE
|
D3DPTEXTURECAPS_NONPOW2CONDITIONAL
|
D3DPTEXTURECAPS_PROJECTED
|
D3DPTEXTURECAPS_CUBEMAP
|
D3DPTEXTURECAPS_COLORKEYBLEND
);
Desc7
->
dpcLineCaps
.
dwTextureFilterCaps
&=
(
D3DPTFILTERCAPS_NEAREST
|
D3DPTFILTERCAPS_LINEAR
|
D3DPTFILTERCAPS_MIPNEAREST
|
D3DPTFILTERCAPS_MIPLINEAR
|
D3DPTFILTERCAPS_LINEARMIPNEAREST
|
D3DPTFILTERCAPS_LINEARMIPLINEAR
|
D3DPTFILTERCAPS_MINFPOINT
|
D3DPTFILTERCAPS_MINFLINEAR
|
D3DPTFILTERCAPS_MINFANISOTROPIC
|
D3DPTFILTERCAPS_MIPFPOINT
|
D3DPTFILTERCAPS_MIPFLINEAR
|
D3DPTFILTERCAPS_MAGFPOINT
|
D3DPTFILTERCAPS_MAGFLINEAR
|
D3DPTFILTERCAPS_MAGFANISOTROPIC
|
D3DPTFILTERCAPS_MAGFAFLATCUBIC
|
D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC
);
Desc7
->
dpcLineCaps
.
dwTextureBlendCaps
&=
(
D3DPTBLENDCAPS_DECAL
|
D3DPTBLENDCAPS_MODULATE
|
D3DPTBLENDCAPS_DECALALPHA
|
D3DPTBLENDCAPS_MODULATEALPHA
|
D3DPTBLENDCAPS_DECALMASK
|
D3DPTBLENDCAPS_MODULATEMASK
|
D3DPTBLENDCAPS_COPY
|
D3DPTBLENDCAPS_ADD
);
Desc7
->
dpcLineCaps
.
dwTextureAddressCaps
&=
(
D3DPTADDRESSCAPS_WRAP
|
D3DPTADDRESSCAPS_MIRROR
|
D3DPTADDRESSCAPS_CLAMP
|
D3DPTADDRESSCAPS_BORDER
|
D3DPTADDRESSCAPS_INDEPENDENTUV
);
if
(
!
(
Desc7
->
dpcLineCaps
.
dwTextureCaps
&
D3DPTEXTURECAPS_POW2
))
{
/* DirectX7 always has the np2 flag set, no matter what the card supports. Some old games(rollcage)
* check the caps incorrectly. If wined3d supports nonpow2 textures it also has np2 conditional support
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment