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
8c1e326e
Commit
8c1e326e
authored
Dec 03, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass shader_data and reg_maps to need_rel_addr_const().
parent
e43cd744
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-6
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8c1e326e
...
@@ -316,11 +316,11 @@ struct shader_arb_priv
...
@@ -316,11 +316,11 @@ struct shader_arb_priv
};
};
/* GL locking for state handlers is done by the caller. */
/* GL locking for state handlers is done by the caller. */
static
BOOL
need_rel_addr_const
(
IWineD3DVertexShaderImpl
*
shader
,
const
struct
wined3d_gl_info
*
gl_info
)
static
BOOL
need_rel_addr_const
(
const
struct
arb_vshader_private
*
shader_data
,
const
struct
shader_reg_maps
*
reg_maps
,
const
struct
wined3d_gl_info
*
gl_info
)
{
{
const
struct
arb_vshader_private
*
shader_data
=
shader
->
baseShader
.
backend_data
;
if
(
shader_data
->
rel_offset
)
return
TRUE
;
if
(
shader_data
->
rel_offset
)
return
TRUE
;
if
(
!
shader
->
baseShader
.
reg_maps
.
usesmova
)
return
FALSE
;
if
(
!
reg_maps
->
usesmova
)
return
FALSE
;
return
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM2_OPTION
];
return
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM2_OPTION
];
}
}
...
@@ -333,7 +333,8 @@ static inline BOOL use_nv_clip(const struct wined3d_gl_info *gl_info)
...
@@ -333,7 +333,8 @@ static inline BOOL use_nv_clip(const struct wined3d_gl_info *gl_info)
static
BOOL
need_helper_const
(
IWineD3DVertexShaderImpl
*
shader
,
const
struct
wined3d_gl_info
*
gl_info
)
static
BOOL
need_helper_const
(
IWineD3DVertexShaderImpl
*
shader
,
const
struct
wined3d_gl_info
*
gl_info
)
{
{
if
(
need_rel_addr_const
(
shader
,
gl_info
))
return
TRUE
;
if
(
need_rel_addr_const
(
shader
->
baseShader
.
backend_data
,
&
shader
->
baseShader
.
reg_maps
,
gl_info
))
return
TRUE
;
if
(
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM
])
return
TRUE
;
/* Need to init colors. */
if
(
!
gl_info
->
supported
[
NV_VERTEX_PROGRAM
])
return
TRUE
;
/* Need to init colors. */
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT
)
return
TRUE
;
/* Load the immval offset. */
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT
)
return
TRUE
;
/* Load the immval offset. */
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
return
TRUE
;
/* Have to init texcoords. */
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
return
TRUE
;
/* Have to init texcoords. */
...
@@ -349,7 +350,8 @@ static unsigned int reserved_vs_const(IWineD3DVertexShaderImpl *shader, const st
...
@@ -349,7 +350,8 @@ static unsigned int reserved_vs_const(IWineD3DVertexShaderImpl *shader, const st
/* We use one PARAM for the pos fixup, and in some cases one to load
/* We use one PARAM for the pos fixup, and in some cases one to load
* some immediate values into the shader. */
* some immediate values into the shader. */
if
(
need_helper_const
(
shader
,
gl_info
))
++
ret
;
if
(
need_helper_const
(
shader
,
gl_info
))
++
ret
;
if
(
need_rel_addr_const
(
shader
,
gl_info
))
++
ret
;
if
(
need_rel_addr_const
(
shader
->
baseShader
.
backend_data
,
&
shader
->
baseShader
.
reg_maps
,
gl_info
))
++
ret
;
return
ret
;
return
ret
;
}
}
...
@@ -4106,7 +4108,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
...
@@ -4106,7 +4108,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
{
{
shader_addline
(
buffer
,
"PARAM helper_const = { 0.0, 1.0, 2.0, %1.10f};
\n
"
,
eps
);
shader_addline
(
buffer
,
"PARAM helper_const = { 0.0, 1.0, 2.0, %1.10f};
\n
"
,
eps
);
}
}
if
(
need_rel_addr_const
(
Thi
s
,
gl_info
))
if
(
need_rel_addr_const
(
shader_data
,
reg_map
s
,
gl_info
))
{
{
shader_addline
(
buffer
,
"PARAM rel_addr_const = { 0.5, %d.0, 0.0, 0.0 };
\n
"
,
shader_data
->
rel_offset
);
shader_addline
(
buffer
,
"PARAM rel_addr_const = { 0.5, %d.0, 0.0, 0.0 };
\n
"
,
shader_data
->
rel_offset
);
shader_addline
(
buffer
,
"TEMP A0_SHADOW;
\n
"
);
shader_addline
(
buffer
,
"TEMP A0_SHADOW;
\n
"
);
...
...
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