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
1f22246b
Commit
1f22246b
authored
Oct 09, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send material updates through the command stream.
parent
db68c436
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
7 deletions
+30
-7
cs.c
dlls/wined3d/cs.c
+27
-0
device.c
dlls/wined3d/device.c
+2
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
1f22246b
...
...
@@ -46,6 +46,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_SAMPLER_STATE
,
WINED3D_CS_OP_SET_TRANSFORM
,
WINED3D_CS_OP_SET_CLIP_PLANE
,
WINED3D_CS_OP_SET_MATERIAL
,
};
struct
wined3d_cs_present
...
...
@@ -185,6 +186,12 @@ struct wined3d_cs_set_clip_plane
const
struct
wined3d_vec4
*
plane
;
};
struct
wined3d_cs_set_material
{
enum
wined3d_cs_op
opcode
;
const
struct
wined3d_material
*
material
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -719,6 +726,25 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_material
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_material
*
op
=
data
;
cs
->
state
.
material
=
*
op
->
material
;
device_invalidate_state
(
cs
->
device
,
STATE_MATERIAL
);
}
void
wined3d_cs_emit_set_material
(
struct
wined3d_cs
*
cs
,
const
struct
wined3d_material
*
material
)
{
struct
wined3d_cs_set_material
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_MATERIAL
;
op
->
material
=
material
;
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
,
...
...
@@ -741,6 +767,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_SAMPLER_STATE */
wined3d_cs_exec_set_sampler_state
,
/* WINED3D_CS_OP_SET_TRANSFORM */
wined3d_cs_exec_set_transform
,
/* WINED3D_CS_OP_SET_CLIP_PLANE */
wined3d_cs_exec_set_clip_plane
,
/* WINED3D_CS_OP_SET_MATERIAL */
wined3d_cs_exec_set_material
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
1f22246b
...
...
@@ -1785,15 +1785,10 @@ void CDECL wined3d_device_set_material(struct wined3d_device *device, const stru
device
->
update_state
->
material
=
*
material
;
/* Handle recording of state blocks */
if
(
device
->
recording
)
{
device
->
recording
->
changed
.
material
=
TRUE
;
TRACE
(
"Recording... not performing anything.
\n
"
);
return
;
}
device_invalidate_state
(
device
,
STATE_MATERIAL
);
else
wined3d_cs_emit_set_material
(
device
->
cs
,
material
);
}
void
CDECL
wined3d_device_get_material
(
const
struct
wined3d_device
*
device
,
struct
wined3d_material
*
material
)
...
...
dlls/wined3d/wined3d_private.h
View file @
1f22246b
...
...
@@ -2491,6 +2491,7 @@ void wined3d_cs_emit_set_depth_stencil(struct wined3d_cs *cs, struct wined3d_sur
void
wined3d_cs_emit_set_geometry_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_index_buffer
(
struct
wined3d_cs
*
cs
,
struct
wined3d_buffer
*
buffer
,
enum
wined3d_format_id
format_id
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_material
(
struct
wined3d_cs
*
cs
,
const
struct
wined3d_material
*
material
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_pixel_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_render_state
(
struct
wined3d_cs
*
cs
,
enum
wined3d_render_state
state
,
DWORD
value
)
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