Commit Graph

5400 Commits

Author SHA1 Message Date
Conor McCarthy
e46de1daa2 tests/d3d12: Test resource flags for multisampled resources. 2024-04-10 08:55:09 -05:00
Stefan Dösinger
a7860ae752 vkd3d: Implement reopening existing caches. 2024-04-10 08:54:58 -05:00
Stefan Dösinger
f24005507c vkd3d: Implement opening and closing shader caches. 2024-04-10 08:54:58 -05:00
Stefan Dösinger
26387e1d4b tests: Add CreateShaderCacheSession pointer clearing tests.
Native's behavior is inconsistent. It sets the pointer to NULL when it
fails to open an existing cache due to a version mismatch, but leaves
the pointer untouched when the description fails validation.
2024-04-10 08:54:56 -05:00
Giovanni Mascellani
42f07352a0 ci: Build Mesa for release.
Otherwise it trips on a few failed assertions in d3d12.c.
2024-04-10 08:54:51 -05:00
Giovanni Mascellani
0be29f78c0 tests: Pop the test context when leaving its scope. 2024-04-10 08:54:51 -05:00
Giovanni Mascellani
59a5d8f852 tests: Add llvmpipe among the Mesa drivers. 2024-04-10 08:54:50 -05:00
Giovanni Mascellani
ecd38f3d1b tests: Print the device name. 2024-04-10 08:54:50 -05:00
Giovanni Mascellani
7cfb02cfd3 tests: Skip some tests that crash on llvmpipe. 2024-04-10 08:54:50 -05:00
Giovanni Mascellani
0b2ce5c13a tests: Mark some test failures as todo on llvmpipe. 2024-04-10 08:54:50 -05:00
Giovanni Mascellani
a2bb4ef301 vkd3d-shader/d3d-asm: Reset indent level on HS phases. 2024-04-10 08:54:29 -05:00
Conor McCarthy
cb5411408a vkd3d-shader/dxil: Implement DX intrinsic CalculateLOD. 2024-04-10 08:54:23 -05:00
Conor McCarthy
bdfa14d219 tests/hlsl: Add tests for CalculateLevelOfDetail().
Includes improvements made by Giovanni Mascellani.
2024-04-10 08:54:23 -05:00
Francisco Casas
e9559c394b vkd3d-shader/hlsl: Allow KW_PIXELSHADER and KW_VERTEXSHADER as stateblock lhs. 2024-04-10 08:54:23 -05:00
Francisco Casas
ef9ae22ed0 vkd3d-shader/hlsl: Store state block on pass variables. 2024-04-10 08:54:23 -05:00
Francisco Casas
a99bcb1196 vkd3d-shader/hlsl: Parse list of state blocks. 2024-04-10 08:54:23 -05:00
Francisco Casas
80320f6129 vkd3d-shader/hlsl: Introduce hlsl_ir_stateblock_constant. 2024-04-10 08:54:23 -05:00
Francisco Casas
ee0d439a1b vkd3d-shader/hlsl: Parse and store state blocks on variables. 2024-04-10 08:54:23 -05:00
Francisco Casas
73ef6907bc tests: Add tests for "compile" and CompileShader() syntax. 2024-04-10 08:54:23 -05:00
Francisco Casas
83f4b46fb1 tests: Add tests for fxgroup syntax. 2024-04-10 08:54:23 -05:00
Francisco Casas
00c8cf1bcc tests: Test function call syntax for state blocks. 2024-04-10 08:54:23 -05:00
Francisco Casas
9ede222714 tests: Add more state block syntax tests. 2024-04-10 08:54:23 -05:00
Francisco Casas
4dedcc5885 vkd3d-shader/hlsl: Also call dce before lowering deref paths. 2024-04-10 08:54:23 -05:00
Henri Verbeet
d1e16514d0 tests/test-driver: Avoid "head" with negative line count.
It's not supported on macOS, and not needed here.
2024-04-09 12:28:51 -05:00
Giovanni Mascellani
ca2f54e729 ci: Delimit building each commit with a collapsible section. 2024-04-09 12:28:10 -05:00
Francisco Casas
5ab1ef1cad vkd3d-shader/hlsl: Properly release string buffer on write_atan_or_atan2().
vkd3d_string_buffer_cleanup() doesn't do the same as
hlsl_release_string_buffer(). The former only frees the char array
inside the string buffer and not the string buffer itself.
2024-04-09 12:28:03 -05:00
Zebediah Figura
0e3377a1be vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
As the diffstat shows, HLSL_CLASS_OBJECT does not really have much in common.
Resource types (TEXTURE, SAMPLER, UAV) sometimes behave similarly to each other,
but do not generally behave similarly to effect-specific types (string, shader,
state, view). Most consumers of HLSL_CLASS_OBJECT subsequently check the base
type anyway.

