winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-devel
January 2019
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-devel@winehq.org
68 participants
552 discussions
Start a n
N
ew thread
[PATCH 2/2] include: Add a few missing d3d9 constants.
by Henri Verbeet
24 Jan '19
24 Jan '19
From: Joshua Ashton <joshua(a)froggi.es> Signed-off-by: Joshua Ashton <joshua(a)froggi.es> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- include/d3d9.h | 2 ++ include/d3d9types.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/d3d9.h b/include/d3d9.h index ef3ea2a9181..3ebde4509af 100644 --- a/include/d3d9.h +++ b/include/d3d9.h @@ -65,8 +65,10 @@ #define D3DPRESENT_DONOTWAIT __MSABI_LONG(1) #define
…
[View More]
D3DPRESENT_LINEAR_CONTENT __MSABI_LONG(2) #define D3DPRESENT_BACK_BUFFERS_MAX __MSABI_LONG(3) +#define D3DPRESENT_BACK_BUFFERS_MAX_EX __MSABI_LONG(30) #define D3DSGR_NO_CALIBRATION __MSABI_LONG(0x00000000) #define D3DSGR_CALIBRATE __MSABI_LONG(0x00000001) +#define D3DCURSOR_IMMEDIATE_UPDATE __MSABI_LONG(0x00000001) #define _FACD3D 0x876 #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) diff --git a/include/d3d9types.h b/include/d3d9types.h index 4891858b3d2..56394dfb2a1 100644 --- a/include/d3d9types.h +++ b/include/d3d9types.h @@ -481,6 +481,9 @@ typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE { #define D3DSP_DCL_USAGEINDEX_SHIFT 16 #define D3DSP_DCL_USAGEINDEX_MASK 0x000f0000 +#define D3DSP_OPCODESPECIFICCONTROL_SHIFT 16 +#define D3DSP_OPCODESPECIFICCONTROL_MASK 0x00ff0000 + #define D3DSP_TEXTURETYPE_SHIFT 27 #define D3DSP_TEXTURETYPE_MASK 0x78000000 -- 2.11.0
[View Less]
1
0
0
0
[PATCH 1/2] include: Mark IDirect3D9Ex::GetAdapterDisplayModeEx() as PURE.
by Henri Verbeet
24 Jan '19
24 Jan '19
From: Joshua Ashton <joshua(a)froggi.es> Signed-off-by: Joshua Ashton <joshua(a)froggi.es> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- include/d3d9.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/d3d9.h b/include/d3d9.h index 08f45559134..ef3ea2a9181 100644 --- a/include/d3d9.h +++ b/include/d3d9.h @@ -1617,7 +1617,8 @@ DECLARE_INTERFACE_(IDirect3D9Ex, IDirect3D9) STDMETHOD_(UINT, GetAdapterModeCountEx)(THIS_ UINT
…
[View More]
adapter_idx, const D3DDISPLAYMODEFILTER *filter) PURE; STDMETHOD(EnumAdapterModesEx)(THIS_ UINT adapter_idx, const D3DDISPLAYMODEFILTER *filter, UINT mode_idx, D3DDISPLAYMODEEX *mode) PURE; - STDMETHOD(GetAdapterDisplayModeEx)(THIS_ UINT adapter_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation); + STDMETHOD(GetAdapterDisplayModeEx)(THIS_ UINT adapter_idx, + D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) PURE; STDMETHOD(CreateDeviceEx)(THIS_ UINT adapter_idx, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode, struct IDirect3DDevice9Ex **device) PURE; STDMETHOD(GetAdapterLUID)(THIS_ UINT adapter_idx, LUID *luid) PURE; -- 2.11.0
[View Less]
1
0
0
0
[PATCH vkd3d 5/5] tests: Add test for sample_c_lz instruction.
by Józef Kucia
24 Jan '19
24 Jan '19
From: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- tests/d3d12.c | 325 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 312 insertions(+), 13 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 5cc2e2b72789..26a216251646 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -841,9 +841,9 @@ struct depth_stencil_resource D3D12_CPU_DESCRIPTOR_HANDLE dsv_handle; }; -#define init_depth_stencil(a, b,
…
[View More]
c, d, e, f, g, h) init_depth_stencil_(__LINE__, a, b, c, d, e, f, g, h) +#define init_depth_stencil(a, b, c, d, e, f, g, h, i) init_depth_stencil_(__LINE__, a, b, c, d, e, f, g, h, i) static void init_depth_stencil_(unsigned int line, struct depth_stencil_resource *ds, - ID3D12Device *device, unsigned int width, unsigned int height, unsigned int array_size, + ID3D12Device *device, unsigned int width, unsigned int height, unsigned int array_size, unsigned int level_count, DXGI_FORMAT format, DXGI_FORMAT view_format, const D3D12_CLEAR_VALUE *clear_value) { D3D12_DEPTH_STENCIL_VIEW_DESC dsv_desc, *view_desc; @@ -862,7 +862,7 @@ static void init_depth_stencil_(unsigned int line, struct depth_stencil_resource resource_desc.Width = width; resource_desc.Height = height; resource_desc.DepthOrArraySize = array_size; - resource_desc.MipLevels = 1; + resource_desc.MipLevels = level_count; resource_desc.Format = format; resource_desc.SampleDesc.Count = 1; resource_desc.SampleDesc.Quality = 0; @@ -3830,7 +3830,7 @@ static void test_clear_depth_stencil_view(void) clear_value.Format = DXGI_FORMAT_D32_FLOAT; clear_value.DepthStencil.Depth = 0.5f; clear_value.DepthStencil.Stencil = 0x3; - init_depth_stencil(&ds, device, 32, 32, 1, DXGI_FORMAT_D32_FLOAT, 0, &clear_value); + init_depth_stencil(&ds, device, 32, 32, 1, 1, DXGI_FORMAT_D32_FLOAT, 0, &clear_value); ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH | D3D12_CLEAR_FLAG_STENCIL, 0.75f, 0x7, 0, NULL); @@ -3840,7 +3840,7 @@ static void test_clear_depth_stencil_view(void) destroy_depth_stencil(&ds); reset_command_list(command_list, context.allocator); - init_depth_stencil(&ds, device, 32, 32, 6, DXGI_FORMAT_D32_FLOAT, 0, &clear_value); + init_depth_stencil(&ds, device, 32, 32, 6, 1, DXGI_FORMAT_D32_FLOAT, 0, &clear_value); ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH, expected_values[0], 0, 0, NULL); @@ -5210,7 +5210,7 @@ static void test_draw_depth_no_ps(void) vbv.StrideInBytes = sizeof(*quad); vbv.SizeInBytes = sizeof(quad); - init_depth_stencil(&ds, context.device, 640, 480, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); + init_depth_stencil(&ds, context.device, 640, 480, 1, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); set_viewport(&context.viewport, 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f); set_rect(&context.scissor_rect, 0, 0, 640, 480); @@ -5306,7 +5306,7 @@ static void test_draw_depth_only(void) command_list = context.list; queue = context.queue; - init_depth_stencil(&ds, context.device, 640, 480, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); + init_depth_stencil(&ds, context.device, 640, 480, 1, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); set_viewport(&context.viewport, 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f); set_rect(&context.scissor_rect, 0, 0, 640, 480); @@ -11685,6 +11685,304 @@ static void test_gather_c(void) destroy_test_context(&context); } +static void test_sample_c_lz(void) +{ + D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc; + ID3D12GraphicsCommandList *command_list; + D3D12_DEPTH_STENCIL_VIEW_DESC dsv_desc; + D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle; + struct depth_stencil_resource ds; + struct test_context_desc desc; + struct resource_readback rb; + struct test_context context; + ID3D12DescriptorHeap *heap; + ID3D12CommandQueue *queue; + struct vec4 ps_constant; + ID3D12Device *device; + unsigned int i; + RECT rect; + + static const D3D12_STATIC_SAMPLER_DESC sampler_desc = + { + .Filter = D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR, + .AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP, + .AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP, + .AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP, + .ComparisonFunc = D3D12_COMPARISON_FUNC_GREATER, + .MaxAnisotropy = 0, + .BorderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE, + .MaxLOD = 10.0f, + }; + static const float clear_color[] = {0.5f, 0.5f, 0.5f, 0.5f}; + static const DWORD ps_array_code[] = + { +#if 0 + Texture2DArray t; + SamplerComparisonState s; + + float ref; + float layer; + + float4 main(float4 position : SV_Position) : SV_Target + { + return t.SampleCmpLevelZero(s, float3(position.x / 640.0f, position.y / 480.0f, layer), ref); + } +#endif + 0x43425844, 0xfe28b3c3, 0xdd7ef404, 0x8d5874a1, 0x984ff182, 0x00000001, 0x00000180, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000000e4, 0x00000041, + 0x00000039, 0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300085a, 0x00106000, + 0x00000000, 0x04004058, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889, 0x00000000, 0x00000000, + 0x06000036, 0x00100042, 0x00000000, 0x0020801a, 0x00000000, 0x00000000, 0x0c000047, 0x00100012, + 0x00000000, 0x00100246, 0x00000000, 0x00107006, 0x00000000, 0x00106000, 0x00000000, 0x0020800a, + 0x00000000, 0x00000000, 0x05000036, 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ps_array = {ps_array_code, sizeof(ps_array_code)}; + static const DWORD ps_cube_code[] = + { +#if 0 + TextureCube t; + SamplerComparisonState s; + + float ref; + float face; + + float4 main(float4 position : SV_Position) : SV_Target + { + float2 p; + p.x = position.x / 640.0f; + p.y = position.y / 480.0f; + + float3 coord; + switch ((uint)face) + { + case 0: + coord = float3(1.0f, p.x, p.y); + break; + case 1: + coord = float3(-1.0f, p.x, p.y); + break; + case 2: + coord = float3(p.x, 1.0f, p.y); + break; + case 3: + coord = float3(p.x, -1.0f, p.y); + break; + case 4: + coord = float3(p.x, p.y, 1.0f); + break; + case 5: + default: + coord = float3(p.x, p.y, -1.0f); + break; + } + + return t.SampleCmpLevelZero(s, coord, ref); + } +#endif + 0x43425844, 0xde5655e5, 0x1b116fa1, 0xfce9e757, 0x41c28aac, 0x00000001, 0x00000328, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000028c, 0x00000041, + 0x000000a3, 0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300085a, 0x00106000, + 0x00000000, 0x04003058, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0600001c, 0x00100012, + 0x00000000, 0x0020801a, 0x00000000, 0x00000000, 0x0300004c, 0x0010000a, 0x00000000, 0x03000006, + 0x00004001, 0x00000000, 0x05000036, 0x00100012, 0x00000000, 0x00004001, 0x3f800000, 0x0a000038, + 0x00100062, 0x00000000, 0x00101106, 0x00000000, 0x00004002, 0x00000000, 0x3acccccd, 0x3b088889, + 0x00000000, 0x01000002, 0x03000006, 0x00004001, 0x00000001, 0x05000036, 0x00100012, 0x00000000, + 0x00004001, 0xbf800000, 0x0a000038, 0x00100062, 0x00000000, 0x00101106, 0x00000000, 0x00004002, + 0x00000000, 0x3acccccd, 0x3b088889, 0x00000000, 0x01000002, 0x03000006, 0x00004001, 0x00000002, + 0x0a000038, 0x00100052, 0x00000000, 0x00101106, 0x00000000, 0x00004002, 0x3acccccd, 0x00000000, + 0x3b088889, 0x00000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f800000, 0x01000002, + 0x03000006, 0x00004001, 0x00000003, 0x0a000038, 0x00100052, 0x00000000, 0x00101106, 0x00000000, + 0x00004002, 0x3acccccd, 0x00000000, 0x3b088889, 0x00000000, 0x05000036, 0x00100022, 0x00000000, + 0x00004001, 0xbf800000, 0x01000002, 0x03000006, 0x00004001, 0x00000004, 0x0a000038, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889, 0x00000000, 0x00000000, + 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x01000002, 0x0100000a, 0x0a000038, + 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889, 0x00000000, + 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0xbf800000, 0x01000002, 0x01000017, + 0x0c000047, 0x00100012, 0x00000000, 0x00100246, 0x00000000, 0x00107006, 0x00000000, 0x00106000, + 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x05000036, 0x001020f2, 0x00000000, 0x00100006, + 0x00000000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ps_cube = {ps_cube_code, sizeof(ps_cube_code)}; + static const float depth_values[] = {1.0f, 0.0f, 0.5f, 0.6f, 0.4f, 0.1f}; + static const struct + { + unsigned int layer; + float d_ref; + float expected; + } + tests[] = + { + {0, 0.5f, 0.0f}, + {1, 0.5f, 1.0f}, + {2, 0.5f, 0.0f}, + {3, 0.5f, 0.0f}, + {4, 0.5f, 1.0f}, + {5, 0.5f, 1.0f}, + + {0, 0.0f, 0.0f}, + {1, 0.0f, 0.0f}, + {2, 0.0f, 0.0f}, + {3, 0.0f, 0.0f}, + {4, 0.0f, 0.0f}, + {5, 0.0f, 0.0f}, + + {0, 1.0f, 0.0f}, + {1, 1.0f, 1.0f}, + {2, 1.0f, 1.0f}, + {3, 1.0f, 1.0f}, + {4, 1.0f, 1.0f}, + {5, 1.0f, 1.0f}, + }; + + memset(&desc, 0, sizeof(desc)); + desc.rt_width = 640; + desc.rt_height = 480; + desc.rt_format = DXGI_FORMAT_R32_FLOAT; + desc.no_root_signature = true; + if (!init_test_context(&context, &desc)) + return; + device = context.device; + command_list = context.list; + queue = context.queue; + + context.root_signature = create_texture_root_signature_(__LINE__, device, + D3D12_SHADER_VISIBILITY_PIXEL, 4, 0, &sampler_desc); + + heap = create_gpu_descriptor_heap(context.device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 6); + cpu_handle = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap); + + /* 2D array texture */ + context.pipeline_state = create_pipeline_state(context.device, + context.root_signature, context.render_target_desc.Format, NULL, &ps_array, NULL); + + init_depth_stencil(&ds, device, 32, 32, ARRAY_SIZE(depth_values), 2, + DXGI_FORMAT_R32_TYPELESS, DXGI_FORMAT_D32_FLOAT, NULL); + + for (i = 0; i < ARRAY_SIZE(depth_values); ++i) + { + memset(&dsv_desc, 0, sizeof(dsv_desc)); + dsv_desc.Format = DXGI_FORMAT_D32_FLOAT; + dsv_desc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2DARRAY; + dsv_desc.Texture2DArray.FirstArraySlice = i; + dsv_desc.Texture2DArray.ArraySize = 1; + ID3D12Device_CreateDepthStencilView(device, ds.texture, &dsv_desc, ds.dsv_handle); + ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, + D3D12_CLEAR_FLAG_DEPTH, depth_values[i], 0, 0, NULL); + + dsv_desc.Texture2DArray.MipSlice = 1; + ID3D12Device_CreateDepthStencilView(device, ds.texture, &dsv_desc, ds.dsv_handle); + ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, + D3D12_CLEAR_FLAG_DEPTH, 1.0f, 0, 0, NULL); + } + + memset(&srv_desc, 0, sizeof(srv_desc)); + srv_desc.Format = DXGI_FORMAT_R32_FLOAT; + srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; + srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2DARRAY; + srv_desc.Texture2DArray.MostDetailedMip = 0; + srv_desc.Texture2DArray.MipLevels = 2; + srv_desc.Texture2DArray.FirstArraySlice = 0; + srv_desc.Texture2DArray.ArraySize = ARRAY_SIZE(depth_values); + ID3D12Device_CreateShaderResourceView(context.device, ds.texture, &srv_desc, cpu_handle); + + transition_resource_state(command_list, ds.texture, + D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); + + memset(&ps_constant, 0, sizeof(ps_constant)); + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + vkd3d_test_set_context("test %u", i); + + ps_constant.x = tests[i].d_ref; + 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_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); + ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap); + ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, + get_gpu_descriptor_handle(&context, heap, 0)); + ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 1, 4, &ps_constant.x, 0); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + + check_sub_resource_float(context.render_target, 0, queue, command_list, tests[i].expected, 2); + + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + } + vkd3d_test_set_context(NULL); + + ID3D12PipelineState_Release(context.pipeline_state); + + /* cube texture */ + context.pipeline_state = create_pipeline_state(context.device, + context.root_signature, context.render_target_desc.Format, NULL, &ps_cube, NULL); + + memset(&srv_desc, 0, sizeof(srv_desc)); + srv_desc.Format = DXGI_FORMAT_R32_FLOAT; + srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; + srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBE; + srv_desc.TextureCube.MostDetailedMip = 0; + srv_desc.TextureCube.MipLevels = 2; + ID3D12Device_CreateShaderResourceView(context.device, ds.texture, &srv_desc, cpu_handle); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + vkd3d_test_set_context("test %u", i); + + ps_constant.x = tests[i].d_ref; + 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_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); + ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap); + ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, + get_gpu_descriptor_handle(&context, heap, 0)); + ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 1, 4, &ps_constant.x, 0); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + + get_texture_readback_with_command_list(context.render_target, 0, &rb, queue, command_list); + /* Avoid testing values affected by seamless cube map filtering. */ + set_rect(&rect, 100, 100, 540, 380); + check_readback_data_float(&rb, &rect, tests[i].expected, 2); + release_resource_readback(&rb); + + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + } + vkd3d_test_set_context(NULL); + + destroy_depth_stencil(&ds); + ID3D12DescriptorHeap_Release(heap); + destroy_test_context(&context); +} + static void test_cube_maps(void) { unsigned int i, j, sub_resource_idx, sub_resource_count; @@ -14205,7 +14503,7 @@ static void test_copy_descriptors(void) transition_resource_state(command_list, t[5], D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE); - init_depth_stencil(&ds, device, 32, 32, 1, DXGI_FORMAT_R32_TYPELESS, DXGI_FORMAT_D32_FLOAT, NULL); + init_depth_stencil(&ds, device, 32, 32, 1, 1, DXGI_FORMAT_R32_TYPELESS, DXGI_FORMAT_D32_FLOAT, NULL); t[6] = ds.texture; ID3D12Resource_AddRef(t[6]); ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, @@ -15574,7 +15872,7 @@ static void test_depth_stencil_sampling(void) reset_command_list(command_list, context.allocator); init_depth_stencil(&ds, device, context.render_target_desc.Width, - context.render_target_desc.Height, 1, tests[i].typeless_format, + context.render_target_desc.Height, 1, 1, tests[i].typeless_format, tests[i].dsv_format, NULL); texture = ds.texture; dsv_handle = ds.dsv_handle; @@ -15795,7 +16093,7 @@ static void test_depth_load(void) heap = create_gpu_descriptor_heap(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 2); init_depth_stencil(&ds, device, context.render_target_desc.Width, - context.render_target_desc.Height, 1, DXGI_FORMAT_R32_TYPELESS, + context.render_target_desc.Height, 1, 1, DXGI_FORMAT_R32_TYPELESS, DXGI_FORMAT_D32_FLOAT, NULL); memset(&srv_desc, 0, sizeof(srv_desc)); srv_desc.Format = DXGI_FORMAT_R32_FLOAT; @@ -15930,7 +16228,7 @@ static void test_depth_read_only_view(void) clear_value.DepthStencil.Depth = 0.5f; clear_value.DepthStencil.Stencil = 0; init_depth_stencil(&ds, device, context.render_target_desc.Width, - context.render_target_desc.Height, 1, DXGI_FORMAT_R32_TYPELESS, + context.render_target_desc.Height, 1, 1, DXGI_FORMAT_R32_TYPELESS, DXGI_FORMAT_D32_FLOAT, &clear_value); memset(&dsv_desc, 0, sizeof(dsv_desc)); dsv_desc.Format = DXGI_FORMAT_D32_FLOAT; @@ -18780,7 +19078,7 @@ static void test_query_occlusion(void) command_list = context.list; queue = context.queue; - init_depth_stencil(&ds, context.device, 640, 480, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); + init_depth_stencil(&ds, context.device, 640, 480, 1, 1, DXGI_FORMAT_D32_FLOAT, 0, NULL); set_viewport(&context.viewport, 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f); set_rect(&context.scissor_rect, 0, 0, 640, 480); @@ -20151,7 +20449,7 @@ static void test_copy_texture_region(void) for (i = 0; i < ARRAY_SIZE(depth_values); ++i) { init_depth_stencil(&ds, device, context.render_target_desc.Width, - context.render_target_desc.Height, 1, DXGI_FORMAT_D32_FLOAT, + context.render_target_desc.Height, 1, 1, DXGI_FORMAT_D32_FLOAT, DXGI_FORMAT_D32_FLOAT, NULL); ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, D3D12_CLEAR_FLAG_DEPTH, depth_values[i], 0, 0, NULL); @@ -23650,6 +23948,7 @@ START_TEST(d3d12) run_test(test_texture_ld); run_test(test_gather); run_test(test_gather_c); + run_test(test_sample_c_lz); run_test(test_cube_maps); run_test(test_multisample_array_texture); run_test(test_resinfo); -- 2.19.2
[View Less]
2
1
0
0
[PATCH vkd3d 4/5] tests: Add test for vCoverage shader register.
by Józef Kucia
24 Jan '19
24 Jan '19
From: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- The test fails on Linux with Intel drivers. The returned coverage mask appears to be wrong. --- tests/d3d12.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index f115e436ac6d..5cc2e2b72789 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -23145,6 +23145,165 @@ static void test_sample_mask(
…
[View More]
void) destroy_test_context(&context); } +static void test_coverage(void) +{ + static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; + D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc; + ID3D12GraphicsCommandList *command_list; + D3D12_CPU_DESCRIPTOR_HANDLE ms_rtv; + ID3D12Resource *ms_render_target; + ID3D12PipelineState *pso_resolve; + struct test_context_desc desc; + struct test_context context; + ID3D12DescriptorHeap *heap; + ID3D12CommandQueue *queue; + unsigned int i; + HRESULT hr; + + static const DWORD ps_code[] = + { +#if 0 + uint4 main(uint coverage : SV_Coverage) : SV_Target + { + return coverage; + } +#endif + 0x43425844, 0x0d652986, 0x6144c247, 0x743bacfa, 0x95068994, 0x00000001, 0x000000ac, 0x00000003, + 0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000034, 0x00000050, 0x0000000d, + 0x0100086a, 0x0200005f, 0x00023001, 0x03000065, 0x001020f2, 0x00000000, 0x04000036, 0x001020f2, + 0x00000000, 0x00023006, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; + static const DWORD ps_resolve_code[] = + { +#if 0 + Texture2DMS<uint> t; + + uint4 main(float4 position : SV_Position) : SV_Target + { + return t.Load((int2)position.xy, 0); + } +#endif + 0x43425844, 0x280a495f, 0x88543834, 0x1fd0597d, 0xe7ed74ac, 0x00000001, 0x00000154, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x000000b8, 0x00000050, + 0x0000002e, 0x0100086a, 0x04002058, 0x00107000, 0x00000000, 0x00004444, 0x04002064, 0x00101032, + 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0500001b, + 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, 0x00004002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8b00002e, 0x80000102, 0x00111103, 0x00100012, + 0x00000000, 0x00100e46, 0x00000000, 0x00107e46, 0x00000000, 0x00004001, 0x00000000, 0x05000036, + 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ps_resolve = {ps_resolve_code, sizeof(ps_resolve_code)}; + + static const struct + { + unsigned int sample_mask; + unsigned int expected_result; + } + tests[] = + { + {0x01, 0x1}, + {0x03, 0x3}, + {0x07, 0x7}, + {0x09, 0x9}, + {0x0d, 0xd}, + {0x0f, 0xf}, + {0xff, 0xf}, + { ~0u, 0xf}, + }; + + if (use_warp_device) + { + skip("Sample shading tests fail on WARP.\n"); + return; + } + + memset(&desc, 0, sizeof(desc)); + desc.rt_width = desc.rt_height = 32; + desc.rt_format = DXGI_FORMAT_R32_UINT; + desc.rt_descriptor_count = 2; + desc.no_root_signature = true; + if (!init_test_context(&context, &desc)) + return; + command_list = context.list; + queue = context.queue; + + context.root_signature = create_texture_root_signature(context.device, + D3D12_SHADER_VISIBILITY_PIXEL, 1, 0); + + ms_rtv = get_cpu_rtv_handle(&context, context.rtv_heap, 1); + desc.sample_desc.Count = 4; + create_render_target(&context, &desc, &ms_render_target, &ms_rtv); + + heap = create_gpu_descriptor_heap(context.device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 1); + ID3D12Device_CreateShaderResourceView(context.device, ms_render_target, NULL, + get_cpu_descriptor_handle(&context, heap, 0)); + + pso_resolve = create_pipeline_state(context.device, + context.root_signature, context.render_target_desc.Format, NULL, &ps_resolve, NULL); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + vkd3d_test_set_context("sample mask %#x", tests[i].sample_mask); + + if (context.pipeline_state) + ID3D12PipelineState_Release(context.pipeline_state); + + init_pipeline_state_desc(&pso_desc, context.root_signature, + context.render_target_desc.Format, NULL, &ps, NULL); + pso_desc.SampleMask = tests[i].sample_mask; + pso_desc.SampleDesc.Count = 4; + 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); + + 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_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + + transition_resource_state(command_list, ms_render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); + + ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetPipelineState(command_list, pso_resolve); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap); + ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, + get_gpu_descriptor_handle(&context, heap, 0)); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + + transition_resource_state(command_list, ms_render_target, + D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + check_sub_resource_uint(context.render_target, 0, queue, command_list, tests[i].expected_result, 0); + + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + } + vkd3d_test_set_context(NULL); + + ID3D12DescriptorHeap_Release(heap); + ID3D12PipelineState_Release(pso_resolve); + ID3D12Resource_Release(ms_render_target); + destroy_test_context(&context); +} + static void test_primitive_restart(void) { static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; @@ -23546,6 +23705,7 @@ START_TEST(d3d12) run_test(test_dual_source_blending); run_test(test_multisample_rendering); run_test(test_sample_mask); + run_test(test_coverage); run_test(test_primitive_restart); run_test(test_vertex_shader_stream_output); } -- 2.19.2
[View Less]
2
1
0
0
[PATCH vkd3d 3/5] vkd3d: Do not ignore SampleMask in D3D12_GRAPHICS_PIPELINE_STATE_DESC.
by Józef Kucia
24 Jan '19
24 Jan '19
From: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- libs/vkd3d/state.c | 10 +++++++--- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index eb7c8be3c6c4..6daeab769344 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -2429,9 +2429,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
…
[View More]
rs_stream_desc_from_d3d12(&graphics->rs_stream_desc, &graphics->rs_desc, so_desc, vk_info); - if (desc->SampleMask != ~0u) - FIXME("Ignoring sample mask %#x.\n", desc->SampleMask); - graphics->ms_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; graphics->ms_desc.pNext = NULL; graphics->ms_desc.flags = 0; @@ -2439,6 +2436,13 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s graphics->ms_desc.sampleShadingEnable = VK_FALSE; graphics->ms_desc.minSampleShading = 0.0f; graphics->ms_desc.pSampleMask = NULL; + if (desc->SampleMask != ~0u) + { + assert(DIV_ROUND_UP(sample_count, 32) < ARRAY_SIZE(graphics->sample_mask)); + graphics->sample_mask[0] = desc->SampleMask; + graphics->sample_mask[1] = 0xffffffffu; + graphics->ms_desc.pSampleMask = graphics->sample_mask; + } graphics->ms_desc.alphaToCoverageEnable = desc->BlendState.AlphaToCoverageEnable; graphics->ms_desc.alphaToOneEnable = VK_FALSE; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index c4b0a4c06513..6b35dc0f65a9 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -617,6 +617,7 @@ struct d3d12_graphics_pipeline_state VkPipelineMultisampleStateCreateInfo ms_desc; VkPipelineDepthStencilStateCreateInfo ds_desc; + VkSampleMask sample_mask[2]; VkPipelineRasterizationStateStreamCreateInfoEXT rs_stream_desc; const struct d3d12_root_signature *root_signature; -- 2.19.2
[View Less]
2
1
0
0
[PATCH vkd3d 2/5] vkd3d-shader: Implement vCoverage shader register.
by Józef Kucia
24 Jan '19
24 Jan '19
From: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- libs/vkd3d-shader/dxbc.c | 1 + libs/vkd3d-shader/spirv.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 2fd0cda7b308..0b5f7bc892f6 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1566,6 +1566,7 @@ static bool shader_sm4_is_scalar_register(const struct
…
[View More]
vkd3d_shader_register *re { switch (reg->type) { + case VKD3DSPR_COVERAGE: case VKD3DSPR_DEPTHOUT: case VKD3DSPR_DEPTHOUTGE: case VKD3DSPR_DEPTHOUTLE: diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index d2c417f0da6e..ddcaead2a185 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2302,6 +2302,9 @@ static bool vkd3d_dxbc_compiler_get_register_name(char *buffer, unsigned int buf case VKD3DSPR_IDXTEMP: snprintf(buffer, buffer_size, "x%u", idx); break; + case VKD3DSPR_COVERAGE: + snprintf(buffer, buffer_size, "vCoverage"); + break; case VKD3DSPR_SAMPLEMASK: snprintf(buffer, buffer_size, "oMask"); break; @@ -2473,7 +2476,7 @@ static void vkd3d_dxbc_compiler_emit_dereference_register(struct vkd3d_dxbc_comp { indexes[index_count++] = vkd3d_dxbc_compiler_emit_register_addressing(compiler, ®->idx[1]); } - else if (reg->type == VKD3DSPR_SAMPLEMASK) + else if (reg->type == VKD3DSPR_COVERAGE || reg->type == VKD3DSPR_SAMPLEMASK) { indexes[index_count++] = vkd3d_dxbc_compiler_get_constant_uint(compiler, register_info->member_idx); } @@ -3116,6 +3119,7 @@ vkd3d_register_builtins[] = {VKD3DSPR_TESSCOORD, {VKD3D_TYPE_FLOAT, 3, SpvBuiltInTessCoord}}, + {VKD3DSPR_COVERAGE, {VKD3D_TYPE_UINT, 1, SpvBuiltInSampleMask, NULL, true}}, {VKD3DSPR_SAMPLEMASK, {VKD3D_TYPE_UINT, 1, SpvBuiltInSampleMask, NULL, true}}, {VKD3DSPR_DEPTHOUT, {VKD3D_TYPE_FLOAT, 1, SpvBuiltInFragDepth}}, @@ -3437,6 +3441,7 @@ static void vkd3d_dxbc_compiler_emit_input_register(struct vkd3d_dxbc_compiler * const struct vkd3d_shader_register *reg = &dst->reg; const struct vkd3d_spirv_builtin *builtin; struct vkd3d_symbol reg_symbol; + unsigned int array_size; uint32_t input_id; assert(!reg->idx[0].rel_addr); @@ -3449,15 +3454,17 @@ static void vkd3d_dxbc_compiler_emit_input_register(struct vkd3d_dxbc_compiler * return; } - input_id = vkd3d_dxbc_compiler_emit_variable(compiler, + array_size = builtin->is_spirv_array ? 1 : 0; + input_id = vkd3d_dxbc_compiler_emit_array_variable(compiler, &builder->global_stream, SpvStorageClassInput, - builtin->component_type, builtin->component_count); + builtin->component_type, builtin->component_count, array_size); vkd3d_spirv_add_iface_variable(builder, input_id); vkd3d_dxbc_compiler_decorate_builtin(compiler, input_id, builtin->spirv_builtin); vkd3d_symbol_make_register(®_symbol, reg); reg_symbol.id = input_id; reg_symbol.info.reg.storage_class = SpvStorageClassInput; + reg_symbol.info.reg.member_idx = 0; reg_symbol.info.reg.component_type = builtin->component_type; reg_symbol.info.reg.write_mask = vkd3d_write_mask_from_component_count(builtin->component_count); vkd3d_dxbc_compiler_put_symbol(compiler, ®_symbol); -- 2.19.2
[View Less]
2
1
0
0
[PATCH vkd3d 1/5] vkd3d-shader: Mark hs_decls as declaration instruction.
by Józef Kucia
24 Jan '19
24 Jan '19
From: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- libs/vkd3d-shader/spirv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 6ea9836481e9..d2c417f0da6e 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6765,7 +6765,8 @@ static void vkd3d_dxbc_compiler_emit_main_prolog(struct vkd3d_dxbc_compiler *com static bool
…
[View More]
is_dcl_instruction(enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx) { - return VKD3DSIH_DCL <= handler_idx && handler_idx <= VKD3DSIH_DCL_VERTICES_OUT; + return (VKD3DSIH_DCL <= handler_idx && handler_idx <= VKD3DSIH_DCL_VERTICES_OUT) + || handler_idx == VKD3DSIH_HS_DECLS; } int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler, -- 2.19.2
[View Less]
2
1
0
0
[PATCH 8/8] d3d9: Use wined3d_bit_scan() instead of open-coding it.
by Józef Kucia
24 Jan '19
24 Jan '19
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/d3d9/device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 067ea2bdc2d2..ed1fedf91db3 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2732,8 +2732,7 @@ static void d3d9_device_upload_sysmem_vertex_buffers(struct d3d9_device *device, map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u &
…
[View More]
lt;< i; + i = wined3d_bit_scan(&map); if (FAILED(hr = wined3d_device_get_stream_source(device->wined3d_device, i, &dst_buffer, &offset, &stride))) ERR("Failed to get stream source.\n"); @@ -3111,8 +3110,7 @@ static HRESULT WINAPI d3d9_device_ProcessVertices(IDirect3DDevice9Ex *iface, map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u << i; + i = wined3d_bit_scan(&map); if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, i, &wined3d_buffer, &offset, &stride))) @@ -3130,8 +3128,7 @@ static HRESULT WINAPI d3d9_device_ProcessVertices(IDirect3DDevice9Ex *iface, map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u << i; + i = wined3d_bit_scan(&map); if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, i, &wined3d_buffer, &offset, &stride))) -- 2.19.2
[View Less]
3
2
0
0
[PATCH 7/8] d3d8: Use wined3d_bit_scan() instead of open-coding it.
by Józef Kucia
24 Jan '19
24 Jan '19
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/d3d8/device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 1d892ecf8d31..33ab34d0b39d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2280,8 +2280,7 @@ static void d3d8_device_upload_sysmem_vertex_buffers(struct d3d8_device *device, map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u &
…
[View More]
lt;< i; + i = wined3d_bit_scan(&map); if (FAILED(hr = wined3d_device_get_stream_source(device->wined3d_device, i, &dst_buffer, &offset, &stride))) ERR("Failed to get stream source.\n"); @@ -2618,8 +2617,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u << i; + i = wined3d_bit_scan(&map); if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, i, &wined3d_buffer, &offset, &stride))) @@ -2636,8 +2634,7 @@ static HRESULT WINAPI d3d8_device_ProcessVertices(IDirect3DDevice8 *iface, UINT map = device->sysmem_vb; while (map) { - i = ffs(map) - 1; - map ^= 1u << i; + i = wined3d_bit_scan(&map); if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, i, &wined3d_buffer, &offset, &stride))) -- 2.19.2
[View Less]
3
2
0
0
[PATCH 5/8] d3d10core/tests: Avoid "skipping tests" in skip() messages.
by Józef Kucia
24 Jan '19
24 Jan '19
skip() prints "Tests skipped:". Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/d3d10core/tests/d3d10core.c | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 7b0d2fb87758..5b8e7e1c7bac 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -1500,7 +1500,7 @@ static void test_feature_level(void) if (!(
…
[View More]
d3d10_device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -1689,7 +1689,7 @@ static void test_texture1d_interfaces(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -1709,7 +1709,7 @@ static void test_texture1d_interfaces(void) ID3D10Texture1D_Release(texture); if (FAILED(hr)) { - win_skip("1D textures do not implement ID3D11Texture1D, skipping tests.\n"); + win_skip("1D textures do not implement ID3D11Texture1D.\n"); ID3D10Device_Release(device); return; } @@ -1880,7 +1880,7 @@ static void test_create_texture2d(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -2024,7 +2024,7 @@ static void test_texture2d_interfaces(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -2047,7 +2047,7 @@ static void test_texture2d_interfaces(void) ID3D10Texture2D_Release(texture); if (FAILED(hr)) { - win_skip("D3D11 is not available, skipping tests.\n"); + win_skip("D3D11 is not available.\n"); ID3D10Device_Release(device); return; } @@ -2157,7 +2157,7 @@ static void test_create_texture3d(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -3733,7 +3733,7 @@ void main(point float4 vin[1] : POSITION, inout TriangleStream<gs_out> vout) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -3859,7 +3859,7 @@ static void test_create_sampler_state(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -4222,7 +4222,7 @@ static void test_create_depthstencil_state(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -4326,7 +4326,7 @@ static void test_create_rasterizer_state(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -4873,7 +4873,7 @@ static void test_device_removed_reason(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -5083,7 +5083,7 @@ float4 main(float4 color : COLOR) : SV_TARGET if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -5981,7 +5981,7 @@ static void test_blend(void) /* DXGI_FORMAT_B8G8R8X8_UNORM is not supported on all implementations. */ if (FAILED(ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &offscreen))) { - skip("DXGI_FORMAT_B8G8R8X8_UNORM not supported, skipping tests.\n"); + skip("DXGI_FORMAT_B8G8R8X8_UNORM not supported.\n"); goto done; } @@ -8434,7 +8434,7 @@ static void test_private_data(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } @@ -10265,7 +10265,7 @@ static void test_check_multisample_quality_levels(void) ok(hr == S_OK, "Failed to check multisample quality levels, hr %#x.\n", hr); if (!quality_levels) { - skip("Multisampling not supported for DXGI_FORMAT_R8G8B8A8_UNORM, skipping test.\n"); + skip("Multisampling not supported for DXGI_FORMAT_R8G8B8A8_UNORM.\n"); goto done; } @@ -10791,7 +10791,7 @@ static void test_swapchain_flip(void) if (!(device = create_device())) { - skip("Failed to create device, skipping tests.\n"); + skip("Failed to create device.\n"); return; } SetRect(&rect, 0, 0, 640, 480); @@ -15875,7 +15875,7 @@ static void test_format_compatibility(void) hr = ID3D10Device_CreateTexture2D(device, &texture_desc, &resource_data, &dst_texture); if (FAILED(hr) && test_data[i].dst_format == DXGI_FORMAT_B8G8R8A8_UNORM) { - skip("B8G8R8A8_UNORM not supported, skipping test.\n"); + skip("B8G8R8A8_UNORM not supported.\n"); ID3D10Texture2D_Release(src_texture); continue; } -- 2.19.2
[View Less]
3
2
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200