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
574e2941
Commit
574e2941
authored
Apr 26, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass wined3d_vec4 structures to wined3d_device_set_ps_consts_f().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
67ec18ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
23 deletions
+18
-23
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+2
-1
device.c
dlls/wined3d/device.c
+12
-18
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/d3d8/device.c
View file @
574e2941
...
...
@@ -2730,7 +2730,7 @@ static HRESULT WINAPI d3d8_device_SetPixelShaderConstant(IDirect3DDevice8 *iface
iface
,
start_register
,
data
,
count
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_ps_consts_f
(
device
->
wined3d_device
,
start_register
,
data
,
count
);
hr
=
wined3d_device_set_ps_consts_f
(
device
->
wined3d_device
,
start_register
,
count
,
data
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/device.c
View file @
574e2941
...
...
@@ -3108,7 +3108,8 @@ static HRESULT WINAPI d3d9_device_SetPixelShaderConstantF(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_f
(
device
->
wined3d_device
,
reg_idx
,
data
,
count
);
hr
=
wined3d_device_set_ps_consts_f
(
device
->
wined3d_device
,
reg_idx
,
count
,
(
const
struct
wined3d_vec4
*
)
data
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/device.c
View file @
574e2941
...
...
@@ -2693,36 +2693,30 @@ HRESULT CDECL wined3d_device_get_ps_consts_i(const struct wined3d_device *device
}
HRESULT
CDECL
wined3d_device_set_ps_consts_f
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
float
*
constants
,
UINT
vector4f_count
)
unsigned
int
start_idx
,
unsigned
int
count
,
const
struct
wined3d_vec4
*
constants
)
{
UINT
i
;
const
struct
wined3d_d3d_info
*
d3d_info
=
&
device
->
adapter
->
d3d_info
;
unsigned
int
i
;
TRACE
(
"device %p, start_
register %u, constants %p, vector4f_count %u
.
\n
"
,
device
,
start_
register
,
constants
,
vector4f_count
);
TRACE
(
"device %p, start_
idx %u, count %u, constants %p
.
\n
"
,
device
,
start_
idx
,
count
,
constants
);
/* Specifically test start_register > limit to catch MAX_UINT overflows
* when adding start_register + vector4f_count. */
if
(
!
constants
||
start_register
+
vector4f_count
>
d3d_info
->
limits
.
ps_uniform_count
||
start_register
>
d3d_info
->
limits
.
ps_uniform_count
)
if
(
!
constants
||
start_idx
>=
d3d_info
->
limits
.
ps_uniform_count
||
count
>
d3d_info
->
limits
.
ps_uniform_count
-
start_idx
)
return
WINED3DERR_INVALIDCALL
;
memcpy
(
&
device
->
update_state
->
ps_consts_f
[
start_register
],
constants
,
vector4f_count
*
sizeof
(
float
)
*
4
);
memcpy
(
&
device
->
update_state
->
ps_consts_f
[
start_idx
],
constants
,
count
*
sizeof
(
*
constants
));
if
(
TRACE_ON
(
d3d
))
{
for
(
i
=
0
;
i
<
vector4f_count
;
++
i
)
TRACE
(
"Set FLOAT constant %u to {%.8e, %.8e, %.8e, %.8e}.
\n
"
,
start_register
+
i
,
constants
[
i
*
4
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
for
(
i
=
0
;
i
<
count
;
++
i
)
TRACE
(
"Set vec4 constant %u to %s.
\n
"
,
start_idx
+
i
,
debug_vec4
(
&
constants
[
i
]));
}
if
(
device
->
recording
)
memset
(
device
->
recording
->
changed
.
pixelShaderConstantsF
+
start_register
,
1
,
sizeof
(
*
device
->
recording
->
changed
.
pixelShaderConstantsF
)
*
vector4f_count
);
memset
(
&
device
->
recording
->
changed
.
pixelShaderConstantsF
[
start_idx
]
,
1
,
count
*
sizeof
(
*
device
->
recording
->
changed
.
pixelShaderConstantsF
)
);
else
device
->
shader_backend
->
shader_update_float_pixel_constants
(
device
,
start_
register
,
vector4f_
count
);
device
->
shader_backend
->
shader_update_float_pixel_constants
(
device
,
start_
idx
,
count
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/stateblock.c
View file @
574e2941
...
...
@@ -978,7 +978,7 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
for
(
i
=
0
;
i
<
stateblock
->
num_contained_ps_consts_f
;
++
i
)
{
wined3d_device_set_ps_consts_f
(
device
,
stateblock
->
contained_ps_consts_f
[
i
],
&
stateblock
->
state
.
ps_consts_f
[
stateblock
->
contained_ps_consts_f
[
i
]].
x
,
1
);
1
,
&
stateblock
->
state
.
ps_consts_f
[
stateblock
->
contained_ps_consts_f
[
i
]]
);
}
for
(
i
=
0
;
i
<
stateblock
->
num_contained_ps_consts_i
;
++
i
)
{
...
...
dlls/wined3d/wined3d.spec
View file @
574e2941
...
...
@@ -130,7 +130,7 @@
@ cdecl wined3d_device_set_primitive_type(ptr long)
@ 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
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_resource_view(ptr long ptr)
@ cdecl wined3d_device_set_ps_sampler(ptr long ptr)
...
...
include/wine/wined3d.h
View file @
574e2941
...
...
@@ -2209,7 +2209,7 @@ void __cdecl wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, s
HRESULT
__cdecl
wined3d_device_set_ps_consts_b
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
BOOL
*
constants
,
UINT
bool_count
);
HRESULT
__cdecl
wined3d_device_set_ps_consts_f
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
float
*
constants
,
UINT
vector4f_count
);
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
);
void
__cdecl
wined3d_device_set_ps_resource_view
(
struct
wined3d_device
*
device
,
...
...
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