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
596f7077
Commit
596f7077
authored
May 17, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
May 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass wined3d_ivec4 structures to wined3d_device_set_ps_consts_i().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ae7ab95
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
15 deletions
+18
-15
device.c
dlls/d3d9/device.c
+2
-1
device.c
dlls/wined3d/device.c
+13
-11
stateblock.c
dlls/wined3d/stateblock.c
+1
-1
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/d3d9/device.c
View file @
596f7077
...
...
@@ -3142,7 +3142,8 @@ static HRESULT WINAPI d3d9_device_SetPixelShaderConstantI(IDirect3DDevice9Ex *if
TRACE
(
"iface %p, reg_idx %u, data %p, count %u.
\n
"
,
iface
,
reg_idx
,
data
,
count
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_ps_consts_i
(
device
->
wined3d_device
,
reg_idx
,
data
,
count
);
hr
=
wined3d_device_set_ps_consts_i
(
device
->
wined3d_device
,
reg_idx
,
count
,
(
const
struct
wined3d_ivec4
*
)
data
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/device.c
View file @
596f7077
...
...
@@ -2648,26 +2648,28 @@ HRESULT CDECL wined3d_device_get_ps_consts_b(const struct wined3d_device *device
}
HRESULT
CDECL
wined3d_device_set_ps_consts_i
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
int
*
constants
,
UINT
vector4i_count
)
unsigned
int
start_idx
,
unsigned
int
count
,
const
struct
wined3d_ivec4
*
constants
)
{
UINT
count
=
min
(
vector4i_count
,
WINED3D_MAX_CONSTS_I
-
start_register
);
UINT
i
;
unsigned
int
i
;
TRACE
(
"device %p, start_
register %u, constants %p, vector4i_count %u
.
\n
"
,
device
,
start_
register
,
constants
,
vector4i_count
);
TRACE
(
"device %p, start_
idx %u, count %u, constants %p
.
\n
"
,
device
,
start_
idx
,
count
,
constants
);
if
(
!
constants
||
start_
register
>=
WINED3D_MAX_CONSTS_I
)
if
(
!
constants
||
start_
idx
>=
WINED3D_MAX_CONSTS_I
)
return
WINED3DERR_INVALIDCALL
;
memcpy
(
&
device
->
update_state
->
ps_consts_i
[
start_register
],
constants
,
count
*
sizeof
(
int
)
*
4
);
if
(
count
>
WINED3D_MAX_CONSTS_I
-
start_idx
)
count
=
WINED3D_MAX_CONSTS_I
-
start_idx
;
memcpy
(
&
device
->
update_state
->
ps_consts_i
[
start_idx
],
constants
,
count
*
sizeof
(
*
constants
));
if
(
TRACE_ON
(
d3d
))
{
for
(
i
=
0
;
i
<
count
;
++
i
)
TRACE
(
"Set INT constant %u to {%d, %d, %d, %d}.
\n
"
,
start_register
+
i
,
constants
[
i
*
4
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
TRACE
(
"Set ivec4 constant %u to %s.
\n
"
,
start_idx
+
i
,
debug_ivec4
(
&
constants
[
i
]));
}
if
(
device
->
recording
)
{
for
(
i
=
start_
register
;
i
<
count
+
start_register
;
++
i
)
for
(
i
=
start_
idx
;
i
<
count
+
start_idx
;
++
i
)
device
->
recording
->
changed
.
pixelShaderConstantsI
|=
(
1u
<<
i
);
}
else
...
...
dlls/wined3d/stateblock.c
View file @
596f7077
...
...
@@ -928,7 +928,7 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
for
(
i
=
0
;
i
<
stateblock
->
num_contained_ps_consts_i
;
++
i
)
{
wined3d_device_set_ps_consts_i
(
device
,
stateblock
->
contained_ps_consts_i
[
i
],
&
stateblock
->
state
.
ps_consts_i
[
stateblock
->
contained_ps_consts_i
[
i
]].
x
,
1
);
1
,
&
stateblock
->
state
.
ps_consts_i
[
stateblock
->
contained_ps_consts_i
[
i
]]
);
}
for
(
i
=
0
;
i
<
stateblock
->
num_contained_ps_consts_b
;
++
i
)
{
...
...
dlls/wined3d/wined3d.spec
View file @
596f7077
...
...
@@ -131,7 +131,7 @@
@ cdecl wined3d_device_set_ps_cb(ptr long ptr)
@ cdecl wined3d_device_set_ps_consts_b(ptr long ptr long)
@ cdecl wined3d_device_set_ps_consts_f(ptr long long ptr)
@ cdecl wined3d_device_set_ps_consts_i(ptr long
ptr long
)
@ cdecl wined3d_device_set_ps_consts_i(ptr long
long ptr
)
@ cdecl wined3d_device_set_ps_resource_view(ptr long ptr)
@ cdecl wined3d_device_set_ps_sampler(ptr long ptr)
@ cdecl wined3d_device_set_render_state(ptr long long)
...
...
include/wine/wined3d.h
View file @
596f7077
...
...
@@ -2219,7 +2219,7 @@ HRESULT __cdecl wined3d_device_set_ps_consts_b(struct wined3d_device *device,
HRESULT
__cdecl
wined3d_device_set_ps_consts_f
(
struct
wined3d_device
*
device
,
unsigned
int
start_idx
,
unsigned
int
count
,
const
struct
wined3d_vec4
*
constants
);
HRESULT
__cdecl
wined3d_device_set_ps_consts_i
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
int
*
constants
,
UINT
vector4i_count
);
unsigned
int
start_idx
,
unsigned
int
count
,
const
struct
wined3d_ivec4
*
constants
);
void
__cdecl
wined3d_device_set_ps_resource_view
(
struct
wined3d_device
*
device
,
UINT
idx
,
struct
wined3d_shader_resource_view
*
view
);
void
__cdecl
wined3d_device_set_ps_sampler
(
struct
wined3d_device
*
device
,
UINT
idx
,
struct
wined3d_sampler
*
sampler
);
...
...
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