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
d633b6d4
Commit
d633b6d4
authored
Apr 02, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid comparing against WINED3DSIO_* in the ARB shader backend.
parent
44648b2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
56 deletions
+55
-56
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+55
-56
No files found.
dlls/wined3d/arb_program_shader.c
View file @
d633b6d4
...
...
@@ -907,33 +907,33 @@ static void shader_hw_map2gl(const struct wined3d_shader_instruction *ins)
char
arguments
[
256
];
unsigned
int
i
;
switch
(
curOpcode
->
opcode
)
switch
(
ins
->
handler_idx
)
{
case
WINED3DSI
O
_ABS
:
instruction
=
"ABS"
;
break
;
case
WINED3DSI
O
_ADD
:
instruction
=
"ADD"
;
break
;
case
WINED3DSI
O
_CRS
:
instruction
=
"XPD"
;
break
;
case
WINED3DSI
O
_DP3
:
instruction
=
"DP3"
;
break
;
case
WINED3DSI
O
_DP4
:
instruction
=
"DP4"
;
break
;
case
WINED3DSI
O
_DST
:
instruction
=
"DST"
;
break
;
case
WINED3DSI
O
_EXP
:
instruction
=
"EX2"
;
break
;
case
WINED3DSI
O
_EXPP
:
instruction
=
"EXP"
;
break
;
case
WINED3DSI
O
_FRC
:
instruction
=
"FRC"
;
break
;
case
WINED3DSI
O
_LIT
:
instruction
=
"LIT"
;
break
;
case
WINED3DSI
O
_LOG
:
instruction
=
"LG2"
;
break
;
case
WINED3DSI
O
_LOGP
:
instruction
=
"LOG"
;
break
;
case
WINED3DSI
O
_LRP
:
instruction
=
"LRP"
;
break
;
case
WINED3DSI
O
_MAD
:
instruction
=
"MAD"
;
break
;
case
WINED3DSI
O
_MAX
:
instruction
=
"MAX"
;
break
;
case
WINED3DSI
O
_MIN
:
instruction
=
"MIN"
;
break
;
case
WINED3DSI
O
_MOV
:
instruction
=
"MOV"
;
break
;
case
WINED3DSI
O
_MUL
:
instruction
=
"MUL"
;
break
;
case
WINED3DSI
O
_NOP
:
instruction
=
"NOP"
;
break
;
case
WINED3DSI
O
_POW
:
instruction
=
"POW"
;
break
;
case
WINED3DSI
O
_SGE
:
instruction
=
"SGE"
;
break
;
case
WINED3DSI
O
_SLT
:
instruction
=
"SLT"
;
break
;
case
WINED3DSI
O
_SUB
:
instruction
=
"SUB"
;
break
;
case
WINED3DSI
H
_ABS
:
instruction
=
"ABS"
;
break
;
case
WINED3DSI
H
_ADD
:
instruction
=
"ADD"
;
break
;
case
WINED3DSI
H
_CRS
:
instruction
=
"XPD"
;
break
;
case
WINED3DSI
H
_DP3
:
instruction
=
"DP3"
;
break
;
case
WINED3DSI
H
_DP4
:
instruction
=
"DP4"
;
break
;
case
WINED3DSI
H
_DST
:
instruction
=
"DST"
;
break
;
case
WINED3DSI
H
_EXP
:
instruction
=
"EX2"
;
break
;
case
WINED3DSI
H
_EXPP
:
instruction
=
"EXP"
;
break
;
case
WINED3DSI
H
_FRC
:
instruction
=
"FRC"
;
break
;
case
WINED3DSI
H
_LIT
:
instruction
=
"LIT"
;
break
;
case
WINED3DSI
H
_LOG
:
instruction
=
"LG2"
;
break
;
case
WINED3DSI
H
_LOGP
:
instruction
=
"LOG"
;
break
;
case
WINED3DSI
H
_LRP
:
instruction
=
"LRP"
;
break
;
case
WINED3DSI
H
_MAD
:
instruction
=
"MAD"
;
break
;
case
WINED3DSI
H
_MAX
:
instruction
=
"MAX"
;
break
;
case
WINED3DSI
H
_MIN
:
instruction
=
"MIN"
;
break
;
case
WINED3DSI
H
_MOV
:
instruction
=
"MOV"
;
break
;
case
WINED3DSI
H
_MUL
:
instruction
=
"MUL"
;
break
;
case
WINED3DSI
H
_NOP
:
instruction
=
"NOP"
;
break
;
case
WINED3DSI
H
_POW
:
instruction
=
"POW"
;
break
;
case
WINED3DSI
H
_SGE
:
instruction
=
"SGE"
;
break
;
case
WINED3DSI
H
_SLT
:
instruction
=
"SLT"
;
break
;
case
WINED3DSI
H
_SUB
:
instruction
=
"SUB"
;
break
;
default:
instruction
=
""
;
FIXME
(
"Unhandled opcode %
s
\n
"
,
curOpcode
->
name
);
FIXME
(
"Unhandled opcode %
#x
\n
"
,
ins
->
handler_idx
);
break
;
}
...
...
@@ -1018,12 +1018,12 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
if
((
WINED3DSHADER_VERSION_MAJOR
(
ins
->
reg_maps
->
shader_version
)
==
1
&&
!
shader_is_pshader_version
(
ins
->
reg_maps
->
shader_version
)
&&
shader_get_regtype
(
ins
->
dst
)
==
WINED3DSPR_ADDR
)
||
ins
->
opcode
->
opcode
==
WINED3DSIO
_MOVA
)
||
ins
->
handler_idx
==
WINED3DSIH
_MOVA
)
{
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
char
src0_param
[
256
];
if
(
ins
->
opcode
->
opcode
==
WINED3DSIO
_MOVA
)
if
(
ins
->
handler_idx
==
WINED3DSIH
_MOVA
)
FIXME
(
"mova should round
\n
"
);
src0_param
[
0
]
=
'\0'
;
...
...
@@ -1271,7 +1271,7 @@ static void pshader_hw_texbem(const struct wined3d_shader_instruction *ins)
shader_hw_sample
(
ins
,
reg_dest_code
,
reg_coord
,
"TMP"
,
FALSE
,
FALSE
);
if
(
ins
->
opcode
->
opcode
==
WINED3DSIO
_TEXBEML
&&
has_luminance
)
if
(
ins
->
handler_idx
==
WINED3DSIH
_TEXBEML
&&
has_luminance
)
{
shader_addline
(
buffer
,
"MAD TMP, T%u.z, luminance%d.x, luminance%d.y;
\n
"
,
src
,
reg_dest_code
,
reg_dest_code
);
...
...
@@ -1554,30 +1554,30 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
tmp_ins
.
src_addr
[
1
]
=
ins
->
src_addr
[
1
];
tmp_ins
.
reg_maps
=
ins
->
reg_maps
;
switch
(
ins
->
opcode
->
opcode
)
switch
(
ins
->
handler_idx
)
{
case
WINED3DSIO
_M4x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
);
break
;
case
WINED3DSIO
_M4x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
);
break
;
case
WINED3DSIO
_M3x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
case
WINED3DSIO
_M3x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
case
WINED3DSIO
_M3x2
:
nComponents
=
2
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
default:
break
;
case
WINED3DSIH
_M4x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
);
break
;
case
WINED3DSIH
_M4x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP4
);
break
;
case
WINED3DSIH
_M3x4
:
nComponents
=
4
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
case
WINED3DSIH
_M3x3
:
nComponents
=
3
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
case
WINED3DSIH
_M3x2
:
nComponents
=
2
;
tmp_ins
.
opcode
=
shader_get_opcode
(
opcode_table
,
shader_version
,
WINED3DSIO_DP3
);
break
;
default:
break
;
}
tmp_ins
.
handler_idx
=
tmp_ins
.
opcode
->
handler_idx
;
...
...
@@ -1590,7 +1590,6 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
static
void
vshader_hw_rsq_rcp
(
const
struct
wined3d_shader_instruction
*
ins
)
{
CONST
SHADER_OPCODE
*
curOpcode
=
ins
->
opcode
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
DWORD
dst
=
ins
->
dst
;
DWORD
src
=
ins
->
src
[
0
];
...
...
@@ -1599,12 +1598,12 @@ static void vshader_hw_rsq_rcp(const struct wined3d_shader_instruction *ins)
char
tmpLine
[
256
];
switch
(
curOpcode
->
opcode
)
switch
(
ins
->
handler_idx
)
{
case
WINED3DSI
O
_RSQ
:
instruction
=
"RSQ"
;
break
;
case
WINED3DSI
O
_RCP
:
instruction
=
"RCP"
;
break
;
case
WINED3DSI
H
_RSQ
:
instruction
=
"RSQ"
;
break
;
case
WINED3DSI
H
_RCP
:
instruction
=
"RCP"
;
break
;
default:
instruction
=
""
;
FIXME
(
"Unhandled opcode %
s
\n
"
,
curOpcode
->
name
);
FIXME
(
"Unhandled opcode %
#x
\n
"
,
ins
->
handler_idx
);
break
;
}
...
...
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