Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
July 2019
- 65 participants
- 633 messages
[PATCH 1/2] makefiles: Align PE sections so that they get directly mmap-ed
by Rémi Bernon
This will make linux perf tool able to find the origin of the code in
memory.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
tools/makedep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/makedep.c b/tools/makedep.c
index 24866b31455..9713f62b25d 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3242,6 +3242,7 @@ static void output_module( struct makefile *make )
output_filenames_obj_dir( make, make->res_files );
output_filenames( all_libs );
output_filename( make->is_cross ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" );
+ output_filename( make->is_cross ? "-Wl,--file-alignment,4096" : "" );
output( "\n" );
if (spec_file && make->importlib)
--
2.20.1
July 18, 2019
[PATCH 0/2] Help Linux perf get debug information from PE files
by Rémi Bernon
Sending these patches here as well as it could be useful for anyone
wanting to make performance analysis, although it's a little bit hacky.
Rémi Bernon (2):
makefiles: Align PE sections so that they get directly mmap-ed
makefiles: Split PE debug sections to separate ELF file
tools/makedep.c | 9 +++++++++
1 file changed, 9 insertions(+)
--
2.20.1
July 18, 2019
Re: [PATCH] user32: Modal dialogs send WM_CANCELMODE when mouse is captured by unrelated window in same thread.
by Dmitry Timoshkov
Sergio <sdelreal(a)codeweavers.com> wrote:
> @@ -701,7 +701,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
>
> if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
> {
> + HWND hwnd_capture;
> ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
> + if ( (hwnd_capture = GetCapture()) && !IsChild( hwnd, hwnd_capture ) && modal_owner )
> + SendMessageW(hwnd_capture, WM_CANCELMODE, 0, 0);
> }
This is most likely wrong, WM_CANCELMODE should be sent when the capturing
window loses focus during ShowWindow( hwnd, SW_SHOWNORMAL ) call.
> +static INT_PTR CALLBACK TestModalDlgWithCaptureProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
> +{
> + struct recvd_message msg;
> +
> + if (ignore_message( message )) return 0;
> +
> + switch (message)
> + {
> + case WM_NCHITTEST:
> + return HTCLIENT;
> + case WM_QUERYNEWPALETTE:
> + case WM_GETTEXT:
> + case WM_WINDOWPOSCHANGING:
> + case WM_WINDOWPOSCHANGED:
> + case WM_NCPAINT:
> + case WM_NCACTIVATE:
> + case WM_NCCALCSIZE:
> + case WM_NCDESTROY:
> + case WM_PAINT:
> + case WM_ERASEBKGND:
> + case WM_ACTIVATEAPP:
> + case WM_CTLCOLORDLG:
> + case WM_CTLCOLORBTN:
> + case WM_SETFOCUS:
> + case WM_KILLFOCUS:
> + case 0x90:
> + break;
The fact that you need to filter out so many messages is a clear sign that
the test is broken. Same comment applies for the next message proc.
--
Dmitry.
July 18, 2019
Re: [PATCH] user32: Modal dialogs send WM_CANCELMODE when mouse is captured by unrelated window in same thread.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=54821
Your paranoid android.
=== w7u (32 bit report) ===
user32:
msg.c:13945: Test failed: CreateDialogParam_3: 12: the msg 0x001c was expected, but got msg 0x0047 instead
=== w1064v1809 (32 bit report) ===
user32:
msg.c:10440: Test failed: did not get expected count for minimum timeout (54 != ~100).
=== debian9 (32 bit WoW report) ===
user32:
msg.c:8833: Test failed: WaitForSingleObject failed 102
msg.c:8839: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead
msg.c:8839: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead
msg.c:8839: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
=== debian9 (64 bit WoW report) ===
user32:
clipboard.c:1630: Test failed: gle 5
clipboard.c:1632: Test failed: expected moveable mem 00000000
clipboard.c:1637: Test failed: expected moveable mem 00000000
clipboard.c:1642: Test failed: expected moveable mem 00000000
clipboard.c:1648: Test failed: expected moveable mem 00000000
clipboard.c:1654: Test failed: expected bitmap 00000000
clipboard.c:1655: Test failed: different bitmap 00000000 / 005E003F
clipboard.c:1658: Test failed: expected bitmap 00000000
clipboard.c:1659: Test failed: different bitmap 00000000 / 000B0045
clipboard.c:1662: Test failed: expected palette 00000000
clipboard.c:1663: Test failed: different palette 00000000 / 000C0041
clipboard.c:1666: Test failed: expected fixed mem 00000000
clipboard.c:1668: Test failed: expected fixed mem 00000000
clipboard.c:1670: Test failed: gle 1418
win.c:10150: Test failed: Expected foreground window 000E0120, got 00E300D4
win.c:10152: Test failed: GetActiveWindow() = 00000000
win.c:10152: Test failed: GetFocus() = 00000000
win.c:10153: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.
win.c:10154: Test failed: Received WM_ACTIVATEAPP(0), did not expect it.
win.c:10162: Test failed: Expected foreground window 000E0120, got 00000000
win.c:10164: Test failed: GetActiveWindow() = 00000000
win.c:10164: Test failed: GetFocus() = 00000000
win.c:10172: Test failed: Received WM_ACTIVATEAPP(1), did not expect it.
July 17, 2019
[PATCH] user32: Modal dialogs send WM_CANCELMODE when mouse is captured by unrelated window in same thread.
by Sergio
Signed-off-by: Sergio <sdelreal(a)codeweavers.com>
---
dlls/user32/dialog.c | 3 +
dlls/user32/tests/msg.c | 221 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 222 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
index 88c2930c06..36a442d32b 100644
--- a/dlls/user32/dialog.c
+++ b/dlls/user32/dialog.c
@@ -701,7 +701,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{
+ HWND hwnd_capture;
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
+ if ( (hwnd_capture = GetCapture()) && !IsChild( hwnd, hwnd_capture ) && modal_owner )
+ SendMessageW(hwnd_capture, WM_CANCELMODE, 0, 0);
}
return hwnd;
}
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index a5bc1c5518..2508bb85d2 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -1675,6 +1675,85 @@ static const struct message WmModalDialogSeq_2[] = {
{ WM_NCDESTROY, sent },
{ 0 }
};
+/* remove capture when creating modal dialog */
+static const struct message WmDialogWithCaptureSeq[] = {
+ { WM_CANCELMODE, sent },
+ { WM_CAPTURECHANGED, sent|defwinproc|lparam, 0 },
+ { WM_KILLFOCUS, sent },
+ { WM_ENABLE, sent|wparam, 0 },
+ { HCBT_CREATEWND, hook },
+ { WM_SETFONT, sent|optional },
+ { WM_INITDIALOG, sent },
+ { WM_CHANGEUISTATE, sent|optional },
+ { WM_UPDATEUISTATE, sent|optional },
+ { WM_ENABLE, sent|wparam, 1 },
+ { WM_SHOWWINDOW, sent|wparam, 1 },
+ { HCBT_ACTIVATE, hook },
+ { WM_ACTIVATE, sent },
+ { WM_ACTIVATE, sent },
+ { HCBT_DESTROYWND, hook },
+ { WM_ACTIVATE, sent },
+ { WM_ACTIVATE, sent },
+ { WM_SETFOCUS, sent|defwinproc },
+ { WM_DESTROY, sent },
+ { 0 }
+};
+static const struct message WmDialogWithCapture2Seq[] = {
+ { HCBT_CREATEWND, hook|optional },
+ { WM_SETFONT, sent },
+ { WM_INITDIALOG, sent },
+ { WM_CHANGEUISTATE, sent|optional },
+ { WM_UPDATEUISTATE, sent|optional },
+ { WM_SHOWWINDOW, sent, 1 },
+ { HCBT_ACTIVATE, hook },
+ { WM_ACTIVATE, sent },
+ { WM_ACTIVATE, sent|optional },
+ { WM_KILLFOCUS, sent|optional },
+ { WM_CANCELMODE, sent },
+ { WM_CAPTURECHANGED, sent|defwinproc, 0 },
+ { HCBT_DESTROYWND, hook|optional },
+ { WM_ACTIVATE, sent|optional },
+ { WM_ACTIVATE, sent|optional },
+ { WM_SETFOCUS, sent|defwinproc|optional },
+ { WM_DESTROY, sent },
+ { 0 }
+};
+static const struct message WmDialogNoCaptureSeq[] = {
+ { WM_CANCELMODE, sent },
+ { WM_KILLFOCUS, sent|optional },
+ { WM_ENABLE, sent },
+ { HCBT_CREATEWND, hook|optional },
+ { WM_SETFONT, sent },
+ { WM_INITDIALOG, sent },
+ { WM_CHANGEUISTATE, sent|optional },
+ { WM_UPDATEUISTATE, sent|optional },
+ { WM_ENABLE, sent },
+ { WM_SHOWWINDOW, sent },
+ { HCBT_ACTIVATE, hook|optional },
+ { WM_ACTIVATE, sent|optional },
+ { WM_ACTIVATE, sent|optional },
+ { HCBT_DESTROYWND, hook|optional },
+ { WM_ACTIVATE, sent|optional },
+ { WM_ACTIVATE, sent|optional },
+ { WM_SETFOCUS, sent|defwinproc|optional },
+ { WM_DESTROY, sent },
+ { 0 }
+};
+/* modeless dialogs don't remove capture */
+static const struct message WmDialogModelessWithCaptureSeq[] = {
+ { HCBT_CREATEWND, hook|optional },
+ { WM_SETFONT, sent },
+ { WM_INITDIALOG, sent },
+ { WM_CHANGEUISTATE, sent|optional },
+ { WM_UPDATEUISTATE, sent|optional },
+ { WM_SHOWWINDOW, sent|wparam, 1 },
+ { HCBT_ACTIVATE, hook|optional },
+ { WM_ACTIVATE, sent },
+ { WM_ACTIVATE, sent },
+ { WM_KILLFOCUS, sent },
+ { 0 }
+};
+
/* SetMenu for NonVisible windows with size change*/
static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
@@ -4447,6 +4526,47 @@ static INT_PTR CALLBACK TestModalDlgProc2(HWND hwnd, UINT message, WPARAM wParam
return 0;
}
+static INT_PTR CALLBACK TestModalDlgWithCaptureProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ struct recvd_message msg;
+
+ if (ignore_message( message )) return 0;
+
+ switch (message)
+ {
+ case WM_NCHITTEST:
+ return HTCLIENT;
+ case WM_QUERYNEWPALETTE:
+ case WM_GETTEXT:
+ case WM_WINDOWPOSCHANGING:
+ case WM_WINDOWPOSCHANGED:
+ case WM_NCPAINT:
+ case WM_NCACTIVATE:
+ case WM_NCCALCSIZE:
+ case WM_NCDESTROY:
+ case WM_PAINT:
+ case WM_ERASEBKGND:
+ case WM_ACTIVATEAPP:
+ case WM_CTLCOLORDLG:
+ case WM_CTLCOLORBTN:
+ case WM_SETFOCUS:
+ case WM_KILLFOCUS:
+ case 0x90:
+ break;
+ case WM_SHOWWINDOW:
+ EndDialog(hwnd, 5);
+ default:
+ msg.hwnd = hwnd;
+ msg.message = message;
+ msg.flags = sent|wparam|lparam;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
+ msg.descr = "dialog";
+ add_message(&msg);
+ }
+ return FALSE;
+}
+
static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min, INT max)
{
DWORD style, exstyle;
@@ -9771,6 +9891,45 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
return ret;
}
+static LRESULT WINAPI WindowCaptureProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ static LONG defwndproc_counter = 0;
+ LRESULT ret;
+ struct recvd_message msg;
+
+ if (ignore_message(message)) return 0;
+
+ switch (message)
+ {
+ case WM_NCHITTEST:
+ return HTCLIENT;
+ case WM_QUERYNEWPALETTE:
+ case WM_GETTEXT:
+ case WM_WINDOWPOSCHANGING:
+ case WM_WINDOWPOSCHANGED:
+ case WM_NCPAINT:
+ case WM_NCACTIVATE:
+ case WM_ERASEBKGND:
+ case WM_ACTIVATEAPP:
+ break;
+ default:
+ msg.hwnd = hwnd;
+ msg.message = message;
+ msg.flags = sent|wparam|lparam;
+ if (defwndproc_counter) msg.flags |= defwinproc;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
+ msg.descr = "capture_window";
+ add_message(&msg);
+ }
+
+ defwndproc_counter++;
+ ret = DefWindowProcA(hwnd, message, wParam, lParam);
+ defwndproc_counter--;
+
+ return ret;
+}
+
static BOOL RegisterWindowClasses(void)
{
WNDCLASSA cls;
@@ -9820,6 +9979,10 @@ static BOOL RegisterWindowClasses(void)
cls.lpszClassName = "NoCloseWindowClass";
if(!RegisterClassA(&cls)) return FALSE;
+ cls.lpfnWndProc = WindowCaptureProcA;
+ cls.lpszClassName = "WindowCaptureClass";
+ if(!RegisterClassA(&cls)) return FALSE;
+
ok(GetClassInfoA(0, "#32770", &cls), "GetClassInfo failed\n");
cls.style = 0;
cls.hInstance = GetModuleHandleA(0);
@@ -13664,6 +13827,7 @@ static void test_dialog_messages(void)
WNDCLASSA cls;
HWND hdlg, hedit1, hedit2, hfocus, parent, child, child2;
LRESULT ret;
+ int dialog_ret;
#define set_selection(hctl, start, end) \
ret = SendMessageA(hctl, EM_SETSEL, start, end); \
@@ -13820,11 +13984,64 @@ static void test_dialog_messages(void)
flush_sequence();
DialogBoxA( 0, "TEST_DIALOG", child2, TestModalDlgProc2 );
ok_sequence(WmModalDialogSeq_2, "ModalDialog2", TRUE);
-
DestroyWindow(child2);
DestroyWindow(child);
DestroyWindow(parent);
- flush_sequence();
+
+ /* test that if a window has the mouse captured, modal dialogs should send it WM_CANCELMODE */
+ parent = CreateWindowExA(0, "WindowCaptureClass", "Test parent", WS_VISIBLE,
+ 100, 100, 200, 200, NULL, 0, 0, NULL);
+ ok(parent != NULL, "Failed creating window.\n");
+ child = CreateWindowExA(0, "WindowCaptureClass", "Test child", WS_VISIBLE | WS_CHILD,
+ 100, 100, 200, 200, parent, 0, 0, NULL);
+ ok(child != NULL, "Failed creating window.\n");
+
+ /* test modal dialog being child of window with capture */
+ SetCapture(parent);
+ ok(GetCapture() == parent, "Failed capturing mouse.\n");
+ flush_sequence();
+ dialog_ret = DialogBoxParamA(0, "TEST_DIALOG", parent, TestModalDlgWithCaptureProc, 0);
+ ok(dialog_ret > 0, "DialogBoxParamA failed.\n");
+ ok_sequence(WmDialogWithCaptureSeq, "ModalDialogWithCapture", FALSE);
+ ok(GetCapture() == NULL, "Mouse shouldn't be captured by hwnd %p\n", GetCapture());
+
+ /* test modal dialog unrelated to window with capture */
+ SetCapture(parent);
+ ok(GetCapture() == parent, "Failed capturing mouse.\n");
+ flush_sequence();
+ dialog_ret = DialogBoxParamA(0, "TEST_DIALOG", NULL, TestModalDlgWithCaptureProc, 0);
+ ok(dialog_ret > 0, "DialogBoxParamA failed.\n");
+ ok_sequence(WmDialogWithCapture2Seq, "ModalDialogWithCapture2", FALSE);
+ ok(GetCapture() == NULL, "Mouse shouldn't be captured by hwnd %p\n", GetCapture());
+
+ /* test modal dialog unrelated to window with capture, child */
+ SetCapture(child);
+ ok(GetCapture() == child, "Failed capturing mouse.\n");
+ flush_sequence();
+ dialog_ret = DialogBoxParamA(0, "TEST_DIALOG", NULL, TestModalDlgWithCaptureProc, 0);
+ ok(dialog_ret > 0, "DialogBoxParamA failed.\n");
+ ok_sequence(WmDialogWithCapture2Seq, "ModalDialogWithCapture3", FALSE);
+ ok(GetCapture() == NULL, "Mouse shouldn't be captured by hwnd %p\n", GetCapture());
+
+ /* test modal dialog, no capture */
+ flush_sequence();
+ dialog_ret = DialogBoxParamA(0, "TEST_DIALOG", parent, TestModalDlgWithCaptureProc, 0);
+ ok(dialog_ret > 0, "DialogBoxParamA failed.\n");
+ ok_sequence(WmDialogNoCaptureSeq, "ModalDialogNoCapture", FALSE);
+ ok(GetCapture() == NULL, "Mouse shouldn't be captured by hwnd %p\n", GetCapture());
+
+ /* test that modeless dialogs don't send message */
+ SetCapture(parent);
+ ok(GetCapture() == parent, "Failed capturing mouse.\n");
+ flush_sequence();
+ hdlg = CreateDialogParamA(0, "TEST_DIALOG", 0, TestModalDlgWithCaptureProc, 0);
+ ok(hdlg != NULL, "CreateDialogParamA failed.\n");
+ ok_sequence(WmDialogModelessWithCaptureSeq, "ModelessDialogWithCapture", FALSE);
+ ok(GetCapture() == parent, "Mouse should be captured by hwnd %p\n", parent);
+
+ DestroyWindow(child);
+ DestroyWindow(parent);
+ DestroyWindow(hdlg);
}
static void test_enddialog_seq(HWND dialog, HWND owner)
--
2.17.1
July 17, 2019
[PATCH vkd3d] demos: Use 3 swapchain images.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Mesa drivers increased minImageCount to 3.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
demos/gears.c | 51 ++++++++++++++++++++++++++----------------------
demos/triangle.c | 2 +-
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/demos/gears.c b/demos/gears.c
index 72916dc77417..2045b3cdd842 100644
--- a/demos/gears.c
+++ b/demos/gears.c
@@ -124,12 +124,12 @@ struct cx_gears
struct demo_swapchain *swapchain;
ID3D12DescriptorHeap *rtv_heap, *dsv_heap;
unsigned int rtv_descriptor_size;
- ID3D12Resource *render_targets[2];
- ID3D12CommandAllocator *command_allocator[2];
+ ID3D12Resource *render_targets[3];
+ ID3D12CommandAllocator *command_allocator[3];
ID3D12RootSignature *root_signature;
ID3D12PipelineState *pipeline_state_smooth, *pipeline_state_flat;
- ID3D12GraphicsCommandList *command_list[2];
+ ID3D12GraphicsCommandList *command_list[3];
ID3D12Resource *ds, *cb, *vb[2], *ib;
D3D12_VERTEX_BUFFER_VIEW vbv[2];
D3D12_INDEX_BUFFER_VIEW ibv;
@@ -306,8 +306,10 @@ static void cxg_destroy_pipeline(struct cx_gears *cxg)
{
unsigned int i;
- ID3D12CommandAllocator_Release(cxg->command_allocator[1]);
- ID3D12CommandAllocator_Release(cxg->command_allocator[0]);
+ for (i = 0; i < ARRAY_SIZE(cxg->command_allocator); ++i)
+ {
+ ID3D12CommandAllocator_Release(cxg->command_allocator[i]);
+ }
for (i = 0; i < ARRAY_SIZE(cxg->render_targets); ++i)
{
ID3D12Resource_Release(cxg->render_targets[i]);
@@ -371,12 +373,12 @@ static void cxg_load_pipeline(struct cx_gears *cxg)
&IID_ID3D12DescriptorHeap, (void **)&cxg->dsv_heap);
assert(SUCCEEDED(hr));
- hr = ID3D12Device_CreateCommandAllocator(cxg->device, D3D12_COMMAND_LIST_TYPE_DIRECT,
- &IID_ID3D12CommandAllocator, (void **)&cxg->command_allocator[0]);
- assert(SUCCEEDED(hr));
- hr = ID3D12Device_CreateCommandAllocator(cxg->device, D3D12_COMMAND_LIST_TYPE_DIRECT,
- &IID_ID3D12CommandAllocator, (void **)&cxg->command_allocator[1]);
- assert(SUCCEEDED(hr));
+ for (i = 0; i < ARRAY_SIZE(cxg->command_allocator); ++i)
+ {
+ hr = ID3D12Device_CreateCommandAllocator(cxg->device, D3D12_COMMAND_LIST_TYPE_DIRECT,
+ &IID_ID3D12CommandAllocator, (void **)&cxg->command_allocator[i]);
+ assert(SUCCEEDED(hr));
+ }
}
static void cxg_fence_destroy(struct cxg_fence *cxg_fence)
@@ -387,6 +389,8 @@ static void cxg_fence_destroy(struct cxg_fence *cxg_fence)
static void cxg_destroy_assets(struct cx_gears *cxg)
{
+ unsigned int i;
+
cxg_fence_destroy(&cxg->fence);
ID3D12Resource_Release(cxg->ib);
ID3D12Resource_Unmap(cxg->vb[1], 0, NULL);
@@ -395,8 +399,8 @@ static void cxg_destroy_assets(struct cx_gears *cxg)
ID3D12Resource_Unmap(cxg->cb, 0, NULL);
ID3D12Resource_Release(cxg->cb);
ID3D12Resource_Release(cxg->ds);
- ID3D12GraphicsCommandList_Release(cxg->command_list[1]);
- ID3D12GraphicsCommandList_Release(cxg->command_list[0]);
+ for (i = 0; i < ARRAY_SIZE(cxg->command_list); ++i)
+ ID3D12GraphicsCommandList_Release(cxg->command_list[i]);
ID3D12PipelineState_Release(cxg->pipeline_state_smooth);
ID3D12PipelineState_Release(cxg->pipeline_state_flat);
ID3D12RootSignature_Release(cxg->root_signature);
@@ -659,6 +663,7 @@ static void cxg_load_assets(struct cx_gears *cxg)
D3D12_HEAP_PROPERTIES heap_desc;
D3D12_RANGE read_range = {0, 0};
D3D12_CLEAR_VALUE clear_value;
+ unsigned int i;
HRESULT hr;
root_parameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
@@ -709,16 +714,15 @@ static void cxg_load_assets(struct cx_gears *cxg)
&IID_ID3D12PipelineState, (void **)&cxg->pipeline_state_smooth);
assert(SUCCEEDED(hr));
- hr = ID3D12Device_CreateCommandList(cxg->device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT, cxg->command_allocator[0],
- cxg->pipeline_state_flat, &IID_ID3D12GraphicsCommandList, (void **)&cxg->command_list[0]);
- assert(SUCCEEDED(hr));
- hr = ID3D12GraphicsCommandList_Close(cxg->command_list[0]);
- assert(SUCCEEDED(hr));
- hr = ID3D12Device_CreateCommandList(cxg->device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT, cxg->command_allocator[1],
- cxg->pipeline_state_flat, &IID_ID3D12GraphicsCommandList, (void **)&cxg->command_list[1]);
- assert(SUCCEEDED(hr));
- hr = ID3D12GraphicsCommandList_Close(cxg->command_list[1]);
- assert(SUCCEEDED(hr));
+ for (i = 0; i < ARRAY_SIZE(cxg->command_list); ++i)
+ {
+ hr = ID3D12Device_CreateCommandList(cxg->device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
+ cxg->command_allocator[i], cxg->pipeline_state_flat,
+ &IID_ID3D12GraphicsCommandList, (void **)&cxg->command_list[i]);
+ assert(SUCCEEDED(hr));
+ hr = ID3D12GraphicsCommandList_Close(cxg->command_list[i]);
+ assert(SUCCEEDED(hr));
+ }
heap_desc.Type = D3D12_HEAP_TYPE_DEFAULT;
heap_desc.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
@@ -861,6 +865,7 @@ static int cxg_main(void)
cxg_load_assets(&cxg);
cxg_populate_command_list(&cxg, 0);
cxg_populate_command_list(&cxg, 1);
+ cxg_populate_command_list(&cxg, 2);
demo_process_events(&cxg.demo);
diff --git a/demos/triangle.c b/demos/triangle.c
index 96ad83794d8d..bac1cdc59d88 100644
--- a/demos/triangle.c
+++ b/demos/triangle.c
@@ -73,7 +73,7 @@ struct cx_triangle
struct demo_swapchain *swapchain;
ID3D12DescriptorHeap *rtv_heap;
unsigned int rtv_descriptor_size;
- ID3D12Resource *render_targets[2];
+ ID3D12Resource *render_targets[3];
ID3D12CommandAllocator *command_allocator;
ID3D12RootSignature *root_signature;
--
2.21.0
July 17, 2019
[PATCH] dxgi: Obey image count limits for Vulkan swapchains.
by Józef Kucia
Mesa drivers require at least 3 images (see Mesa commit
4689e98fe884d9412b72fd6293b6d6a69e3ef68e).
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/dxgi/swapchain.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index 8dbbfab805d3..5d41edabaeb4 100644
--- a/dlls/dxgi/swapchain.c
+++ b/dlls/dxgi/swapchain.c
@@ -1651,9 +1651,9 @@ static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *s
VkSwapchainCreateInfoKHR vk_swapchain_desc;
VkDevice vk_device = swapchain->vk_device;
VkFormat vk_format, vk_swapchain_format;
+ unsigned int width, height, image_count;
VkSurfaceCapabilitiesKHR surface_caps;
VkSwapchainKHR vk_swapchain;
- unsigned int width, height;
VkImageUsageFlags usage;
VkResult vr;
HRESULT hr;
@@ -1675,12 +1675,15 @@ static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *s
return hresult_from_vk_result(vr);
}
- if (surface_caps.maxImageCount && (swapchain->desc.BufferCount > surface_caps.maxImageCount
- || swapchain->desc.BufferCount < surface_caps.minImageCount))
+ image_count = swapchain->desc.BufferCount;
+ image_count = max(image_count, surface_caps.minImageCount);
+ if (surface_caps.maxImageCount)
+ image_count = min(image_count, surface_caps.maxImageCount);
+
+ if (image_count != swapchain->desc.BufferCount)
{
WARN("Buffer count %u is not supported (%u-%u).\n", swapchain->desc.BufferCount,
surface_caps.minImageCount, surface_caps.maxImageCount);
- return DXGI_ERROR_UNSUPPORTED;
}
width = swapchain->desc.Width;
@@ -1716,7 +1719,7 @@ static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *s
vk_swapchain_desc.pNext = NULL;
vk_swapchain_desc.flags = 0;
vk_swapchain_desc.surface = swapchain->vk_surface;
- vk_swapchain_desc.minImageCount = swapchain->desc.BufferCount;
+ vk_swapchain_desc.minImageCount = image_count;
vk_swapchain_desc.imageFormat = vk_swapchain_format;
vk_swapchain_desc.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
vk_swapchain_desc.imageExtent.width = width;
--
2.21.0
July 17, 2019
[PATCH vkd3d 6/6] tests: Do not use TRUE and FALSE constants.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Use true and false instead.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
tests/d3d12.c | 352 +++++++++++++++++++++++-----------------------
tests/vkd3d_api.c | 2 +-
2 files changed, 177 insertions(+), 177 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index c22607764b6e..b93555e22389 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -2884,8 +2884,8 @@ static void test_create_graphics_pipeline_state(void)
ok(!refcount, "ID3D12PipelineState has %u references left.\n", (unsigned int)refcount);
blend = &pso_desc.BlendState;
- blend->IndependentBlendEnable = FALSE;
- blend->RenderTarget[0].BlendEnable = TRUE;
+ blend->IndependentBlendEnable = false;
+ blend->RenderTarget[0].BlendEnable = true;
blend->RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_COLOR;
blend->RenderTarget[0].DestBlend = D3D12_BLEND_DEST_COLOR;
blend->RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
@@ -2899,9 +2899,9 @@ static void test_create_graphics_pipeline_state(void)
ID3D12PipelineState_Release(pipeline_state);
/* Only one of BlendEnable or LogicOpEnable can be set to true. */
- blend->IndependentBlendEnable = FALSE;
- blend->RenderTarget[0].BlendEnable = TRUE;
- blend->RenderTarget[0].LogicOpEnable = TRUE;
+ blend->IndependentBlendEnable = false;
+ blend->RenderTarget[0].BlendEnable = true;
+ blend->RenderTarget[0].LogicOpEnable = true;
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&pipeline_state);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
@@ -2910,17 +2910,17 @@ static void test_create_graphics_pipeline_state(void)
&IID_ID3D12PipelineState, (void **)&pipeline_state);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
- blend->IndependentBlendEnable = FALSE;
- blend->RenderTarget[0].BlendEnable = FALSE;
- blend->RenderTarget[0].LogicOpEnable = TRUE;
+ blend->IndependentBlendEnable = false;
+ blend->RenderTarget[0].BlendEnable = false;
+ blend->RenderTarget[0].LogicOpEnable = true;
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
ID3D12PipelineState_Release(pipeline_state);
/* IndependentBlendEnable must be set to false when logic operations are enabled. */
- blend->IndependentBlendEnable = TRUE;
- blend->RenderTarget[0].LogicOpEnable = TRUE;
+ blend->IndependentBlendEnable = true;
+ blend->RenderTarget[0].LogicOpEnable = true;
for (i = 1; i < ARRAY_SIZE(blend->RenderTarget); ++i)
blend->RenderTarget[i] = blend->RenderTarget[0];
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
@@ -2930,7 +2930,7 @@ static void test_create_graphics_pipeline_state(void)
/* DSVFormat = DXGI_FORMAT_UNKNOWN */
memset(blend, 0, sizeof(*blend));
pso_desc.DSVFormat = DXGI_FORMAT_UNKNOWN;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
@@ -2940,7 +2940,7 @@ static void test_create_graphics_pipeline_state(void)
/* Invalid DSVFormat */
pso_desc.DSVFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&pipeline_state);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
@@ -4825,13 +4825,13 @@ static void test_set_render_targets(void)
dsv = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(dsv_heap);
rtv = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rtv_heap);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, FALSE, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, TRUE, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, TRUE, &dsv);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, &rtv, TRUE, &dsv);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, &rtv, FALSE, &dsv);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, TRUE, &dsv);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &dsv);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, false, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, true, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, true, &dsv);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, &rtv, true, &dsv);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, &rtv, false, &dsv);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, true, &dsv);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &dsv);
hr = ID3D12GraphicsCommandList_Close(command_list);
ok(hr == S_OK, "Failed to close command list, hr %#x.\n", hr);
@@ -4861,7 +4861,7 @@ static void test_draw_instanced(void)
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
}
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -4906,7 +4906,7 @@ static void test_draw_indexed_instanced(void)
ID3D12GraphicsCommandList_DrawIndexedInstanced(command_list, 3, 1, 0, 0, 0);
}
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -4977,7 +4977,7 @@ static void test_draw_no_descriptor_bindings(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5058,7 +5058,7 @@ static void test_multiple_render_targets(void)
for (i = 0; i < ARRAY_SIZE(rtvs); ++i)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtvs[i], white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), rtvs, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), rtvs, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5090,7 +5090,7 @@ static void test_multiple_render_targets(void)
transition_resource_state(command_list, render_targets[1],
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), &context.rtv, TRUE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), &context.rtv, true, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5173,7 +5173,7 @@ static void test_unknown_rtv_format(void)
pso_desc.RTVFormats[i] = desc.rt_format;
pso_desc.RTVFormats[0] = DXGI_FORMAT_UNKNOWN;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -5198,7 +5198,7 @@ static void test_unknown_rtv_format(void)
ID3D12Device_CreateRenderTargetView(context.device, NULL, &rtv_desc,
get_cpu_rtv_handle(&context, context.rtv_heap, 0));
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), rtvs, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, ARRAY_SIZE(rtvs), rtvs, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5286,7 +5286,7 @@ static void test_unknown_dsv_format(void)
/* DSVFormat = DXGI_FORMAT_UNKNOWN and D3D12_DEPTH_WRITE_MASK_ZERO */
init_pipeline_state_desc(&pso_desc, context.root_signature, desc.rt_format, NULL, &ps_color, NULL);
pso_desc.DSVFormat = DXGI_FORMAT_UNKNOWN;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_EQUAL;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -5297,7 +5297,7 @@ static void test_unknown_dsv_format(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle,
D3D12_CLEAR_FLAG_DEPTH, 0.5f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5337,7 +5337,7 @@ static void test_unknown_dsv_format(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5370,7 +5370,7 @@ static void test_unknown_dsv_format(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -5410,13 +5410,13 @@ static void test_unknown_dsv_format(void)
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 0, 4, &red.x, 0);
set_viewport(&context.viewport, 0.0f, 0.0f, 32.0f, 32.0f, 1.0f, 1.0f);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 0, 4, &green.x, 0);
set_viewport(&context.viewport, 0.0f, 0.0f, 32.0f, 32.0f, 0.6f, 0.6f);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
@@ -5606,7 +5606,7 @@ static void test_append_aligned_element(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -5743,7 +5743,7 @@ static void test_gpu_virtual_address(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -5878,7 +5878,7 @@ static void test_fragment_coords(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -6044,7 +6044,7 @@ static void test_fractional_viewports(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -6124,7 +6124,7 @@ static void test_scissor(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, red, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -6222,7 +6222,7 @@ static void test_draw_depth_no_ps(void)
memset(&pso_desc.PS, 0, sizeof(pso_desc.PS));
pso_desc.NumRenderTargets = 0;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -6232,7 +6232,7 @@ static void test_draw_depth_no_ps(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle,
D3D12_CLEAR_FLAG_DEPTH, 1.0f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -6315,7 +6315,7 @@ static void test_draw_depth_only(void)
init_pipeline_state_desc(&pso_desc, context.root_signature, 0, NULL, &ps, NULL);
pso_desc.NumRenderTargets = 0;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -6329,7 +6329,7 @@ static void test_draw_depth_only(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle,
D3D12_CLEAR_FLAG_DEPTH, tests[i].clear_depth, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -6351,7 +6351,7 @@ static void test_draw_depth_only(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle,
D3D12_CLEAR_FLAG_DEPTH, 1.0f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -7000,7 +7000,7 @@ static void test_bundle_state_inheritance(void)
/* A bundle does not inherit the current pipeline state. */
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -7036,7 +7036,7 @@ static void test_bundle_state_inheritance(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -7073,7 +7073,7 @@ static void test_bundle_state_inheritance(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -7097,7 +7097,7 @@ static void test_bundle_state_inheritance(void)
transition_resource_state(command_list, context.render_target,
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -9476,7 +9476,7 @@ static void test_shader_instructions(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(cb));
@@ -9529,7 +9529,7 @@ static void test_shader_instructions(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(cb));
@@ -9823,7 +9823,7 @@ static void test_discard_instruction(void)
update_buffer_data(cb, 0, sizeof(values[i]), &values[i]);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(cb));
@@ -9841,7 +9841,7 @@ static void test_discard_instruction(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(cb));
@@ -9999,7 +9999,7 @@ static void test_shader_interstage_interface(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -10382,7 +10382,7 @@ static void test_shader_input_output_components(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
}
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 2, &context.rtv, TRUE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 2, &context.rtv, true, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -11828,7 +11828,7 @@ static void test_immediate_constant_buffer(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(cb));
@@ -12048,7 +12048,7 @@ static void test_root_constants(void)
context.root_signature, desc.rt_format, NULL, &ps_uint_constant, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 0,
ARRAY_SIZE(constants), constants, 0);
@@ -12095,7 +12095,7 @@ static void test_root_constants(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
vs_cb_color = ps_cb_color = expected_result = (struct vec4){0.0f, 1.0f, 0.0f, 1.0f};
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 0, 4, &vs_cb_color.x, 0);
@@ -12116,7 +12116,7 @@ static void test_root_constants(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
vs_cb_color = (struct vec4){0.0f, 1.0f, 0.0f, 1.0f};
ps_cb_color = (struct vec4){1.0f, 1.0f, 1.0f, 1.0f};
@@ -12167,7 +12167,7 @@ static void test_root_constants(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
vs_cb_color = expected_result = (struct vec4){0.0f, 1.0f, 0.0f, 1.0f};
ps_cb_color = (struct vec4){1.0f, 1.0f, 1.0f, 1.0f};
@@ -12191,7 +12191,7 @@ static void test_root_constants(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
vs_cb_color = (struct vec4){0.0f, 1.0f, 0.0f, 1.0f};
ps_cb_color = expected_result = (struct vec4){1.0f, 1.0f, 1.0f, 1.0f};
@@ -12215,7 +12215,7 @@ static void test_root_constants(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
vs_cb_color = (struct vec4){0.5f, 1.0f, 0.5f, 1.0f};
ps_cb_color = (struct vec4){0.5f, 0.7f, 1.0f, 1.0f};
@@ -12355,7 +12355,7 @@ static void test_texture(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, red, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12587,7 +12587,7 @@ static void test_texture_ld(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12806,7 +12806,7 @@ static void test_gather(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12844,7 +12844,7 @@ static void test_gather(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12882,7 +12882,7 @@ static void test_gather(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12920,7 +12920,7 @@ static void test_gather(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -12956,7 +12956,7 @@ static void test_gather(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13146,7 +13146,7 @@ static void test_gather_c(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13184,7 +13184,7 @@ static void test_gather_c(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13220,7 +13220,7 @@ static void test_gather_c(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, &white.x, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13473,7 +13473,7 @@ static void test_sample_c_lz(void)
ps_constant.y = tests[i].layer;
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, clear_color, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13518,7 +13518,7 @@ static void test_sample_c_lz(void)
ps_constant.y = tests[i].layer;
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, clear_color, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -13828,7 +13828,7 @@ static void test_cube_maps(void)
constants.cube = (sub_resource_idx / test->miplevel_count) / 6;
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -14039,7 +14039,7 @@ static void test_multisample_array_texture(void)
vkd3d_test_set_context("Test %u", i);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -14422,7 +14422,7 @@ static void test_resinfo(void)
constant.x = type;
constant.y = test->miplevel;
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -14664,7 +14664,7 @@ static void test_srv_component_mapping(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -14867,7 +14867,7 @@ static void test_descriptor_tables(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
heaps[0] = heap; heaps[1] = sampler_heap;
@@ -15333,7 +15333,7 @@ static void test_update_descriptor_tables(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -15468,7 +15468,7 @@ static void test_update_descriptor_heap_after_closing_command_list(void)
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -16189,7 +16189,7 @@ static void test_update_descriptor_tables_after_root_signature_change(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, pipeline_state);
@@ -16933,7 +16933,7 @@ static void test_copy_descriptors_range_sizes(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -17222,7 +17222,7 @@ static void test_descriptors_visibility(void)
5, get_gpu_descriptor_handle(&context, heap, 1));
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -17401,7 +17401,7 @@ static void test_null_cbv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -17557,7 +17557,7 @@ static void test_null_srv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -17593,7 +17593,7 @@ static void test_null_srv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -17633,7 +17633,7 @@ static void test_null_srv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
@@ -17799,7 +17799,7 @@ static void test_null_uav(void)
ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(uav_heap));
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(command_list, 1, test->location, 0);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
@@ -17913,7 +17913,7 @@ static void test_null_vbv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -18372,8 +18372,8 @@ static void test_depth_clip(void)
input_layout.NumElements = ARRAY_SIZE(layout_desc);
init_pipeline_state_desc(&pso_desc, context.root_signature,
context.render_target_desc.Format, &vs, NULL, &input_layout);
- pso_desc.RasterizerState.DepthClipEnable = TRUE;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.RasterizerState.DepthClipEnable = true;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
@@ -18389,7 +18389,7 @@ static void test_depth_clip(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list,
ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH, 0.125f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -18415,7 +18415,7 @@ static void test_depth_clip(void)
}
ID3D12PipelineState_Release(context.pipeline_state);
- pso_desc.RasterizerState.DepthClipEnable = FALSE;
+ pso_desc.RasterizerState.DepthClipEnable = false;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
@@ -18428,7 +18428,7 @@ static void test_depth_clip(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list,
ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH, 0.125f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -18455,7 +18455,7 @@ static void test_depth_clip(void)
ID3D12PipelineState_Release(context.pipeline_state);
pso_desc.PS = ps_depth;
- pso_desc.RasterizerState.DepthClipEnable = TRUE;
+ pso_desc.RasterizerState.DepthClipEnable = true;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
@@ -18464,7 +18464,7 @@ static void test_depth_clip(void)
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list,
ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH, 0.125f, 0, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -18509,7 +18509,7 @@ static void check_depth_stencil_sampling_(unsigned int line, struct test_context
D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context->rtv, black, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
@@ -19016,7 +19016,7 @@ static void test_depth_load(void)
D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -19113,7 +19113,7 @@ static void test_depth_read_only_view(void)
init_pipeline_state_desc(&pso_desc, context.root_signature,
context.render_target_desc.Format, NULL, &ps, NULL);
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_GREATER;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -19141,7 +19141,7 @@ static void test_depth_read_only_view(void)
D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_DEPTH_READ);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, &dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, &dsv_handle);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
@@ -19310,7 +19310,7 @@ static void test_stencil_load(void)
D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -20495,7 +20495,7 @@ static void test_uav_load(void)
ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(uav_heap));
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(command_list, 1, test->constant, 0);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &cpu_handle, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &cpu_handle, false, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, cpu_handle, white, 0, NULL);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
@@ -21843,7 +21843,7 @@ static void test_buffer_srv(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -22045,7 +22045,7 @@ static void test_query_pipeline_statistics(void)
/* Second query: draw something simple. */
ID3D12GraphicsCommandList_BeginQuery(command_list, query_heap, D3D12_QUERY_TYPE_PIPELINE_STATISTICS, 1);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -22176,7 +22176,7 @@ static void test_query_occlusion(void)
init_pipeline_state_desc(&pso_desc, context.root_signature, 0, NULL, &ps, NULL);
pso_desc.NumRenderTargets = 0;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -22191,7 +22191,7 @@ static void test_query_occlusion(void)
resource = create_readback_buffer(device, ARRAY_SIZE(tests) * sizeof(uint64_t));
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -22328,7 +22328,7 @@ static void test_resolve_query_data_in_different_command_list(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -22418,7 +22418,7 @@ static void test_resolve_query_data_in_reordered_command_list(void)
ok(SUCCEEDED(hr), "Failed to close command list, hr %#x.\n", hr);
/* Produce query results in the first command list. */
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_lists[0], 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_lists[0], 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_lists[0], context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_lists[0], context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_lists[0], D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -22616,7 +22616,7 @@ static void test_execute_indirect(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -22635,7 +22635,7 @@ static void test_execute_indirect(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -22704,7 +22704,7 @@ static void test_execute_indirect(void)
ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, 1, &vbv);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_ExecuteIndirect(command_list, command_signature,
ARRAY_SIZE(argument_data.indexed_draws), argument_buffer,
offsetof(struct argument_data, indexed_draws), NULL, 0);
@@ -22733,7 +22733,7 @@ static void test_execute_indirect(void)
ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, 1, &vbv);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_ExecuteIndirect(command_list, command_signature,
ARRAY_SIZE(argument_data.indexed_draws), argument_buffer,
offsetof(struct argument_data, indexed_draws), count_buffer, sizeof(uint32_t));
@@ -23000,7 +23000,7 @@ static void test_zero_vertex_stride(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -23021,7 +23021,7 @@ static void test_zero_vertex_stride(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, instance_pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -23282,7 +23282,7 @@ static void test_instance_id(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtvs[0], white, 0, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtvs[1], white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 2, rtvs, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 2, rtvs, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -23783,7 +23783,7 @@ static void test_copy_texture(void)
D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -24631,7 +24631,7 @@ static void test_separate_bindings(void)
ID3D12Device_CreateUnorderedAccessView(device, ps_textures[1], NULL, NULL,
get_cpu_descriptor_handle(&context, heap, 11));
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
@@ -24802,7 +24802,7 @@ static void test_face_culling(void)
context.render_target_desc.Format, &vs_ccw, &ps_color, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24819,7 +24819,7 @@ static void test_face_culling(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24848,7 +24848,7 @@ static void test_face_culling(void)
ok(SUCCEEDED(hr), "Failed to create graphics pipeline state, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24872,7 +24872,7 @@ static void test_face_culling(void)
ok(SUCCEEDED(hr), "Failed to create graphics pipeline state, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24907,7 +24907,7 @@ static void test_face_culling(void)
ok(SUCCEEDED(hr), "Failed to create graphics pipeline state, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24930,7 +24930,7 @@ static void test_face_culling(void)
ok(SUCCEEDED(hr), "Failed to create graphics pipeline state, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -24985,7 +24985,7 @@ static void draw_thread_main(void *thread_data)
for (i = 0; i < 100; ++i)
{
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context->pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -25030,7 +25030,7 @@ static void test_multithread_command_queue_exec(void)
for (i = 0; i < 100; ++i)
{
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -25267,7 +25267,7 @@ static void test_geometry_shader(void)
for (i = 0; i < ARRAY_SIZE(rtvs); ++i)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtvs[i], red, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtvs[0], FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtvs[0], false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -25276,7 +25276,7 @@ static void test_geometry_shader(void)
ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, 1, &vbv);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 1, 1, 0, 0);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtvs[1], FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtvs[1], false, NULL);
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso_5_0);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 1, 1, 0, 0);
@@ -25498,7 +25498,7 @@ static void test_layered_rendering(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -25649,7 +25649,7 @@ static void test_ps_layer(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
@@ -25905,7 +25905,7 @@ static void test_nop_tessellation_shaders(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST);
@@ -26289,7 +26289,7 @@ static void test_quad_tessellation(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST);
@@ -26328,7 +26328,7 @@ static void test_quad_tessellation(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST);
@@ -26359,7 +26359,7 @@ static void test_quad_tessellation(void)
transition_resource_state(command_list, so_buffer,
D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_STREAM_OUT);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST);
@@ -26587,7 +26587,7 @@ static void test_tessellation_dcl_index_range(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST);
@@ -26738,7 +26738,7 @@ static void test_hull_shader_control_point_phase(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST);
@@ -26971,7 +26971,7 @@ static void test_hull_shader_fork_phase(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST);
@@ -27621,7 +27621,7 @@ static void test_tessellation_primitive_id(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST);
@@ -27677,7 +27677,7 @@ static void test_render_a8(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, black, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -27781,7 +27781,7 @@ static void test_cpu_descriptors_lifetime(void)
ID3D12Device_CreateRenderTargetView(device, red_resource, NULL, rtv_handle);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtv_handle, red, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv_handle, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv_handle, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -27793,7 +27793,7 @@ static void test_cpu_descriptors_lifetime(void)
ID3D12Device_CreateRenderTargetView(device, blue_resource, NULL, rtv_handle);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtv_handle, blue, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv_handle, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv_handle, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -27841,7 +27841,7 @@ static void check_clip_distance(struct test_context *context,
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = 1.0f;
update_buffer_data(vb, 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -27865,7 +27865,7 @@ static void check_clip_distance(struct test_context *context,
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = 0.0f;
update_buffer_data(vb, 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -27889,7 +27889,7 @@ static void check_clip_distance(struct test_context *context,
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = -1.0f;
update_buffer_data(vb, 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -27913,7 +27913,7 @@ static void check_clip_distance(struct test_context *context,
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = i < 2 ? 1.0f : -1.0f;
update_buffer_data(vb, 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -27942,7 +27942,7 @@ static void check_clip_distance(struct test_context *context,
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = i % 2 ? 1.0f : -1.0f;
update_buffer_data(vb, 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28235,7 +28235,7 @@ static void test_clip_distance(void)
vs_cb = create_upload_buffer(device, sizeof(cb_data), &cb_data);
gs_cb = create_upload_buffer(device, sizeof(cb_data), &cb_data);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28276,7 +28276,7 @@ static void test_clip_distance(void)
cb_data.use_constant = true;
cb_data.clip_distance0 = 1.0f;
update_buffer_data(gs_cb, 0, sizeof(cb_data), &cb_data);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28311,7 +28311,7 @@ static void test_clip_distance(void)
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
vertices[i].clip_distance0 = 1.0f;
update_buffer_data(vb[1], 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28338,7 +28338,7 @@ static void test_clip_distance(void)
vertices[i].clip_distance1 = i % 2 ? 1.0f : -1.0f;
}
update_buffer_data(vb[1], 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28371,7 +28371,7 @@ static void test_clip_distance(void)
cb_data.clip_distance0 = 0.0f;
cb_data.clip_distance1 = 0.0f;
update_buffer_data(vs_cb, 0, sizeof(cb_data), &cb_data);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0,
ID3D12Resource_GetGPUVirtualAddress(vs_cb));
@@ -28558,7 +28558,7 @@ static void test_combined_clip_and_cull_distances(void)
vbv[1].StrideInBytes = sizeof(*vertices);
vbv[1].SizeInBytes = sizeof(vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -28587,7 +28587,7 @@ static void test_combined_clip_and_cull_distances(void)
vertices[k].cull_distance[i] = test->vertices[k];
update_buffer_data(vb[1], 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -28631,7 +28631,7 @@ static void test_combined_clip_and_cull_distances(void)
vertices[j].clip_distance[i] = -1.0f;
update_buffer_data(vb[1], 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -28655,7 +28655,7 @@ static void test_combined_clip_and_cull_distances(void)
memset(vertices, 0, sizeof(vertices));
update_buffer_data(vb[1], 0, sizeof(vertices), vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -28937,7 +28937,7 @@ static void test_command_list_initial_pipeline_state(void)
ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
@@ -28955,7 +28955,7 @@ static void test_command_list_initial_pipeline_state(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
@@ -29004,7 +29004,7 @@ static void test_blend_factor(void)
init_pipeline_state_desc(&pso_desc, context.root_signature,
context.render_target_desc.Format, NULL, NULL, NULL);
- pso_desc.BlendState.RenderTarget[0].BlendEnable = TRUE;
+ pso_desc.BlendState.RenderTarget[0].BlendEnable = true;
pso_desc.BlendState.RenderTarget[0].SrcBlend = D3D12_BLEND_BLEND_FACTOR;
pso_desc.BlendState.RenderTarget[0].DestBlend = D3D12_BLEND_INV_BLEND_FACTOR;
pso_desc.BlendState.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
@@ -29020,7 +29020,7 @@ static void test_blend_factor(void)
vkd3d_test_set_context("Test %u", i);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29103,7 +29103,7 @@ static void test_dual_source_blending(void)
init_pipeline_state_desc(&pso_desc, context.root_signature,
context.render_target_desc.Format, NULL, &ps, NULL);
- pso_desc.BlendState.RenderTarget[0].BlendEnable = TRUE;
+ pso_desc.BlendState.RenderTarget[0].BlendEnable = true;
pso_desc.BlendState.RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_COLOR;
pso_desc.BlendState.RenderTarget[0].DestBlend = D3D12_BLEND_SRC1_COLOR;
pso_desc.BlendState.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
@@ -29119,7 +29119,7 @@ static void test_dual_source_blending(void)
vkd3d_test_set_context("Test %u", i);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29138,7 +29138,7 @@ static void test_dual_source_blending(void)
vkd3d_test_set_context(NULL);
ID3D12PipelineState_Release(context.pipeline_state);
- pso_desc.BlendState.IndependentBlendEnable = TRUE;
+ pso_desc.BlendState.IndependentBlendEnable = true;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
@@ -29159,8 +29159,8 @@ static void test_dual_source_blending(void)
pso_desc.NumRenderTargets = 2;
pso_desc.RTVFormats[1] = pso_desc.RTVFormats[0];
- pso_desc.BlendState.IndependentBlendEnable = FALSE;
- pso_desc.BlendState.RenderTarget[0].BlendEnable = TRUE;
+ pso_desc.BlendState.IndependentBlendEnable = false;
+ pso_desc.BlendState.RenderTarget[0].BlendEnable = true;
pso_desc.BlendState.RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_COLOR;
pso_desc.BlendState.RenderTarget[0].DestBlend = D3D12_BLEND_SRC1_COLOR;
pso_desc.BlendState.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
@@ -29294,7 +29294,7 @@ static void test_multisample_rendering(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, ms_rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &ms_rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &ms_rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, ms_pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29324,7 +29324,7 @@ static void test_multisample_rendering(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29411,7 +29411,7 @@ static void test_sample_mask(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, ms_rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &ms_rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &ms_rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29560,7 +29560,7 @@ static void test_coverage(void)
uav_barrier(command_list, texture);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, black, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29640,7 +29640,7 @@ static void test_shader_get_render_target_sample_count(void)
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, black, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29730,7 +29730,7 @@ static void test_shader_sample_position(void)
for (sample_index = 0; sample_index < resource_desc.SampleDesc.Count; ++sample_index)
{
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29928,7 +29928,7 @@ static void test_shader_eval_attribute(void)
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -29952,7 +29952,7 @@ static void test_shader_eval_attribute(void)
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -30099,7 +30099,7 @@ static void test_primitive_restart(void)
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
@@ -30534,7 +30534,7 @@ static void test_queue_wait(void)
readback_buffer = create_readback_buffer(device, buffer_size);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -30844,7 +30844,7 @@ static void test_graphics_compute_queue_synchronization(void)
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(command_list,
0, ID3D12Resource_GetGPUVirtualAddress(buffer));
ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 1, 1, &value, 0);
@@ -30959,7 +30959,7 @@ static void test_early_depth_stencil_tests(void)
init_pipeline_state_desc(&pso_desc, context.root_signature, 0, NULL, &ps, NULL);
pso_desc.NumRenderTargets = 0;
pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
- pso_desc.DepthStencilState.DepthEnable = TRUE;
+ pso_desc.DepthStencilState.DepthEnable = true;
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
@@ -30980,7 +30980,7 @@ static void test_early_depth_stencil_tests(void)
set_viewport(&context.viewport, 0.0f, 0.0f, 1.0f, 100.0f, 0.5f, 0.5f);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -31012,7 +31012,7 @@ static void test_early_depth_stencil_tests(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_DEPTH_WRITE);
transition_resource_state(command_list, texture,
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, FALSE, &ds.dsv_handle);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 0, NULL, false, &ds.dsv_handle);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
@@ -31054,7 +31054,7 @@ static void prepare_instanced_draw(struct test_context *context)
{
ID3D12GraphicsCommandList *command_list = context->list;
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context->rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context->pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c
index 5acec56d8646..a9a7fc1071d4 100644
--- a/tests/vkd3d_api.c
+++ b/tests/vkd3d_api.c
@@ -965,7 +965,7 @@ static void test_external_resource_present_state(void)
D3D12_RESOURCE_STATE_PRESENT, D3D12_RESOURCE_STATE_RENDER_TARGET);
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, rtv, white, 0, NULL);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &rtv, false, NULL);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
--
2.21.0
July 17, 2019
[PATCH vkd3d 5/6] tests: Prefer C99 bool.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
tests/d3d12.c | 230 +++++++++++++++++++++++++-------------------------
1 file changed, 115 insertions(+), 115 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index c53d6053de1c..c22607764b6e 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -958,10 +958,10 @@ static void test_create_device(void)
return;
}
- check_interface(device, &IID_ID3D12Object, TRUE);
- check_interface(device, &IID_ID3D12DeviceChild, FALSE);
- check_interface(device, &IID_ID3D12Pageable, FALSE);
- check_interface(device, &IID_ID3D12Device, TRUE);
+ check_interface(device, &IID_ID3D12Object, true);
+ check_interface(device, &IID_ID3D12DeviceChild, false);
+ check_interface(device, &IID_ID3D12Pageable, false);
+ check_interface(device, &IID_ID3D12Device, true);
refcount = ID3D12Device_Release(device);
ok(!refcount, "ID3D12Device has %u references left.\n", (unsigned int)refcount);
@@ -1356,12 +1356,12 @@ static void test_multisample_quality_levels(void)
/* invalid sample counts */
for (i = 1; i <= 32; ++i)
{
- BOOL valid_sample_count = FALSE;
+ bool valid_sample_count = false;
for (j = 0; j < ARRAY_SIZE(sample_counts); ++j)
{
if (sample_counts[j] == i)
{
- valid_sample_count = TRUE;
+ valid_sample_count = true;
break;
}
}
@@ -1434,10 +1434,10 @@ static void test_create_command_allocator(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(command_allocator, &IID_ID3D12Object, TRUE);
- check_interface(command_allocator, &IID_ID3D12DeviceChild, TRUE);
- check_interface(command_allocator, &IID_ID3D12Pageable, TRUE);
- check_interface(command_allocator, &IID_ID3D12CommandAllocator, TRUE);
+ check_interface(command_allocator, &IID_ID3D12Object, true);
+ check_interface(command_allocator, &IID_ID3D12DeviceChild, true);
+ check_interface(command_allocator, &IID_ID3D12Pageable, true);
+ check_interface(command_allocator, &IID_ID3D12CommandAllocator, true);
refcount = ID3D12CommandAllocator_Release(command_allocator);
ok(!refcount, "ID3D12CommandAllocator has %u references left.\n", (unsigned int)refcount);
@@ -1509,12 +1509,12 @@ static void test_create_command_list(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(command_list, &IID_ID3D12Object, TRUE);
- check_interface(command_list, &IID_ID3D12DeviceChild, TRUE);
- check_interface(command_list, &IID_ID3D12Pageable, FALSE);
- check_interface(command_list, &IID_ID3D12CommandList, TRUE);
- check_interface(command_list, &IID_ID3D12GraphicsCommandList, TRUE);
- check_interface(command_list, &IID_ID3D12CommandAllocator, FALSE);
+ check_interface(command_list, &IID_ID3D12Object, true);
+ check_interface(command_list, &IID_ID3D12DeviceChild, true);
+ check_interface(command_list, &IID_ID3D12Pageable, false);
+ check_interface(command_list, &IID_ID3D12CommandList, true);
+ check_interface(command_list, &IID_ID3D12GraphicsCommandList, true);
+ check_interface(command_list, &IID_ID3D12CommandAllocator, false);
refcount = ID3D12CommandList_Release(command_list);
ok(!refcount, "ID3D12CommandList has %u references left.\n", (unsigned int)refcount);
@@ -1530,7 +1530,7 @@ static void test_create_command_list(void)
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_BUNDLE,
command_allocator, NULL, &IID_ID3D12CommandList, (void **)&command_list);
ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
- check_interface(command_list, &IID_ID3D12GraphicsCommandList, TRUE);
+ check_interface(command_list, &IID_ID3D12GraphicsCommandList, true);
refcount = ID3D12CommandList_Release(command_list);
ok(!refcount, "ID3D12CommandList has %u references left.\n", (unsigned int)refcount);
refcount = ID3D12CommandAllocator_Release(command_allocator);
@@ -1545,7 +1545,7 @@ static void test_create_command_list(void)
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_COMPUTE,
command_allocator, NULL, &IID_ID3D12CommandList, (void **)&command_list);
ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
- check_interface(command_list, &IID_ID3D12GraphicsCommandList, TRUE);
+ check_interface(command_list, &IID_ID3D12GraphicsCommandList, true);
refcount = ID3D12CommandList_Release(command_list);
ok(!refcount, "ID3D12CommandList has %u references left.\n", (unsigned int)refcount);
refcount = ID3D12CommandAllocator_Release(command_allocator);
@@ -1563,7 +1563,7 @@ static void test_create_command_list(void)
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_COPY,
command_allocator, NULL, &IID_ID3D12CommandList, (void **)&command_list);
ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
- check_interface(command_list, &IID_ID3D12GraphicsCommandList, TRUE);
+ check_interface(command_list, &IID_ID3D12GraphicsCommandList, true);
refcount = ID3D12CommandList_Release(command_list);
ok(!refcount, "ID3D12CommandList has %u references left.\n", (unsigned int)refcount);
refcount = ID3D12CommandAllocator_Release(command_allocator);
@@ -1605,10 +1605,10 @@ static void test_create_command_queue(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(queue, &IID_ID3D12Object, TRUE);
- check_interface(queue, &IID_ID3D12DeviceChild, TRUE);
- check_interface(queue, &IID_ID3D12Pageable, TRUE);
- check_interface(queue, &IID_ID3D12CommandQueue, TRUE);
+ check_interface(queue, &IID_ID3D12Object, true);
+ check_interface(queue, &IID_ID3D12DeviceChild, true);
+ check_interface(queue, &IID_ID3D12Pageable, true);
+ check_interface(queue, &IID_ID3D12CommandQueue, true);
result_desc = ID3D12CommandQueue_GetDesc(queue);
ok(result_desc.Type == desc.Type, "Got unexpected type %#x.\n", result_desc.Type);
@@ -1775,10 +1775,10 @@ static void test_create_committed_resource(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(resource, &IID_ID3D12Object, TRUE);
- check_interface(resource, &IID_ID3D12DeviceChild, TRUE);
- check_interface(resource, &IID_ID3D12Pageable, TRUE);
- check_interface(resource, &IID_ID3D12Resource, TRUE);
+ check_interface(resource, &IID_ID3D12Object, true);
+ check_interface(resource, &IID_ID3D12DeviceChild, true);
+ check_interface(resource, &IID_ID3D12Pageable, true);
+ check_interface(resource, &IID_ID3D12Resource, true);
gpu_address = ID3D12Resource_GetGPUVirtualAddress(resource);
ok(!gpu_address, "Got unexpected GPU virtual address %#"PRIx64".\n", gpu_address);
@@ -1860,10 +1860,10 @@ static void test_create_committed_resource(void)
&IID_ID3D12Resource, (void **)&resource);
ok(hr == S_OK, "Failed to create committed resource, hr %#x.\n", hr);
- check_interface(resource, &IID_ID3D12Object, TRUE);
- check_interface(resource, &IID_ID3D12DeviceChild, TRUE);
- check_interface(resource, &IID_ID3D12Pageable, TRUE);
- check_interface(resource, &IID_ID3D12Resource, TRUE);
+ check_interface(resource, &IID_ID3D12Object, true);
+ check_interface(resource, &IID_ID3D12DeviceChild, true);
+ check_interface(resource, &IID_ID3D12Pageable, true);
+ check_interface(resource, &IID_ID3D12Resource, true);
gpu_address = ID3D12Resource_GetGPUVirtualAddress(resource);
ok(gpu_address, "Got unexpected GPU virtual address %#"PRIx64".\n", gpu_address);
@@ -2010,10 +2010,10 @@ static void test_create_heap(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(heap, &IID_ID3D12Object, TRUE);
- check_interface(heap, &IID_ID3D12DeviceChild, TRUE);
- check_interface(heap, &IID_ID3D12Pageable, TRUE);
- check_interface(heap, &IID_ID3D12Heap, TRUE);
+ check_interface(heap, &IID_ID3D12Object, true);
+ check_interface(heap, &IID_ID3D12DeviceChild, true);
+ check_interface(heap, &IID_ID3D12Pageable, true);
+ check_interface(heap, &IID_ID3D12Heap, true);
result_desc = ID3D12Heap_GetDesc(heap);
check_heap_desc(&result_desc, &desc);
@@ -2163,10 +2163,10 @@ static void test_create_placed_resource(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(resource, &IID_ID3D12Object, TRUE);
- check_interface(resource, &IID_ID3D12DeviceChild, TRUE);
- check_interface(resource, &IID_ID3D12Pageable, TRUE);
- check_interface(resource, &IID_ID3D12Resource, TRUE);
+ check_interface(resource, &IID_ID3D12Object, true);
+ check_interface(resource, &IID_ID3D12DeviceChild, true);
+ check_interface(resource, &IID_ID3D12Pageable, true);
+ check_interface(resource, &IID_ID3D12Resource, true);
gpu_address = ID3D12Resource_GetGPUVirtualAddress(resource);
ok(gpu_address, "Got unexpected GPU virtual address %#"PRIx64".\n", gpu_address);
@@ -2266,10 +2266,10 @@ static void test_create_reserved_resource(void)
&IID_ID3D12Resource, (void **)&resource);
ok(hr == S_OK, "Failed to create reserved resource, hr %#x.\n", hr);
- check_interface(resource, &IID_ID3D12Object, TRUE);
- check_interface(resource, &IID_ID3D12DeviceChild, TRUE);
- check_interface(resource, &IID_ID3D12Pageable, TRUE);
- check_interface(resource, &IID_ID3D12Resource, TRUE);
+ check_interface(resource, &IID_ID3D12Object, true);
+ check_interface(resource, &IID_ID3D12DeviceChild, true);
+ check_interface(resource, &IID_ID3D12Pageable, true);
+ check_interface(resource, &IID_ID3D12Resource, true);
gpu_address = ID3D12Resource_GetGPUVirtualAddress(resource);
ok(gpu_address, "Got unexpected GPU virtual address %#"PRIx64".\n", gpu_address);
@@ -2387,10 +2387,10 @@ static void test_create_descriptor_heap(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(heap, &IID_ID3D12Object, TRUE);
- check_interface(heap, &IID_ID3D12DeviceChild, TRUE);
- check_interface(heap, &IID_ID3D12Pageable, TRUE);
- check_interface(heap, &IID_ID3D12DescriptorHeap, TRUE);
+ check_interface(heap, &IID_ID3D12Object, true);
+ check_interface(heap, &IID_ID3D12DeviceChild, true);
+ check_interface(heap, &IID_ID3D12Pageable, true);
+ check_interface(heap, &IID_ID3D12DescriptorHeap, true);
refcount = ID3D12DescriptorHeap_Release(heap);
ok(!refcount, "ID3D12DescriptorHeap has %u references left.\n", (unsigned int)refcount);
@@ -2597,10 +2597,10 @@ static void test_create_root_signature(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(root_signature, &IID_ID3D12Object, TRUE);
- check_interface(root_signature, &IID_ID3D12DeviceChild, TRUE);
- check_interface(root_signature, &IID_ID3D12Pageable, FALSE);
- check_interface(root_signature, &IID_ID3D12RootSignature, TRUE);
+ check_interface(root_signature, &IID_ID3D12Object, true);
+ check_interface(root_signature, &IID_ID3D12DeviceChild, true);
+ check_interface(root_signature, &IID_ID3D12Pageable, false);
+ check_interface(root_signature, &IID_ID3D12RootSignature, true);
refcount = ID3D12RootSignature_Release(root_signature);
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
@@ -2809,10 +2809,10 @@ static void test_create_compute_pipeline_state(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(pipeline_state, &IID_ID3D12Object, TRUE);
- check_interface(pipeline_state, &IID_ID3D12DeviceChild, TRUE);
- check_interface(pipeline_state, &IID_ID3D12Pageable, TRUE);
- check_interface(pipeline_state, &IID_ID3D12PipelineState, TRUE);
+ check_interface(pipeline_state, &IID_ID3D12Object, true);
+ check_interface(pipeline_state, &IID_ID3D12DeviceChild, true);
+ check_interface(pipeline_state, &IID_ID3D12Pageable, true);
+ check_interface(pipeline_state, &IID_ID3D12PipelineState, true);
refcount = ID3D12PipelineState_Release(pipeline_state);
ok(!refcount, "ID3D12PipelineState has %u references left.\n", (unsigned int)refcount);
@@ -2875,10 +2875,10 @@ static void test_create_graphics_pipeline_state(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(pipeline_state, &IID_ID3D12Object, TRUE);
- check_interface(pipeline_state, &IID_ID3D12DeviceChild, TRUE);
- check_interface(pipeline_state, &IID_ID3D12Pageable, TRUE);
- check_interface(pipeline_state, &IID_ID3D12PipelineState, TRUE);
+ check_interface(pipeline_state, &IID_ID3D12Object, true);
+ check_interface(pipeline_state, &IID_ID3D12DeviceChild, true);
+ check_interface(pipeline_state, &IID_ID3D12Pageable, true);
+ check_interface(pipeline_state, &IID_ID3D12PipelineState, true);
refcount = ID3D12PipelineState_Release(pipeline_state);
ok(!refcount, "ID3D12PipelineState has %u references left.\n", (unsigned int)refcount);
@@ -2996,10 +2996,10 @@ static void test_create_fence(void)
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
- check_interface(fence, &IID_ID3D12Object, TRUE);
- check_interface(fence, &IID_ID3D12DeviceChild, TRUE);
- check_interface(fence, &IID_ID3D12Pageable, TRUE);
- check_interface(fence, &IID_ID3D12Fence, TRUE);
+ check_interface(fence, &IID_ID3D12Object, true);
+ check_interface(fence, &IID_ID3D12DeviceChild, true);
+ check_interface(fence, &IID_ID3D12Pageable, true);
+ check_interface(fence, &IID_ID3D12Fence, true);
value = ID3D12Fence_GetCompletedValue(fence);
ok(value == 0, "Got unexpected value %"PRIu64".\n", value);
@@ -11419,12 +11419,12 @@ static void test_root_signature_byte_code(void)
&IID_ID3D12RootSignatureDeserializer, (void **)&deserializer);
ok(hr == S_OK, "Failed to create deserializer, hr %#x.\n", hr);
- check_interface(deserializer, &IID_IUnknown, FALSE);
- check_interface(deserializer, &IID_ID3D12RootSignatureDeserializer, TRUE);
- check_interface(deserializer, &IID_ID3D12VersionedRootSignatureDeserializer, FALSE);
- check_interface(deserializer, &IID_ID3D12Object, FALSE);
- check_interface(deserializer, &IID_ID3D12DeviceChild, FALSE);
- check_interface(deserializer, &IID_ID3D12Pageable, FALSE);
+ check_interface(deserializer, &IID_IUnknown, false);
+ check_interface(deserializer, &IID_ID3D12RootSignatureDeserializer, true);
+ check_interface(deserializer, &IID_ID3D12VersionedRootSignatureDeserializer, false);
+ check_interface(deserializer, &IID_ID3D12Object, false);
+ check_interface(deserializer, &IID_ID3D12DeviceChild, false);
+ check_interface(deserializer, &IID_ID3D12Pageable, false);
refcount = ID3D12RootSignatureDeserializer_Release(deserializer);
ok(!refcount, "ID3D12RootSignatureDeserializer has %u references left.\n", (unsigned int)refcount);
@@ -11468,12 +11468,12 @@ static void test_root_signature_byte_code(void)
&IID_ID3D12VersionedRootSignatureDeserializer, (void **)&versioned_deserializer);
ok(hr == S_OK, "Failed to create deserializer, hr %#x.\n", hr);
- check_interface(versioned_deserializer, &IID_IUnknown, FALSE);
- check_interface(versioned_deserializer, &IID_ID3D12RootSignatureDeserializer, FALSE);
- check_interface(versioned_deserializer, &IID_ID3D12VersionedRootSignatureDeserializer, TRUE);
- check_interface(versioned_deserializer, &IID_ID3D12Object, FALSE);
- check_interface(versioned_deserializer, &IID_ID3D12DeviceChild, FALSE);
- check_interface(versioned_deserializer, &IID_ID3D12Pageable, FALSE);
+ check_interface(versioned_deserializer, &IID_IUnknown, false);
+ check_interface(versioned_deserializer, &IID_ID3D12RootSignatureDeserializer, false);
+ check_interface(versioned_deserializer, &IID_ID3D12VersionedRootSignatureDeserializer, true);
+ check_interface(versioned_deserializer, &IID_ID3D12Object, false);
+ check_interface(versioned_deserializer, &IID_ID3D12DeviceChild, false);
+ check_interface(versioned_deserializer, &IID_ID3D12Pageable, false);
refcount = ID3D12VersionedRootSignatureDeserializer_Release(versioned_deserializer);
ok(!refcount, "ID3D12VersionedRootSignatureDeserializer has %u references left.\n", (unsigned int)refcount);
@@ -21538,7 +21538,7 @@ static void test_atomic_instructions(void)
get_buffer_readback_with_command_list(cs_buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
for (j = 0; j < ARRAY_SIZE(instructions); ++j)
{
- BOOL todo_instruction = !strcmp(imm_instructions[j], "imm_atomic_imax")
+ bool todo_instruction = !strcmp(imm_instructions[j], "imm_atomic_imax")
|| !strcmp(imm_instructions[j], "imm_atomic_imin");
unsigned int value = get_readback_uint(&rb, j, 0, 0);
unsigned int expected = test->expected_result[j];
@@ -23456,8 +23456,8 @@ static void test_vertex_id(void)
{0xf, 2, 9},
};
- BOOL found_values[ARRAY_SIZE(expected_values)] = {0};
- BOOL used_values[ARRAY_SIZE(expected_values)] = {0};
+ bool found_values[ARRAY_SIZE(expected_values)] = {0};
+ bool used_values[ARRAY_SIZE(expected_values)] = {0};
ID3D12Resource *args_buffer, *indexed_args_buffer;
ID3D12CommandSignature *indexed_command_signature;
D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc;
@@ -23590,8 +23590,8 @@ static void test_vertex_id(void)
{
if (!used_values[j] && compare_uvec4(get_readback_uvec4(&rb, j, 0), &expected_values[i]))
{
- found_values[i] = TRUE;
- used_values[j] = TRUE;
+ found_values[i] = true;
+ used_values[j] = true;
break;
}
}
@@ -24770,20 +24770,20 @@ static void test_face_culling(void)
static const struct
{
D3D12_CULL_MODE cull_mode;
- BOOL front_ccw;
- BOOL expected_cw;
- BOOL expected_ccw;
+ bool front_ccw;
+ bool expected_cw;
+ bool expected_ccw;
}
tests[] =
{
- {D3D12_CULL_MODE_NONE, FALSE, TRUE, TRUE},
- {D3D12_CULL_MODE_NONE, TRUE, TRUE, TRUE},
- {D3D12_CULL_MODE_FRONT, FALSE, FALSE, TRUE},
- {D3D12_CULL_MODE_FRONT, TRUE, TRUE, FALSE},
- {D3D12_CULL_MODE_BACK, FALSE, TRUE, FALSE},
- {D3D12_CULL_MODE_BACK, TRUE, FALSE, TRUE},
+ {D3D12_CULL_MODE_NONE, false, true, true},
+ {D3D12_CULL_MODE_NONE, true, true, true},
+ {D3D12_CULL_MODE_FRONT, false, false, true},
+ {D3D12_CULL_MODE_FRONT, true, true, false},
+ {D3D12_CULL_MODE_BACK, false, true, false},
+ {D3D12_CULL_MODE_BACK, true, false, true},
};
- static const BOOL front_tests[] = {FALSE, TRUE};
+ static const bool front_tests[] = {false, true};
memset(&desc, 0, sizeof(desc));
desc.no_root_signature = true;
@@ -28176,7 +28176,7 @@ static void test_clip_distance(void)
static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
struct
{
- BOOL use_constant;
+ bool use_constant;
float clip_distance0;
float clip_distance1;
float padding;
@@ -28259,7 +28259,7 @@ static void test_clip_distance(void)
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
check_clip_distance(&context, pso, vbv, vb[1], vs_cb, gs_cb);
- cb_data.use_constant = TRUE;
+ cb_data.use_constant = true;
cb_data.clip_distance0 = -1.0f;
update_buffer_data(vs_cb, 0, sizeof(cb_data), &cb_data);
@@ -28273,7 +28273,7 @@ static void test_clip_distance(void)
check_clip_distance(&context, pso, vbv, vb[1], vs_cb, gs_cb);
- cb_data.use_constant = TRUE;
+ cb_data.use_constant = true;
cb_data.clip_distance0 = 1.0f;
update_buffer_data(gs_cb, 0, sizeof(cb_data), &cb_data);
ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
@@ -28305,7 +28305,7 @@ static void test_clip_distance(void)
&IID_ID3D12PipelineState, (void **)&pso);
ok(hr == S_OK, "Failed to create pipeline state, hr %#x.\n", hr);
- cb_data.use_constant = FALSE;
+ cb_data.use_constant = false;
update_buffer_data(vs_cb, 0, sizeof(cb_data), &cb_data);
for (i = 0; i < ARRAY_SIZE(vertices); ++i)
@@ -28367,7 +28367,7 @@ static void test_clip_distance(void)
transition_resource_state(command_list, context.render_target,
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
- cb_data.use_constant = TRUE;
+ cb_data.use_constant = true;
cb_data.clip_distance0 = 0.0f;
cb_data.clip_distance1 = 0.0f;
update_buffer_data(vs_cb, 0, sizeof(cb_data), &cb_data);
@@ -28507,27 +28507,27 @@ static void test_combined_clip_and_cull_distances(void)
static const struct test
{
float vertices[4];
- BOOL triangle_visible[2];
+ bool triangle_visible[2];
}
cull_distance_tests[] =
{
- {{-1.0f, 1.0f, 1.0f, 1.0f}, {TRUE, TRUE}},
- {{ 1.0f, -1.0f, 1.0f, 1.0f}, {TRUE, TRUE}},
- {{ 1.0f, 1.0f, 1.0f, -1.0f}, {TRUE, TRUE}},
- {{-1.0f, -1.0f, 1.0f, 1.0f}, {TRUE, TRUE}},
- {{-1.0f, 1.0f, -1.0f, 1.0f}, {TRUE, TRUE}},
- {{-1.0f, 1.0f, 1.0f, -1.0f}, {TRUE, TRUE}},
- {{ 1.0f, -1.0f, -1.0f, 1.0f}, {TRUE, TRUE}},
- {{ 1.0f, -1.0f, 1.0f, -1.0f}, {TRUE, TRUE}},
- {{ 1.0f, 1.0f, -1.0f, -1.0f}, {TRUE, TRUE}},
+ {{-1.0f, 1.0f, 1.0f, 1.0f}, {true, true}},
+ {{ 1.0f, -1.0f, 1.0f, 1.0f}, {true, true}},
+ {{ 1.0f, 1.0f, 1.0f, -1.0f}, {true, true}},
+ {{-1.0f, -1.0f, 1.0f, 1.0f}, {true, true}},
+ {{-1.0f, 1.0f, -1.0f, 1.0f}, {true, true}},
+ {{-1.0f, 1.0f, 1.0f, -1.0f}, {true, true}},
+ {{ 1.0f, -1.0f, -1.0f, 1.0f}, {true, true}},
+ {{ 1.0f, -1.0f, 1.0f, -1.0f}, {true, true}},
+ {{ 1.0f, 1.0f, -1.0f, -1.0f}, {true, true}},
- {{-1.0f, -1.0f, -1.0f, 1.0f}, {FALSE, TRUE}},
- {{-1.0f, -1.0f, 1.0f, -1.0f}, {TRUE, TRUE}},
- {{-1.0f, -1.0f, 1.0f, -1.0f}, {TRUE, TRUE}},
- {{-1.0f, 1.0f, -1.0f, -1.0f}, {TRUE, TRUE}},
- {{ 1.0f, -1.0f, -1.0f, -1.0f}, {TRUE, FALSE}},
+ {{-1.0f, -1.0f, -1.0f, 1.0f}, {false, true}},
+ {{-1.0f, -1.0f, 1.0f, -1.0f}, {true, true}},
+ {{-1.0f, -1.0f, 1.0f, -1.0f}, {true, true}},
+ {{-1.0f, 1.0f, -1.0f, -1.0f}, {true, true}},
+ {{ 1.0f, -1.0f, -1.0f, -1.0f}, {true, false}},
- {{-1.0f, -1.0f, -1.0f, -1.0f}, {FALSE, FALSE}},
+ {{-1.0f, -1.0f, -1.0f, -1.0f}, {false, false}},
};
static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
@@ -28871,10 +28871,10 @@ static void test_suballocate_small_textures(void)
NULL, &IID_ID3D12Resource, (void **)&textures[i]);
ok(hr == S_OK, "Failed to create placed resource %u, hr %#x.\n", i, hr);
- check_interface(textures[i], &IID_ID3D12Object, TRUE);
- check_interface(textures[i], &IID_ID3D12DeviceChild, TRUE);
- check_interface(textures[i], &IID_ID3D12Pageable, TRUE);
- check_interface(textures[i], &IID_ID3D12Resource, TRUE);
+ check_interface(textures[i], &IID_ID3D12Object, true);
+ check_interface(textures[i], &IID_ID3D12DeviceChild, true);
+ check_interface(textures[i], &IID_ID3D12Pageable, true);
+ check_interface(textures[i], &IID_ID3D12Resource, true);
gpu_address = ID3D12Resource_GetGPUVirtualAddress(textures[i]);
ok(!gpu_address, "Got unexpected GPU virtual address %#"PRIx64".\n", gpu_address);
--
2.21.0
July 17, 2019
[PATCH vkd3d 4/6] tests: Introduce VKD3D_TEST_FILTER.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Useful for running a subset of tests.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
README | 4 ++++
include/private/vkd3d_test.h | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/README b/README
index 2f2f3952c197..3c70ede80b24 100644
--- a/README
+++ b/README
@@ -65,6 +65,10 @@ commas or semicolons.
* VKD3D_TEST_DEBUG - enables additional debug messages in tests. Set to 0, 1
or 2.
+ * VKD3D_TEST_FILTER - a filter string. Only the tests whose names matches the
+ filter string will be run, e.g. VKD3D_TEST_FILTER=clear_render_target.
+ Useful for debugging or developing new tests.
+
* VKD3D_TEST_PLATFORM - can be set to "wine", "windows" or "other". The test
platform controls the behavior of todo(), todo_if(), bug_if() and broken()
conditions in tests.
diff --git a/include/private/vkd3d_test.h b/include/private/vkd3d_test.h
index a37f6ff70ce4..319bf5dc87ea 100644
--- a/include/private/vkd3d_test.h
+++ b/include/private/vkd3d_test.h
@@ -118,6 +118,7 @@ static struct
bool bug_do_loop;
bool bug_enabled;
+ const char *test_name_filter;
char context[1024];
} vkd3d_test_state;
@@ -254,6 +255,7 @@ vkd3d_test_debug(const char *fmt, ...)
int main(int argc, char **argv)
{
+ const char *test_filter = getenv("VKD3D_TEST_FILTER");
const char *debug_level = getenv("VKD3D_TEST_DEBUG");
char *test_platform = getenv("VKD3D_TEST_PLATFORM");
const char *bug = getenv("VKD3D_TEST_BUG");
@@ -261,6 +263,7 @@ int main(int argc, char **argv)
memset(&vkd3d_test_state, 0, sizeof(vkd3d_test_state));
vkd3d_test_state.debug_level = debug_level ? atoi(debug_level) : 0;
vkd3d_test_state.bug_enabled = bug ? atoi(bug) : true;
+ vkd3d_test_state.test_name_filter = test_filter;
if (test_platform)
{
@@ -341,6 +344,9 @@ typedef void (*vkd3d_test_pfn)(void);
static inline void vkd3d_run_test(const char *name, vkd3d_test_pfn test_pfn)
{
+ if (vkd3d_test_state.test_name_filter && !strstr(name, vkd3d_test_state.test_name_filter))
+ return;
+
vkd3d_test_debug("%s", name);
test_pfn();
}
--
2.21.0
July 17, 2019