tests: Strip reflection data from dxbc-tpf-hex shaders.

This commit is contained in:
Henri Verbeet
2025-07-31 18:40:15 +02:00
parent 243207701b
commit 721859005f
Notes: Henri Verbeet 2025-08-04 15:08:50 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1667
4 changed files with 117 additions and 153 deletions

View File

@@ -51,34 +51,18 @@ shader model < 5.1
[pixel shader dxbc-tpf-hex] [pixel shader dxbc-tpf-hex]
% The same as above, but in bytecode format so that we're sure that the % The same as above, but in bytecode format so that we're sure that the
% ABSNEG source modifier is used. % ABSNEG source modifier is used.
43425844 1ab08b1b ccb6cea5 90d9b116 03ae9845 00000001 000000c0 % DXBC header
% ps_5_0 00000003 0000002c 0000003c 00000070 %
% dcl_globalFlags refactoringAllowed 4e475349 00000008 00000000 00000008 % .input
% dcl_constantbuffer CB0[1], immediateIndexed 4e47534f 0000002c 00000001 00000008 % .output
% dcl_output o0.xyzw 00000020 00000000 00000000 00000003 00000000 0000000f % .param sv_target.xyzw, o0.xyzw, float, TARGET
% mov o0.xyzw, -|cb0[0].xyzw| 745f7673 65677261 abab0074 %
% ret 58454853 00000048 00000050 00000012 % .text ps_5_0
0100086a % dcl_globalFlags refactoringAllowed
43425844 f1f3f986 b40d7bb2 ded2b849 afffb109 00000001 00000278 00000005 04000059 00208e46 00000000 00000001 % dcl_constantBuffer cb0[1], immediateIndexed
00000034 00000148 00000158 0000018c 000001dc 46454452 0000010c 00000001 03000065 001020f2 00000000 % dcl_output o0.xyzw
00000068 00000001 0000003c ffff0500 00000100 000000d8 31314452 0000003c 07000036 001020f2 00000000 80208e46 000000c1 00000000 00000000 % mov o0.xyzw, -|cb0[0].xyzw|
00000018 00000020 00000028 00000024 0000000c 00000000 0000005c 00000000 0100003e % ret
00000000 00000000 00000000 00000000 00000001 00000000 6f6c4724 736c6162
ababab00 0000005c 00000001 00000080 00000010 00000000 00000000 000000a8
00000000 00000010 00000002 000000b4 00000000 ffffffff 00000000 ffffffff
00000000 6c660075 3474616f ababab00 00030001 00040001 00000000 00000000
00000000 00000000 00000000 00000000 000000aa 7263694d 666f736f 52282074
4c482029 53204c53 65646168 6f432072 6c69706d 31207265 2e302e30 31303031
36312e31 00343833 4e475349 00000008 00000000 00000008 4e47534f 0000002c
00000001 00000008 00000020 00000000 00000000 00000003 00000000 0000000f
745f7673 65677261 abab0074 58454853 00000048 00000050 00000012 0100086a
04000059 00208e46 00000000 00000001 03000065 001020f2 00000000 07000036
001020f2 00000000 80208e46 000000c1 00000000 00000000 0100003e 54415453
00000094 00000002 00000000 00000000 00000001 00000001 00000000 00000000
00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[test] [test]
uniform 0 float4 1.0 -3.0 10.0 -100.0 uniform 0 float4 1.0 -3.0 10.0 -100.0

View File

