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
351e6ddf
Commit
351e6ddf
authored
Feb 17, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle CS op emission from CS op handlers.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2a28c206
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
cs.c
dlls/wined3d/cs.c
+29
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/cs.c
View file @
351e6ddf
...
...
@@ -1576,26 +1576,47 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
{
if
(
size
>
cs
->
data_size
)
if
(
size
>
(
cs
->
data_size
-
cs
->
end
)
)
{
size_t
new_size
;
void
*
new_data
;
size
=
max
(
size
,
cs
->
data_size
*
2
);
if
(
!
(
new_data
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
cs
->
data
,
size
)))
new_size
=
max
(
size
,
cs
->
data_size
*
2
);
if
(
!
cs
->
end
)
new_data
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
cs
->
data
,
new_size
);
else
new_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
new_size
);
if
(
!
new_data
)
return
NULL
;
cs
->
data_size
=
size
;
cs
->
data_size
=
new_size
;
cs
->
start
=
cs
->
end
=
0
;
cs
->
data
=
new_data
;
}
return
cs
->
data
;
cs
->
end
+=
size
;
return
(
BYTE
*
)
cs
->
data
+
cs
->
start
;
}
static
void
wined3d_cs_st_submit
(
struct
wined3d_cs
*
cs
)
{
enum
wined3d_cs_op
opcode
=
*
(
const
enum
wined3d_cs_op
*
)
cs
->
data
;
wined3d_cs_op_handlers
[
opcode
](
cs
,
cs
->
data
);
enum
wined3d_cs_op
opcode
;
size_t
start
;
BYTE
*
data
;
data
=
cs
->
data
;
start
=
cs
->
start
;
cs
->
start
=
cs
->
end
;
opcode
=
*
(
const
enum
wined3d_cs_op
*
)
&
data
[
start
];
wined3d_cs_op_handlers
[
opcode
](
cs
,
&
data
[
start
]);
if
(
!
start
)
{
if
(
cs
->
data
!=
data
)
HeapFree
(
GetProcessHeap
(),
0
,
data
);
else
cs
->
start
=
cs
->
end
=
0
;
}
}
static
void
wined3d_cs_st_push_constants
(
struct
wined3d_cs
*
cs
,
enum
wined3d_push_constants
p
,
...
...
dlls/wined3d/wined3d_private.h
View file @
351e6ddf
...
...
@@ -3170,7 +3170,7 @@ struct wined3d_cs
struct
wined3d_fb_state
fb
;
struct
wined3d_state
state
;
size_t
data_size
;
size_t
data_size
,
start
,
end
;
void
*
data
;
};
...
...
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