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
0663eb93
Commit
0663eb93
authored
Apr 17, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the source relative addressing token as a struct wined3d_shader_src_param.
parent
d6ee7d59
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
baseshader.c
dlls/wined3d/baseshader.c
+15
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/baseshader.c
View file @
0663eb93
...
...
@@ -239,14 +239,15 @@ static void shader_parse_dst_param(DWORD param, DWORD addr_param, struct wined3d
dst
->
addr_token
=
addr_param
;
}
static
void
shader_parse_src_param
(
DWORD
param
,
DWORD
addr_param
,
struct
wined3d_shader_src_param
*
src
)
static
void
shader_parse_src_param
(
DWORD
param
,
const
struct
wined3d_shader_src_param
*
rel_addr
,
struct
wined3d_shader_src_param
*
src
)
{
src
->
register_type
=
((
param
&
WINED3DSP_REGTYPE_MASK
)
>>
WINED3DSP_REGTYPE_SHIFT
)
|
((
param
&
WINED3DSP_REGTYPE_MASK2
)
>>
WINED3DSP_REGTYPE_SHIFT2
);
src
->
register_idx
=
param
&
WINED3DSP_REGNUM_MASK
;
src
->
modifiers
=
param
&
WINED3DSP_SRCMOD_MASK
;
src
->
rel_addr
=
rel_addr
;
src
->
token
=
param
;
src
->
addr_token
=
addr_param
;
}
/* Note that this does not count the loop register
...
...
@@ -814,6 +815,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
const
SHADER_OPCODE
*
opcode_table
=
This
->
baseShader
.
shader_ins
;
const
SHADER_HANDLER
*
handler_table
=
device
->
shader_backend
->
shader_instruction_handler_table
;
DWORD
shader_version
=
reg_maps
->
shader_version
;
struct
wined3d_shader_src_param
src_rel_addr
[
4
];
struct
wined3d_shader_src_param
src_param
[
4
];
struct
wined3d_shader_dst_param
dst_param
;
struct
wined3d_shader_instruction
ins
;
...
...
@@ -908,9 +910,17 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
ins
.
src_count
=
curOpcode
->
num_params
-
curOpcode
->
dst_token
;
for
(
i
=
0
;
i
<
ins
.
src_count
;
++
i
)
{
DWORD
param
,
addr_token
=
0
;
pToken
+=
shader_get_param
(
pToken
,
shader_version
,
&
param
,
&
addr_token
);
shader_parse_src_param
(
param
,
addr_token
,
&
src_param
[
i
]);
DWORD
param
,
addr_param
;
pToken
+=
shader_get_param
(
pToken
,
shader_version
,
&
param
,
&
addr_param
);
if
(
param
&
WINED3DSHADER_ADDRMODE_RELATIVE
)
{
shader_parse_src_param
(
addr_param
,
NULL
,
&
src_rel_addr
[
i
]);
shader_parse_src_param
(
param
,
&
src_rel_addr
[
i
],
&
src_param
[
i
]);
}
else
{
shader_parse_src_param
(
param
,
NULL
,
&
src_param
[
i
]);
}
}
/* Call appropriate function for output target */
...
...
dlls/wined3d/glsl_shader.c
View file @
0663eb93
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
View file @
0663eb93
...
...
@@ -467,8 +467,8 @@ struct wined3d_shader_src_param
WINED3DSHADER_PARAM_REGISTER_TYPE
register_type
;
UINT
register_idx
;
DWORD
modifiers
;
const
struct
wined3d_shader_src_param
*
rel_addr
;
DWORD
token
;
DWORD
addr_token
;
};
struct
wined3d_shader_instruction
...
...
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