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
18df05eb
Commit
18df05eb
authored
Apr 30, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass the register type and index to shader_get_float_offset().
parent
3fc27f67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
baseshader.c
dlls/wined3d/baseshader.c
+14
-14
No files found.
dlls/wined3d/baseshader.c
View file @
18df05eb
...
...
@@ -453,20 +453,18 @@ static inline BOOL shader_is_comment(DWORD token)
/* Convert floating point offset relative
* to a register file to an absolute offset for float constants */
static
unsigned
int
shader_get_float_offset
(
const
DWORD
reg
)
static
unsigned
int
shader_get_float_offset
(
WINED3DSHADER_PARAM_REGISTER_TYPE
register_type
,
UINT
register_idx
)
{
unsigned
int
regnum
=
reg
&
WINED3DSP_REGNUM_MASK
;
int
regtype
=
shader_get_regtype
(
reg
);
switch
(
regtype
)
{
case
WINED3DSPR_CONST
:
return
regnum
;
case
WINED3DSPR_CONST2
:
return
2048
+
regnum
;
case
WINED3DSPR_CONST3
:
return
4096
+
regnum
;
case
WINED3DSPR_CONST4
:
return
6144
+
regnum
;
switch
(
register_type
)
{
case
WINED3DSPR_CONST
:
return
register_idx
;
case
WINED3DSPR_CONST2
:
return
2048
+
register_idx
;
case
WINED3DSPR_CONST3
:
return
4096
+
register_idx
;
case
WINED3DSPR_CONST4
:
return
6144
+
register_idx
;
default:
FIXME
(
"Unsupported register type: %d
\n
"
,
regtype
);
return
reg
num
;
}
FIXME
(
"Unsupported register type: %d
\n
"
,
reg
ister_
type
);
return
reg
ister_idx
;
}
}
static
void
shader_delete_constant_list
(
struct
list
*
clist
)
{
...
...
@@ -962,7 +960,8 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, BOOL is
case
WINED3DSPR_CONST3
:
case
WINED3DSPR_CONST4
:
TRACE
(
"c"
);
shader_dump_arr_entry
(
param
,
addr_token
,
shader_get_float_offset
(
param
),
shader_version
);
shader_dump_arr_entry
(
param
,
addr_token
,
shader_get_float_offset
(
shader_get_regtype
(
param
),
param
&
WINED3DSP_REGNUM_MASK
),
shader_version
);
break
;
case
WINED3DSPR_TEXTURE
:
/* vs: case D3DSPR_ADDR */
TRACE
(
"%c%u"
,
(
pshader
?
't'
:
'a'
),
reg
);
...
...
@@ -1268,7 +1267,8 @@ void shader_trace_init(const DWORD *pFunction, const SHADER_OPCODE *opcode_table
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DEF
)
{
unsigned
int
offset
=
shader_get_float_offset
(
*
pToken
);
unsigned
int
offset
=
shader_get_float_offset
(
shader_get_regtype
(
*
pToken
),
*
pToken
&
WINED3DSP_REGNUM_MASK
);
TRACE
(
"def c%u = %f, %f, %f, %f"
,
offset
,
*
(
const
float
*
)(
pToken
+
1
),
...
...
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