@@ -164,30 +164,21 @@ shader model < 4.1
[pixel shader dxbc-tpf-hex] [pixel shader dxbc-tpf-hex]
% The same as above, but in bytecode format. % The same as above, but in bytecode format.
43425844 f1557687 26b262bd 9eb2bc5d 66f940c8 00000001 00000114 % DXBC header
% ps_4_0 00000003 0000002c 00000080 000000b4 %
% dcl_input_ps linear v1.xw 4e475349 0000004c 00000002 00000008 % .input
% dcl_output o0.xyzw 00000038 00000000 00000001 00000003 00000000 0000000f % .param SV_Position.xyzw, v0, float, POS
% mov o0.xw, v1.xxxw 00000044 00000000 00000000 00000003 00000001 0000090f % .param COLOR.xyzw, v1.xw, float
% mov o0.yz, l(0,10.000000,11.000000,0) 505f5653 7469736f 006e6f69 4f4c4f43 abab0052 %
% ret 4e47534f 0000002c 00000001 00000008 % .output
00000020 00000000 00000000 00000003 00000000 0000000f % .param SV_Target.xyzw, o0.xyzw, float, TARGET
43425844 6d22be01 b0d27896 c533f8d0 6c7ce163 00000001 000001f0 00000005 545f5653 65677261 abab0074 %
00000034 0000008c 000000e0 00000114 00000174 46454452 00000050 00000000 52444853 00000058 00000040 00000016 % .text ps_4_0
00000000 00000000 0000001c ffff0400 00000100 0000001c 7263694d 666f736f 03001062 00101092 00000001 % dcl_input_ps linear v1.xw
52282074 4c482029 53204c53 65646168 6f432072 6c69706d 31207265 2e302e30 03000065 001020f2 00000000 % dcl_output o0.xyzw
31303031 36312e31 00343833 4e475349 0000004c 00000002 00000008 00000038 05000036 00102092 00000000 00101c06 00000001 % mov o0.xw, v1.xxxw
00000000 00000001 00000003 00000000 0000000f 00000044 00000000 00000000 08000036 00102062 00000000 00004002 00000000 41200000 41300000 00000000 % mov o0.yz, l(0, 10.0, 11.0, 0)
00000003 00000001 0000090f 505f5653 7469736f 006e6f69 4f4c4f43 abab0052 0100003e % ret
4e47534f 0000002c 00000001 00000008 00000020 00000000 00000000 00000003
00000000 0000000f 545f5653 65677261 abab0074 52444853 00000058 00000040
00000016 03001062 00101092 00000001 03000065 001020f2 00000000 05000036
00102092 00000000 00101c06 00000001 08000036 00102062 00000000 00004002
00000000 41200000 41300000 00000000 0100003e 54415453 00000074 00000003
00000000 00000000 00000002 00000000 00000000 00000000 00000001 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000002 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
[test] [test]
draw triangle list 3 draw triangle list 3

View File

@@ -30,24 +30,30 @@ todo(msl & sm>=6) draw triangle list 6
probe (160, 240) f32(2.0, 0.0, 0.0, 0.0) probe (160, 240) f32(2.0, 0.0, 0.0, 0.0)
probe (480, 240) f32(2.0, 1.0, 0.0, 0.0) probe (480, 240) f32(2.0, 1.0, 0.0, 0.0)
% As above, but compiled with native d3dcompiler_43.
% Versions 43 and earlier will pack together "a" with "face".
[require] [require]
shader model >= 4.0 shader model >= 4.0
shader model < 4.1 shader model < 4.1
[pixel shader dxbc-tpf-hex] [pixel shader dxbc-tpf-hex]
43425844 5c2e1427 858794db 4ee8c03b c5723497 00000001 00000140 00000003 % As above, but compiled with native d3dcompiler_43.
0000002c 00000080 000000b4 4e475349 0000004c 00000002 00000008 00000038 % Versions 43 and earlier will pack together "a" with "face".
00000000 00000000 00000001 00000000 00000101 0000003a 00000000 00000009 43425844 5c2e1427 858794db 4ee8c03b c5723497 00000001 00000140 % DXBC header
00000001 00000000 00000202 76730041 6673695f 746e6f72 65636166 ababab00 00000003 0000002c 00000080 000000b4 %
4e47534f 0000002c 00000001 00000008 00000020 00000000 00000000 00000003 4e475349 0000004c 00000002 00000008 % .input
00000000 0000000f 745f7673 65677261 abab0074 52444853 00000084 00000040 00000038 00000000 00000000 00000001 00000000 00000101 % .param A.x, v0.x, uint
00000021 03000862 00101012 00000000 04000863 00101022 00000000 00000009 0000003a 00000000 00000009 00000001 00000000 00000202 % .param sv_isfrontface.y, v0.y, uint, FFACE
03000065 001020f2 00000000 05000056 00102012 00000000 0010100a 00000000 76730041 6673695f 746e6f72 65636166 ababab00 %
07000001 00102022 00000000 0010101a 00000000 00004001 3f800000 08000036 4e47534f 0000002c 00000001 00000008 % .output
001020c2 00000000 00004002 00000000 00000000 00000000 00000000 0100003e 00000020 00000000 00000000 00000003 00000000 0000000f % .param sv_target.xyzw, o0.xyzw, float, TARGET
745f7673 65677261 abab0074 %
52444853 00000084 00000040 00000021 % .text ps_4_0
03000862 00101012 00000000 % dcl_input_ps constant v0.x
04000863 00101022 00000000 00000009 % dcl_input_ps_sgv v0.y, is_front_face
03000065 001020f2 00000000 % dcl_output o0.xyzw
05000056 00102012 00000000 0010100a 00000000 % utof o0.x, v0.x
07000001 00102022 00000000 0010101a 00000000 00004001 3f800000 % and o0.y, v0.y, l(0x3f800000)
08000036 001020c2 00000000 00004002 00000000 00000000 00000000 00000000 % mov o0.zw, l(0, 0, 0, 0)
0100003e % ret
[test] [test]
clear rtv 0 0.0 0.0 0.0 0.0 clear rtv 0 0.0 0.0 0.0 0.0