Hence we want to replace HLSL_TYPE_* with individual classes for object types.
As a first step, change the last few places that only check HLSL_CLASS_OBJECT.
2024-04-09 12:27:55 -05:00
Zebediah Figura
269cdad7b9 vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
Regardless of the type of the variable.
2024-04-09 12:27:53 -05:00
Zebediah Figura
bdbf5e7d74 tests: Add more tests for manual packing. 2024-04-09 12:27:53 -05:00
Zebediah Figura
ce50c3a186 vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
Not all objects can be unbounded descriptors.
2024-04-09 12:27:51 -05:00
Zebediah Figura
083a58767a tests: Test HLSL unbounded array syntax.
Change the shader in test_unbounded_samplers() to also test a nested array.
Note that the changed shader compiles to the same bytecode.
2024-04-09 12:27:49 -05:00
Zebediah Figura
c5f507ac38 vkd3d-shader/hlsl: Add SM5.1 shader target strings. 2024-04-09 12:27:47 -05:00
Zebediah Figura
843968cd63 vkd3d-shader/hlsl: Use hlsl_version_ge() when checking for unbounded arrays.
6.x also allows them.
2024-04-09 12:27:45 -05:00
Zebediah Figura
5fbd2708c0 vkd3d-shader/hlsl: Move shader version helpers to hlsl.h. 2024-04-09 12:27:43 -05:00
Conor McCarthy
e72c3bab71 vkd3d-shader/spirv: Ensure the data register is UINT in spirv_compiler_emit_store_tgsm(). 2024-04-09 12:27:30 -05:00
Conor McCarthy
dc99159dd8 vkd3d-shader/spirv: Bitcast if necessary in spirv_compiler_emit_store_dst_components(). 2024-04-09 12:27:29 -05:00
Conor McCarthy
85c8c6be4d vkd3d-shader/dxil: Support constexpr GEP. 2024-04-09 12:27:26 -05:00
Conor McCarthy
7d5e3713f9 vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions. 2024-04-09 12:27:20 -05:00
Conor McCarthy
cfcd57209b vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses. 2024-04-09 12:27:19 -05:00
Conor McCarthy
1c61776c18 vkd3d-shader/spirv: Handle uint2 to double bitcast in spirv_compiler_emit_mov().
Necessary for MakeDouble if the dst is SSA.
2024-04-09 12:27:18 -05:00
Conor McCarthy
c8eb7e1c81 vkd3d-shader/spirv: Emit a uint result for RESINFO_UINT if the dst register is SSA. 2024-04-09 12:27:16 -05:00
Conor McCarthy
7bfc7410f2 vkd3d-shader/ir: Materialise phis to temps in the incoming blocks.
RADV converts temps to phi instructions, so converting phis to MOVC in
VSIR just translates back to phis feeding into a MOVC. This commit
eliminates the MOVC.
2024-04-09 12:27:15 -05:00
Francisco Casas
62bb12f322 vkd3d-shader/hlsl: Use LOGIC_AND instead of MUL in all(). 2024-04-09 12:27:09 -05:00
Francisco Casas
53e4d6eedb vkd3d-shader/hlsl: Use LOGIC_OR instead of BIT_OR in any().
Note that BIT_OR is not available for SM1 bools, so we must prefer
LOGIC_OR when possible.
2024-04-09 12:27:07 -05:00
Francisco Casas
2621fc9572 vkd3d-shader/ir: Add missing src swizzle in vsir_program_lower_texkills(). 2024-04-09 12:27:06 -05:00
Francisco Casas
808ec288cf tests: Add failing test for clip.shader_test in SM1.
We are not properly translating texkill to spir-v since it is only
considering the first component.
2024-04-09 12:27:04 -05:00
Francisco Casas
8fca801591 vkd3d-shader/tpf: Use the extra_bits field for _nz on discard. 2024-04-09 12:27:03 -05:00
Francisco Casas
3503145ced tests: Report missing signature element in openGL runner. 2024-04-09 12:27:03 -05:00
Francisco Casas
3a0a4b625f vkd3d-shader/hlsl: Merge HLSL_OP3_MOVC into HLSL_OP3_TERNARY. 2024-04-09 12:27:02 -05:00
Francisco Casas
8f6f875a59 vkd3d-shader/hlsl: Move lower of non-float expressions with the other SM1 passes. 2024-04-09 12:27:01 -05:00