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
739e302e
Commit
739e302e
authored
Sep 08, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Store the resource in the d3d10core rendertarget view.
parent
f5c5a307
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
+8
-20
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-0
view.c
dlls/d3d10core/view.c
+7
-20
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
739e302e
...
...
@@ -140,6 +140,7 @@ struct d3d10_rendertarget_view
struct
wined3d_rendertarget_view
*
wined3d_view
;
D3D10_RENDER_TARGET_VIEW_DESC
desc
;
ID3D10Resource
*
resource
;
};
HRESULT
d3d10_rendertarget_view_init
(
struct
d3d10_rendertarget_view
*
view
,
...
...
dlls/d3d10core/view.c
View file @
739e302e
...
...
@@ -339,6 +339,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTarge
if
(
!
refcount
)
{
wined3d_rendertarget_view_decref
(
This
->
wined3d_view
);
ID3D10Resource_Release
(
This
->
resource
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -383,29 +384,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface
static
void
STDMETHODCALLTYPE
d3d10_rendertarget_view_GetResource
(
ID3D10RenderTargetView
*
iface
,
ID3D10Resource
**
resource
)
{
struct
d3d10_rendertarget_view
*
This
=
impl_from_ID3D10RenderTargetView
(
iface
);
struct
wined3d_resource
*
wined3d_resource
;
IUnknown
*
parent
;
HRESULT
hr
;
struct
d3d10_rendertarget_view
*
view
=
impl_from_ID3D10RenderTargetView
(
iface
);
TRACE
(
"iface %p, resource %p
\n
"
,
iface
,
resource
);
wined3d_resource
=
wined3d_rendertarget_view_get_resource
(
This
->
wined3d_view
);
if
(
!
wined3d_resource
)
{
ERR
(
"Failed to get wined3d resource.
\n
"
);
*
resource
=
NULL
;
return
;
}
parent
=
wined3d_resource_get_parent
(
wined3d_resource
);
hr
=
IUnknown_QueryInterface
(
parent
,
&
IID_ID3D10Resource
,
(
void
**
)
&
resource
);
if
(
FAILED
(
hr
))
{
ERR
(
"Resource parent isn't a d3d10 resource, hr %#x
\n
"
,
hr
);
*
resource
=
NULL
;
return
;
}
*
resource
=
view
->
resource
;
ID3D10Resource_AddRef
(
*
resource
);
}
/* ID3D10RenderTargetView methods */
...
...
@@ -470,6 +454,9 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view,
return
hr
;
}
view
->
resource
=
resource
;
ID3D10Resource_AddRef
(
resource
);
return
S_OK
;
}
...
...
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