Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
40bc4790
Commit
40bc4790
authored
Jul 01, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use flags for driver quirks.
parent
c475789b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
18 deletions
+26
-18
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-4
directx.c
dlls/wined3d/directx.c
+3
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+6
-4
vertexshader.c
dlls/wined3d/vertexshader.c
+4
-4
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+2
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
40bc4790
...
...
@@ -49,9 +49,10 @@ static BOOL need_mova_const(IWineD3DBaseShader *shader, const WineD3D_GL_Info *g
}
static
BOOL
need_helper_const
(
const
WineD3D_GL_Info
*
gl_info
)
{
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
)
||
/* Need to init colors */
gl_info
->
arb_vs_offset_limit
||
/* Have to init texcoords */
gl_info
->
set_texcoord_w
)
{
/* Load the immval offset */
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
)
/* Need to init colors. */
||
gl_info
->
quirks
&
WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT
/* Load the immval offset. */
||
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
/* Have to init texcoords. */
{
return
TRUE
;
}
return
FALSE
;
...
...
@@ -3751,7 +3752,8 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This,
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
))
{
shader_addline
(
buffer
,
"MOV result.color.secondary, -helper_const.wwwy;
\n
"
);
if
((
GLINFO_LOCATION
).
set_texcoord_w
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
if
((
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
int
i
;
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
if
(
This
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
0
&&
...
...
dlls/wined3d/directx.c
View file @
40bc4790
...
...
@@ -950,7 +950,7 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
gl_info
->
vs_arb_max_instructions
=
gl_max
;
TRACE_
(
d3d_caps
)(
"Max ARB_VERTEX_PROGRAM native instructions: %d
\n
"
,
gl_info
->
vs_arb_max_instructions
);
gl_info
->
arb_vs_offset_limit
=
test_arb_vs_offset_limit
(
gl_info
)
;
if
(
test_arb_vs_offset_limit
(
gl_info
))
gl_info
->
quirks
|=
WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT
;
}
if
(
gl_info
->
supported
[
ARB_VERTEX_SHADER
])
{
glGetIntegerv
(
GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB
,
&
gl_max
);
...
...
@@ -4196,11 +4196,11 @@ static void quirk_texcoord_w(WineD3D_GL_Info *gl_info) {
* performance negatively.
*/
TRACE
(
"Enabling vertex texture coord fixes in vertex shaders
\n
"
);
gl_info
->
set_texcoord_w
=
TRUE
;
gl_info
->
quirks
|=
WINED3D_QUIRK_SET_TEXCOORD_W
;
}
static
void
quirk_clip_varying
(
WineD3D_GL_Info
*
gl_info
)
{
gl_info
->
glsl_clip_varying
=
TRUE
;
gl_info
->
quirks
|=
WINED3D_QUIRK_GLSL_CLIP_VARYING
;
}
struct
driver_quirk
...
...
dlls/wined3d/glsl_shader.c
View file @
40bc4790
...
...
@@ -776,7 +776,7 @@ static int vec4_varyings(DWORD shader_major, const WineD3D_GL_Info *gl_info)
if
(
shader_major
>
3
)
return
ret
;
/* 3.0 shaders may need an extra varying for the clip coord on some cards(mostly dx10 ones) */
if
(
gl_info
->
glsl_clip_varying
)
ret
-=
1
;
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_GLSL_CLIP_VARYING
)
ret
-=
1
;
return
ret
;
}
...
...
@@ -3529,8 +3529,9 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
* Take care about the texcoord .w fixup though if we're using the fixed function fragment pipeline
*/
device
=
(
IWineD3DDeviceImpl
*
)
vs
->
baseShader
.
device
;
if
((
GLINFO_LOCATION
).
set_texcoord_w
&&
ps_major
==
0
&&
vs_major
>
0
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
if
(((
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
&&
ps_major
==
0
&&
vs_major
>
0
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
shader_addline
(
&
buffer
,
"void order_ps_input() {
\n
"
);
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
if
(
vs
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
0
&&
...
...
@@ -3575,7 +3576,8 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
{
if
(
semantic_idx
<
8
)
{
if
(
!
(
GLINFO_LOCATION
).
set_texcoord_w
||
ps_major
>
0
)
write_mask
|=
WINED3DSP_WRITEMASK_3
;
if
(
!
((
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
||
ps_major
>
0
)
write_mask
|=
WINED3DSP_WRITEMASK_3
;
shader_addline
(
&
buffer
,
"gl_TexCoord[%u]%s = OUT[%u]%s;
\n
"
,
semantic_idx
,
reg_mask
,
i
,
reg_mask
);
...
...
dlls/wined3d/vertexshader.c
View file @
40bc4790
...
...
@@ -280,10 +280,10 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader
vshader_set_limits
(
This
);
if
(
deviceImpl
->
vs_selected_mode
==
SHADER_ARB
&&
(
GLINFO_LOCATION
).
arb_vs_offset_limit
&&
This
->
min_rel_offset
<=
This
->
max_rel_offset
)
{
if
(
deviceImpl
->
vs_selected_mode
==
SHADER_ARB
&&
((
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT
)
&&
This
->
min_rel_offset
<=
This
->
max_rel_offset
)
{
if
(
This
->
max_rel_offset
-
This
->
min_rel_offset
>
127
)
{
FIXME
(
"The difference between the minimum and maximum relative offset is > 127
\n
"
);
FIXME
(
"Which this OpenGL implementation does not support. Try using GLSL
\n
"
);
...
...
dlls/wined3d/wined3d_gl.h
View file @
40bc4790
...
...
@@ -4000,10 +4000,9 @@ typedef struct _WineD3D_GL_Info {
GL_VSVersion
vs_nv_version
;
GL_VSVersion
vs_ati_version
;
BOOL
arb_vs_offset_limit
;
BOOL
set_texcoord_w
;
DWORD
reserved_glsl_constants
;
BOOL
glsl_clip_varying
;
DWORD
quirks
;
BOOL
supported
[
WINED3D_GL_EXT_COUNT
];
...
...
dlls/wined3d/wined3d_private.h
View file @
40bc4790
...
...
@@ -43,6 +43,11 @@
#include "wine/list.h"
#include "wine/rbtree.h"
/* Driver quirks */
#define WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT 0x00000001
#define WINED3D_QUIRK_SET_TEXCOORD_W 0x00000002
#define WINED3D_QUIRK_GLSL_CLIP_VARYING 0x00000004
/* Texture format fixups */
enum
fixup_channel_source
...
...
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