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
cb77e188
Commit
cb77e188
authored
May 25, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
May 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Validate constant buffer alignment.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0726d7e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
buffer.c
dlls/wined3d/buffer.c
+8
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/buffer.c
View file @
cb77e188
...
...
@@ -1380,8 +1380,14 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
if
(
!
size
)
{
WARN
(
"Size 0 requested, returning WINED3DERR_INVALIDCALL.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
WARN
(
"Size 0 requested, returning E_INVALIDARG.
\n
"
);
return
E_INVALIDARG
;
}
if
(
bind_flags
&
WINED3D_BIND_CONSTANT_BUFFER
&&
size
&
(
WINED3D_CONSTANT_BUFFER_ALIGNMENT
-
1
))
{
WARN
(
"Size %#x is not suitably aligned for constant buffers.
\n
"
,
size
);
return
E_INVALIDARG
;
}
if
(
data
&&
!
data
->
data
)
...
...
dlls/wined3d/wined3d_private.h
View file @
cb77e188
...
...
@@ -2894,6 +2894,7 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DEC
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
#define WINED3D_CONSTANT_BUFFER_ALIGNMENT 16
struct
gl_texture
{
...
...
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