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
f699b6da
Commit
f699b6da
authored
Oct 10, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send sampler binding updates through the command stream.
parent
738de80d
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
+31
-0
device.c
dlls/wined3d/device.c
+5
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
f699b6da
...
...
@@ -39,6 +39,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_INDEX_BUFFER
,
WINED3D_CS_OP_SET_CONSTANT_BUFFER
,
WINED3D_CS_OP_SET_TEXTURE
,
WINED3D_CS_OP_SET_SAMPLER
,
WINED3D_CS_OP_SET_SHADER
,
WINED3D_CS_OP_SET_RENDER_STATE
,
WINED3D_CS_OP_SET_TEXTURE_STATE
,
...
...
@@ -150,6 +151,14 @@ struct wined3d_cs_set_texture
struct
wined3d_texture
*
texture
;
};
struct
wined3d_cs_set_sampler
{
enum
wined3d_cs_op
opcode
;
enum
wined3d_shader_type
type
;
UINT
sampler_idx
;
struct
wined3d_sampler
*
sampler
;
};
struct
wined3d_cs_set_shader
{
enum
wined3d_cs_op
opcode
;
...
...
@@ -599,6 +608,27 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_sampler
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_sampler
*
op
=
data
;
cs
->
state
.
sampler
[
op
->
type
][
op
->
sampler_idx
]
=
op
->
sampler
;
}
void
wined3d_cs_emit_set_sampler
(
struct
wined3d_cs
*
cs
,
enum
wined3d_shader_type
type
,
UINT
sampler_idx
,
struct
wined3d_sampler
*
sampler
)
{
struct
wined3d_cs_set_sampler
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_SAMPLER
;
op
->
type
=
type
;
op
->
sampler_idx
=
sampler_idx
;
op
->
sampler
=
sampler
;
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_shader
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_shader
*
op
=
data
;
...
...
@@ -759,6 +789,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_INDEX_BUFFER */
wined3d_cs_exec_set_index_buffer
,
/* WINED3D_CS_OP_SET_CONSTANT_BUFFER */
wined3d_cs_exec_set_constant_buffer
,
/* WINED3D_CS_OP_SET_TEXTURE */
wined3d_cs_exec_set_texture
,
/* WINED3D_CS_OP_SET_SAMPLER */
wined3d_cs_exec_set_sampler
,
/* WINED3D_CS_OP_SET_SHADER */
wined3d_cs_exec_set_shader
,
/* WINED3D_CS_OP_SET_RENDER_STATE */
wined3d_cs_exec_set_render_state
,
/* WINED3D_CS_OP_SET_TEXTURE_STATE */
wined3d_cs_exec_set_texture_state
,
...
...
dlls/wined3d/device.c
View file @
f699b6da
...
...
@@ -2142,10 +2142,14 @@ static void wined3d_device_set_sampler(struct wined3d_device *device,
}
prev
=
device
->
update_state
->
sampler
[
type
][
idx
];
device
->
update_state
->
sampler
[
type
][
idx
]
=
sampler
;
if
(
sampler
==
prev
)
return
;
if
(
sampler
)
wined3d_sampler_incref
(
sampler
);
device
->
update_state
->
sampler
[
type
][
idx
]
=
sampler
;
if
(
!
device
->
recording
)
wined3d_cs_emit_set_sampler
(
device
->
cs
,
type
,
idx
,
sampler
);
if
(
prev
)
wined3d_sampler_decref
(
prev
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
f699b6da
...
...
@@ -2485,6 +2485,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
enum
wined3d_render_state
state
,
DWORD
value
)
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_sampler
(
struct
wined3d_cs
*
cs
,
enum
wined3d_shader_type
type
,
UINT
sampler_idx
,
struct
wined3d_sampler
*
sampler
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_sampler_state
(
struct
wined3d_cs
*
cs
,
UINT
sampler_idx
,
enum
wined3d_sampler_state
state
,
DWORD
value
)
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