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
e2059739
Commit
e2059739
authored
Aug 13, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the redundant vs_nv_version and ps_nv_version fields from struct wined3d_gl_info.
parent
fbc3cf89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
58 deletions
+9
-58
directx.c
dlls/wined3d/directx.c
+3
-27
glsl_shader.c
dlls/wined3d/glsl_shader.c
+6
-4
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+0
-27
No files found.
dlls/wined3d/directx.c
View file @
e2059739
...
...
@@ -379,7 +379,7 @@ static void select_shader_mode(const struct wined3d_gl_info *gl_info,
/* Geforce4 cards support GLSL but for vertex shaders only. Further its reported GLSL caps are
* wrong. This combined with the fact that glsl won't offer more features or performance, use ARB
* shaders only on this card. */
if
(
gl_info
->
vs_nv_version
&&
gl_info
->
vs_nv_version
<
VS_VERSION_20
)
if
(
gl_info
->
supported
[
NV_VERTEX_PROGRAM
]
&&
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM2
]
)
*
vs_selected
=
SHADER_ARB
;
else
*
vs_selected
=
SHADER_GLSL
;
...
...
@@ -1191,7 +1191,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
gl_info
->
ps_arb_max_instructions
=
0
;
gl_info
->
vs_arb_max_temps
=
0
;
gl_info
->
vs_arb_max_instructions
=
0
;
gl_info
->
vs_nv_version
=
VS_VERSION_NOT_SUPPORTED
;
gl_info
->
vs_glsl_constantsF
=
0
;
gl_info
->
ps_glsl_constantsF
=
0
;
gl_info
->
vs_arb_constantsF
=
0
;
...
...
@@ -1469,30 +1468,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
gl_info
->
max_glsl_varyings
=
gl_max
;
TRACE_
(
d3d_caps
)(
"Max GLSL varyings: %u (%u 4 component varyings).
\n
"
,
gl_max
,
gl_max
/
4
);
}
if
(
gl_info
->
supported
[
NV_VERTEX_PROGRAM3
])
{
gl_info
->
vs_nv_version
=
VS_VERSION_30
;
}
else
if
(
gl_info
->
supported
[
NV_VERTEX_PROGRAM2
])
{
gl_info
->
vs_nv_version
=
VS_VERSION_20
;
}
else
if
(
gl_info
->
supported
[
NV_VERTEX_PROGRAM1_1
])
{
gl_info
->
vs_nv_version
=
VS_VERSION_11
;
}
else
if
(
gl_info
->
supported
[
NV_VERTEX_PROGRAM
])
{
gl_info
->
vs_nv_version
=
VS_VERSION_10
;
}
if
(
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM2
])
{
gl_info
->
ps_nv_version
=
PS_VERSION_30
;
}
else
if
(
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM
])
{
gl_info
->
ps_nv_version
=
PS_VERSION_20
;
}
if
(
gl_info
->
supported
[
NV_LIGHT_MAX_EXPONENT
])
{
glGetFloatv
(
GL_MAX_SHININESS_NV
,
&
gl_info
->
max_shininess
);
...
...
@@ -1601,7 +1576,8 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
/* Both the GeforceFX, 6xxx and 7xxx series support D3D9. The last two types have more
* shader capabilities, so we use the shader capabilities to distinguish between FX and 6xxx/7xxx.
*/
if
(
WINE_D3D9_CAPABLE
(
gl_info
)
&&
(
gl_info
->
vs_nv_version
==
VS_VERSION_30
))
{
if
(
WINE_D3D9_CAPABLE
(
gl_info
)
&&
gl_info
->
supported
[
NV_VERTEX_PROGRAM3
])
{
/* Geforce 200 - highend */
if
(
strstr
(
gl_renderer
,
"GTX 280"
)
||
strstr
(
gl_renderer
,
"GTX 285"
)
...
...
dlls/wined3d/glsl_shader.c
View file @
e2059739
...
...
@@ -4577,14 +4577,15 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype,
const
struct
wined3d_gl_info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
/* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support
using
*
vs_nv_version which is based on
NV_vertex_program.
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support
based
*
on the version of
NV_vertex_program.
* For Ati cards there's no way using glsl (it abstracts the lowlevel info away) and also not
* using ARB_vertex_program. It is safe to assume that when a card supports pixel shader 2.0 it
* supports vertex shader 2.0 too and the way around. We can detect ps2.0 using the maximum number
* of native instructions, so use that here. For more info see the pixel shader versioning code below.
*/
if
((
GLINFO_LOCATION
.
vs_nv_version
==
VS_VERSION_20
)
||
(
GLINFO_LOCATION
.
ps_arb_max_instructions
<=
512
))
if
((
gl_info
->
supported
[
NV_VERTEX_PROGRAM2
]
&&
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM3
])
||
gl_info
->
ps_arb_max_instructions
<=
512
)
pCaps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
2
,
0
);
else
pCaps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
3
,
0
);
...
...
@@ -4602,7 +4603,8 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype,
* 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
))
if
((
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM
]
&&
!
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM2
])
||
(
gl_info
->
ps_arb_max_instructions
<=
512
))
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
2
,
0
);
else
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
3
,
0
);
...
...
dlls/wined3d/wined3d_gl.h
View file @
e2059739
...
...
@@ -3394,29 +3394,6 @@ typedef enum _GL_Cards {
#define WINE_DEFAULT_VIDMEM 64*1024*1024
typedef
enum
_GL_VSVersion
{
VS_VERSION_NOT_SUPPORTED
=
0x0
,
VS_VERSION_10
=
0x10
,
VS_VERSION_11
=
0x11
,
VS_VERSION_20
=
0x20
,
VS_VERSION_30
=
0x30
,
/*Force 32-bits*/
VS_VERSION_FORCE_DWORD
=
0x7FFFFFFF
}
GL_VSVersion
;
typedef
enum
_GL_PSVersion
{
PS_VERSION_NOT_SUPPORTED
=
0x0
,
PS_VERSION_10
=
0x10
,
PS_VERSION_11
=
0x11
,
PS_VERSION_12
=
0x12
,
PS_VERSION_13
=
0x13
,
PS_VERSION_14
=
0x14
,
PS_VERSION_20
=
0x20
,
PS_VERSION_30
=
0x30
,
/*Force 32-bits*/
PS_VERSION_FORCE_DWORD
=
0x7FFFFFFF
}
GL_PSVersion
;
#define MAKEDWORD_VERSION(maj, min) ((maj & 0x0000FFFF) << 16) | (min & 0x0000FFFF)
/* OpenGL Supported Extensions (ARB and EXT) */
...
...
@@ -4004,10 +3981,6 @@ struct wined3d_gl_info
unsigned
int
vs_glsl_constantsF
;
unsigned
int
ps_glsl_constantsF
;
GL_PSVersion
ps_nv_version
;
GL_VSVersion
vs_nv_version
;
DWORD
reserved_glsl_constants
;
DWORD
quirks
;
...
...
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