Matteo Bruni : d3dx9: Don' t take the fastpath when converting between texture formats of different type.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 30 09:54:02 CST 2015
Module: wine
Branch: master
Commit: d71970f658fbf9a7278f159e13c9851b0edee4d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d71970f658fbf9a7278f159e13c9851b0edee4d4
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Fri Nov 27 20:39:32 2015 +0100
d3dx9: Don't take the fastpath when converting between texture formats of different type.
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index b8bb710..b14f5e7 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1525,7 +1525,6 @@ void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch,
* Copies the source buffer to the destination buffer, performing
* any necessary format conversion and color keying.
* Pixels outsize the source rect are blacked out.
- * Works only for ARGB formats with 1 - 4 bytes per pixel.
*/
void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size,
const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch,
@@ -1562,6 +1561,7 @@ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pit
for (x = 0; x < min_width; x++) {
if (!src_format->to_rgba && !dst_format->from_rgba
+ && src_format->type == dst_format->type
&& src_format->bytes_per_pixel <= 4 && dst_format->bytes_per_pixel <= 4)
{
DWORD val;
@@ -1628,7 +1628,6 @@ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pit
* Copies the source buffer to the destination buffer, performing
* any necessary format conversion, color keying and stretching
* using a point filter.
- * Works only for ARGB formats with 1 - 4 bytes per pixel.
*/
void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size,
const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch,
@@ -1665,6 +1664,7 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
const BYTE *src_ptr = src_row_ptr + (x * src_size->width / dst_size->width) * src_format->bytes_per_pixel;
if (!src_format->to_rgba && !dst_format->from_rgba
+ && src_format->type == dst_format->type
&& src_format->bytes_per_pixel <= 4 && dst_format->bytes_per_pixel <= 4)
{
DWORD val;
More information about the wine-cvs
mailing list