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
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-commits
January 2016
----- 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-commits@winehq.org
2 participants
627 discussions
Start a n
N
ew thread
Józef Kucia : d3d10core/tests: Add test for SM4 ld instruction.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 68ba8f9037478aa037908dcda0e3379257ce74f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68ba8f9037478aa037908dcda…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 5 21:52:34 2016 +0100 d3d10core/tests: Add test for SM4 ld instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/device.c | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index b08f6d0..cedeef6 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -3280,6 +3280,55 @@ static void test_texture(void) 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, }; + static const DWORD ps_ld_0_code[] = + { +#if 0 + Texture2D t; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float3 p = float3(position.x / 640.0f, position.y / 480.0f, 0.0f); + p *= float3(4.0f, 4.0f, 1.0f); + return t.Load(int3(p)); + } +#endif + 0x43425844, 0x0aef49ac, 0x02fa5594, 0xfb8a34cd, 0x8e03ee1d, 0x00000001, 0x00000168, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000cc, 0x00000040, + 0x00000033, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x05000036, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, 0x00004002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0a000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00004002, 0x3bcccccd, 0x3c088889, 0x3f800000, 0x3f800000, 0x0500001b, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00107e46, + 0x00000000, 0x0100003e, + }; + static const DWORD ps_ld_1_code[] = + { +#if 0 + Texture2D t; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float3 p = float3(position.x / 640.0f, position.y / 480.0f, 1.0f); + p *= float3(2.0f, 2.0f, 1.0f); + return t.Load(int3(p)); + } +#endif + 0x43425844, 0xd43b0155, 0x1ae5af92, 0x34e50992, 0x5e7a0d1a, 0x00000001, 0x00000154, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000b8, 0x00000040, + 0x0000002e, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3b4ccccd, 0x3b888889, 0x00000000, 0x00000000, + 0x0500001b, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, + 0x00004002, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x0700002d, 0x001020f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00107e46, 0x00000000, 0x0100003e, + }; static const DWORD ps_sample_code[] = { #if 0 @@ -3335,6 +3384,8 @@ static void test_texture(void) 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x0100003e, }; + static const struct shader ps_ld_0 = {ps_ld_0_code, sizeof(ps_ld_0_code)}; + static const struct shader ps_ld_1 = {ps_ld_1_code, sizeof(ps_ld_1_code)}; static const struct shader ps_sample = {ps_sample_code, sizeof(ps_sample_code)}; static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)}; static const struct @@ -3392,6 +3443,8 @@ static void test_texture(void) } tests[] = { + {&ps_ld_0, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0}, + {&ps_ld_1, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_1}, {&ps_sample, D3D10_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0}, {&ps_sample, D3D10_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D10_FLOAT32_MAX, 0.0f, level_0}, {&ps_sample_l, D3D10_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D10_FLOAT32_MAX, -1.0f, level_0},
1
0
0
0
Józef Kucia : d3d11/tests: Add test for SM4 ld instruction.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 5be262565ef816ffa122b03ad03c04381e545fe2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5be262565ef816ffa122b03ad…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 5 21:52:33 2016 +0100 d3d11/tests: Add test for SM4 ld instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 876a86a..94d9b42 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -2904,6 +2904,55 @@ static void test_texture(void) 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, }; + static const DWORD ps_ld_0_code[] = + { +#if 0 + Texture2D t; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float3 p = float3(position.x / 640.0f, position.y / 480.0f, 0.0f); + p *= float3(4.0f, 4.0f, 1.0f); + return t.Load(int3(p)); + } +#endif + 0x43425844, 0x0aef49ac, 0x02fa5594, 0xfb8a34cd, 0x8e03ee1d, 0x00000001, 0x00000168, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000cc, 0x00000040, + 0x00000033, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x05000036, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, 0x00004002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0a000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00004002, 0x3bcccccd, 0x3c088889, 0x3f800000, 0x3f800000, 0x0500001b, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00107e46, + 0x00000000, 0x0100003e, + }; + static const DWORD ps_ld_1_code[] = + { +#if 0 + Texture2D t; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float3 p = float3(position.x / 640.0f, position.y / 480.0f, 1.0f); + p *= float3(2.0f, 2.0f, 1.0f); + return t.Load(int3(p)); + } +#endif + 0x43425844, 0xd43b0155, 0x1ae5af92, 0x34e50992, 0x5e7a0d1a, 0x00000001, 0x00000154, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000b8, 0x00000040, + 0x0000002e, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, + 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3b4ccccd, 0x3b888889, 0x00000000, 0x00000000, + 0x0500001b, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, + 0x00004002, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x0700002d, 0x001020f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00107e46, 0x00000000, 0x0100003e, + }; static const DWORD ps_sample_code[] = { #if 0 @@ -2959,6 +3008,8 @@ static void test_texture(void) 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x0100003e, }; + static const struct shader ps_ld_0 = {ps_ld_0_code, sizeof(ps_ld_0_code)}; + static const struct shader ps_ld_1 = {ps_ld_1_code, sizeof(ps_ld_1_code)}; static const struct shader ps_sample = {ps_sample_code, sizeof(ps_sample_code)}; static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)}; static const struct @@ -3016,6 +3067,8 @@ static void test_texture(void) } tests[] = { + {&ps_ld_0, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0}, + {&ps_ld_1, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_1}, {&ps_sample, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0}, {&ps_sample, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D11_FLOAT32_MAX, 0.0f, level_0}, {&ps_sample_l, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D11_FLOAT32_MAX, -1.0f, level_0},
1
0
0
0
Józef Kucia : wined3d: Implement SM4 ld instruction.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 524556e7f883c736c6058901505e65b2a98fc971 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=524556e7f883c736c60589015…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 5 21:52:32 2016 +0100 wined3d: Implement SM4 ld instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 38 +++++++++++++++++++++++++++++++++----- dlls/wined3d/shader_sm4.c | 2 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d0285ef..66a541a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -44,10 +44,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); WINE_DECLARE_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(winediag); -#define WINED3D_GLSL_SAMPLE_PROJECTED 0x1 -#define WINED3D_GLSL_SAMPLE_NPOT 0x2 -#define WINED3D_GLSL_SAMPLE_LOD 0x4 -#define WINED3D_GLSL_SAMPLE_GRAD 0x8 +#define WINED3D_GLSL_SAMPLE_PROJECTED 0x01 +#define WINED3D_GLSL_SAMPLE_NPOT 0x02 +#define WINED3D_GLSL_SAMPLE_LOD 0x04 +#define WINED3D_GLSL_SAMPLE_GRAD 0x08 +#define WINED3D_GLSL_SAMPLE_LOAD 0x10 struct glsl_dst_param { @@ -2674,6 +2675,15 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context } } + if (flags & WINED3D_GLSL_SAMPLE_LOAD) + { + if (flags != WINED3D_GLSL_SAMPLE_LOAD) + ERR("Unexpected flags for texelFetch %#x.\n", flags & ~WINED3D_GLSL_SAMPLE_LOAD); + + base = "texelFetch"; + type_part = ""; + } + sample_function->name = string_buffer_get(priv->string_buffers); string_buffer_sprintf(sample_function->name, "%s%s%s%s%s", base, type_part, projected ? "Proj" : "", lod ? "Lod" : grad ? "Grad" : "", suffix); @@ -4231,6 +4241,24 @@ static unsigned int shader_glsl_find_sampler(const struct wined3d_shader_sampler return ~0u; } +/* FIXME: The current implementation does not handle multisample textures correctly. */ +static void shader_glsl_ld(const struct wined3d_shader_instruction *ins) +{ + struct glsl_src_param coord_param, lod_param; + struct glsl_sample_function sample_function; + unsigned int sampler_idx; + + shader_glsl_get_sample_function(ins->ctx, ins->src[1].reg.idx[0].offset, WINED3D_GLSL_SAMPLE_LOAD, + &sample_function); + shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param); + shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &lod_param); + sampler_idx = shader_glsl_find_sampler(&ins->ctx->reg_maps->sampler_map, + ins->src[1].reg.idx[0].offset, WINED3D_SAMPLER_DEFAULT); + shader_glsl_gen_sample_code(ins, sampler_idx, &sample_function, WINED3DSP_NOSWIZZLE, + NULL, NULL, lod_param.param_str, "%s", coord_param.param_str); + shader_glsl_release_sample_function(ins->ctx, &sample_function); +} + static void shader_glsl_sample(const struct wined3d_shader_instruction *ins) { struct glsl_sample_function sample_function; @@ -7883,7 +7911,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_ISHL */ shader_glsl_binop, /* WINED3DSIH_ITOF */ shader_glsl_to_float, /* WINED3DSIH_LABEL */ shader_glsl_label, - /* WINED3DSIH_LD */ NULL, + /* WINED3DSIH_LD */ shader_glsl_ld, /* WINED3DSIH_LIT */ shader_glsl_lit, /* WINED3DSIH_LOG */ shader_glsl_scalar_op, /* WINED3DSIH_LOGP */ shader_glsl_scalar_op, diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index a915b0d..d0d6291 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -274,7 +274,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {WINED3D_SM4_OP_IMUL, WINED3DSIH_IMUL, "II", "II"}, {WINED3D_SM4_OP_ISHL, WINED3DSIH_ISHL, "I", "II"}, {WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, "F", "I"}, - {WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "FR"}, + {WINED3D_SM4_OP_LD, WINED3DSIH_LD, "U", "IR"}, {WINED3D_SM4_OP_LOG, WINED3DSIH_LOG, "F", "F"}, {WINED3D_SM4_OP_LOOP, WINED3DSIH_LOOP, "", ""}, {WINED3D_SM4_OP_LT, WINED3DSIH_LT, "U", "FF"},
1
0
0
0
Józef Kucia : wined3d: Record texture accesses for SM4 ld instruction.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 5ca86ca4ee9bc9d5b1d90ccbb0c2662d74ab1962 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ca86ca4ee9bc9d5b1d90ccbb…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 5 21:52:31 2016 +0100 wined3d: Record texture accesses for SM4 ld instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 14 ++++++++++++-- dlls/wined3d/shader.c | 5 +++++ dlls/wined3d/wined3d_private.h | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 1e357e7..dabb5fd 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3112,6 +3112,7 @@ static void context_load_shader_resources(struct wined3d_context *context, const static void context_bind_shader_resources(struct wined3d_context *context, const struct wined3d_state *state) { + const struct wined3d_device *device = context->swapchain->device; const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_shader_sampler_map_entry *entry; struct wined3d_shader_resource_view *view; @@ -3119,6 +3120,7 @@ static void context_bind_shader_resources(struct wined3d_context *context, const struct wined3d_texture *texture; struct wined3d_shader *shader; unsigned int i, j, count; + GLuint sampler_name; static const struct { @@ -3161,7 +3163,15 @@ static void context_bind_shader_resources(struct wined3d_context *context, const continue; } - if (!(sampler = state->sampler[shader_types[i].type][entry->sampler_idx])) + if (entry->sampler_idx == WINED3D_SAMPLER_DEFAULT) + { + sampler_name = device->default_sampler; + } + else if ((sampler = state->sampler[shader_types[i].type][entry->sampler_idx])) + { + sampler_name = sampler->name; + } + else { WARN("No sampler object bound at index %u, %u.\n", shader_types[i].type, entry->sampler_idx); continue; @@ -3171,7 +3181,7 @@ static void context_bind_shader_resources(struct wined3d_context *context, const context_active_texture(context, gl_info, shader_types[i].base_idx + entry->bind_idx); wined3d_texture_bind(texture, context, FALSE); - GL_EXTCALL(glBindSampler(shader_types[i].base_idx + entry->bind_idx, sampler->name)); + GL_EXTCALL(glBindSampler(shader_types[i].base_idx + entry->bind_idx, sampler_name)); checkGLcall("glBindSampler"); } } diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 2837229..6aa5bd5 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1068,6 +1068,11 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st shader_record_sample(reg_maps, ins.src[1].reg.idx[0].offset, ins.src[2].reg.idx[0].offset, reg_maps->sampler_map.count); } + else if (ins.handler_idx == WINED3DSIH_LD) + { + shader_record_sample(reg_maps, ins.src[1].reg.idx[0].offset, + WINED3D_SAMPLER_DEFAULT, reg_maps->sampler_map.count); + } if (ins.predicate) if (!shader_record_register_usage(shader, reg_maps, &ins.predicate->reg, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c591f7d..805e32e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -597,6 +597,8 @@ struct wined3d_shader_resource_info enum wined3d_data_type data_type; }; +#define WINED3D_SAMPLER_DEFAULT ~0x0u + struct wined3d_shader_sampler_map_entry { unsigned int resource_idx;
1
0
0
0
Józef Kucia : wined3d: Maintain default sampler per device.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 3193505f9f52b0cb1fe2ec7539508187dcf8ccce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3193505f9f52b0cb1fe2ec753…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 5 21:52:30 2016 +0100 wined3d: Maintain default sampler per device. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 45 ++++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 2 files changed, 48 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d8a6462..49480c5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -773,6 +773,49 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w memset(device->dummy_texture_2d, 0, count * sizeof(*device->dummy_texture_2d)); } +/* Context activation is done by the caller. */ +static void create_default_sampler(struct wined3d_device *device) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + + /* + * In SM4+ shaders there is a separation between resources and samplers. Some of shader + * instructions allow to access resources without using samplers. + * In GLSL resources are always accessed through sampler or image variables. The default + * sampler object is used to emulate the direct resource access when there is no sampler state + * to use. + */ + + if (gl_info->supported[ARB_SAMPLER_OBJECTS]) + { + GL_EXTCALL(glGenSamplers(1, &device->default_sampler)); + checkGLcall("glGenSamplers"); + if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT)); + checkGLcall("glSamplerParamteri"); + } + } + else + { + device->default_sampler = 0; + } +} + +/* Context activation is done by the caller. */ +static void destroy_default_sampler(struct wined3d_device *device) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + + if (gl_info->supported[ARB_SAMPLER_OBJECTS]) + { + GL_EXTCALL(glDeleteSamplers(1, &device->default_sampler)); + checkGLcall("glDeleteSamplers"); + } + + device->default_sampler = 0; +} + static LONG fullscreen_style(LONG style) { /* Make sure the window is managed, otherwise we won't get keyboard input. */ @@ -972,6 +1015,7 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0))); create_dummy_textures(device, context); + create_default_sampler(device); device->contexts[0]->last_was_rhw = 0; @@ -1119,6 +1163,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) device->blitter->free_private(device); device->shader_backend->shader_free_private(device); destroy_dummy_textures(device, gl_info); + destroy_default_sampler(device); /* Release the context again as soon as possible. In particular, * releasing the render target views below may release the last reference diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0c113a1..c591f7d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2128,6 +2128,9 @@ struct wined3d_device UINT dummy_texture_3d[MAX_COMBINED_SAMPLERS]; UINT dummy_texture_cube[MAX_COMBINED_SAMPLERS]; + /* Default sampler used to emulate the direct resource access without using wined3d_sampler */ + GLuint default_sampler; + /* Command stream */ struct wined3d_cs *cs;
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDocument4::hasFocus implementation.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 67014b7cf96821081e33ba983ec462607baf289a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67014b7cf96821081e33ba983…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jan 6 15:05:42 2016 +0100 mshtml: Added IHTMLDocument4::hasFocus implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmldoc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index cdeb371..8e59e98 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -2549,8 +2549,21 @@ static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface) static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus) { HTMLDocument *This = impl_from_IHTMLDocument4(iface); - FIXME("(%p)->(%p)\n", This, pfFocus); - return E_NOTIMPL; + cpp_bool has_focus; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, pfFocus); + + if(!This->doc_node->nsdoc) { + FIXME("Unimplemented for fragments.\n"); + return E_NOTIMPL; + } + + nsres = nsIDOMHTMLDocument_HasFocus(This->doc_node->nsdoc, &has_focus); + assert(nsres == NS_OK); + + *pfFocus = has_focus ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; } static HRESULT WINAPI HTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v)
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_VideoController.VideoModeDescription.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 62c367d12dc17ec56d4337ffd6d36616ea5d0085 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62c367d12dc17ec56d4337ffd…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 6 14:44:34 2016 +0100 wbemprox: Implement Win32_VideoController.VideoModeDescription. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index a3cf673..13f708f 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -85,8 +85,6 @@ static const WCHAR class_physicalmediaW[] = {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','d','i','a',0}; static const WCHAR class_physicalmemoryW[] = {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; -static const WCHAR class_qualifiersW[] = - {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR class_printerW[] = {'W','i','n','3','2','_','P','r','i','n','t','e','r',0}; static const WCHAR class_process_getowner_outW[] = @@ -96,6 +94,8 @@ static const WCHAR class_processorW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; static const WCHAR class_processor2W[] = {'C','I','M','_','P','r','o','c','e','s','s','o','r',0}; +static const WCHAR class_qualifiersW[] = + {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR class_sidW[] = {'W','i','n','3','2','_','S','I','D',0}; static const WCHAR class_sounddeviceW[] = @@ -357,6 +357,8 @@ static const WCHAR prop_videoarchitectureW[] = {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_videomemorytypeW[] = {'V','i','d','e','o','M','e','m','o','r','y','T','y','p','e',0}; +static const WCHAR prop_videomodedescriptionW[] = + {'V','i','d','e','o','M','o','d','e','D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_videoprocessorW[] = {'V','i','d','e','o','P','r','o','c','e','s','s','o','r',0}; static const WCHAR prop_volumenameW[] = @@ -657,6 +659,7 @@ static const struct column col_videocontroller[] = { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoarchitectureW, CIM_UINT16, VT_I4 }, { prop_videomemorytypeW, CIM_UINT16, VT_I4 }, + { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC } }; @@ -1052,6 +1055,7 @@ struct record_videocontroller const WCHAR *pnpdevice_id; UINT16 videoarchitecture; UINT16 videomemorytype; + const WCHAR *videomodedescription; const WCHAR *videoprocessor; }; #include "poppack.h" @@ -2938,16 +2942,16 @@ static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc ) static enum fill_status fill_videocontroller( struct table *table, const struct expr *cond ) { - + static const WCHAR fmtW[] = {'%','u',' ','x',' ','%','u',' ','x',' ','%','I','6','4','u',' ','c','o','l','o','r','s',0}; struct record_videocontroller *rec; HRESULT hr; IDXGIFactory *factory = NULL; IDXGIAdapter *adapter = NULL; DXGI_ADAPTER_DESC desc; - UINT hres = 1024, vres = 768, vidmem = 512 * 1024 * 1024; + UINT row = 0, hres = 1024, vres = 768, vidmem = 512 * 1024 * 1024; const WCHAR *name = videocontroller_deviceidW; enum fill_status status = FILL_STATUS_UNFILTERED; - UINT row = 0; + WCHAR mode[44]; if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; @@ -2983,6 +2987,8 @@ done: rec->pnpdevice_id = get_pnpdeviceid( &desc ); rec->videoarchitecture = 2; /* Unknown */ rec->videomemorytype = 2; /* Unknown */ + wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel ); + rec->videomodedescription = heap_strdupW( mode ); rec->videoprocessor = heap_strdupW( name ); if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++;
1
0
0
0
Hans Leidekker : wbemprox: Fix a typo.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 298c64c6eb6046b92f2f724fbabbf2196d26e418 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=298c64c6eb6046b92f2f724fb…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 6 14:44:33 2016 +0100 wbemprox: Fix a typo. Spotted by Nikolay Sivov. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 53e1044..76f5caa 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -266,7 +266,7 @@ static HRESULT eval_binary( const struct table *table, UINT row, const struct co if (is_int( ltype )) lstr = format_int( lbuf, ltype, lval ); else lstr = (const WCHAR *)(INT_PTR)lval; - if (is_int( rtype )) rstr = format_int( rbuf, ltype, rval ); + if (is_int( rtype )) rstr = format_int( rbuf, rtype, rval ); else rstr = (const WCHAR *)(INT_PTR)rval; return eval_strcmp( expr->op, lstr, rstr, val );
1
0
0
0
Hans Leidekker : bcrypt: Implement BCryptFinishHash.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: 085ed64df6b048f1237006f5b58994b11fea1fb0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=085ed64df6b048f1237006f5b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 6 14:19:19 2016 +0100 bcrypt: Implement BCryptFinishHash. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/bcrypt/bcrypt.spec | 2 +- dlls/bcrypt/bcrypt_main.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec index 5d67516..c52d89f 100644 --- a/dlls/bcrypt/bcrypt.spec +++ b/dlls/bcrypt/bcrypt.spec @@ -22,7 +22,7 @@ @ stub BCryptEnumRegisteredProviders @ stub BCryptExportKey @ stub BCryptFinalizeKeyPair -@ stub BCryptFinishHash +@ stdcall BCryptFinishHash(ptr ptr long long) @ stub BCryptFreeBuffer @ stdcall BCryptGenRandom(ptr ptr long long) @ stub BCryptGenerateKeyPair diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 806fee8..9cc5227 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -228,6 +228,33 @@ static void hash_update( struct hash *hash, UCHAR *input, ULONG size ) break; } } + +static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size ) +{ + switch (hash->alg_id) + { + case ALG_ID_SHA1: + CC_SHA1_Final( output, &hash->u.sha1_ctx ); + break; + + case ALG_ID_SHA256: + CC_SHA256_Final( output, &hash->u.sha256_ctx ); + break; + + case ALG_ID_SHA384: + CC_SHA384_Final( output, &hash->u.sha512_ctx ); + break; + + case ALG_ID_SHA512: + CC_SHA512_Final( output, &hash->u.sha512_ctx ); + break; + + default: + ERR( "unhandled id %u\n", hash->alg_id ); + break; + } + return STATUS_SUCCESS; +} #else struct hash { @@ -245,6 +272,12 @@ static void hash_update( struct hash *hash, UCHAR *input, ULONG size ) { ERR( "support for hashes not available at build time\n" ); } + +static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size ) +{ + ERR( "support for hashes not available at build time\n" ); + return STATUS_NOT_IMPLEMENTED; +} #endif #define OBJECT_LENGTH_SHA1 278 @@ -454,3 +487,15 @@ NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG s hash_update( hash, input, size ); return STATUS_SUCCESS; } + +NTSTATUS WINAPI BCryptFinishHash( BCRYPT_HASH_HANDLE handle, UCHAR *output, ULONG size, ULONG flags ) +{ + struct hash *hash = handle; + + TRACE( "%p, %p, %u, %08x\n", handle, output, size, flags ); + + if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE; + if (!output) return STATUS_INVALID_PARAMETER; + + return hash_finish( hash, output, size ); +}
1
0
0
0
Hans Leidekker : bcrypt: Implement BCryptHashData.
by Alexandre Julliard
06 Jan '16
06 Jan '16
Module: wine Branch: master Commit: b1e08b3928f00f36eefd1bcec17c83dbd58419ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1e08b3928f00f36eefd1bcec…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 6 14:19:18 2016 +0100 bcrypt: Implement BCryptHashData. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/bcrypt/bcrypt.spec | 2 +- dlls/bcrypt/bcrypt_main.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec index 53db32a..5d67516 100644 --- a/dlls/bcrypt/bcrypt.spec +++ b/dlls/bcrypt/bcrypt.spec @@ -29,7 +29,7 @@ @ stub BCryptGenerateSymmetricKey @ stdcall BCryptGetFipsAlgorithmMode(ptr) @ stdcall BCryptGetProperty(ptr wstr ptr long ptr long) -@ stub BCryptHashData +@ stdcall BCryptHashData(ptr ptr long long) @ stub BCryptImportKey @ stub BCryptImportKeyPair @ stdcall BCryptOpenAlgorithmProvider(ptr wstr wstr long) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 9ad3060..806fee8 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -202,6 +202,32 @@ static NTSTATUS hash_init( struct hash *hash ) } return STATUS_SUCCESS; } + +static void hash_update( struct hash *hash, UCHAR *input, ULONG size ) +{ + switch (hash->alg_id) + { + case ALG_ID_SHA1: + CC_SHA1_Update( &hash->u.sha1_ctx, input, size ); + break; + + case ALG_ID_SHA256: + CC_SHA256_Update( &hash->u.sha256_ctx, input, size ); + break; + + case ALG_ID_SHA384: + CC_SHA384_Update( &hash->u.sha512_ctx, input, size ); + break; + + case ALG_ID_SHA512: + CC_SHA512_Update( &hash->u.sha512_ctx, input, size ); + break; + + default: + ERR( "unhandled id %u\n", hash->alg_id ); + break; + } +} #else struct hash { @@ -214,6 +240,11 @@ static NTSTATUS hash_init( struct hash *hash ) ERR( "support for hashes not available at build time\n" ); return STATUS_NOT_IMPLEMENTED; } + +static void hash_update( struct hash *hash, UCHAR *input, ULONG size ) +{ + ERR( "support for hashes not available at build time\n" ); +} #endif #define OBJECT_LENGTH_SHA1 278 @@ -410,3 +441,16 @@ NTSTATUS WINAPI BCryptDestroyHash( BCRYPT_HASH_HANDLE handle ) HeapFree( GetProcessHeap(), 0, hash ); return STATUS_SUCCESS; } + +NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG size, ULONG flags ) +{ + struct hash *hash = handle; + + TRACE( "%p, %p, %u, %08x\n", handle, input, size, flags ); + + if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE; + if (!input) return STATUS_INVALID_PARAMETER; + + hash_update( hash, input, size ); + return STATUS_SUCCESS; +}
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
63
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
57
58
59
60
61
62
63
Results per page:
10
25
50
100
200