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
6f5a1d9a
Commit
6f5a1d9a
authored
Aug 07, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Filter WINED3DSTENCILCAPS_TWOSIDED in d3d8.
parent
296573ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
21 deletions
+19
-21
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-0
device.c
dlls/d3d8/device.c
+1
-9
directx.c
dlls/d3d8/directx.c
+15
-9
directx.c
dlls/wined3d/directx.c
+1
-3
No files found.
dlls/d3d8/d3d8_private.h
View file @
6f5a1d9a
...
...
@@ -97,6 +97,8 @@
_pD3D8Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
_pD3D8Caps->MaxPixelShaderValue = _pWineCaps->PixelShader1xMaxValue;
void
fixup_caps
(
WINED3DCAPS
*
pWineCaps
);
/* Direct3D8 Interfaces: */
typedef
struct
IDirect3DBaseTexture8Impl
IDirect3DBaseTexture8Impl
;
typedef
struct
IDirect3DVolumeTexture8Impl
IDirect3DVolumeTexture8Impl
;
...
...
dlls/d3d8/device.c
View file @
6f5a1d9a
...
...
@@ -394,18 +394,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface
EnterCriticalSection
(
&
d3d8_cs
);
hrc
=
IWineD3DDevice_GetDeviceCaps
(
This
->
WineD3DDevice
,
pWineCaps
);
LeaveCriticalSection
(
&
d3d8_cs
);
fixup_caps
(
pWineCaps
);
WINECAPSTOD3D8CAPS
(
pCaps
,
pWineCaps
)
HeapFree
(
GetProcessHeap
(),
0
,
pWineCaps
);
/* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
if
(
pCaps
->
PixelShaderVersion
>
D3DPS_VERSION
(
1
,
4
)){
pCaps
->
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
4
);
}
if
(
pCaps
->
VertexShaderVersion
>
D3DVS_VERSION
(
1
,
1
)){
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
}
pCaps
->
MaxVertexShaderConst
=
min
(
D3D8_MAX_VERTEX_SHADER_CONSTANTF
,
pCaps
->
MaxVertexShaderConst
);
TRACE
(
"Returning %p %p
\n
"
,
This
,
pCaps
);
return
hrc
;
}
...
...
dlls/d3d8/directx.c
View file @
6f5a1d9a
...
...
@@ -250,6 +250,20 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface,
return
hr
;
}
void
fixup_caps
(
WINED3DCAPS
*
caps
)
{
/* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
if
(
caps
->
PixelShaderVersion
>
D3DPS_VERSION
(
1
,
4
))
{
caps
->
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
4
);
}
if
(
caps
->
VertexShaderVersion
>
D3DVS_VERSION
(
1
,
1
))
{
caps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
}
caps
->
MaxVertexShaderConst
=
min
(
D3D8_MAX_VERTEX_SHADER_CONSTANTF
,
caps
->
MaxVertexShaderConst
);
caps
->
StencilCaps
&=
~
WINED3DSTENCILCAPS_TWOSIDED
;
}
static
HRESULT
WINAPI
IDirect3D8Impl_GetDeviceCaps
(
LPDIRECT3D8
iface
,
UINT
Adapter
,
D3DDEVTYPE
DeviceType
,
D3DCAPS8
*
pCaps
)
{
IDirect3D8Impl
*
This
=
(
IDirect3D8Impl
*
)
iface
;
HRESULT
hrc
=
D3D_OK
;
...
...
@@ -267,18 +281,10 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada
EnterCriticalSection
(
&
d3d8_cs
);
hrc
=
IWineD3D_GetDeviceCaps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
pWineCaps
);
LeaveCriticalSection
(
&
d3d8_cs
);
fixup_caps
(
pWineCaps
);
WINECAPSTOD3D8CAPS
(
pCaps
,
pWineCaps
)
HeapFree
(
GetProcessHeap
(),
0
,
pWineCaps
);
/* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
if
(
pCaps
->
PixelShaderVersion
>
D3DPS_VERSION
(
1
,
4
)){
pCaps
->
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
4
);
}
if
(
pCaps
->
VertexShaderVersion
>
D3DVS_VERSION
(
1
,
1
)){
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
}
pCaps
->
MaxVertexShaderConst
=
min
(
D3D8_MAX_VERTEX_SHADER_CONSTANTF
,
pCaps
->
MaxVertexShaderConst
);
TRACE
(
"(%p) returning %p
\n
"
,
This
,
pCaps
);
return
hrc
;
}
...
...
dlls/wined3d/directx.c
View file @
6f5a1d9a
...
...
@@ -4050,9 +4050,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
pCaps
->
StencilCaps
|=
WINED3DSTENCILCAPS_DECR
|
WINED3DSTENCILCAPS_INCR
;
}
if
(
This
->
dxVersion
>
8
&&
(
GL_SUPPORT
(
EXT_STENCIL_TWO_SIDE
)
||
GL_SUPPORT
(
ATI_SEPARATE_STENCIL
)
)
)
{
if
(
GL_SUPPORT
(
EXT_STENCIL_TWO_SIDE
)
||
GL_SUPPORT
(
ATI_SEPARATE_STENCIL
))
{
pCaps
->
StencilCaps
|=
WINED3DSTENCILCAPS_TWOSIDED
;
}
...
...
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