You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 4bd044dd32818166d42a9262411a1ae7ef42cc07.
This commit is contained in:
@@ -1,166 +0,0 @@
|
||||
From 1e6c40cf8a92d7873f1689d64936cd4dfd32f246 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 21 Apr 2016 14:40:58 +0800
|
||||
Subject: [PATCH] oleaut32: OleLoadPicture should create a DIB section for a
|
||||
being loaded bitmap. (v3)
|
||||
|
||||
Application in the bug 39474 depends on this (GetObject/bmBits should not be
|
||||
NULL, otherwise it crashes).
|
||||
---
|
||||
dlls/oleaut32/olepicture.c | 65 +++++++++++++-------------------
|
||||
dlls/oleaut32/tests/olepicture.c | 2 +-
|
||||
2 files changed, 27 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
|
||||
index 8df0c22b6cf..b41668a4aeb 100644
|
||||
--- a/dlls/oleaut32/olepicture.c
|
||||
+++ b/dlls/oleaut32/olepicture.c
|
||||
@@ -983,23 +983,16 @@ static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
|
||||
{
|
||||
BITMAPFILEHEADER *bfh = (BITMAPFILEHEADER*)xbuf;
|
||||
BITMAPINFO *bi = (BITMAPINFO*)(bfh+1);
|
||||
- HDC hdcref;
|
||||
+ void *bits;
|
||||
+ BITMAP bmp;
|
||||
|
||||
- /* Does not matter whether this is a coreheader or not, we only use
|
||||
- * components which are in both
|
||||
- */
|
||||
- hdcref = GetDC(0);
|
||||
- This->desc.bmp.hbitmap = CreateDIBitmap(
|
||||
- hdcref,
|
||||
- &(bi->bmiHeader),
|
||||
- CBM_INIT,
|
||||
- xbuf+bfh->bfOffBits,
|
||||
- bi,
|
||||
- DIB_RGB_COLORS
|
||||
- );
|
||||
- ReleaseDC(0, hdcref);
|
||||
+ This->desc.bmp.hbitmap = CreateDIBSection(0, bi, DIB_RGB_COLORS, &bits, NULL, 0);
|
||||
if (This->desc.bmp.hbitmap == 0)
|
||||
return E_FAIL;
|
||||
+
|
||||
+ GetObjectA(This->desc.u.bmp.hbitmap, sizeof(bmp), &bmp);
|
||||
+ memcpy(bits, xbuf + bfh->bfOffBits, bmp.bmHeight * bmp.bmWidthBytes);
|
||||
+
|
||||
This->desc.picType = PICTYPE_BITMAP;
|
||||
OLEPictureImpl_SetBitmap(This);
|
||||
return S_OK;
|
||||
@@ -1009,10 +1002,9 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour
|
||||
{
|
||||
HRESULT hr;
|
||||
BITMAPINFOHEADER bih;
|
||||
- HDC hdcref;
|
||||
UINT width, height;
|
||||
UINT stride, buffersize;
|
||||
- LPBYTE bits=NULL;
|
||||
+ BYTE *bits, *mask = NULL;
|
||||
WICRect rc;
|
||||
IWICBitmapSource *real_source;
|
||||
UINT x, y;
|
||||
@@ -1040,34 +1032,28 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour
|
||||
stride = 4 * width;
|
||||
buffersize = stride * height;
|
||||
|
||||
- bits = malloc(buffersize);
|
||||
- if (!bits)
|
||||
+ mask = malloc(buffersize);
|
||||
+ if (!mask)
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto end;
|
||||
}
|
||||
|
||||
+ This->desc.bmp.hbitmap = CreateDIBSection(0, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void **)&bits, NULL, 0);
|
||||
+ if (This->desc.bmp.hbitmap == 0)
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
rc.X = 0;
|
||||
rc.Y = 0;
|
||||
rc.Width = width;
|
||||
rc.Height = height;
|
||||
hr = IWICBitmapSource_CopyPixels(real_source, &rc, stride, buffersize, bits);
|
||||
if (FAILED(hr))
|
||||
- goto end;
|
||||
-
|
||||
- hdcref = GetDC(0);
|
||||
- This->desc.bmp.hbitmap = CreateDIBitmap(
|
||||
- hdcref,
|
||||
- &bih,
|
||||
- CBM_INIT,
|
||||
- bits,
|
||||
- (BITMAPINFO*)&bih,
|
||||
- DIB_RGB_COLORS);
|
||||
-
|
||||
- if (This->desc.bmp.hbitmap == 0)
|
||||
{
|
||||
- hr = E_FAIL;
|
||||
- ReleaseDC(0, hdcref);
|
||||
+ DeleteObject(This->desc.bmp.hbitmap);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -1081,23 +1067,25 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour
|
||||
if((*pixel & 0x80000000) == 0)
|
||||
{
|
||||
has_alpha = TRUE;
|
||||
- *pixel = black;
|
||||
+ *(DWORD *)(mask + stride * y + 4 * x) = black;
|
||||
}
|
||||
else
|
||||
- *pixel = white;
|
||||
+ *(DWORD *)(mask + stride * y + 4 * x) = white;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_alpha)
|
||||
{
|
||||
- HDC hdcBmp, hdcXor, hdcMask;
|
||||
+ HDC hdcref, hdcBmp, hdcXor, hdcMask;
|
||||
HBITMAP hbmoldBmp, hbmoldXor, hbmoldMask;
|
||||
|
||||
+ hdcref = GetDC(0);
|
||||
+
|
||||
This->hbmXor = CreateDIBitmap(
|
||||
hdcref,
|
||||
&bih,
|
||||
CBM_INIT,
|
||||
- bits,
|
||||
+ mask,
|
||||
(BITMAPINFO*)&bih,
|
||||
DIB_RGB_COLORS
|
||||
);
|
||||
@@ -1122,12 +1110,11 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour
|
||||
DeleteDC(hdcBmp);
|
||||
DeleteDC(hdcXor);
|
||||
DeleteDC(hdcMask);
|
||||
+ ReleaseDC(0, hdcref);
|
||||
}
|
||||
|
||||
- ReleaseDC(0, hdcref);
|
||||
-
|
||||
end:
|
||||
- free(bits);
|
||||
+ free(mask);
|
||||
IWICBitmapSource_Release(real_source);
|
||||
return hr;
|
||||
}
|
||||
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
|
||||
index 02d53404e32..98d081b745e 100644
|
||||
--- a/dlls/oleaut32/tests/olepicture.c
|
||||
+++ b/dlls/oleaut32/tests/olepicture.c
|
||||
@@ -239,7 +239,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
|
||||
{
|
||||
BITMAP bmp;
|
||||
GetObjectA(UlongToHandle(handle), sizeof(BITMAP), &bmp);
|
||||
- todo_wine ok(bmp.bmBits != 0, "not a dib\n");
|
||||
+ ok(bmp.bmBits != 0, "not a dib\n");
|
||||
}
|
||||
|
||||
width = 0;
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -1,93 +0,0 @@
|
||||
From e72c3ef9b52c3b5b099907c017206f168cff419f Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 5 Apr 2017 12:03:19 +0800
|
||||
Subject: [PATCH] oleaut32: Make OleLoadPicture load DIBs using WIC decoder.
|
||||
|
||||
CreateDIBSection doesn't support RLE compressed bitmaps.
|
||||
|
||||
This patch fixes a regression with displaying images in a Wix based
|
||||
installer.
|
||||
---
|
||||
dlls/oleaut32/olepicture.c | 21 +--------------------
|
||||
dlls/oleaut32/tests/olepicture.c | 12 +++++++++++-
|
||||
2 files changed, 12 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
|
||||
index 22a34d6e380..37c3983ed21 100644
|
||||
--- a/dlls/oleaut32/olepicture.c
|
||||
+++ b/dlls/oleaut32/olepicture.c
|
||||
@@ -979,25 +979,6 @@ static HRESULT WINAPI OLEPictureImpl_IsDirty(
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
-static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xread)
|
||||
-{
|
||||
- BITMAPFILEHEADER *bfh = (BITMAPFILEHEADER*)xbuf;
|
||||
- BITMAPINFO *bi = (BITMAPINFO*)(bfh+1);
|
||||
- void *bits;
|
||||
- BITMAP bmp;
|
||||
-
|
||||
- This->desc.bmp.hbitmap = CreateDIBSection(0, bi, DIB_RGB_COLORS, &bits, NULL, 0);
|
||||
- if (This->desc.bmp.hbitmap == 0)
|
||||
- return E_FAIL;
|
||||
-
|
||||
- GetObjectA(This->desc.u.bmp.hbitmap, sizeof(bmp), &bmp);
|
||||
- memcpy(bits, xbuf + bfh->bfOffBits, bmp.bmHeight * bmp.bmWidthBytes);
|
||||
-
|
||||
- This->desc.picType = PICTYPE_BITMAP;
|
||||
- OLEPictureImpl_SetBitmap(This);
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSource *src)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -1478,7 +1459,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
|
||||
hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICJpegDecoder, xbuf, xread);
|
||||
break;
|
||||
case BITMAP_FORMAT_BMP: /* Bitmap */
|
||||
- hr = OLEPictureImpl_LoadDIB(This, xbuf, xread);
|
||||
+ hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICBmpDecoder, xbuf, xread);
|
||||
break;
|
||||
case BITMAP_FORMAT_PNG: /* PNG */
|
||||
hr = OLEPictureImpl_LoadWICDecoder(This, &CLSID_WICPngDecoder, xbuf, xread);
|
||||
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
|
||||
index fa7e8009cbd..a1c3ccf20c3 100644
|
||||
--- a/dlls/oleaut32/tests/olepicture.c
|
||||
+++ b/dlls/oleaut32/tests/olepicture.c
|
||||
@@ -97,7 +97,7 @@ static const unsigned char pngimage[285] = {
|
||||
0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
|
||||
};
|
||||
|
||||
-/* 1x1 pixel bmp */
|
||||
+/* 1bpp BI_RGB 1x1 pixel bmp */
|
||||
static const unsigned char bmpimage[66] = {
|
||||
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,
|
||||
@@ -106,6 +106,15 @@ static const unsigned char bmpimage[66] = {
|
||||
0x00,0x00
|
||||
};
|
||||
|
||||
+/* 8bpp BI_RLE8 1x1 pixel bmp */
|
||||
+static const unsigned char bmpimage_rle8[] = {
|
||||
+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,0x01,0x00,
|
||||
+0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
|
||||
+0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x01,
|
||||
+0x00,0x00
|
||||
+};
|
||||
+
|
||||
/* 2x2 pixel gif */
|
||||
static const unsigned char gif4pixel[42] = {
|
||||
0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,
|
||||
@@ -1492,6 +1501,7 @@ START_TEST(olepicture)
|
||||
test_pic(gifimage, sizeof(gifimage));
|
||||
test_pic(jpgimage, sizeof(jpgimage));
|
||||
test_pic(bmpimage, sizeof(bmpimage));
|
||||
+ test_pic(bmpimage_rle8, sizeof(bmpimage_rle8));
|
||||
test_pic(gif4pixel, sizeof(gif4pixel));
|
||||
/* FIXME: No PNG support in Windows... */
|
||||
if (0) test_pic(pngimage, sizeof(pngimage));
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [39474] Create DIB section in OleLoadPicture
|
@@ -1,4 +1,4 @@
|
||||
From a3f14d043f05ff7cfaf00bc548d02f32dd85cc8f Mon Sep 17 00:00:00 2001
|
||||
From 1569189e4213b5df68680c56e18f397873bc19aa Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Mar 2015 01:05:48 +0100
|
||||
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
|
||||
@@ -15,10 +15,10 @@ Changes in v3:
|
||||
2 files changed, 65 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index 398bb0a69ed..2aec627604c 100644
|
||||
index 9282896262e..d4749a1eb57 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -14353,13 +14353,10 @@ static void test_PeekMessage3(void)
|
||||
@@ -14478,13 +14478,10 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_NOREMOVE);
|
||||
@@ -32,7 +32,7 @@ index 398bb0a69ed..2aec627604c 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -14369,10 +14366,8 @@ static void test_PeekMessage3(void)
|
||||
@@ -14494,10 +14491,8 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE);
|
||||
@@ -43,7 +43,7 @@ index 398bb0a69ed..2aec627604c 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -14384,10 +14379,11 @@ static void test_PeekMessage3(void)
|
||||
@@ -14509,10 +14504,11 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = GetMessageA(&msg, hwnd, 0, 0);
|
||||
@@ -57,7 +57,7 @@ index 398bb0a69ed..2aec627604c 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -14415,14 +14411,32 @@ static void test_PeekMessage3(void)
|
||||
@@ -14540,14 +14536,32 @@ static void test_PeekMessage3(void)
|
||||
ret = GetMessageA(&msg, hwnd, 0, 0);
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = GetMessageA(&msg, hwnd, 0, 0);
|
||||
@@ -93,10 +93,10 @@ index 398bb0a69ed..2aec627604c 100644
|
||||
* because both messages are in the same queue. */
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 4f58b795b7e..3fa5c05214e 100644
|
||||
index 520659d377c..2d23fb0def8 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -143,6 +143,7 @@ struct msg_queue
|
||||
@@ -133,6 +133,7 @@ struct msg_queue
|
||||
timeout_t last_get_msg; /* time of last get message call */
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
@@ -104,7 +104,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -309,6 +310,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -312,6 +313,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->hooks = NULL;
|
||||
queue->last_get_msg = current_time;
|
||||
queue->keystate_lock = 0;
|
||||
@@ -112,7 +112,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -725,13 +727,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
@@ -792,13 +794,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
}
|
||||
|
||||
/* get a (pseudo-)unique id to tag hardware messages */
|
||||
@@ -132,10 +132,10 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
+ return id;
|
||||
+}
|
||||
+
|
||||
/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */
|
||||
static int merge_mousemove( struct thread_input *input, const struct message *msg )
|
||||
/* lookup an already queued mouse message that matches the message, window and type */
|
||||
static struct message *find_mouse_message( struct thread_input *input, const struct message *msg )
|
||||
{
|
||||
@@ -1042,7 +1052,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
|
||||
@@ -1144,7 +1154,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
|
||||
}
|
||||
|
||||
/* retrieve a posted message */
|
||||
@@ -144,7 +144,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
unsigned int first, unsigned int last, unsigned int flags,
|
||||
struct get_message_reply *reply )
|
||||
{
|
||||
@@ -1053,6 +1063,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
@@ -1155,6 +1165,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
{
|
||||
if (!match_window( win, msg->win )) continue;
|
||||
if (!check_msg_filter( msg->msg, first, last )) continue;
|
||||
@@ -152,15 +152,15 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
goto found; /* found one */
|
||||
}
|
||||
return 0;
|
||||
@@ -1676,6 +1687,7 @@ found:
|
||||
@@ -1835,6 +1846,7 @@ found:
|
||||
msg->msg = WM_HOTKEY;
|
||||
msg->wparam = hotkey->id;
|
||||
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
|
||||
+ msg->unique_id = get_unique_post_id();
|
||||
+ msg->unique_id = get_unique_hw_id();
|
||||
|
||||
free( msg->data );
|
||||
msg->data = NULL;
|
||||
@@ -2646,7 +2658,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
@@ -2821,7 +2833,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
}
|
||||
|
||||
/* now we can return it */
|
||||
@@ -169,7 +169,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
reply->type = MSG_HARDWARE;
|
||||
reply->win = win;
|
||||
reply->msg = msg_code;
|
||||
@@ -2753,6 +2765,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
|
||||
@@ -2928,6 +2940,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
|
||||
msg->result = NULL;
|
||||
msg->data = NULL;
|
||||
msg->data_size = 0;
|
||||
@@ -177,7 +177,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
|
||||
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
|
||||
|
||||
@@ -3070,6 +3083,7 @@ DECL_HANDLER(send_message)
|
||||
@@ -3245,6 +3258,7 @@ DECL_HANDLER(send_message)
|
||||
set_queue_bits( recv_queue, QS_SENDMESSAGE );
|
||||
break;
|
||||
case MSG_POSTED:
|
||||
@@ -185,7 +185,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
|
||||
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
|
||||
if (msg->msg == WM_HOTKEY)
|
||||
@@ -3202,12 +3216,12 @@ DECL_HANDLER(get_message)
|
||||
@@ -3379,12 +3393,12 @@ DECL_HANDLER(get_message)
|
||||
|
||||
/* then check for posted messages */
|
||||
if ((filter & QS_POSTMESSAGE) &&
|
||||
@@ -200,7 +200,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
return;
|
||||
|
||||
/* only check for quit messages if not posted messages pending */
|
||||
@@ -3218,7 +3232,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -3395,7 +3409,7 @@ DECL_HANDLER(get_message)
|
||||
if ((filter & QS_INPUT) &&
|
||||
filter_contains_hw_range( req->get_first, req->get_last ) &&
|
||||
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
|
||||
@@ -209,7 +209,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
|
||||
/* now check for WM_PAINT */
|
||||
if ((filter & QS_PAINT) &&
|
||||
@@ -3231,7 +3245,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -3408,7 +3422,7 @@ DECL_HANDLER(get_message)
|
||||
reply->wparam = 0;
|
||||
reply->lparam = 0;
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
@@ -218,7 +218,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
}
|
||||
|
||||
/* now check for timer */
|
||||
@@ -3247,9 +3261,19 @@ DECL_HANDLER(get_message)
|
||||
@@ -3424,9 +3438,19 @@ DECL_HANDLER(get_message)
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
|
||||
set_event( current->process->idle_event );
|
||||
@@ -239,7 +239,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
|
||||
|
||||
SHARED_WRITE_BEGIN( queue_shm, queue_shm_t )
|
||||
@@ -3260,6 +3284,13 @@ DECL_HANDLER(get_message)
|
||||
@@ -3437,6 +3461,13 @@ DECL_HANDLER(get_message)
|
||||
SHARED_WRITE_END;
|
||||
|
||||
set_error( STATUS_PENDING ); /* FIXME */
|
||||
@@ -253,7 +253,7 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -3277,7 +3308,10 @@ DECL_HANDLER(reply_message)
|
||||
@@ -3454,7 +3485,10 @@ DECL_HANDLER(reply_message)
|
||||
DECL_HANDLER(accept_hardware_message)
|
||||
{
|
||||
if (current->queue)
|
||||
@@ -265,5 +265,5 @@ index 4f58b795b7e..3fa5c05214e 100644
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
From 466b9a26e43c4a9d2ddb9f28c92e43323cdbb343 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 28 Jan 2025 08:24:16 +1100
|
||||
Subject: [PATCH] Updated vkd3d to 40c225095f64dacfe8b88780a5d43ecdeafe4d2a.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/dxil.c | 1 +
|
||||
.../vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c | 17 ++++++++---------
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
index 399c2b67eae..a10de68008a 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
@@ -8598,6 +8598,7 @@ static const enum vkd3d_shader_sysval_semantic sysval_semantic_table[] =
|
||||
[SEMANTIC_KIND_VERTEXID] = VKD3D_SHADER_SV_VERTEX_ID,
|
||||
[SEMANTIC_KIND_INSTANCEID] = VKD3D_SHADER_SV_INSTANCE_ID,
|
||||
[SEMANTIC_KIND_POSITION] = VKD3D_SHADER_SV_POSITION,
|
||||
+ [SEMANTIC_KIND_RTARRAYINDEX] = VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX,
|
||||
[SEMANTIC_KIND_CLIPDISTANCE] = VKD3D_SHADER_SV_CLIP_DISTANCE,
|
||||
[SEMANTIC_KIND_CULLDISTANCE] = VKD3D_SHADER_SV_CULL_DISTANCE,
|
||||
[SEMANTIC_KIND_PRIMITIVEID] = VKD3D_SHADER_SV_PRIMITIVE_ID,
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
index e8dd4d62ae2..8d112fb57a7 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
@@ -148,15 +148,7 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst,
|
||||
float f = 0.0f;
|
||||
int32_t i = 0;
|
||||
|
||||
- if (dst_type->e.numeric.dimx != src->node.data_type->e.numeric.dimx
|
||||
- || dst_type->e.numeric.dimy != src->node.data_type->e.numeric.dimy)
|
||||
- {
|
||||
- FIXME("Cast from %s to %s.\n", debug_hlsl_type(ctx, src->node.data_type),
|
||||
- debug_hlsl_type(ctx, dst_type));
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- for (k = 0; k < dst_type->e.numeric.dimx; ++k)
|
||||
+ for (k = 0; k < src->node.data_type->e.numeric.dimx; ++k)
|
||||
{
|
||||
switch (src->node.data_type->e.numeric.type)
|
||||
{
|
||||
@@ -221,6 +213,13 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst,
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (src->node.data_type->e.numeric.dimx == 1)
|
||||
+ {
|
||||
+ for (k = 1; k < dst_type->e.numeric.dimx; ++k)
|
||||
+ dst->u[k] = dst->u[0];
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
--
|
||||
2.47.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,414 +0,0 @@
|
||||
From 4cb706ac6d429e39fd2fc6bc346a9aa216ae5c17 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 6 Feb 2025 13:52:27 +1100
|
||||
Subject: [PATCH] Updated vkd3d to fe52e696629c27abd7e4097e1e44a81b377f4f4f.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/hlsl.y | 67 ++++++++++++-------
|
||||
libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c | 55 ++++++++-------
|
||||
.../libs/vkd3d-shader/hlsl_constant_ops.c | 42 +++++++-----
|
||||
3 files changed, 98 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl.y b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
index 4813940e89c..7afc9274c2e 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
@@ -6889,6 +6889,46 @@ static void check_duplicated_switch_cases(struct hlsl_ctx *ctx, const struct hls
|
||||
}
|
||||
}
|
||||
|
||||
+static bool add_switch(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
+ struct parse_attribute_list *attributes, struct list *cases, const struct vkd3d_shader_location *loc)
|
||||
+{
|
||||
+ struct hlsl_ir_node *selector = node_from_block(block);
|
||||
+ struct hlsl_ir_node *s;
|
||||
+
|
||||
+ if (selector->data_type->class == HLSL_CLASS_ERROR)
|
||||
+ {
|
||||
+ destroy_switch_cases(cases);
|
||||
+ destroy_block(block);
|
||||
+ cleanup_parse_attribute_list(attributes);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (!(selector = add_implicit_conversion(ctx, block, selector,
|
||||
+ hlsl_get_scalar_type(ctx, HLSL_TYPE_UINT), &selector->loc)))
|
||||
+ {
|
||||
+ destroy_switch_cases(cases);
|
||||
+ destroy_block(block);
|
||||
+ cleanup_parse_attribute_list(attributes);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ s = hlsl_new_switch(ctx, selector, cases, loc);
|
||||
+
|
||||
+ destroy_switch_cases(cases);
|
||||
+
|
||||
+ if (!s)
|
||||
+ {
|
||||
+ destroy_block(block);
|
||||
+ cleanup_parse_attribute_list(attributes);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ hlsl_block_add_instr(block, s);
|
||||
+
|
||||
+ cleanup_parse_attribute_list(attributes);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
struct hlsl_type *format, const struct vkd3d_shader_location* loc)
|
||||
{
|
||||
@@ -9237,33 +9277,10 @@ loop_statement:
|
||||
switch_statement:
|
||||
attribute_list_optional switch_scope_start KW_SWITCH '(' expr ')' '{' switch_cases '}'
|
||||
{
|
||||
- struct hlsl_ir_node *selector = node_from_block($5);
|
||||
- struct hlsl_ir_node *s;
|
||||
-
|
||||
- if (!(selector = add_implicit_conversion(ctx, $5, selector, hlsl_get_scalar_type(ctx, HLSL_TYPE_UINT), &@5)))
|
||||
- {
|
||||
- destroy_switch_cases($8);
|
||||
- destroy_block($5);
|
||||
- cleanup_parse_attribute_list(&$1);
|
||||
- YYABORT;
|
||||
- }
|
||||
-
|
||||
- s = hlsl_new_switch(ctx, selector, $8, &@3);
|
||||
-
|
||||
- destroy_switch_cases($8);
|
||||
-
|
||||
- if (!s)
|
||||
- {
|
||||
- destroy_block($5);
|
||||
- cleanup_parse_attribute_list(&$1);
|
||||
- YYABORT;
|
||||
- }
|
||||
-
|
||||
$$ = $5;
|
||||
- hlsl_block_add_instr($$, s);
|
||||
-
|
||||
+ if (!add_switch(ctx, $$, &$1, $8, &@3))
|
||||
+ YYABORT;
|
||||
hlsl_pop_scope(ctx);
|
||||
- cleanup_parse_attribute_list(&$1);
|
||||
}
|
||||
|
||||
switch_case:
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
index a7798bf8e9f..2afd3e1e1e5 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
@@ -386,7 +386,7 @@ static uint32_t combine_field_storage_modifiers(uint32_t modifiers, uint32_t fie
|
||||
}
|
||||
|
||||
static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func,
|
||||
- struct hlsl_ir_var *top_var, uint32_t patch_index, struct hlsl_ir_load *lhs,
|
||||
+ struct hlsl_block *block, struct hlsl_ir_var *top_var, uint32_t patch_index, struct hlsl_ir_load *lhs,
|
||||
uint32_t modifiers, struct hlsl_semantic *semantic, uint32_t semantic_index, bool force_align)
|
||||
{
|
||||
struct hlsl_type *type = lhs->node.data_type, *vector_type_src, *vector_type_dst;
|
||||
@@ -438,11 +438,11 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_dec
|
||||
|
||||
if (!(idx = hlsl_new_uint_constant(ctx, patch_index, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&lhs->node.entry, &idx->entry);
|
||||
+ hlsl_block_add_instr(block, idx);
|
||||
|
||||
if (!(load = hlsl_new_load_index(ctx, &patch_deref, idx, loc)))
|
||||
return;
|
||||
- list_add_after(&idx->entry, &load->node.entry);
|
||||
+ hlsl_block_add_instr(block, &load->node);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -452,22 +452,22 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_dec
|
||||
|
||||
if (!(load = hlsl_new_var_load(ctx, input, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&lhs->node.entry, &load->node.entry);
|
||||
+ hlsl_block_add_instr(block, &load->node);
|
||||
}
|
||||
|
||||
if (!(cast = hlsl_new_cast(ctx, &load->node, vector_type_dst, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&load->node.entry, &cast->entry);
|
||||
+ hlsl_block_add_instr(block, cast);
|
||||
|
||||
if (type->class == HLSL_CLASS_MATRIX)
|
||||
{
|
||||
if (!(c = hlsl_new_uint_constant(ctx, i, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&cast->entry, &c->entry);
|
||||
+ hlsl_block_add_instr(block, c);
|
||||
|
||||
if (!(store = hlsl_new_store_index(ctx, &lhs->src, c, cast, 0, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&c->entry, &store->entry);
|
||||
+ hlsl_block_add_instr(block, store);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -475,14 +475,14 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_dec
|
||||
|
||||
if (!(store = hlsl_new_store_index(ctx, &lhs->src, NULL, cast, 0, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&cast->entry, &store->entry);
|
||||
+ hlsl_block_add_instr(block, store);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func,
|
||||
- struct hlsl_ir_var *top_var, uint32_t patch_index, struct hlsl_ir_load *lhs, uint32_t modifiers,
|
||||
- struct hlsl_semantic *semantic, uint32_t semantic_index, bool force_align)
|
||||
+ struct hlsl_block *block, struct hlsl_ir_var *top_var, uint32_t patch_index, struct hlsl_ir_load *lhs,
|
||||
+ uint32_t modifiers, struct hlsl_semantic *semantic, uint32_t semantic_index, bool force_align)
|
||||
{
|
||||
struct vkd3d_shader_location *loc = &lhs->node.loc;
|
||||
struct hlsl_type *type = lhs->node.data_type;
|
||||
@@ -528,20 +528,20 @@ static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_ir_func
|
||||
|
||||
if (!(c = hlsl_new_uint_constant(ctx, i, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&lhs->node.entry, &c->entry);
|
||||
+ hlsl_block_add_instr(block, c);
|
||||
|
||||
/* This redundant load is expected to be deleted later by DCE. */
|
||||
if (!(element_load = hlsl_new_load_index(ctx, &lhs->src, c, loc)))
|
||||
return;
|
||||
- list_add_after(&c->entry, &element_load->node.entry);
|
||||
+ hlsl_block_add_instr(block, &element_load->node);
|
||||
|
||||
- prepend_input_copy_recurse(ctx, func, top_var, patch_index, element_load, element_modifiers,
|
||||
- semantic, elem_semantic_index, force_align);
|
||||
+ prepend_input_copy_recurse(ctx, func, block, top_var, patch_index, element_load,
|
||||
+ element_modifiers, semantic, elem_semantic_index, force_align);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
- prepend_input_copy(ctx, func, var, patch_index, lhs, modifiers, semantic, semantic_index, force_align);
|
||||
+ prepend_input_copy(ctx, func, block, var, patch_index, lhs, modifiers, semantic, semantic_index, force_align);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,14 +550,19 @@ static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_ir_func
|
||||
static void prepend_input_var_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func, struct hlsl_ir_var *var)
|
||||
{
|
||||
struct hlsl_ir_load *load;
|
||||
+ struct hlsl_block block;
|
||||
+
|
||||
+ hlsl_block_init(&block);
|
||||
|
||||
/* This redundant load is expected to be deleted later by DCE. */
|
||||
if (!(load = hlsl_new_var_load(ctx, var, &var->loc)))
|
||||
return;
|
||||
- list_add_head(&func->body.instrs, &load->node.entry);
|
||||
+ hlsl_block_add_instr(&block, &load->node);
|
||||
|
||||
- prepend_input_copy_recurse(ctx, func, var, 0, load, var->storage_modifiers, &var->semantic,
|
||||
- var->semantic.index, false);
|
||||
+ prepend_input_copy_recurse(ctx, func, &block, var, 0, load,
|
||||
+ var->storage_modifiers, &var->semantic, var->semantic.index, false);
|
||||
+
|
||||
+ list_move_head(&func->body.instrs, &block.instrs);
|
||||
}
|
||||
|
||||
static void append_output_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func,
|
||||
@@ -1087,8 +1092,8 @@ static bool lower_calls(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *
|
||||
return true;
|
||||
}
|
||||
|
||||
-static struct hlsl_ir_node *add_zero_mipmap_level(struct hlsl_ctx *ctx, struct hlsl_ir_node *index,
|
||||
- const struct vkd3d_shader_location *loc)
|
||||
+static struct hlsl_ir_node *add_zero_mipmap_level(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
+ struct hlsl_ir_node *index, const struct vkd3d_shader_location *loc)
|
||||
{
|
||||
unsigned int dim_count = index->data_type->e.numeric.dimx;
|
||||
struct hlsl_ir_node *store, *zero;
|
||||
@@ -1105,19 +1110,19 @@ static struct hlsl_ir_node *add_zero_mipmap_level(struct hlsl_ctx *ctx, struct h
|
||||
hlsl_init_simple_deref_from_var(&coords_deref, coords);
|
||||
if (!(store = hlsl_new_store_index(ctx, &coords_deref, NULL, index, (1u << dim_count) - 1, loc)))
|
||||
return NULL;
|
||||
- list_add_after(&index->entry, &store->entry);
|
||||
+ hlsl_block_add_instr(block, store);
|
||||
|
||||
if (!(zero = hlsl_new_uint_constant(ctx, 0, loc)))
|
||||
return NULL;
|
||||
- list_add_after(&store->entry, &zero->entry);
|
||||
+ hlsl_block_add_instr(block, zero);
|
||||
|
||||
if (!(store = hlsl_new_store_index(ctx, &coords_deref, NULL, zero, 1u << dim_count, loc)))
|
||||
return NULL;
|
||||
- list_add_after(&zero->entry, &store->entry);
|
||||
+ hlsl_block_add_instr(block, store);
|
||||
|
||||
if (!(coords_load = hlsl_new_var_load(ctx, coords, loc)))
|
||||
return NULL;
|
||||
- list_add_after(&store->entry, &coords_load->node.entry);
|
||||
+ hlsl_block_add_instr(block, &coords_load->node);
|
||||
|
||||
return &coords_load->node;
|
||||
}
|
||||
@@ -1283,7 +1288,7 @@ static bool lower_index_loads(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
|
||||
VKD3D_ASSERT(coords->data_type->e.numeric.type == HLSL_TYPE_UINT);
|
||||
VKD3D_ASSERT(coords->data_type->e.numeric.dimx == dim_count);
|
||||
|
||||
- if (!(coords = add_zero_mipmap_level(ctx, coords, &instr->loc)))
|
||||
+ if (!(coords = add_zero_mipmap_level(ctx, block, coords, &instr->loc)))
|
||||
return false;
|
||||
|
||||
params.type = HLSL_RESOURCE_LOAD;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
index 8d112fb57a7..538f0f46854 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_constant_ops.c
|
||||
@@ -1588,7 +1588,7 @@ static bool is_op_left_distributive(enum hlsl_ir_expr_op opl, enum hlsl_ir_expr_
|
||||
}
|
||||
|
||||
/* Attempt to collect together the expression (x OPL a) OPR (x OPL b) -> x OPL (a OPR b). */
|
||||
-static struct hlsl_ir_node *collect_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
|
||||
+static struct hlsl_ir_node *collect_exprs(struct hlsl_ctx *ctx, struct hlsl_block *block, struct hlsl_ir_node *instr,
|
||||
enum hlsl_ir_expr_op opr, struct hlsl_ir_node *node1, struct hlsl_ir_node *node2)
|
||||
{
|
||||
enum hlsl_base_type type = instr->data_type->e.numeric.type;
|
||||
@@ -1612,14 +1612,14 @@ static struct hlsl_ir_node *collect_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_n
|
||||
|
||||
if (!(ab = hlsl_new_binary_expr(ctx, opr, e1->operands[1].node, e2->operands[1].node)))
|
||||
return NULL;
|
||||
- list_add_before(&instr->entry, &ab->entry);
|
||||
+ hlsl_block_add_instr(block, ab);
|
||||
|
||||
operands[0] = e1->operands[0].node;
|
||||
operands[1] = ab;
|
||||
|
||||
if (!(res = hlsl_new_expr(ctx, opl, operands, instr->data_type, &instr->loc)))
|
||||
return NULL;
|
||||
- list_add_before(&instr->entry, &res->entry);
|
||||
+ hlsl_block_add_instr(block, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1629,6 +1629,7 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
struct hlsl_ir_expr *expr;
|
||||
enum hlsl_base_type type;
|
||||
enum hlsl_ir_expr_op op;
|
||||
+ struct hlsl_block block;
|
||||
bool progress = false;
|
||||
|
||||
if (instr->type != HLSL_IR_EXPR)
|
||||
@@ -1638,6 +1639,8 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
if (instr->data_type->class > HLSL_CLASS_VECTOR)
|
||||
return false;
|
||||
|
||||
+ hlsl_block_init(&block);
|
||||
+
|
||||
arg1 = expr->operands[0].node;
|
||||
arg2 = expr->operands[1].node;
|
||||
type = instr->data_type->e.numeric.type;
|
||||
@@ -1646,9 +1649,10 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
if (!arg1 || !arg2)
|
||||
return false;
|
||||
|
||||
- if ((tmp = collect_exprs(ctx, instr, op, arg1, arg2)))
|
||||
+ if ((tmp = collect_exprs(ctx, &block, instr, op, arg1, arg2)))
|
||||
{
|
||||
/* (x OPL a) OPR (x OPL b) -> x OPL (a OPR b) */
|
||||
+ list_move_before(&instr->entry, &block.instrs);
|
||||
hlsl_replace_node(instr, tmp);
|
||||
return true;
|
||||
}
|
||||
@@ -1676,8 +1680,8 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
struct hlsl_ir_node *ab;
|
||||
|
||||
if (!(ab = hlsl_new_binary_expr(ctx, op, e1->operands[1].node, arg2)))
|
||||
- return false;
|
||||
- list_add_before(&instr->entry, &ab->entry);
|
||||
+ goto fail;
|
||||
+ hlsl_block_add_instr(&block, ab);
|
||||
|
||||
arg1 = e1->operands[0].node;
|
||||
arg2 = ab;
|
||||
@@ -1689,8 +1693,8 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
struct hlsl_ir_node *xy;
|
||||
|
||||
if (!(xy = hlsl_new_binary_expr(ctx, op, e1->operands[0].node, arg2)))
|
||||
- return false;
|
||||
- list_add_before(&instr->entry, &xy->entry);
|
||||
+ goto fail;
|
||||
+ hlsl_block_add_instr(&block, xy);
|
||||
|
||||
arg1 = xy;
|
||||
arg2 = e1->operands[1].node;
|
||||
@@ -1705,15 +1709,15 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
struct hlsl_ir_node *xy;
|
||||
|
||||
if (!(xy = hlsl_new_binary_expr(ctx, op, arg1, e2->operands[0].node)))
|
||||
- return false;
|
||||
- list_add_before(&instr->entry, &xy->entry);
|
||||
+ goto fail;
|
||||
+ hlsl_block_add_instr(&block, xy);
|
||||
|
||||
arg1 = xy;
|
||||
arg2 = e2->operands[1].node;
|
||||
progress = true;
|
||||
}
|
||||
|
||||
- if (!progress && e1 && (tmp = collect_exprs(ctx, instr, op, e1->operands[1].node, arg2)))
|
||||
+ if (!progress && e1 && (tmp = collect_exprs(ctx, &block, instr, op, e1->operands[1].node, arg2)))
|
||||
{
|
||||
/* (y OPR (x OPL a)) OPR (x OPL b) -> y OPR (x OPL (a OPR b)) */
|
||||
arg1 = e1->operands[0].node;
|
||||
@@ -1722,7 +1726,7 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
}
|
||||
|
||||
if (!progress && is_op_commutative(op) && e1
|
||||
- && (tmp = collect_exprs(ctx, instr, op, e1->operands[0].node, arg2)))
|
||||
+ && (tmp = collect_exprs(ctx, &block, instr, op, e1->operands[0].node, arg2)))
|
||||
{
|
||||
/* ((x OPL a) OPR y) OPR (x OPL b) -> (x OPL (a OPR b)) OPR y */
|
||||
arg1 = tmp;
|
||||
@@ -1730,7 +1734,7 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
progress = true;
|
||||
}
|
||||
|
||||
- if (!progress && e2 && (tmp = collect_exprs(ctx, instr, op, arg1, e2->operands[0].node)))
|
||||
+ if (!progress && e2 && (tmp = collect_exprs(ctx, &block, instr, op, arg1, e2->operands[0].node)))
|
||||
{
|
||||
/* (x OPL a) OPR ((x OPL b) OPR y) -> (x OPL (a OPR b)) OPR y */
|
||||
arg1 = tmp;
|
||||
@@ -1739,7 +1743,7 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
}
|
||||
|
||||
if (!progress && is_op_commutative(op) && e2
|
||||
- && (tmp = collect_exprs(ctx, instr, op, arg1, e2->operands[1].node)))
|
||||
+ && (tmp = collect_exprs(ctx, &block, instr, op, arg1, e2->operands[1].node)))
|
||||
{
|
||||
/* (x OPL a) OPR (y OPR (x OPL b)) -> (x OPL (a OPR b)) OPR y */
|
||||
arg1 = tmp;
|
||||
@@ -1754,12 +1758,18 @@ bool hlsl_normalize_binary_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
|
||||
struct hlsl_ir_node *res;
|
||||
|
||||
if (!(res = hlsl_new_expr(ctx, op, operands, instr->data_type, &instr->loc)))
|
||||
- return false;
|
||||
- list_add_before(&instr->entry, &res->entry);
|
||||
+ goto fail;
|
||||
+ hlsl_block_add_instr(&block, res);
|
||||
+
|
||||
+ list_move_before(&instr->entry, &block.instrs);
|
||||
hlsl_replace_node(instr, res);
|
||||
}
|
||||
|
||||
return progress;
|
||||
+
|
||||
+fail:
|
||||
+ hlsl_block_cleanup(&block);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool hlsl_fold_constant_swizzles(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context)
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 630d70bf14564ee5f380ae08720a2c8c98679bd1 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 18 Feb 2025 08:11:04 +1100
|
||||
Subject: [PATCH] Updated vkd3d to c3555a34dcf291e0811b0acce8884651d4e728a4.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d/state.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
|
||||
index bd3c3758ecb..c8a67479a22 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/state.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/state.c
|
||||
@@ -3595,7 +3595,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
mask |= 1u << e->InputSlot;
|
||||
}
|
||||
graphics->attribute_count = j;
|
||||
- vkd3d_shader_free_shader_signature(&input_signature);
|
||||
|
||||
switch (desc->strip_cut_value)
|
||||
{
|
||||
@@ -3661,6 +3660,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
if (FAILED(hr = vkd3d_private_store_init(&state->private_store)))
|
||||
goto fail;
|
||||
|
||||
+ vkd3d_shader_free_shader_signature(&input_signature);
|
||||
state->vk_bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
|
||||
state->implicit_root_signature = NULL;
|
||||
d3d12_device_add_ref(state->device = device);
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,36 +0,0 @@
|
||||
From ced946739a16c99cea79c46563048647fbf67f7e Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 19 Feb 2025 09:33:06 +1100
|
||||
Subject: [PATCH] Updated vkd3d to 86462db9ed051b92ad3fe007af64b8cd08d5a38a.
|
||||
|
||||
---
|
||||
libs/vkd3d/include/vkd3d_shader.h | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/vkd3d/include/vkd3d_shader.h b/libs/vkd3d/include/vkd3d_shader.h
|
||||
index af55d63a5c8..78d6e264a64 100644
|
||||
--- a/libs/vkd3d/include/vkd3d_shader.h
|
||||
+++ b/libs/vkd3d/include/vkd3d_shader.h
|
||||
@@ -2746,6 +2746,7 @@ VKD3D_SHADER_API const enum vkd3d_shader_target_type *vkd3d_shader_get_supported
|
||||
* - vkd3d_shader_preprocess_info
|
||||
* - vkd3d_shader_scan_combined_resource_sampler_info
|
||||
* - vkd3d_shader_scan_descriptor_info
|
||||
+ * - vkd3d_shader_scan_hull_shader_tessellation_info
|
||||
* - vkd3d_shader_scan_signature_info
|
||||
* - vkd3d_shader_spirv_domain_shader_target_info
|
||||
* - vkd3d_shader_spirv_target_info
|
||||
@@ -2933,9 +2934,10 @@ VKD3D_SHADER_API int vkd3d_shader_convert_root_signature(struct vkd3d_shader_ver
|
||||
* \param compile_info A chained structure containing scan parameters.
|
||||
* \n
|
||||
* The scanner supports the following chained structures:
|
||||
+ * - vkd3d_shader_scan_combined_resource_sampler_info
|
||||
* - vkd3d_shader_scan_descriptor_info
|
||||
+ * - vkd3d_shader_scan_hull_shader_tessellation_info
|
||||
* - vkd3d_shader_scan_signature_info
|
||||
- * - vkd3d_shader_scan_combined_resource_sampler_info
|
||||
* \n
|
||||
* Although the \a compile_info parameter is read-only, chained structures
|
||||
* passed to this function need not be, and may serve as output parameters,
|
||||
--
|
||||
2.47.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
||||
From 9d32cc45f4c3ce2ddbc92d74198053631003153a Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 18:09:55 +0800
|
||||
Subject: [PATCH] gdiplus: Add support for more image color formats.
|
||||
|
||||
---
|
||||
dlls/gdiplus/image.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index cafe69d8f43..4b696cd0481 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -62,7 +62,12 @@ static const struct
|
||||
{ &GUID_WICPixelFormat24bppBGR, PixelFormat24bppRGB, 0 },
|
||||
{ &GUID_WICPixelFormat32bppBGR, PixelFormat32bppRGB, 0 },
|
||||
{ &GUID_WICPixelFormat32bppBGRA, PixelFormat32bppARGB, 0 },
|
||||
+ { &GUID_WICPixelFormat32bppCMYK, PixelFormat32bppCMYK, 0 },
|
||||
+ { &GUID_WICPixelFormat32bppGrayFloat, PixelFormat32bppARGB, 0 },
|
||||
{ &GUID_WICPixelFormat32bppPBGRA, PixelFormat32bppPARGB, 0 },
|
||||
+ { &GUID_WICPixelFormat48bppRGB, PixelFormat48bppRGB, 0 },
|
||||
+ { &GUID_WICPixelFormat64bppCMYK, PixelFormat48bppRGB, 0 },
|
||||
+ { &GUID_WICPixelFormat64bppRGBA, PixelFormat48bppRGB, 0 },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@@ -1,212 +0,0 @@
|
||||
From 82ac8d6c986a16e4dfe07d53403f5636c9ee8d33 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 18:10:30 +0800
|
||||
Subject: [PATCH] gdiplus/tests: Add some tests for loading TIFF images in
|
||||
various color formats.
|
||||
|
||||
---
|
||||
dlls/gdiplus/tests/image.c | 181 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 181 insertions(+)
|
||||
|
||||
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
|
||||
index f63346e1dbf..9fcd66640e8 100644
|
||||
--- a/dlls/gdiplus/tests/image.c
|
||||
+++ b/dlls/gdiplus/tests/image.c
|
||||
@@ -5901,6 +5901,186 @@ static void test_graphics_clear(void)
|
||||
GdipDisposeImage((GpImage *)bitmap);
|
||||
}
|
||||
|
||||
+#include "pshpack2.h"
|
||||
+static const struct tiff_1x1_data
|
||||
+{
|
||||
+ USHORT byte_order;
|
||||
+ USHORT version;
|
||||
+ ULONG dir_offset;
|
||||
+ USHORT number_of_entries;
|
||||
+ struct IFD_entry entry[12];
|
||||
+ ULONG next_IFD;
|
||||
+ struct IFD_rational res;
|
||||
+ short palette_data[3][256];
|
||||
+ short bps_data[4];
|
||||
+ BYTE pixel_data[32];
|
||||
+} tiff_1x1_data =
|
||||
+{
|
||||
+#ifdef WORDS_BIGENDIAN
|
||||
+ 'M' | 'M' << 8,
|
||||
+#else
|
||||
+ 'I' | 'I' << 8,
|
||||
+#endif
|
||||
+ 42,
|
||||
+ FIELD_OFFSET(struct tiff_1x1_data, number_of_entries),
|
||||
+ 12,
|
||||
+ {
|
||||
+ { 0xff, IFD_SHORT, 1, 0 }, /* SUBFILETYPE */
|
||||
+ { 0x100, IFD_LONG, 1, 1 }, /* IMAGEWIDTH */
|
||||
+ { 0x101, IFD_LONG, 1, 1 }, /* IMAGELENGTH */
|
||||
+ { 0x102, IFD_SHORT, 3, FIELD_OFFSET(struct tiff_1x1_data, bps_data) }, /* BITSPERSAMPLE */
|
||||
+ { 0x103, IFD_SHORT, 1, 1 }, /* COMPRESSION: XP doesn't accept IFD_LONG here */
|
||||
+ { 0x106, IFD_SHORT, 1, 2 }, /* PHOTOMETRIC */
|
||||
+ { 0x111, IFD_LONG, 1, FIELD_OFFSET(struct tiff_1x1_data, pixel_data) }, /* STRIPOFFSETS */
|
||||
+ { 0x115, IFD_SHORT, 1, 3 }, /* SAMPLESPERPIXEL */
|
||||
+ { 0x11a, IFD_RATIONAL, 1, FIELD_OFFSET(struct tiff_1x1_data, res) },
|
||||
+ { 0x11b, IFD_RATIONAL, 1, FIELD_OFFSET(struct tiff_1x1_data, res) },
|
||||
+ { 0x128, IFD_SHORT, 1, 2 }, /* RESOLUTIONUNIT */
|
||||
+ { 0x140, IFD_SHORT, 256*3, FIELD_OFFSET(struct tiff_1x1_data, palette_data) } /* COLORMAP */
|
||||
+ },
|
||||
+ 0,
|
||||
+ { 96, 1 },
|
||||
+ { { 0 } },
|
||||
+ { 8,8,8,0 },
|
||||
+ { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 }
|
||||
+};
|
||||
+#include "poppack.h"
|
||||
+
|
||||
+static void test_tiff_color_formats(void)
|
||||
+{
|
||||
+ static const struct
|
||||
+ {
|
||||
+ int photometric; /* PhotometricInterpretation */
|
||||
+ int samples; /* SamplesPerPixel */
|
||||
+ int bps; /* BitsPerSample */
|
||||
+ PixelFormat format;
|
||||
+ } td[] =
|
||||
+ {
|
||||
+ /* 2 - RGB */
|
||||
+ { 2, 3, 1, PixelFormat24bppRGB },
|
||||
+ { 2, 3, 4, PixelFormat24bppRGB },
|
||||
+ { 2, 3, 8, PixelFormat24bppRGB },
|
||||
+ { 2, 3, 16, PixelFormat48bppRGB },
|
||||
+ { 2, 3, 24, 0 },
|
||||
+#if 0 /* FIXME */
|
||||
+ { 2, 3, 32, 0 },
|
||||
+#endif
|
||||
+ { 2, 4, 1, PixelFormat32bppARGB },
|
||||
+ { 2, 4, 4, PixelFormat32bppARGB },
|
||||
+ { 2, 4, 8, PixelFormat32bppARGB },
|
||||
+ { 2, 4, 16, PixelFormat48bppRGB },
|
||||
+ { 2, 4, 24, 0 },
|
||||
+ { 2, 4, 32, 0 },
|
||||
+ /* 1 - BlackIsZero (Bilevel) */
|
||||
+ { 1, 1, 1, PixelFormat1bppIndexed },
|
||||
+#if 0 /* FIXME: PNG vs TIFF mismatch */
|
||||
+ { 1, 1, 4, PixelFormat8bppIndexed },
|
||||
+#endif
|
||||
+ { 1, 1, 8, PixelFormat8bppIndexed },
|
||||
+ { 1, 1, 16, PixelFormat32bppARGB },
|
||||
+ { 1, 1, 24, 0 },
|
||||
+ { 1, 1, 32, PixelFormat32bppARGB },
|
||||
+ /* 3 - Palette Color */
|
||||
+ { 3, 1, 1, PixelFormat1bppIndexed },
|
||||
+ { 3, 1, 4, PixelFormat4bppIndexed },
|
||||
+ { 3, 1, 8, PixelFormat8bppIndexed },
|
||||
+#if 0 /* FIXME: for some reason libtiff replaces photometric 3 by 1 for bps > 8 */
|
||||
+ { 3, 1, 16, 0 },
|
||||
+ { 3, 1, 24, 0 },
|
||||
+ { 3, 1, 32, 0 },
|
||||
+#endif
|
||||
+ /* 5 - Separated */
|
||||
+ { 5, 4, 1, 0 },
|
||||
+ { 5, 4, 4, 0 },
|
||||
+ { 5, 4, 8, PixelFormat32bppCMYK },
|
||||
+ { 5, 4, 16, PixelFormat48bppRGB },
|
||||
+ { 5, 4, 24, 0 },
|
||||
+ { 5, 4, 32, 0 },
|
||||
+ };
|
||||
+ BYTE buf[sizeof(tiff_1x1_data)];
|
||||
+ GpStatus status;
|
||||
+ GpImage *image;
|
||||
+ UINT count, i;
|
||||
+ struct IFD_entry *tag, *tag_photo = NULL, *tag_bps = NULL, *tag_samples = NULL, *tag_colormap = NULL;
|
||||
+ short *bps;
|
||||
+ ImageType type;
|
||||
+ PixelFormat format;
|
||||
+
|
||||
+ memcpy(buf, &tiff_1x1_data, sizeof(tiff_1x1_data));
|
||||
+
|
||||
+ count = *(short *)(buf + tiff_1x1_data.dir_offset);
|
||||
+ tag = (struct IFD_entry *)(buf + tiff_1x1_data.dir_offset + sizeof(short));
|
||||
+
|
||||
+ /* verify the TIFF structure */
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ if (tag[i].id == 0x102) /* BitsPerSample */
|
||||
+ tag_bps = &tag[i];
|
||||
+ else if (tag[i].id == 0x106) /* PhotometricInterpretation */
|
||||
+ tag_photo = &tag[i];
|
||||
+ else if (tag[i].id == 0x115) /* SamplesPerPixel */
|
||||
+ tag_samples = &tag[i];
|
||||
+ else if (tag[i].id == 0x140) /* ColorMap */
|
||||
+ tag_colormap = &tag[i];
|
||||
+ }
|
||||
+
|
||||
+ ok(tag_bps && tag_photo && tag_samples && tag_colormap, "tag 0x102,0x106,0x115 or 0x140 is missing\n");
|
||||
+ if (!tag_bps || !tag_photo || !tag_samples || !tag_colormap) return;
|
||||
+
|
||||
+ ok(tag_bps->type == IFD_SHORT, "tag 0x102 should have type IFD_SHORT\n");
|
||||
+ bps = (short *)(buf + tag_bps->value);
|
||||
+ ok(bps[0] == 8 && bps[1] == 8 && bps[2] == 8 && bps[3] == 0,
|
||||
+ "expected bps 8,8,8,0 got %d,%d,%d,%d\n", bps[0], bps[1], bps[2], bps[3]);
|
||||
+
|
||||
+ for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
|
||||
+ {
|
||||
+ tag_colormap->count = (1 << td[i].bps) * 3;
|
||||
+ tag_photo->value = td[i].photometric;
|
||||
+ tag_bps->count = td[i].samples;
|
||||
+ tag_samples->value = td[i].samples;
|
||||
+
|
||||
+ if (td[i].samples == 1)
|
||||
+ tag_bps->value = td[i].bps;
|
||||
+ else if (td[i].samples == 2)
|
||||
+ tag_bps->value = MAKELONG(td[i].bps, td[i].bps);
|
||||
+ else if (td[i].samples == 3)
|
||||
+ {
|
||||
+ tag_bps->value = (BYTE *)bps - buf;
|
||||
+ bps[0] = bps[1] = bps[2] = td[i].bps;
|
||||
+ }
|
||||
+ else if (td[i].samples == 4)
|
||||
+ {
|
||||
+ tag_bps->value = (BYTE *)bps - buf;
|
||||
+ bps[0] = bps[1] = bps[2] = bps[3] = td[i].bps;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ok(0, "%u: unsupported samples count %d\n", i, td[i].samples);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ image = load_image(buf, sizeof(buf), TRUE, FALSE);
|
||||
+ if (!td[i].format)
|
||||
+ ok(!image,
|
||||
+ "%u: (%d,%d,%d) TIFF image loading should have failed\n", i, td[i].photometric, td[i].samples, td[i].bps);
|
||||
+ else
|
||||
+ ok(image != NULL || broken(!image) /* XP */, "%u: failed to load TIFF image data (%d,%d,%d)\n",
|
||||
+ i, td[i].photometric, td[i].samples, td[i].bps);
|
||||
+ if (!image) continue;
|
||||
+
|
||||
+ status = GdipGetImageType(image, &type);
|
||||
+ ok(status == Ok, "%u: GdipGetImageType error %d\n", i, status);
|
||||
+ ok(type == ImageTypeBitmap, "%u: wrong image type %d\n", i, type);
|
||||
+
|
||||
+ status = GdipGetImagePixelFormat(image, &format);
|
||||
+ expect(Ok, status);
|
||||
+ ok(format == td[i].format,
|
||||
+ "%u: expected %#x, got %#x\n", i, td[i].format, format);
|
||||
+
|
||||
+ GdipDisposeImage(image);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
START_TEST(image)
|
||||
{
|
||||
HMODULE mod = GetModuleHandleA("gdiplus.dll");
|
||||
@@ -5925,6 +6105,7 @@ START_TEST(image)
|
||||
pGdipBitmapGetHistogram = (void*)GetProcAddress(mod, "GdipBitmapGetHistogram");
|
||||
pGdipImageSetAbort = (void*)GetProcAddress(mod, "GdipImageSetAbort");
|
||||
|
||||
+ test_tiff_color_formats();
|
||||
test_GdipInitializePalette();
|
||||
test_png_color_formats();
|
||||
test_png_save_palette();
|
||||
--
|
||||
2.26.2
|
||||
|
@@ -1 +1 @@
|
||||
94dc1f470cc7adfee75cb0718e953ca1954599ef
|
||||
4bd044dd32818166d42a9262411a1ae7ef42cc07
|
||||
|
Reference in New Issue
Block a user