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
eefb45f3
Commit
eefb45f3
authored
Feb 22, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly report shader comment sizes.
parent
4064efdc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
shader.c
dlls/wined3d/shader.c
+6
-3
shader_sm1.c
dlls/wined3d/shader_sm1.c
+5
-2
shader_sm4.c
dlls/wined3d/shader_sm4.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/shader.c
View file @
eefb45f3
...
...
@@ -467,10 +467,11 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct
{
struct
wined3d_shader_instruction
ins
;
const
char
*
comment
;
UINT
comment_size
;
UINT
param_size
;
/* Skip comments. */
fe
->
shader_read_comment
(
&
ptr
,
&
comment
);
fe
->
shader_read_comment
(
&
ptr
,
&
comment
,
&
comment_size
);
if
(
comment
)
continue
;
/* Fetch opcode. */
...
...
@@ -1115,10 +1116,11 @@ void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffe
while
(
!
fe
->
shader_is_end
(
fe_data
,
&
ptr
))
{
const
char
*
comment
;
UINT
comment_size
;
UINT
param_size
;
/* Skip comment tokens. */
fe
->
shader_read_comment
(
&
ptr
,
&
comment
);
fe
->
shader_read_comment
(
&
ptr
,
&
comment
,
&
comment_size
);
if
(
comment
)
continue
;
/* Read opcode. */
...
...
@@ -1222,10 +1224,11 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
{
struct
wined3d_shader_instruction
ins
;
const
char
*
comment
;
UINT
comment_size
;
UINT
param_size
;
/* comment */
fe
->
shader_read_comment
(
&
ptr
,
&
comment
);
fe
->
shader_read_comment
(
&
ptr
,
&
comment
,
&
comment_size
);
if
(
comment
)
{
TRACE
(
"//%s
\n
"
,
comment
);
...
...
dlls/wined3d/shader_sm1.c
View file @
eefb45f3
...
...
@@ -641,9 +641,10 @@ static void shader_sm1_read_semantic(const DWORD **ptr, struct wined3d_shader_se
shader_parse_dst_param
(
dst_token
,
NULL
,
&
semantic
->
reg
);
}
static
void
shader_sm1_read_comment
(
const
DWORD
**
ptr
,
const
char
**
comment
)
static
void
shader_sm1_read_comment
(
const
DWORD
**
ptr
,
const
char
**
comment
,
UINT
*
comment_size
)
{
DWORD
token
=
**
ptr
;
UINT
size
;
if
((
token
&
WINED3DSI_OPCODE_MASK
)
!=
WINED3D_SM1_OP_COMMENT
)
{
...
...
@@ -651,8 +652,10 @@ static void shader_sm1_read_comment(const DWORD **ptr, const char **comment)
return
;
}
size
=
(
token
&
WINED3DSI_COMMENTSIZE_MASK
)
>>
WINED3DSI_COMMENTSIZE_SHIFT
;
*
comment
=
(
const
char
*
)
++
(
*
ptr
);
*
ptr
+=
(
token
&
WINED3DSI_COMMENTSIZE_MASK
)
>>
WINED3DSI_COMMENTSIZE_SHIFT
;
*
comment_size
=
size
*
sizeof
(
DWORD
);
*
ptr
+=
size
;
}
static
BOOL
shader_sm1_is_end
(
void
*
data
,
const
DWORD
**
ptr
)
...
...
dlls/wined3d/shader_sm4.c
View file @
eefb45f3
...
...
@@ -406,9 +406,9 @@ static void shader_sm4_read_semantic(const DWORD **ptr, struct wined3d_shader_se
FIXME
(
"ptr %p, semantic %p stub!
\n
"
,
ptr
,
semantic
);
}
static
void
shader_sm4_read_comment
(
const
DWORD
**
ptr
,
const
char
**
comment
)
static
void
shader_sm4_read_comment
(
const
DWORD
**
ptr
,
const
char
**
comment
,
UINT
*
comment_size
)
{
FIXME
(
"ptr %p, comment %p
stub!
\n
"
,
ptr
,
comment
);
FIXME
(
"ptr %p, comment %p
, comment_size %p stub!
\n
"
,
ptr
,
comment
,
comment_size
);
*
comment
=
NULL
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
eefb45f3
...
...
@@ -625,7 +625,7 @@ struct wined3d_shader_frontend
void
(
*
shader_read_dst_param
)(
void
*
data
,
const
DWORD
**
ptr
,
struct
wined3d_shader_dst_param
*
dst_param
,
struct
wined3d_shader_src_param
*
dst_rel_addr
);
void
(
*
shader_read_semantic
)(
const
DWORD
**
ptr
,
struct
wined3d_shader_semantic
*
semantic
);
void
(
*
shader_read_comment
)(
const
DWORD
**
ptr
,
const
char
**
comment
);
void
(
*
shader_read_comment
)(
const
DWORD
**
ptr
,
const
char
**
comment
,
UINT
*
comment_size
);
BOOL
(
*
shader_is_end
)(
void
*
data
,
const
DWORD
**
ptr
);
};
...
...
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