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
50ed6f36
Commit
50ed6f36
authored
Oct 27, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Oct 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add proper PS2.0 detection for older cards with GLSL support.
parent
465962da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
directx.c
dlls/wined3d/directx.c
+12
-3
No files found.
dlls/wined3d/directx.c
View file @
50ed6f36
...
...
@@ -2386,9 +2386,18 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
*
pCaps
->
MaxVertexShaderConst
=
GL_LIMITS
(
vshader_constantsF
);
if
(
ps_selected_mode
==
SHADER_GLSL
)
{
/* See the comment about VS2.0/VS3.0 detection as we do the same here but then based on NV_fragment_program
in case of GeforceFX cards. */
if
(
GLINFO_LOCATION
.
ps_nv_version
==
PS_VERSION_20
)
/* Older DX9-class videocards (GeforceFX / Radeon >9500/X*00) only support pixel shader 2.0/2.0a/2.0b.
* In OpenGL the extensions related to GLSL abstract lowlevel GL info away which is needed
* to distinguish between 2.0 and 3.0 (and 2.0a/2.0b). In case of Nvidia we use their fragment
* program extensions. On other hardware including ATI GL_ARB_fragment_program offers the info
* in max native instructions. Intel and others also offer the info in this extension but they
* don't support GLSL (at least on Windows).
*
* PS2.0 requires at least 96 instructions, 2.0a/2.0b go upto 512. Assume that if the number
* of instructions is 512 or less we have to do with ps2.0 hardware.
* NOTE: ps3.0 hardware requires 512 or more instructions but ati and nvidia offer 'enough' (1024 vs 4096) on their most basic ps3.0 hardware.
*/
if
((
GLINFO_LOCATION
.
ps_nv_version
==
PS_VERSION_20
)
||
(
GLINFO_LOCATION
.
ps_arb_max_instructions
<=
512
))
*
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
2
,
0
);
else
*
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
3
,
0
);
...
...
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