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
04b2e0b1
Commit
04b2e0b1
authored
Apr 03, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the opcode field from struct wined3d_shader_instruction.
parent
29c9dc98
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
25 deletions
+15
-25
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-11
baseshader.c
dlls/wined3d/baseshader.c
+0
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
04b2e0b1
...
...
@@ -1541,9 +1541,6 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
int
i
;
int
nComponents
=
0
;
struct
wined3d_shader_instruction
tmp_ins
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
shader
;
const
SHADER_OPCODE
*
opcode_table
=
shader
->
baseShader
.
shader_ins
;
DWORD
shader_version
=
ins
->
reg_maps
->
shader_version
;
memset
(
&
tmp_ins
,
0
,
sizeof
(
tmp_ins
));
...
...
@@ -1554,36 +1551,36 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
tmp_ins
.
src_addr
[
0
]
=
ins
->
src_addr
[
0
];
tmp_ins
.
src_addr
[
1
]
=
ins
->
src_addr
[
1
];
tmp_ins
.
reg_maps
=
ins
->
reg_maps
;
tmp_ins
.
dst_count
=
1
;
tmp_ins
.
src_count
=
2
;
switch
(
ins
->
handler_idx
)
{
case
WINED3DSIH_M4x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP4
;
break
;
case
WINED3DSIH_M4x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP4
;
break
;
case
WINED3DSIH_M3x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
case
WINED3DSIH_M3x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
case
WINED3DSIH_M3x2
:
nComponents
=
2
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
default:
FIXME
(
"Unhandled opcode %#x
\n
"
,
ins
->
handler_idx
);
break
;
}
tmp_ins
.
handler_idx
=
tmp_ins
.
opcode
->
handler_idx
;
tmp_ins
.
dst_count
=
tmp_ins
.
opcode
->
dst_token
?
1
:
0
;
tmp_ins
.
src_count
=
tmp_ins
.
opcode
->
num_params
-
tmp_ins
.
dst_count
;
for
(
i
=
0
;
i
<
nComponents
;
i
++
)
{
tmp_ins
.
dst
=
((
ins
->
dst
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
...
...
dlls/wined3d/baseshader.c
View file @
04b2e0b1
...
...
@@ -838,8 +838,6 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
continue
;
}
ins
.
opcode
=
curOpcode
;
ins
.
handler_idx
=
curOpcode
->
handler_idx
;
ins
.
flags
=
opcode_token
&
WINED3D_OPCODESPECIFICCONTROL_MASK
;
ins
.
coissue
=
opcode_token
&
WINED3DSI_COISSUE
;
...
...
dlls/wined3d/glsl_shader.c
View file @
04b2e0b1
...
...
@@ -2032,9 +2032,6 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins)
Vertex shaders to GLSL codes */
static
void
shader_glsl_mnxn
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
shader
;
const
SHADER_OPCODE
*
opcode_table
=
shader
->
baseShader
.
shader_ins
;
DWORD
shader_version
=
ins
->
reg_maps
->
shader_version
;
int
i
;
int
nComponents
=
0
;
struct
wined3d_shader_instruction
tmp_ins
;
...
...
@@ -2048,36 +2045,35 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
tmp_ins
.
src_addr
[
0
]
=
ins
->
src_addr
[
0
];
tmp_ins
.
src_addr
[
1
]
=
ins
->
src_addr
[
1
];
tmp_ins
.
reg_maps
=
ins
->
reg_maps
;
tmp_ins
.
dst_count
=
1
;
tmp_ins
.
src_count
=
2
;
switch
(
ins
->
handler_idx
)
{
case
WINED3DSIH_M4x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP4
;
break
;
case
WINED3DSIH_M4x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP4
;
break
;
case
WINED3DSIH_M3x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
case
WINED3DSIH_M3x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
case
WINED3DSIH_M3x2
:
nComponents
=
2
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
)
;
tmp_ins
.
handler_idx
=
WINED3DSIH_DP3
;
break
;
default:
break
;
}
tmp_ins
.
handler_idx
=
tmp_ins
.
opcode
->
handler_idx
;
tmp_ins
.
dst_count
=
tmp_ins
.
opcode
->
dst_token
?
1
:
0
;
tmp_ins
.
src_count
=
tmp_ins
.
opcode
->
num_params
-
tmp_ins
.
dst_count
;
for
(
i
=
0
;
i
<
nComponents
;
++
i
)
{
tmp_ins
.
dst
=
((
ins
->
dst
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
...
...
dlls/wined3d/wined3d_private.h
View file @
04b2e0b1
...
...
@@ -454,7 +454,6 @@ struct wined3d_shader_instruction
{
IWineD3DBaseShader
*
shader
;
const
shader_reg_maps
*
reg_maps
;
CONST
SHADER_OPCODE
*
opcode
;
enum
WINED3D_SHADER_INSTRUCTION_HANDLER
handler_idx
;
DWORD
flags
;
BOOL
coissue
;
...
...
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