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
9a2b73d3
Commit
9a2b73d3
authored
Sep 01, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Sep 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Implement d3d11_device_CreateTexture3D().
parent
11cd2dd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
16 deletions
+38
-16
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-2
device.c
dlls/d3d11/device.c
+12
-12
texture.c
dlls/d3d11/texture.c
+24
-2
No files found.
dlls/d3d11/d3d11_private.h
View file @
9a2b73d3
...
...
@@ -130,8 +130,8 @@ struct d3d_texture3d
ID3D11Device
*
device
;
};
HRESULT
d3d_texture3d_
init
(
struct
d3d_texture3d
*
texture
,
struct
d3d_device
*
device
,
const
D3D11_
TEXTURE3D_DESC
*
desc
,
const
D3D10_SUBRESOURCE_DATA
*
data
)
DECLSPEC_HIDDEN
;
HRESULT
d3d_texture3d_
create
(
struct
d3d_device
*
device
,
const
D3D11_TEXTURE3D_DESC
*
desc
,
const
D3D11_
SUBRESOURCE_DATA
*
data
,
struct
d3d_texture3d
**
texture
)
DECLSPEC_HIDDEN
;
/* ID3D10Buffer */
struct
d3d10_buffer
...
...
dlls/d3d11/device.c
View file @
9a2b73d3
...
...
@@ -92,9 +92,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture2D(ID3D11Device *ifac
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateTexture3D
(
ID3D11Device
*
iface
,
const
D3D11_TEXTURE3D_DESC
*
desc
,
const
D3D11_SUBRESOURCE_DATA
*
data
,
ID3D11Texture3D
**
texture
)
{
FIXME
(
"iface %p, desc %p, data %p, texture %p stub!
\n
"
,
iface
,
desc
,
data
,
texture
);
struct
d3d_device
*
device
=
impl_from_ID3D11Device
(
iface
);
struct
d3d_texture3d
*
object
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, desc %p, data %p, texture %p.
\n
"
,
iface
,
desc
,
data
,
texture
);
if
(
FAILED
(
hr
=
d3d_texture3d_create
(
device
,
desc
,
data
,
&
object
)))
return
hr
;
*
texture
=
&
object
->
ID3D11Texture3D_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateShaderResourceView
(
ID3D11Device
*
iface
,
...
...
@@ -2050,10 +2059,6 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device1 *ifa
TRACE
(
"iface %p, desc %p, data %p, texture %p.
\n
"
,
iface
,
desc
,
data
,
texture
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
d3d11_desc
.
Width
=
desc
->
Width
;
d3d11_desc
.
Height
=
desc
->
Height
;
d3d11_desc
.
Depth
=
desc
->
Depth
;
...
...
@@ -2064,14 +2069,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device1 *ifa
d3d11_desc
.
CPUAccessFlags
=
d3d11_cpu_access_flags_from_d3d10_cpu_access_flags
(
desc
->
CPUAccessFlags
);
d3d11_desc
.
MiscFlags
=
d3d11_resource_misc_flags_from_d3d10_resource_misc_flags
(
desc
->
MiscFlags
);
if
(
FAILED
(
hr
=
d3d_texture3d_init
(
object
,
device
,
&
d3d11_desc
,
data
)))
{
WARN
(
"Failed to initialize texture, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
if
(
FAILED
(
hr
=
d3d_texture3d_create
(
device
,
&
d3d11_desc
,
(
const
D3D11_SUBRESOURCE_DATA
*
)
data
,
&
object
)))
return
hr
;
}
TRACE
(
"Created 3D texture %p.
\n
"
,
object
);
*
texture
=
&
object
->
ID3D10Texture3D_iface
;
return
S_OK
;
...
...
dlls/d3d11/texture.c
View file @
9a2b73d3
...
...
@@ -897,8 +897,8 @@ static const struct wined3d_parent_ops d3d_texture3d_wined3d_parent_ops =
d3d_texture3d_wined3d_object_released
,
};
HRESULT
d3d_texture3d_init
(
struct
d3d_texture3d
*
texture
,
struct
d3d_device
*
device
,
const
D3D11_TEXTURE3D_DESC
*
desc
,
const
D3D1
0
_SUBRESOURCE_DATA
*
data
)
static
HRESULT
d3d_texture3d_init
(
struct
d3d_texture3d
*
texture
,
struct
d3d_device
*
device
,
const
D3D11_TEXTURE3D_DESC
*
desc
,
const
D3D1
1
_SUBRESOURCE_DATA
*
data
)
{
struct
wined3d_resource_desc
wined3d_desc
;
unsigned
int
levels
;
...
...
@@ -941,3 +941,25 @@ HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_device *dev
return
S_OK
;
}
HRESULT
d3d_texture3d_create
(
struct
d3d_device
*
device
,
const
D3D11_TEXTURE3D_DESC
*
desc
,
const
D3D11_SUBRESOURCE_DATA
*
data
,
struct
d3d_texture3d
**
texture
)
{
struct
d3d_texture3d
*
object
;
HRESULT
hr
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d_texture3d_init
(
object
,
device
,
desc
,
data
)))
{
WARN
(
"Failed to initialize texture, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created texture %p.
\n
"
,
object
);
*
texture
=
object
;
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