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
28f98a0d
Commit
28f98a0d
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_shader_resource_view_GetDesc().
parent
cdc8d9af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-2
device.c
dlls/d3d11/device.c
+2
-1
view.c
dlls/d3d11/view.c
+15
-11
No files found.
dlls/d3d11/d3d11_private.h
View file @
28f98a0d
...
...
@@ -197,13 +197,13 @@ struct d3d_shader_resource_view
struct
wined3d_private_store
private_store
;
struct
wined3d_shader_resource_view
*
wined3d_view
;
D3D1
0
_SHADER_RESOURCE_VIEW_DESC
desc
;
D3D1
1
_SHADER_RESOURCE_VIEW_DESC
desc
;
ID3D10Resource
*
resource
;
ID3D11Device
*
device
;
};
HRESULT
d3d_shader_resource_view_init
(
struct
d3d_shader_resource_view
*
view
,
struct
d3d_device
*
device
,
ID3D10Resource
*
resource
,
const
D3D1
0
_SHADER_RESOURCE_VIEW_DESC
*
desc
)
DECLSPEC_HIDDEN
;
ID3D10Resource
*
resource
,
const
D3D1
1
_SHADER_RESOURCE_VIEW_DESC
*
desc
)
DECLSPEC_HIDDEN
;
struct
d3d_shader_resource_view
*
unsafe_impl_from_ID3D10ShaderResourceView
(
ID3D10ShaderResourceView
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d11/device.c
View file @
28f98a0d
...
...
@@ -2115,7 +2115,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Dev
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d_shader_resource_view_init
(
object
,
device
,
resource
,
desc
)))
if
(
FAILED
(
hr
=
d3d_shader_resource_view_init
(
object
,
device
,
resource
,
(
const
D3D11_SHADER_RESOURCE_VIEW_DESC
*
)
desc
)))
{
WARN
(
"Failed to initialize shader resource view, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
dlls/d3d11/view.c
View file @
28f98a0d
...
...
@@ -240,7 +240,7 @@ static HRESULT set_rtdesc_from_resource(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3
}
}
static
HRESULT
set_srdesc_from_resource
(
D3D1
0
_SHADER_RESOURCE_VIEW_DESC
*
desc
,
ID3D10Resource
*
resource
)
static
HRESULT
set_srdesc_from_resource
(
D3D1
1
_SHADER_RESOURCE_VIEW_DESC
*
desc
,
ID3D10Resource
*
resource
)
{
D3D10_RESOURCE_DIMENSION
dimension
;
...
...
@@ -265,13 +265,13 @@ static HRESULT set_srdesc_from_resource(D3D10_SHADER_RESOURCE_VIEW_DESC *desc, I
desc
->
Format
=
texture_desc
.
Format
;
if
(
texture_desc
.
ArraySize
==
1
)
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE1D
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE1D
;
desc
->
u
.
Texture1D
.
MostDetailedMip
=
0
;
desc
->
u
.
Texture1D
.
MipLevels
=
texture_desc
.
MipLevels
;
}
else
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE1DARRAY
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE1DARRAY
;
desc
->
u
.
Texture1DArray
.
MostDetailedMip
=
0
;
desc
->
u
.
Texture1DArray
.
MipLevels
=
texture_desc
.
MipLevels
;
desc
->
u
.
Texture1DArray
.
FirstArraySlice
=
0
;
...
...
@@ -300,20 +300,20 @@ static HRESULT set_srdesc_from_resource(D3D10_SHADER_RESOURCE_VIEW_DESC *desc, I
{
if
(
texture_desc
.
SampleDesc
.
Count
==
1
)
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE2D
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE2D
;
desc
->
u
.
Texture2D
.
MostDetailedMip
=
0
;
desc
->
u
.
Texture2D
.
MipLevels
=
texture_desc
.
MipLevels
;
}
else
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE2DMS
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE2DMS
;
}
}
else
{
if
(
texture_desc
.
SampleDesc
.
Count
==
1
)
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE2DARRAY
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE2DARRAY
;
desc
->
u
.
Texture2DArray
.
MostDetailedMip
=
0
;
desc
->
u
.
Texture2DArray
.
MipLevels
=
texture_desc
.
MipLevels
;
desc
->
u
.
Texture2DArray
.
FirstArraySlice
=
0
;
...
...
@@ -321,7 +321,7 @@ static HRESULT set_srdesc_from_resource(D3D10_SHADER_RESOURCE_VIEW_DESC *desc, I
}
else
{
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE2DMSARRAY
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE2DMSARRAY
;
desc
->
u
.
Texture2DMSArray
.
FirstArraySlice
=
0
;
desc
->
u
.
Texture2DMSArray
.
ArraySize
=
texture_desc
.
ArraySize
;
}
...
...
@@ -345,7 +345,7 @@ static HRESULT set_srdesc_from_resource(D3D10_SHADER_RESOURCE_VIEW_DESC *desc, I
ID3D10Texture3D_Release
(
texture
);
desc
->
Format
=
texture_desc
.
Format
;
desc
->
ViewDimension
=
D3D1
0
_SRV_DIMENSION_TEXTURE3D
;
desc
->
ViewDimension
=
D3D1
1
_SRV_DIMENSION_TEXTURE3D
;
desc
->
u
.
Texture3D
.
MostDetailedMip
=
0
;
desc
->
u
.
Texture3D
.
MipLevels
=
texture_desc
.
MipLevels
;
...
...
@@ -1298,7 +1298,11 @@ static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetResource(ID3D11Shade
static
void
STDMETHODCALLTYPE
d3d11_shader_resource_view_GetDesc
(
ID3D11ShaderResourceView
*
iface
,
D3D11_SHADER_RESOURCE_VIEW_DESC
*
desc
)
{
FIXME
(
"iface %p, desc %p stub!
\n
"
,
iface
,
desc
);
struct
d3d_shader_resource_view
*
view
=
impl_from_ID3D11ShaderResourceView
(
iface
);
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
*
desc
=
view
->
desc
;
}
static
const
struct
ID3D11ShaderResourceViewVtbl
d3d11_shader_resource_view_vtbl
=
...
...
@@ -1421,7 +1425,7 @@ static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc(ID3D10ShaderRes
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
*
desc
=
view
->
desc
;
memcpy
(
desc
,
&
view
->
desc
,
sizeof
(
*
desc
))
;
}
static
const
struct
ID3D10ShaderResourceViewVtbl
d3d10_shader_resource_view_vtbl
=
...
...
@@ -1442,7 +1446,7 @@ static const struct ID3D10ShaderResourceViewVtbl d3d10_shader_resource_view_vtbl
};
HRESULT
d3d_shader_resource_view_init
(
struct
d3d_shader_resource_view
*
view
,
struct
d3d_device
*
device
,
ID3D10Resource
*
resource
,
const
D3D1
0
_SHADER_RESOURCE_VIEW_DESC
*
desc
)
ID3D10Resource
*
resource
,
const
D3D1
1
_SHADER_RESOURCE_VIEW_DESC
*
desc
)
{
struct
wined3d_resource
*
wined3d_resource
;
HRESULT
hr
;
...
...
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