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
8972105e
Commit
8972105e
authored
Sep 10, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Sep 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Implement d3d11_device_CreateShaderResourceView().
parent
487cf3d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
20 deletions
+40
-20
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-2
device.c
dlls/d3d11/device.c
+15
-17
view.c
dlls/d3d11/view.c
+23
-1
No files found.
dlls/d3d11/d3d11_private.h
View file @
8972105e
...
...
@@ -202,8 +202,8 @@ struct d3d_shader_resource_view
ID3D11Device
*
device
;
};
HRESULT
d3d_shader_resource_view_
init
(
struct
d3d_shader_resource_view
*
view
,
struct
d3d_device
*
devi
ce
,
ID3D11Resource
*
resource
,
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
)
DECLSPEC_HIDDEN
;
HRESULT
d3d_shader_resource_view_
create
(
struct
d3d_device
*
device
,
ID3D11Resource
*
resour
ce
,
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
,
struct
d3d_shader_resource_view
**
view
)
DECLSPEC_HIDDEN
;
struct
d3d_shader_resource_view
*
unsafe_impl_from_ID3D10ShaderResourceView
(
ID3D10ShaderResourceView
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d11/device.c
View file @
8972105e
...
...
@@ -119,9 +119,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture3D(ID3D11Device *ifac
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateShaderResourceView
(
ID3D11Device
*
iface
,
ID3D11Resource
*
resource
,
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
,
ID3D11ShaderResourceView
**
view
)
{
FIXME
(
"iface %p, resource %p, desc %p, view %p stub!
\n
"
,
iface
,
resource
,
desc
,
view
);
struct
d3d_device
*
device
=
impl_from_ID3D11Device
(
iface
);
struct
d3d_shader_resource_view
*
object
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, resource %p, desc %p, view %p.
\n
"
,
iface
,
resource
,
desc
,
view
);
if
(
FAILED
(
hr
=
d3d_shader_resource_view_create
(
device
,
resource
,
desc
,
&
object
)))
return
hr
;
*
view
=
&
object
->
ID3D11ShaderResourceView_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateUnorderedAccessView
(
ID3D11Device
*
iface
,
...
...
@@ -147,7 +156,6 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Devic
*
view
=
&
object
->
ID3D11RenderTargetView_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateDepthStencilView
(
ID3D11Device
*
iface
,
...
...
@@ -2113,28 +2121,18 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Dev
TRACE
(
"iface %p, resource %p, desc %p, view %p.
\n
"
,
iface
,
resource
,
desc
,
view
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
ID3D10Resource_QueryInterface
(
resource
,
&
IID_ID3D11Resource
,
(
void
**
)
&
d3d11_resource
)))
{
ERR
(
"Resource does not implement ID3D11Resource.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
E_FAIL
;
}
if
(
FAILED
(
hr
=
d3d_shader_resource_view_init
(
object
,
device
,
d3d11_resource
,
(
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
)
desc
)))
{
WARN
(
"Failed to initialize shader resource view, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
ID3D11Resource_Release
(
d3d11_resource
);
return
hr
;
}
hr
=
d3d_shader_resource_view_create
(
device
,
d3d11_resource
,
(
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
)
desc
,
&
object
);
ID3D11Resource_Release
(
d3d11_resource
);
if
(
FAILED
(
hr
))
return
hr
;
TRACE
(
"Created shader resource view %p.
\n
"
,
object
);
*
view
=
&
object
->
ID3D10ShaderResourceView_iface
;
return
S_OK
;
...
...
dlls/d3d11/view.c
View file @
8972105e
...
...
@@ -1449,7 +1449,7 @@ static const struct ID3D10ShaderResourceViewVtbl d3d10_shader_resource_view_vtbl
d3d10_shader_resource_view_GetDesc
,
};
HRESULT
d3d_shader_resource_view_init
(
struct
d3d_shader_resource_view
*
view
,
struct
d3d_device
*
device
,
static
HRESULT
d3d_shader_resource_view_init
(
struct
d3d_shader_resource_view
*
view
,
struct
d3d_device
*
device
,
ID3D11Resource
*
resource
,
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
)
{
struct
wined3d_resource
*
wined3d_resource
;
...
...
@@ -1493,6 +1493,28 @@ HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *view, str
return
S_OK
;
}
HRESULT
d3d_shader_resource_view_create
(
struct
d3d_device
*
device
,
ID3D11Resource
*
resource
,
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
,
struct
d3d_shader_resource_view
**
view
)
{
struct
d3d_shader_resource_view
*
object
;
HRESULT
hr
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d_shader_resource_view_init
(
object
,
device
,
resource
,
desc
)))
{
WARN
(
"Failed to initialize shader resource view, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created shader resource view %p.
\n
"
,
object
);
*
view
=
object
;
return
S_OK
;
}
struct
d3d_shader_resource_view
*
unsafe_impl_from_ID3D10ShaderResourceView
(
ID3D10ShaderResourceView
*
iface
)
{
if
(
!
iface
)
...
...
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