View File

@@ -184,94 +184,77 @@ tessellation-shader
% return input[i]; % return input[i];
% } % }
% hs_5_0 43425844 d70b6259 818a3418 8aff8947 e7f3a36d 00000001 00000420 % DXBC header
% hs_decls 00000004 00000030 000000bc 00000148 00000228 %
% dcl_input_control_point_count 3 4e475349 00000084 00000004 00000008 % .input
% dcl_output_control_point_count 3 00000068 00000000 00000001 00000003 00000000 00000f0f % .param SV_Position.xyzw, v0.xyzw, float, POS
% dcl_tessellator_domain domain_tri 00000074 00000000 00000000 00000003 00000001 00000101 % .param RED.x, v1.x, float
% dcl_tessellator_partitioning partitioning_integer 00000078 00000000 00000000 00000003 00000001 00000202 % .param GREEN.y, v1.y, float
% dcl_tessellator_output_primitive output_triangle_cw 0000007e 00000000 00000000 00000003 00000001 00000404 % .param BLUE.z, v1.z, float
% dcl_globalFlags refactoringAllowed 505f5653 7469736f 006e6f69 00444552 45455247 4c42004e ab004555 %
% hs_fork_phase 4e47534f 00000084 00000004 00000008 % .output
% dcl_hs_fork_phase_instance_count 3 00000068 00000000 00000001 00000003 00000000 0000000f % .param SV_Position.xyzw, o0.xyzw, float, POS
% dcl_input vForkInstanceID 00000074 00000000 00000000 00000003 00000001 00000e01 % .param RED.x, o1.x, float
% dcl_output_siv o0.x, finalTriUeq0EdgeTessFactor 00000078 00000000 00000000 00000003 00000001 00000d02 % .param GREEN.y, o1.y, float
% dcl_output_siv o1.x, finalTriVeq0EdgeTessFactor 0000007e 00000000 00000000 00000003 00000001 00000b04 % .param BLUE.z, o1.z, float
% dcl_output_siv o2.x, finalTriWeq0EdgeTessFactor 505f5653 7469736f 006e6f69 00444552 45455247 4c42004e ab004555 %
% dcl_temps 1 47534350 000000d8 00000007 00000008 % .patch_constant
% dcl_indexrange o0.x 3 000000b0 00000000 0000000d 00000003 00000000 00000e01 % .param SV_TessFactor.x, o0.x, float, TRIEDGE
% mov r0.x, vForkInstanceID.x 000000be 00000000 00000000 00000003 00000000 00000906 % .param X.yz, o0.yz, float
% mov o[r0.x + 0].x, l(1.000000) 000000b0 00000001 0000000d 00000003 00000001 00000e01 % .param SV_TessFactor1.x, o1.x, float, TRIEDGE
% ret 000000c0 00000000 00000000 00000003 00000001 00000d02 % .param Y.y, o1.y, float
% hs_fork_phase 000000b0 00000002 0000000d 00000003 00000002 00000e01 % .param SV_TessFactor2.x, o2.x, float, TRIEDGE
% dcl_output_siv o3.x, finalTriInsideTessFactor 000000c2 00000000 00000000 00000003 00000002 00000906 % .param Z.yz, o2.yz, float
% mov o3.x, l(1.000000) 000000c4 00000000 0000000e 00000003 00000003 00000e01 % .param SV_InsideTessFactor.x, o3.x,
% ret % float, TRIINT
% hs_fork_phase 545f5653 46737365 6f746361 00580072 005a0059 495f5653 6469736e %
% dcl_hs_fork_phase_instance_count 3 73655465 63614673 00726f74 %
% dcl_input vForkInstanceID 58454853 000001f0 00030050 0000007c % .text hs_5_0
% dcl_output o0.y 01000071 % hs_decls
% dcl_output o1.y 01001893 % dcl_input_control_point_count 3
% dcl_output o2.y 01001894 % dcl_output_control_point_count 3
% dcl_temps 1 01001095 % dcl_tessellator_domain domain_tri
% dcl_indexrange o0.y 3 01000896 % dcl_tessellator_partitioning partitioning_integer
% mov r0.x, vForkInstanceID.x 01001897 % dcl_tessellator_output_primitive output_triangle_cw
% mov o[r0.x + 0].y, l(0) 0100086a % dcl_globalFlags refactoringAllowed
% ret 01000073 % hs_fork_phase
% hs_fork_phase 02000099 00000003 % dcl_hs_fork_phase_instance_count 3
% dcl_hs_fork_phase_instance_count 2 0200005f 00017000 % dcl_input vForkInstanceId
% dcl_input vForkInstanceID 04000067 00102012 00000000 00000011 % dcl_output_siv o0.x, finalTriUeq0EdgeTessFactor
% dcl_output o0.z 04000067 00102012 00000001 00000012 % dcl_output_siv o1.x, finalTriVeq0EdgeTessFactor
% dcl_output o2.z 04000067 00102012 00000002 00000013 % dcl_output_siv o2.x, finalTriWeq0EdgeTessFactor
% dcl_temps 1 02000068 00000001 % dcl_temps 1
% dcl_indexrange o0.z 3 0400005b 00102012 00000000 00000003 % dcl_index_range o0.x 3
% ult r0.x, vForkInstanceID.x, l(1) 04000036 00100012 00000000 0001700a % mov r0.x, vForkInstanceId.x
% movc r0.x, r0.x, l(0), l(2) 06000036 00902012 0010000a 00000000 00004001 3f800000 % mov o[r0.x + 0].x, l(1.00000000e+00)
% mov o[r0.x + 0].z, l(0) 0100003e % ret
% ret 01000073 % hs_fork_phase
04000067 00102012 00000003 00000014 % dcl_output_siv o3.x, finalTriInsideTessFactor
43425844 d3d22934 2b8d40fb cc30d02f 0b5acd69 00000001 0000053c 00000006 05000036 00102012 00000003 00004001 3f800000 % mov o3.x, l(1.00000000e+00)
00000038 000000b0 0000013c 000001c8 000002a8 000004a0 46454452 00000070 0100003e % ret
00000000 00000000 00000000 0000003c 48530500 00000100 0000003c 31314452 01000073 % hs_fork_phase
0000003c 00000018 00000020 00000028 00000024 0000000c 00000000 7263694d 02000099 00000003 % dcl_hs_fork_phase_instance_count 3
666f736f 52282074 4c482029 53204c53 65646168 6f432072 6c69706d 31207265 0200005f 00017000 % dcl_input vForkInstanceId
2e302e30 31303031 36312e31 00343833 4e475349 00000084 00000004 00000008 03000065 00102022 00000000 % dcl_output o0.y
00000068 00000000 00000001 00000003 00000000 00000f0f 00000074 00000000 03000065 00102022 00000001 % dcl_output o1.y
00000000 00000003 00000001 00000101 00000078 00000000 00000000 00000003 03000065 00102022 00000002 % dcl_output o2.y
00000001 00000202 0000007e 00000000 00000000 00000003 00000001 00000404 02000068 00000001 % dcl_temps 1
505f5653 7469736f 006e6f69 00444552 45455247 4c42004e ab004555 4e47534f 0400005b 00102022 00000000 00000003 % dcl_index_range o0.y 3
00000084 00000004 00000008 00000068 00000000 00000001 00000003 00000000 04000036 00100012 00000000 0001700a % mov r0.x, vForkInstanceId.x
0000000f 00000074 00000000 00000000 00000003 00000001 00000e01 00000078 06000036 00902022 0010000a 00000000 00004001 00000000 % mov o[r0.x + 0].y, l(0)
00000000 00000000 00000003 00000001 00000d02 0000007e 00000000 00000000 0100003e % ret
00000003 00000001 00000b04 505f5653 7469736f 006e6f69 00444552 45455247 01000073 % hs_fork_phase
4c42004e ab004555 47534350 000000d8 00000007 00000008 000000b0 00000000 02000099 00000002 % dcl_hs_fork_phase_instance_count 2
0000000d 00000003 00000000 00000e01 000000be 00000000 00000000 00000003 0200005f 00017000 % dcl_input vForkInstanceId
00000000 00000906 000000b0 00000001 0000000d 00000003 00000001 00000e01 03000065 00102042 00000000 % dcl_output o0.z
000000c0 00000000 00000000 00000003 00000001 00000d02 000000b0 00000002 03000065 00102042 00000002 % dcl_output o2.z
0000000d 00000003 00000002 00000e01 000000c2 00000000 00000000 00000003 02000068 00000001 % dcl_temps 1
00000002 00000906 000000c4 00000000 0000000e 00000003 00000003 00000e01 0400005b 00102042 00000000 00000003 % dcl_index_range o0.z 3
545f5653 46737365 6f746361 00580072 005a0059 495f5653 6469736e 73655465 0600004f 00100012 00000000 0001700a 00004001 00000001 % ult r0.x, vForkInstanceId.x, l(1)
63614673 00726f74 58454853 000001f0 00030050 0000007c 01000071 01001893 09000037 00100012 00000000 0010000a 00000000 % movc r0.x, r0.x,
01001894 01001095 01000896 01001897 0100086a 01000073 02000099 00000003 00004001 00000000 00004001 00000002 % l(0), l(2)
0200005f 00017000 04000067 00102012 00000000 00000011 04000067 00102012 06000036 00902042 0010000a 00000000 00004001 00000000 % mov o[r0.x + 0].z, l(0)
00000001 00000012 04000067 00102012 00000002 00000013 02000068 00000001 0100003e % ret
0400005b 00102012 00000000 00000003 04000036 00100012 00000000 0001700a
06000036 00902012 0010000a 00000000 00004001 3f800000 0100003e 01000073
04000067 00102012 00000003 00000014 05000036 00102012 00000003 00004001
3f800000 0100003e 01000073 02000099 00000003 0200005f 00017000 03000065
00102022 00000000 03000065 00102022 00000001 03000065 00102022 00000002
02000068 00000001 0400005b 00102022 00000000 00000003 04000036 00100012
00000000 0001700a 06000036 00902022 0010000a 00000000 00004001 00000000
0100003e 01000073 02000099 00000002 0200005f 00017000 03000065 00102042
00000000 03000065 00102042 00000002 02000068 00000001 0400005b 00102042
00000000 00000003 0600004f 00100012 00000000 0001700a 00004001 00000001
09000037 00100012 00000000 0010000a 00000000 00004001 00000000 00004001
00000002 06000036 00902042 0010000a 00000000 00004001 00000000 0100003e
54415453 00000094 0000000c 00000001 00000000 00000004 00000000 00000000
00000001 00000004 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000006 00000001 00000000
00000000 0000000a 00000000 00000000 00000000 00000000 00000000 00000000
00000003 00000003 00000001 00000002 00000000 00000000 00000000
[domain shader] [domain shader]
struct data struct data