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
84a290c1
Commit
84a290c1
authored
Jan 27, 2017
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Don't forbid supported format conversions.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69006a7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
d3dx9_private.h
dlls/d3dx9_36/d3dx9_private.h
+16
-0
surface.c
dlls/d3dx9_36/surface.c
+6
-5
volume.c
dlls/d3dx9_36/volume.c
+2
-2
No files found.
dlls/d3dx9_36/d3dx9_private.h
View file @
84a290c1
...
...
@@ -65,6 +65,22 @@ struct pixel_format_desc {
void
(
*
to_rgba
)(
const
struct
vec4
*
src
,
struct
vec4
*
dst
,
const
PALETTEENTRY
*
palette
);
};
static
inline
BOOL
is_conversion_from_supported
(
const
struct
pixel_format_desc
*
format
)
{
if
(
format
->
type
==
FORMAT_ARGB
||
format
->
type
==
FORMAT_ARGBF16
||
format
->
type
==
FORMAT_ARGBF
)
return
TRUE
;
return
!!
format
->
to_rgba
;
}
static
inline
BOOL
is_conversion_to_supported
(
const
struct
pixel_format_desc
*
format
)
{
if
(
format
->
type
==
FORMAT_ARGB
||
format
->
type
==
FORMAT_ARGBF16
||
format
->
type
==
FORMAT_ARGBF
)
return
TRUE
;
return
!!
format
->
from_rgba
;
}
HRESULT
map_view_of_file
(
const
WCHAR
*
filename
,
void
**
buffer
,
DWORD
*
length
)
DECLSPEC_HIDDEN
;
HRESULT
load_resource_into_memory
(
HMODULE
module
,
HRSRC
resinfo
,
void
**
buffer
,
DWORD
*
length
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3dx9_36/surface.c
View file @
84a290c1
...
...
@@ -1837,10 +1837,10 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
}
else
/* Stretching or format conversion. */
{
if
(
((
srcformatdesc
->
type
!=
FORMAT_ARGB
)
&&
(
srcformatdesc
->
type
!=
FORMAT_INDEX
))
||
(
destformatdesc
->
type
!=
FORMAT_ARGB
))
if
(
!
is_conversion_from_supported
(
srcformatdesc
)
||
!
is_conversion_to_supported
(
destformatdesc
))
{
FIXME
(
"
Format conversion missing %#x -> %#x
\n
"
,
src_format
,
surfdesc
.
Format
);
FIXME
(
"
Unsupported format conversion %#x -> %#x.
\n
"
,
src_format
,
surfdesc
.
Format
);
return
E_NOTIMPL
;
}
...
...
@@ -2112,9 +2112,10 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
src_format_desc
=
get_format_info
(
src_surface_desc
.
Format
);
dst_format_desc
=
get_format_info
(
d3d_pixel_format
);
if
(
src_format_desc
->
type
!=
FORMAT_ARGB
||
dst_format_desc
->
type
!=
FORMAT_ARGB
)
if
(
!
is_conversion_from_supported
(
src_format_desc
)
||
!
is_conversion_to_supported
(
dst_format_desc
))
{
FIXME
(
"Unsupported
pixel format conversion %#x -> %#x
\n
"
,
FIXME
(
"Unsupported
format conversion %#x -> %#x.
\n
"
,
src_surface_desc
.
Format
,
d3d_pixel_format
);
hr
=
E_NOTIMPL
;
goto
cleanup
;
...
...
dlls/d3dx9_36/volume.c
View file @
84a290c1
...
...
@@ -188,8 +188,8 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume,
const
BYTE
*
src_addr
;
if
(
((
src_format_desc
->
type
!=
FORMAT_ARGB
)
&&
(
src_format_desc
->
type
!=
FORMAT_INDEX
))
||
(
dst_format_desc
->
type
!=
FORMAT_ARGB
))
if
(
!
is_conversion_from_supported
(
src_format_desc
)
||
!
is_conversion_to_supported
(
dst_format_desc
))
{
FIXME
(
"Pixel format conversion is not implemented %#x -> %#x
\n
"
,
src_format_desc
->
format
,
dst_format_desc
->
format
);
...
...
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