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
26425697
Commit
26425697
authored
Oct 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send stream frequency updates through the command stream.
parent
70bc6d5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
cs.c
dlls/wined3d/cs.c
+35
-0
device.c
dlls/wined3d/device.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
26425697
...
...
@@ -34,6 +34,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_DEPTH_STENCIL
,
WINED3D_CS_OP_SET_VERTEX_DECLARATION
,
WINED3D_CS_OP_SET_STREAM_SOURCE
,
WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ
,
};
struct
wined3d_cs_present
...
...
@@ -108,6 +109,14 @@ struct wined3d_cs_set_stream_source
UINT
stride
;
};
struct
wined3d_cs_set_stream_source_freq
{
enum
wined3d_cs_op
opcode
;
UINT
stream_idx
;
UINT
frequency
;
UINT
flags
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -355,6 +364,31 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_stream_source_freq
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_stream_source_freq
*
op
=
data
;
struct
wined3d_stream_state
*
stream
;
stream
=
&
cs
->
state
.
streams
[
op
->
stream_idx
];
stream
->
frequency
=
op
->
frequency
;
stream
->
flags
=
op
->
flags
;
device_invalidate_state
(
cs
->
device
,
STATE_STREAMSRC
);
}
void
wined3d_cs_emit_set_stream_source_freq
(
struct
wined3d_cs
*
cs
,
UINT
stream_idx
,
UINT
frequency
,
UINT
flags
)
{
struct
wined3d_cs_set_stream_source_freq
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ
;
op
->
stream_idx
=
stream_idx
;
op
->
frequency
=
frequency
;
op
->
flags
=
flags
;
cs
->
ops
->
submit
(
cs
);
}
static
void
(
*
const
wined3d_cs_op_handlers
[])(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
=
{
/* WINED3D_CS_OP_PRESENT */
wined3d_cs_exec_present
,
...
...
@@ -366,6 +400,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_DEPTH_STENCIL */
wined3d_cs_exec_set_depth_stencil
,
/* WINED3D_CS_OP_SET_VERTEX_DECLARATION */
wined3d_cs_exec_set_vertex_declaration
,
/* WINED3D_CS_OP_SET_STREAM_SOURCE */
wined3d_cs_exec_set_stream_source
,
/* WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ */
wined3d_cs_exec_set_stream_source_freq
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
26425697
...
...
@@ -1308,7 +1308,7 @@ HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *devic
if
(
device
->
recording
)
device
->
recording
->
changed
.
streamFreq
|=
1
<<
stream_idx
;
else
if
(
stream
->
frequency
!=
old_freq
||
stream
->
flags
!=
old_flags
)
device_invalidate_state
(
device
,
STATE_STREAMSRC
);
wined3d_cs_emit_set_stream_source_freq
(
device
->
cs
,
stream_idx
,
stream
->
frequency
,
stream
->
flags
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
26425697
...
...
@@ -2492,6 +2492,8 @@ void wined3d_cs_emit_set_render_target(struct wined3d_cs *cs, UINT render_target
void
wined3d_cs_emit_set_scissor_rect
(
struct
wined3d_cs
*
cs
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_stream_source
(
struct
wined3d_cs
*
cs
,
UINT
stream_idx
,
struct
wined3d_buffer
*
buffer
,
UINT
offset
,
UINT
stride
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_stream_source_freq
(
struct
wined3d_cs
*
cs
,
UINT
stream_idx
,
UINT
frequency
,
UINT
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_vertex_declaration
(
struct
wined3d_cs
*
cs
,
struct
wined3d_vertex_declaration
*
declaration
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_viewport
(
struct
wined3d_cs
*
cs
,
const
struct
wined3d_viewport
*
viewport
)
DECLSPEC_HIDDEN
;
...
...
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