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
c6f8404b
Commit
c6f8404b
authored
Oct 07, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send transformation matrix updates through the command stream.
parent
b2e75e27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
cs.c
dlls/wined3d/cs.c
+31
-0
device.c
dlls/wined3d/device.c
+1
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
c6f8404b
...
...
@@ -44,6 +44,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_RENDER_STATE
,
WINED3D_CS_OP_SET_TEXTURE_STATE
,
WINED3D_CS_OP_SET_SAMPLER_STATE
,
WINED3D_CS_OP_SET_TRANSFORM
,
};
struct
wined3d_cs_present
...
...
@@ -169,6 +170,13 @@ struct wined3d_cs_set_sampler_state
DWORD
value
;
};
struct
wined3d_cs_set_transform
{
enum
wined3d_cs_op
opcode
;
enum
wined3d_transform_state
state
;
const
struct
wined3d_matrix
*
matrix
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -661,6 +669,28 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_transform
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_transform
*
op
=
data
;
cs
->
state
.
transforms
[
op
->
state
]
=
*
op
->
matrix
;
if
(
op
->
state
<
WINED3D_TS_WORLD_MATRIX
(
cs
->
device
->
adapter
->
gl_info
.
limits
.
blends
))
device_invalidate_state
(
cs
->
device
,
STATE_TRANSFORM
(
op
->
state
));
}
void
wined3d_cs_emit_set_transform
(
struct
wined3d_cs
*
cs
,
enum
wined3d_transform_state
state
,
const
struct
wined3d_matrix
*
matrix
)
{
struct
wined3d_cs_set_transform
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_TRANSFORM
;
op
->
state
=
state
;
op
->
matrix
=
matrix
;
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
,
...
...
@@ -681,6 +711,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_RENDER_STATE */
wined3d_cs_exec_set_render_state
,
/* WINED3D_CS_OP_SET_TEXTURE_STATE */
wined3d_cs_exec_set_texture_state
,
/* WINED3D_CS_OP_SET_SAMPLER_STATE */
wined3d_cs_exec_set_sampler_state
,
/* WINED3D_CS_OP_SET_TRANSFORM */
wined3d_cs_exec_set_transform
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
c6f8404b
...
...
@@ -1360,9 +1360,7 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device,
}
device
->
state
.
transforms
[
d3dts
]
=
*
matrix
;
if
(
d3dts
<
WINED3D_TS_WORLD_MATRIX
(
device
->
adapter
->
gl_info
.
limits
.
blends
))
device_invalidate_state
(
device
,
STATE_TRANSFORM
(
d3dts
));
wined3d_cs_emit_set_transform
(
device
->
cs
,
d3dts
,
matrix
);
}
void
CDECL
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
...
...
dlls/wined3d/wined3d_private.h
View file @
c6f8404b
...
...
@@ -2505,6 +2505,8 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
void
wined3d_cs_emit_set_texture
(
struct
wined3d_cs
*
cs
,
UINT
stage
,
struct
wined3d_texture
*
texture
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_texture_state
(
struct
wined3d_cs
*
cs
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
,
DWORD
value
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_transform
(
struct
wined3d_cs
*
cs
,
enum
wined3d_transform_state
state
,
const
struct
wined3d_matrix
*
matrix
)
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_vertex_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
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