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
82cf8b20
Commit
82cf8b20
authored
Oct 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send pixel shader binding updates through the command stream.
parent
819e9dda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
+29
-15
cs.c
dlls/wined3d/cs.c
+21
-0
device.c
dlls/wined3d/device.c
+7
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
82cf8b20
...
...
@@ -40,6 +40,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_TEXTURE
,
WINED3D_CS_OP_SET_VERTEX_SHADER
,
WINED3D_CS_OP_SET_GEOMETRY_SHADER
,
WINED3D_CS_OP_SET_PIXEL_SHADER
,
};
struct
wined3d_cs_present
...
...
@@ -551,6 +552,25 @@ void wined3d_cs_emit_set_geometry_shader(struct wined3d_cs *cs, struct wined3d_s
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_pixel_shader
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_shader
*
op
=
data
;
cs
->
state
.
pixel_shader
=
op
->
shader
;
device_invalidate_state
(
cs
->
device
,
STATE_PIXELSHADER
);
}
void
wined3d_cs_emit_set_pixel_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
{
struct
wined3d_cs_set_shader
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_PIXEL_SHADER
;
op
->
shader
=
shader
;
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
,
...
...
@@ -567,6 +587,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_TEXTURE */
wined3d_cs_exec_set_texture
,
/* WINED3D_CS_OP_SET_VERTEX_SHADER */
wined3d_cs_exec_set_vertex_shader
,
/* WINED3D_CS_OP_SET_GEOMETRY_SHADER */
wined3d_cs_exec_set_geometry_shader
,
/* WINED3D_CS_OP_SET_PIXEL_SHADER */
wined3d_cs_exec_set_pixel_shader
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
82cf8b20
...
...
@@ -2345,27 +2345,19 @@ void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct
TRACE
(
"device %p, shader %p.
\n
"
,
device
,
shader
);
if
(
shader
)
wined3d_shader_incref
(
shader
);
if
(
prev
)
wined3d_shader_decref
(
prev
);
device
->
update_state
->
pixel_shader
=
shader
;
if
(
device
->
recording
)
{
TRACE
(
"Recording... not performing anything.
\n
"
);
device
->
recording
->
changed
.
pixelShader
=
TRUE
;
return
;
}
if
(
shader
==
prev
)
{
TRACE
(
"Application is setting the old shader over, nothing to do.
\n
"
);
return
;
}
device_invalidate_state
(
device
,
STATE_PIXELSHADER
);
if
(
shader
)
wined3d_shader_incref
(
shader
);
device
->
update_state
->
pixel_shader
=
shader
;
if
(
!
device
->
recording
)
wined3d_cs_emit_set_pixel_shader
(
device
->
cs
,
shader
);
if
(
prev
)
wined3d_shader_decref
(
prev
);
}
struct
wined3d_shader
*
CDECL
wined3d_device_get_pixel_shader
(
const
struct
wined3d_device
*
device
)
...
...
dlls/wined3d/wined3d_private.h
View file @
82cf8b20
...
...
@@ -2490,6 +2490,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_pixel_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_render_target
(
struct
wined3d_cs
*
cs
,
UINT
render_target_idx
,
struct
wined3d_surface
*
render_target
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_scissor_rect
(
struct
wined3d_cs
*
cs
,
const
RECT
*
rect
)
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