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
b28e9f64
Commit
b28e9f64
authored
Sep 05, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Enforce WINED3DUSAGE_RENDERTARGET format restrictions on resource creation.
parent
6f321ff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
resource.c
dlls/wined3d/resource.c
+7
-2
No files found.
dlls/wined3d/resource.c
View file @
b28e9f64
...
@@ -85,6 +85,13 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -85,6 +85,13 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
{
{
const
struct
wined3d
*
d3d
=
device
->
wined3d
;
const
struct
wined3d
*
d3d
=
device
->
wined3d
;
resource_check_usage
(
usage
);
if
(
pool
!=
WINED3D_POOL_SCRATCH
)
{
if
((
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
!
(
format
->
flags
&
WINED3DFMT_FLAG_RENDERTARGET
))
return
WINED3DERR_INVALIDCALL
;
}
resource
->
ref
=
1
;
resource
->
ref
=
1
;
resource
->
device
=
device
;
resource
->
device
=
device
;
resource
->
type
=
type
;
resource
->
type
=
type
;
...
@@ -106,8 +113,6 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -106,8 +113,6 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
resource_ops
=
resource_ops
;
resource
->
resource_ops
=
resource_ops
;
list_init
(
&
resource
->
privateData
);
list_init
(
&
resource
->
privateData
);
resource_check_usage
(
usage
);
if
(
size
)
if
(
size
)
{
{
resource
->
heap_memory
=
wined3d_resource_allocate_sysmem
(
size
);
resource
->
heap_memory
=
wined3d_resource_allocate_sysmem
(
size
);
...
...
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