"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/d3dx10_43/tests/d3dx10.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

d3dx10.c  (wine-5.12.tar.xz):d3dx10.c  (wine-5.13.tar.xz)
skipping to change at line 25 skipping to change at line 25
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define COBJMACROS #define COBJMACROS
#include "initguid.h" #include "initguid.h"
#include "d3d10_1.h" #include "d3d10_1.h"
#include "d3dx10.h" #include "d3dx10.h"
#include "wine/test.h" #include "wine/test.h"
/* 1x1 1bpp bmp image */
static const BYTE test_bmp_1bpp[] =
{
0x42, 0x4d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00
, 0x00, 0x28, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00
, 0x00, 0x02, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xf2, 0xf3, 0x80, 0xf4, 0xf5, 0xf6
, 0x81, 0x00, 0x00,
0x00, 0x00
};
/* 1x1 4bpp bmp image */
static const BYTE test_bmp_4bpp[] =
{
0x42, 0x4d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00
, 0x00, 0x28, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00
, 0x00, 0x02, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xf2, 0xf3, 0x80, 0xf4, 0xf5, 0xf6
, 0x81, 0x00, 0x00,
0x00, 0x00
};
/* 1x1 8bpp bmp image */ /* 1x1 8bpp bmp image */
static const BYTE test_bmp_8bpp[] = static const BYTE test_bmp_8bpp[] =
{ {
0x42, 0x4d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00 , 0x00, 0x28, 0x00, 0x42, 0x4d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00 , 0x00, 0x28, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x02, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xf2, 0xf3, 0x80, 0xf4, 0xf5, 0xf6 , 0x81, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xf2, 0xf3, 0x80, 0xf4, 0xf5, 0xf6 , 0x81, 0x00, 0x00,
0x00, 0x00 0x00, 0x00
}; };
/* 1x1 16bpp bmp image */
static const BYTE test_bmp_16bpp[] =
{
0x42, 0x4d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00
, 0x00, 0x28, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x42, 0x00, 0x00, 0x00, 0x00
};
/* 1x1 24bpp bmp image */
static const BYTE test_bmp_24bpp[] =
{
0x42, 0x4d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00
, 0x00, 0x28, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x84, 0x84, 0x00, 0x00, 0x00
};
/* 2x2 32bpp XRGB bmp image */ /* 2x2 32bpp XRGB bmp image */
static const BYTE test_bmp_32bpp_xrgb[] = static const BYTE test_bmp_32bpp_xrgb[] =
{ {
0x42, 0x4d, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00 , 0x00, 0x28, 0x00, 0x42, 0x4d, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00 , 0x00, 0x28, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xb0, 0xc0, 0x00, 0xa1, 0xb1, 0xc1 , 0x00, 0xa2, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xb0, 0xc0, 0x00, 0xa1, 0xb1, 0xc1 , 0x00, 0xa2, 0xb2,
0xc2, 0x00, 0xa3, 0xb3, 0xc3, 0x00 0xc2, 0x00, 0xa3, 0xb3, 0xc3, 0x00
}; };
/* 2x2 32bpp ARGB bmp image */ /* 2x2 32bpp ARGB bmp image */
static const BYTE test_bmp_32bpp_argb[] = static const BYTE test_bmp_32bpp_argb[] =
{ {
0x42, 0x4d, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00 , 0x00, 0x28, 0x00, 0x42, 0x4d, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00 , 0x00, 0x28, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x12, 0x0b, 0x00 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xb0, 0xc0, 0x00, 0xa1, 0xb1, 0xc1 , 0x00, 0xa2, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xb0, 0xc0, 0x00, 0xa1, 0xb1, 0xc1 , 0x00, 0xa2, 0xb2,
0xc2, 0x00, 0xa3, 0xb3, 0xc3, 0x01 0xc2, 0x00, 0xa3, 0xb3, 0xc3, 0x01
}; };
/* png image */ /* 1x1 8bpp gray png image */
static const BYTE test_png_grayscale[] = static const BYTE test_png_8bpp_gray[] =
{ {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49 , 0x48, 0x44, 0x52, 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49 , 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00 , 0x3a, 0x7e, 0x9b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00 , 0x3a, 0x7e, 0x9b,
0x55, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8 , 0x0f, 0x00, 0x01, 0x55, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8 , 0x0f, 0x00, 0x01,
0x01, 0x01, 0x00, 0x1b, 0xb6, 0xee, 0x56, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45 , 0x4e, 0x44, 0xae, 0x01, 0x01, 0x00, 0x1b, 0xb6, 0xee, 0x56, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45 , 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82 0x42, 0x60, 0x82
}; };
/* 1x1 jpg image */
static const BYTE test_jpg[] =
{
0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01
, 0x01, 0x01, 0x2c,
0x01, 0x2c, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x05, 0x03, 0x04, 0x04
, 0x04, 0x03, 0x05,
0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x07, 0x0c, 0x08, 0x07, 0x07, 0x07
, 0x07, 0x0f, 0x0b,
0x0b, 0x09, 0x0c, 0x11, 0x0f, 0x12, 0x12, 0x11, 0x0f, 0x11, 0x11, 0x13, 0x16
, 0x1c, 0x17, 0x13,
0x14, 0x1a, 0x15, 0x11, 0x11, 0x18, 0x21, 0x18, 0x1a, 0x1d, 0x1d, 0x1f, 0x1f
, 0x1f, 0x13, 0x17,
0x22, 0x24, 0x22, 0x1e, 0x24, 0x1c, 0x1e, 0x1f, 0x1e, 0xff, 0xdb, 0x00, 0x43
, 0x01, 0x05, 0x05,
0x05, 0x07, 0x06, 0x07, 0x0e, 0x08, 0x08, 0x0e, 0x1e, 0x14, 0x11, 0x14, 0x1e
, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
, 0x1e, 0xff, 0xc0,
0x00, 0x11, 0x08, 0x00, 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11
, 0x01, 0x03, 0x11,
0x01, 0xff, 0xc4, 0x00, 0x15, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xc4, 0x00, 0x14, 0x10
, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
, 0x00, 0xff, 0xc4,
0x00, 0x14, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xc4, 0x00, 0x14, 0x11, 0x01, 0x00, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xda, 0x00
, 0x0c, 0x03, 0x01,
0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0xb2, 0xc0, 0x07, 0xff, 0xd9
};
/* 1x1 gif image */
static const BYTE test_gif[] =
{
0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00
, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00
, 0x02, 0x02, 0x44,
0x01, 0x00, 0x3b
};
/* 1x1 tiff image */
static const BYTE test_tiff[] =
{
0x49, 0x49, 0x2a, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10
, 0x00, 0xfe, 0x00,
0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x02, 0x01, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00
, 0x00, 0x03, 0x01,
0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x01, 0x03
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x01, 0x02, 0x00, 0x1b, 0x00, 0x00
, 0x00, 0xd8, 0x00,
0x00, 0x00, 0x11, 0x01, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
, 0x00, 0x12, 0x01,
0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x15, 0x01, 0x03
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x16, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00
, 0x00, 0x40, 0x00,
0x00, 0x00, 0x17, 0x01, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00
, 0x00, 0x1a, 0x01,
0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x1b, 0x01, 0x05
, 0x00, 0x01, 0x00,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x1c, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x28, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x2f, 0x68, 0x6f, 0x6d, 0x65
, 0x2f, 0x6d, 0x65,
0x68, 0x2f, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x2f, 0x74, 0x65, 0x73
, 0x74, 0x2e, 0x74,
0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00
, 0x00, 0x00, 0x48,
0x00, 0x00, 0x00, 0x01
};
/* 4x2 DXT5 dds image */ /* 4x2 DXT5 dds image */
static const BYTE test_dds_dxt5[] = static const BYTE test_dds_dxt5[] =
{ {
0x44, 0x44, 0x53, 0x20, 0x7c, 0x00, 0x00, 0x00, 0x07, 0x10, 0x08, 0x00, 0x02 , 0x00, 0x00, 0x00, 0x44, 0x44, 0x53, 0x20, 0x7c, 0x00, 0x00, 0x00, 0x07, 0x10, 0x08, 0x00, 0x02 , 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 , 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20 , 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x44, 0x58, 0x54, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x58, 0x54, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 , 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 , 0x10, 0x00, 0x00,
skipping to change at line 101 skipping to change at line 192
0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7, 0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7,
0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00, 0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00,
0xf5, 0xa7, 0x08, 0x69, 0x74, 0xc0, 0xbf, 0xd7, 0x32, 0x96, 0x0b, 0x7b, 0xcc , 0x55, 0xcc, 0x55, 0xf5, 0xa7, 0x08, 0x69, 0x74, 0xc0, 0xbf, 0xd7, 0x32, 0x96, 0x0b, 0x7b, 0xcc , 0x55, 0xcc, 0x55,
0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7, 0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7,
0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00, 0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00,
0xf5, 0xa7, 0x08, 0x69, 0x74, 0xc0, 0xbf, 0xd7, 0x32, 0x96, 0x0b, 0x7b, 0xcc , 0x55, 0xcc, 0x55, 0xf5, 0xa7, 0x08, 0x69, 0x74, 0xc0, 0xbf, 0xd7, 0x32, 0x96, 0x0b, 0x7b, 0xcc , 0x55, 0xcc, 0x55,
0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7, 0x0e, 0x84, 0x0e, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xa7, 0x08, 0x69, 0x74 , 0xc0, 0xbf, 0xd7,
0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00 0x32, 0x96, 0x0b, 0x7b, 0xcc, 0x55, 0xcc, 0x55, 0x0e, 0x84, 0x0e, 0x84, 0x00 , 0x00, 0x00, 0x00
}; };
/* 1x1 wmp image */
static const BYTE test_wmp[] =
{
0x49, 0x49, 0xbc, 0x01, 0x20, 0x00, 0x00, 0x00, 0x24, 0xc3, 0xdd, 0x6f, 0x03
, 0x4e, 0xfe, 0x4b,
0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x08, 0x00, 0x01, 0xbc, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
, 0x00, 0x02, 0xbc,
0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbc, 0x04
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x81, 0xbc, 0x04, 0x00, 0x01, 0x00, 0x00
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x82, 0xbc, 0x0b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x06, 0xc0
, 0x42, 0x83, 0xbc,
0x0b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x06, 0xc0, 0x42, 0xc0, 0xbc, 0x04
, 0x00, 0x01, 0x00,
0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0xc1, 0xbc, 0x04, 0x00, 0x01, 0x00, 0x00
, 0x00, 0x92, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x4d, 0x50, 0x48, 0x4f, 0x54, 0x4f
, 0x00, 0x11, 0x45,
0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00
, 0x00, 0x00, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x25, 0xff, 0xff
, 0x00, 0x00, 0x01,
0x01, 0xc8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x10, 0x10, 0xa6
, 0x18, 0x8c, 0x21,
0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x4e, 0x0f, 0x3a, 0x4c, 0x94, 0x9d, 0xba
, 0x79, 0xe7, 0x38,
0x4c, 0xcf, 0x14, 0xc3, 0x43, 0x91, 0x88, 0xfb, 0xdc, 0xe0, 0x7c, 0x34, 0x70
, 0x9b, 0x28, 0xa9,
0x18, 0x74, 0x62, 0x87, 0x8e, 0xe4, 0x68, 0x5f, 0xb9, 0xcc, 0x0e, 0xe1, 0x8c
, 0x76, 0x3a, 0x9b,
0x82, 0x76, 0x71, 0x13, 0xde, 0x50, 0xd4, 0x2d, 0xc2, 0xda, 0x1e, 0x3b, 0xa6
, 0xa1, 0x62, 0x7b,
0xca, 0x1a, 0x85, 0x4b, 0x6e, 0x74, 0xec, 0x60
};
static const struct test_image static const struct test_image
{ {
const BYTE *data; const BYTE *data;
unsigned int size; unsigned int size;
D3DX10_IMAGE_INFO expected; D3DX10_IMAGE_INFO expected;
} }
test_image[] = test_image[] =
{ {
{ {
test_bmp_1bpp, sizeof(test_bmp_1bpp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_BMP}
},
{
test_bmp_4bpp, sizeof(test_bmp_4bpp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_BMP}
},
{
test_bmp_8bpp, sizeof(test_bmp_8bpp), test_bmp_8bpp, sizeof(test_bmp_8bpp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP} {1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP}
}, },
{ {
test_bmp_16bpp, sizeof(test_bmp_16bpp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_BMP}
},
{
test_bmp_24bpp, sizeof(test_bmp_24bpp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_BMP}
},
{
test_bmp_32bpp_xrgb, sizeof(test_bmp_32bpp_xrgb), test_bmp_32bpp_xrgb, sizeof(test_bmp_32bpp_xrgb),
{2, 2, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP} {2, 2, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP}
}, },
{ {
test_bmp_32bpp_argb, sizeof(test_bmp_32bpp_argb), test_bmp_32bpp_argb, sizeof(test_bmp_32bpp_argb),
{2, 2, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP} {2, 2, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_BMP}
}, },
{ {
test_png_grayscale, sizeof(test_png_grayscale), test_png_8bpp_gray, sizeof(test_png_8bpp_gray),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_PNG} {1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_PNG}
}, },
{ {
test_jpg, sizeof(test_jpg),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_JPG}
},
{
test_gif, sizeof(test_gif),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_GIF}
},
{
test_tiff, sizeof(test_tiff),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_TIFF}
},
{
test_dds_dxt5, sizeof(test_dds_dxt5), test_dds_dxt5, sizeof(test_dds_dxt5),
{4, 2, 1, 1, 1, 0, DXGI_FORMAT_BC3_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_DDS} {4, 2, 1, 1, 1, 0, DXGI_FORMAT_BC3_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_DDS}
}, },
{ {
test_dds_cube, sizeof(test_dds_cube), test_dds_cube, sizeof(test_dds_cube),
{4, 4, 1, 6, 3, 0x4, DXGI_FORMAT_BC1_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_DDS} {4, 4, 1, 6, 3, 0x4, DXGI_FORMAT_BC1_UNORM, D3D10_RESOURCE_DIMENSIO N_TEXTURE2D, D3DX10_IFF_DDS}
}, },
{
test_wmp, sizeof(test_wmp),
{1, 1, 1, 1, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSIO
N_TEXTURE2D, D3DX10_IFF_WMP}
},
}; };
static BOOL compare_float(float f, float g, unsigned int ulps) static BOOL compare_float(float f, float g, unsigned int ulps)
{ {
int x = *(int *)&f; int x = *(int *)&f;
int y = *(int *)&g; int y = *(int *)&g;
if (x < 0) if (x < 0)
x = INT_MIN - x; x = INT_MIN - x;
if (y < 0) if (y < 0)
skipping to change at line 906 skipping to change at line 1052
ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr); ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
} }
static void test_get_image_info(void) static void test_get_image_info(void)
{ {
D3DX10_IMAGE_INFO image_info; D3DX10_IMAGE_INFO image_info;
unsigned int i; unsigned int i;
DWORD dword; DWORD dword;
HRESULT hr; HRESULT hr;
todo_wine { CoInitialize(NULL);
hr = D3DX10GetImageInfoFromMemory(test_image[0].data, 0, NULL, &image_info, NULL); hr = D3DX10GetImageInfoFromMemory(test_image[0].data, 0, NULL, &image_info, NULL);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
hr = D3DX10GetImageInfoFromMemory(NULL, test_image[0].size, NULL, &image_inf o, NULL); hr = D3DX10GetImageInfoFromMemory(NULL, test_image[0].size, NULL, &image_inf o, NULL);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
hr = D3DX10GetImageInfoFromMemory(&dword, sizeof(dword), NULL, &image_info, NULL); hr = D3DX10GetImageInfoFromMemory(&dword, sizeof(dword), NULL, &image_info, NULL);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
}
for (i = 0; i < ARRAY_SIZE(test_image); ++i) for (i = 0; i < ARRAY_SIZE(test_image); ++i)
{ {
hr = D3DX10GetImageInfoFromMemory(test_image[i].data, test_image[i].size , NULL, &image_info, NULL); hr = D3DX10GetImageInfoFromMemory(test_image[i].data, test_image[i].size , NULL, &image_info, NULL);
todo_wine ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); todo_wine_if(test_image[i].expected.ImageFileFormat == D3DX10_IFF_WMP)
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
if (hr != S_OK) if (hr != S_OK)
continue; continue;
todo_wine {
ok(image_info.Width == test_image[i].expected.Width, ok(image_info.Width == test_image[i].expected.Width,
"Test %u: Got unexpected Width %u, expected %u.\n", "Test %u: Got unexpected Width %u, expected %u.\n",
i, image_info.Width, test_image[i].expected.Width); i, image_info.Width, test_image[i].expected.Width);
ok(image_info.Height == test_image[i].expected.Height, ok(image_info.Height == test_image[i].expected.Height,
"Test %u: Got unexpected Height %u, expected %u.\n", "Test %u: Got unexpected Height %u, expected %u.\n",
i, image_info.Height, test_image[i].expected.Height); i, image_info.Height, test_image[i].expected.Height);
ok(image_info.Depth == test_image[i].expected.Depth, ok(image_info.Depth == test_image[i].expected.Depth,
"Test %u: Got unexpected Depth %u, expected %u.\n", "Test %u: Got unexpected Depth %u, expected %u.\n",
i, image_info.Depth, test_image[i].expected.Depth); i, image_info.Depth, test_image[i].expected.Depth);
ok(image_info.ArraySize == test_image[i].expected.ArraySize, ok(image_info.ArraySize == test_image[i].expected.ArraySize,
skipping to change at line 950 skipping to change at line 1096
i, image_info.MiscFlags, test_image[i].expected.MiscFlags); i, image_info.MiscFlags, test_image[i].expected.MiscFlags);
ok(image_info.Format == test_image[i].expected.Format, ok(image_info.Format == test_image[i].expected.Format,
"Test %u: Got unexpected Format %#x, expected %#x.\n", "Test %u: Got unexpected Format %#x, expected %#x.\n",
i, image_info.Format, test_image[i].expected.Format); i, image_info.Format, test_image[i].expected.Format);
ok(image_info.ResourceDimension == test_image[i].expected.ResourceDimens ion, ok(image_info.ResourceDimension == test_image[i].expected.ResourceDimens ion,
"Test %u: Got unexpected ResourceDimension %u, expected %u.\n", "Test %u: Got unexpected ResourceDimension %u, expected %u.\n",
i, image_info.ResourceDimension, test_image[i].expected.Resource Dimension); i, image_info.ResourceDimension, test_image[i].expected.Resource Dimension);
ok(image_info.ImageFileFormat == test_image[i].expected.ImageFileFormat, ok(image_info.ImageFileFormat == test_image[i].expected.ImageFileFormat,
"Test %u: Got unexpected ImageFileFormat %u, expected %u.\n", "Test %u: Got unexpected ImageFileFormat %u, expected %u.\n",
i, image_info.ImageFileFormat, test_image[i].expected.ImageFileF ormat); i, image_info.ImageFileFormat, test_image[i].expected.ImageFileF ormat);
}
} }
CoUninitialize();
} }
START_TEST(d3dx10) START_TEST(d3dx10)
{ {
test_D3DX10UnsetAllDeviceObjects(); test_D3DX10UnsetAllDeviceObjects();
test_D3DX10CreateAsyncMemoryLoader(); test_D3DX10CreateAsyncMemoryLoader();
test_D3DX10CreateAsyncFileLoader(); test_D3DX10CreateAsyncFileLoader();
test_D3DX10CreateAsyncResourceLoader(); test_D3DX10CreateAsyncResourceLoader();
test_get_image_info(); test_get_image_info();
} }
 End of changes. 16 change blocks. 
8 lines changed or deleted 229 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)