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
0a17173b
Commit
0a17173b
authored
Sep 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a union for declaration shader instruction arguments.
parent
2760a70a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
13 deletions
+18
-13
shader.c
dlls/wined3d/shader.c
+13
-11
shader_sm1.c
dlls/wined3d/shader_sm1.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-1
No files found.
dlls/wined3d/shader.c
View file @
0a17173b
...
...
@@ -501,29 +501,31 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
/* Handle declarations. */
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL
)
{
switch
(
ins
.
semantic
.
reg
.
reg
.
type
)
struct
wined3d_shader_semantic
*
semantic
=
&
ins
.
declaration
.
semantic
;
switch
(
semantic
->
reg
.
reg
.
type
)
{
/* Mark input registers used. */
case
WINED3DSPR_INPUT
:
reg_maps
->
input_registers
|=
1
<<
ins
.
semantic
.
reg
.
reg
.
idx
;
shader_signature_from_semantic
(
&
input_signature
[
ins
.
semantic
.
reg
.
reg
.
idx
],
&
ins
.
semantic
);
reg_maps
->
input_registers
|=
1
<<
semantic
->
reg
.
reg
.
idx
;
shader_signature_from_semantic
(
&
input_signature
[
semantic
->
reg
.
reg
.
idx
],
semantic
);
break
;
/* Vertex shader: mark 3.0 output registers used, save token. */
case
WINED3DSPR_OUTPUT
:
reg_maps
->
output_registers
|=
1
<<
ins
.
semantic
.
reg
.
reg
.
idx
;
shader_signature_from_semantic
(
&
output_signature
[
ins
.
semantic
.
reg
.
reg
.
idx
],
&
ins
.
semantic
);
if
(
ins
.
semantic
.
usage
==
WINED3D_DECL_USAGE_FOG
)
reg_maps
->
output_registers
|=
1
<<
semantic
->
reg
.
reg
.
idx
;
shader_signature_from_semantic
(
&
output_signature
[
semantic
->
reg
.
reg
.
idx
],
semantic
);
if
(
semantic
->
usage
==
WINED3D_DECL_USAGE_FOG
)
reg_maps
->
fog
=
1
;
break
;
/* Save sampler usage token. */
case
WINED3DSPR_SAMPLER
:
reg_maps
->
sampler_type
[
ins
.
semantic
.
reg
.
reg
.
idx
]
=
ins
.
semantic
.
sampler_type
;
reg_maps
->
sampler_type
[
semantic
->
reg
.
reg
.
idx
]
=
semantic
->
sampler_type
;
break
;
default:
TRACE
(
"Not recording DCL register type %#x.
\n
"
,
ins
.
semantic
.
reg
.
reg
.
type
);
TRACE
(
"Not recording DCL register type %#x.
\n
"
,
semantic
->
reg
.
reg
.
type
);
break
;
}
}
...
...
@@ -1314,10 +1316,10 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL
)
{
shader_dump_decl_usage
(
&
ins
.
semantic
,
&
shader_version
);
shader_dump_ins_modifiers
(
&
ins
.
semantic
.
reg
);
shader_dump_decl_usage
(
&
ins
.
declaration
.
semantic
,
&
shader_version
);
shader_dump_ins_modifiers
(
&
ins
.
declaration
.
semantic
.
reg
);
TRACE
(
" "
);
shader_dump_dst_param
(
&
ins
.
semantic
.
reg
,
&
shader_version
);
shader_dump_dst_param
(
&
ins
.
declaration
.
semantic
.
reg
,
&
shader_version
);
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DEF
)
{
...
...
dlls/wined3d/shader_sm1.c
View file @
0a17173b
...
...
@@ -670,7 +670,7 @@ static void shader_sm1_read_instruction(void *data, const DWORD **ptr, struct wi
if
(
ins
->
handler_idx
==
WINED3DSIH_DCL
)
{
shader_sm1_read_semantic
(
&
p
,
&
ins
->
semantic
);
shader_sm1_read_semantic
(
&
p
,
&
ins
->
declaration
.
semantic
);
}
else
if
(
ins
->
handler_idx
==
WINED3DSIH_DEF
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
0a17173b
...
...
@@ -663,7 +663,10 @@ struct wined3d_shader_instruction
const
struct
wined3d_shader_dst_param
*
dst
;
UINT
src_count
;
const
struct
wined3d_shader_src_param
*
src
;
struct
wined3d_shader_semantic
semantic
;
union
{
struct
wined3d_shader_semantic
semantic
;
}
declaration
;
};
struct
wined3d_shader_attribute
...
...
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