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
cfe16a4b
Commit
cfe16a4b
authored
Sep 25, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Translate d3d10 bind flags / usage to wined3d usage for textures.
parent
991e47e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-0
texture.c
dlls/d3d10core/texture.c
+2
-5
utils.c
dlls/d3d10core/utils.c
+22
-0
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
cfe16a4b
...
...
@@ -59,6 +59,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d10core
(
UINT
bind_flags
,
enum
D3D10_USAGE
usage
)
DECLSPEC_HIDDEN
;
static
inline
void
read_dword
(
const
char
**
ptr
,
DWORD
*
d
)
{
...
...
dlls/d3d10core/texture.c
View file @
cfe16a4b
...
...
@@ -258,7 +258,6 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
}
}
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
if
(
desc
->
ArraySize
!=
1
)
FIXME
(
"Array textures not implemented.
\n
"
);
if
(
desc
->
SampleDesc
.
Count
>
1
)
...
...
@@ -268,7 +267,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
wined3d_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
wined3d_desc
.
multisample_type
=
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
desc
->
SampleDesc
.
Quality
;
wined3d_desc
.
usage
=
desc
->
Usage
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d10core
(
desc
->
BindFlags
,
desc
->
Usage
)
;
wined3d_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
wined3d_desc
.
width
=
desc
->
Width
;
wined3d_desc
.
height
=
desc
->
Height
;
...
...
@@ -482,13 +481,11 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic
texture
->
refcount
=
1
;
texture
->
desc
=
*
desc
;
FIXME
(
"Implement DXGI<->wined3d usage conversion.
\n
"
);
wined3d_desc
.
resource_type
=
WINED3D_RTYPE_VOLUME_TEXTURE
;
wined3d_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
desc
->
Usage
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d10core
(
desc
->
BindFlags
,
desc
->
Usage
)
;
wined3d_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
wined3d_desc
.
width
=
desc
->
Width
;
wined3d_desc
.
height
=
desc
->
Height
;
...
...
dlls/d3d10core/utils.c
View file @
cfe16a4b
...
...
@@ -345,6 +345,28 @@ enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
}
}
DWORD
wined3d_usage_from_d3d10core
(
UINT
bind_flags
,
enum
D3D10_USAGE
usage
)
{
static
const
DWORD
handled
=
D3D10_BIND_SHADER_RESOURCE
|
D3D10_BIND_RENDER_TARGET
|
D3D10_BIND_DEPTH_STENCIL
;
DWORD
wined3d_usage
=
0
;
if
(
bind_flags
&
D3D10_BIND_SHADER_RESOURCE
)
wined3d_usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
bind_flags
&
D3D10_BIND_RENDER_TARGET
)
wined3d_usage
|=
WINED3DUSAGE_RENDERTARGET
;
if
(
bind_flags
&
D3D10_BIND_DEPTH_STENCIL
)
wined3d_usage
|=
WINED3DUSAGE_DEPTHSTENCIL
;
if
(
bind_flags
&
~
handled
)
FIXME
(
"Unhandled bind flags %#x.
\n
"
,
usage
&
~
handled
);
if
(
usage
==
D3D10_USAGE_DYNAMIC
)
wined3d_usage
|=
WINED3DUSAGE_DYNAMIC
;
return
wined3d_usage
;
}
void
skip_dword_unknown
(
const
char
**
ptr
,
unsigned
int
count
)
{
unsigned
int
i
;
...
...
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