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
b66a5285
Commit
b66a5285
authored
Dec 23, 2006
by
Chris Robinson
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Don't report Shader Model 2.0 or higher.
parent
b58715e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
device.c
dlls/d3d8/device.c
+9
-0
directx.c
dlls/d3d8/directx.c
+9
-0
device.c
dlls/d3d8/tests/device.c
+21
-0
No files found.
dlls/d3d8/device.c
View file @
b66a5285
...
...
@@ -169,6 +169,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface
D3D8CAPSTOWINECAPS
(
pCaps
,
pWineCaps
)
hrc
=
IWineD3DDevice_GetDeviceCaps
(
This
->
WineD3DDevice
,
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
);
}
TRACE
(
"Returning %p %p
\n
"
,
This
,
pCaps
);
return
hrc
;
}
...
...
dlls/d3d8/directx.c
View file @
b66a5285
...
...
@@ -176,6 +176,15 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada
D3D8CAPSTOWINECAPS
(
pCaps
,
pWineCaps
)
hrc
=
IWineD3D_GetDeviceCaps
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
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
);
}
TRACE
(
"(%p) returning %p
\n
"
,
This
,
pCaps
);
return
hrc
;
}
...
...
dlls/d3d8/tests/device.c
View file @
b66a5285
...
...
@@ -696,6 +696,26 @@ cleanup:
if
(
pDevice
)
IDirect3D8_Release
(
pDevice
);
}
static
void
test_shader_versions
(
void
)
{
HRESULT
hr
;
IDirect3D8
*
pD3d
=
NULL
;
D3DCAPS8
d3dcaps
;
pD3d
=
pDirect3DCreate8
(
D3D_SDK_VERSION
);
ok
(
pD3d
!=
NULL
,
"Failed to create IDirect3D8 object
\n
"
);
if
(
pD3d
!=
NULL
)
{
hr
=
IDirect3D8_GetDeviceCaps
(
pD3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
&
d3dcaps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get D3D8 caps (%s)
\n
"
,
DXGetErrorString8
(
hr
));
if
(
SUCCEEDED
(
hr
))
{
ok
(
d3dcaps
.
VertexShaderVersion
<=
D3DVS_VERSION
(
1
,
1
),
"Unexpected VertexShaderVersion (%#x > %#x)
\n
"
,
d3dcaps
.
VertexShaderVersion
,
D3DVS_VERSION
(
1
,
1
));
ok
(
d3dcaps
.
PixelShaderVersion
<=
D3DPS_VERSION
(
1
,
4
),
"Unexpected PixelShaderVersion (%#x > %#x)
\n
"
,
d3dcaps
.
PixelShaderVersion
,
D3DPS_VERSION
(
1
,
4
));
}
IDirect3D8_Release
(
pD3d
);
}
}
/* Test adapter display modes */
static
void
test_display_modes
(
void
)
{
...
...
@@ -733,6 +753,7 @@ START_TEST(device)
if
(
pDirect3DCreate8
)
{
test_display_modes
();
test_shader_versions
();
test_swapchain
();
test_refcount
();
test_mipmap_levels
();
...
...
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