On MSVC, building hybrid ARM64X images requires executing linker directly, with `-machine:arm64x` option, there is not way to use the compiler as a linker driver in such case.
Clang git version has `-marm64x` option now, which allows using it as a linker driver for ARM64X builds. This MR adds a similar option to winegcc and winebuild. For winegcc, we need to build spec file objects for both targets (native and EC). winebuild uses a new llvm-dlltool option `-N`, which works like MSVC lib.exe's `/defArm64Native` and allows passing .def files for both targets to generate a hybrid import library.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5478
I am still working on parsing the remaining features of the effects framework, such as the FX functions for the state block entries -- such as SetBlendState() -- and the "compile" and "Compileshader()" syntax. However, after adding the many tests included in 2/7 and reading the feedback from !708, I think that this first batch of patches are going in the right direction in terms of parsing the state blocks and how to represent them internally.
As Nikolay mentioned in https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708#note_64421 and https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708#note_64444 there are many types of state blocks entries, which should be identified for writing the effect metadata.
A part that may cause discussion on this series is that I kept the representation of `struct hlsl_state_block_entry` using a `hlsl_block` to keep it general enough to represent all these types of state block entries, thinking on later implementing a helper to identify which type of entry we are dealing with.
Even though, as Nikolay pointed out, the instruction set of fx shaders is different, I still think that HLSL IR should be enough to represent the rhs of state blocks, and hopefully we won't need to pollute it too much (apart from the introduction of hlsl_ir_undeclared_load in 4/7 to avoid creating a new variable) if we find operations that are fx-specific, since I intend to represent calls to FX functions with the same `struct hlsl_state_block_entry`, given that they cannot be called in regular HLSL code. There are many validations that are applied on regular HLSL that still should be applied to state blocks, such as the use of valid swizzles and the correct use of operators.
--
v5: vkd3d-shader/hlsl: Allow KW_PIXELSHADER and KW_VERTEXSHADER as stateblock lhs.
vkd3d-shader/hlsl: Store state block on pass variables.
vkd3d-shader/hlsl: Parse list of state blocks.
vkd3d-shader/hlsl: Introduce hlsl_ir_stateblock_constant.
vkd3d-shader/hlsl: Parse and store state blocks on variables.
tests: Add tests for "compile" and CompileShader() syntax.
tests: Add tests for fxgroup syntax.
tests: Test function call syntax for state blocks.
tests: Add more state block syntax tests.
vkd3d-shader/hlsl: Also call dce before lowering deref paths.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739
Found this after seeing test crashes caused by writing to adjacent
stack memory, corrupting it. Happened with "size + 1" tests.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5469
**Overview:**
Wine currently reports an exit code of zero for processes that terminate due to either of the following conditions:
- The Linux process that represents the Windows process receives a signal such as `SIGKILL` (e.g. due to a user manually killing the process, or the Linux OOM killer targeting the process due to memory pressure)
- The process fails to start because the image is a 32-bit executable and Wine has only been built with 64-bit support
Both of these scenarios represent failures, and so a non-zero exit code is appropriate. This patch ensures that an exit code of 1 is reported for these abnormal process termination edge cases.
**Underlying cause:**
The following logic flow occurs in the Wine server for typical process termination:
1. When a `process` object is created by the Wine server, its `exit_code` field is [set to an initial value](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.… of `STILL_ACTIVE`, and the `exit_code` field in each of its corresponding `thread` objects is [set to a default value of zero](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/thread.c?….
2. When a client process terminates, it sends a `terminate_process` protocol request to the server, and the handler [passes the specified exit code](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.c… to the `terminate_process()` function. This function sets the `is_terminating` field of the process object [to a value of 1](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.c?re…, and if the exit code is non-zero then it also [copies its value to each of the thread objects](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/proces… for the process.
3. The client process closes the pipe that it had been using to communicate with the server.
4. The server [detects the pipe close event](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.… and calls the `kill_process()` function, specifying a value of zero for the `violent_death` parameter.
5. The logic in the `kill_process()` function identifies this as a [normal termination on pipe close](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.…, and then subsequently calls the `kill_thread()` function to [kill each of the threads for the process](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/proces….
6. The `kill_thread()` function [then calls](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/thread.c… `remove_process_thread()`, which [copies the exit code from the last thread object](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process… to the `exit_code` field of the process object.
7. The final value of the `exit_code` field is [reported when responding](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/pro… to `get_process_info` protocol requests, [as sent by](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/dlls/ntdll/unix/pr… `NtQueryInformationProcess()`.
The abnormal process termination scenarios listed earlier will skip the `terminate_process` protocol request and immediately close the pipe. As a result, the `is_terminating` field of the process object will retain its default value of zero, and the `exit_code` field of each thread for the process will also remain at the default value of zero.
Since the logic in `process_poll_event()` always treats a pipe close event as a non-violent termination, `remove_process_thread()` will simply copy the exit code value of zero from the last thread into the process object, and this will then be reported when querying the process exit code.
**Fix details:**
The fix modifies `process_poll_event()` to check the value of the `is_terminating` field of the process object, and to treat a pipe close event as a violent termination if the value of the field is zero. This triggers the alternative code path in `kill_process()` that calls `terminate_process()` and [specifies an exit code value of 1](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/process.c?re…, which is copied to the thread objects and subsequently to the process object.
In my testing, only the abnormal process termination scenarios listed above result in the value of the `is_terminating` field being zero when the pipe is closed. In all other scenarios, I have observed the value to be 1 when the pipe close event is detected. Non-abnormal scenarios tested include ordinary process completion with both zero and non-zero exit codes, crashes in Windows processes due to unhandled exceptions, and ending processes via the Wine implementation of Task Manager.
--
v4: wineserver: Report non-zero exit code for abnormal process termination
https://gitlab.winehq.org/wine/wine/-/merge_requests/3908
--
v22: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use five clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
> This seems a little fragile.
I don't think it is that fragile, currently we handle directives in 3 points in run_shader_tests():
1. The first switch, where we detect that we stopped reading the block because a new block starts or the file ended.
2. The reading of the tags at the beginning of new blocks.
3. The reading of individual lines using a second switch.
We don't need to call update_line_number_context() in 1, and we always have to call it in 2 so we don't have to worry about forgetting to do so we add new functionalities.
It is only in 3 that we have to remember to call update_line_number_context() for the switch cases when we want to update the line number context for each line instead of presenting it at the beginning of the block, but even if we forget, the error will be reported at the beginning of the block because of 2.
> Could we just track the starting line for things touching "shader_source" and then setup/restore the test context in e.g. compile_shader()?
Here is a patch for that proposal (how I see it), but I find it more complex.
[0001-tests-shader-runner-Report-compilation-errors-on-the.patch](/uploads/02a5639e5c17c001d23e1d89105c949b/0001-tests-shader-runner-Report-compilation-errors-on-the.patch)
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/761#note_67306
Fixes some wow64 mode regressions introduced by commit 29c73ee17335b30f3f49c8b3562742c6a35b482c ("ntdll: Support more xstate features.").
That is actually covered by existing ntdll/tests/exception but there are a couple of tests (related to gs override) which crash those tests. Just in case, attaching an ad-hoc patch which comments out those and let the rest run (and succeed here in wow64 mode with these patches). Properly skipping those probably require Wine check I am afraid.
[test.patch](/uploads/9db61a514f4242add75e96cb9493e8c0/test.patch)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5473
This should fix audio issues for users with certain USB audio devices (possibly including the Creative Pebble V3 and RØDECaster Pro II).
The Core Audio UID can contain non-ASCII characters and is converted to UTF-8 by `unix_get_endpoint_ids`. But we were using `CFStringGetLength` to calculate the resulting size, which returns the length in UTF-16 code pairs. This resulted in any UIDs containing non-ASCII characters being truncated, `dev_id_from_device` later failing, and audio not working.
Instead use `CFStringGetBytes` to calculate the resulting UTF-8 size, and to do the conversion.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5472
This is a change from the default behavior in macdrv for as long as it's existed, as far as I can tell. Previously, gaining a dock icon was a one-way path. However, that doesn't jive with the way taskbar entries work on Windows; if an app has no windows, it doesn't appear in the taskbar. This patch attempts to remedy cases where an app winds up with superfluous dock icons for exe's that no longer have windows (looking at you, basically every launcher and Steam).
The major concern I can see with this is that if an app closes all of its windows but does not exit, there will be no indication that it is still running. Two thoughts on that:
1. That *should* be an anomalous case, such as the app hanging on exit.
2. Effectively the same behavior would happen on Windows.
I would love to hear any other thoughts about this change. I'm open (though I would not prefer it) to defaulting the registry key to false if that would alleviate any concerns.
--
v5: winemac.drv: Hide app's dock icon when it wouldn't have a taskbar item on Windows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5188
> > Which complications would those be?
>
> ResolveSubresource(), which I think we would also need in D3D12. It can be done but do we need it?
Well, get_resource_readback_with_command_list_and_states() already handles multi-sampled readback for d3d12, so that part should be fine. It doesn't seem especially complicated to add to the d3d11 runner either?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/734#note_67260
--
v21: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use five clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
vkd3d-shader/spirv: Support no-op signature elements.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
Fix to a sneaky memory leak.
* `hlsl_get_string_buffer()`/`vkd3d_string_buffer_get()` should go with `hlsl_release_string_buffer()`/`vkd3d_string_buffer_release()`.
* `vkd3d_string_buffer_init()` should go with `vkd3d_string_buffer_free()`, which only frees the internal `char *` of the string buffer.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/763
--
v4: vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
tests: Add more tests for manual packing.
vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
tests: Test HLSL unbounded array syntax.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/757
Overall this is simpler, results in less verbose SPIR-V code which is easier to debug, and eliminates stuttering issues in Horizon Zero Dawn when run in an SM 6 dev branch with Gio's cfg4 structuriser branch.
--
v8: vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions.
vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses.
vkd3d-shader/spirv: Handle uint2 to double bitcast in spirv_compiler_emit_mov().
vkd3d-shader/spirv: Emit a uint result for RESINFO_UINT if the dst register is SSA.
vkd3d-shader/ir: Materialise phis to temps in the incoming blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/749
Wine incorrectly inserts a sample copier. D3D awareness is handled per
node, and each node will have their own sample allocator created from
the D3D device manager provided by the session.
--
v2: mf/tests: Check that D3D aware attribute has no effect on the topology.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5464
This would eliminate the todo for the precise mad() test in !718. Maybe we need test results on nvidia and intel to decide if we actually want this.
--
v6: vkd3d-shader/ir: Implement MAD in two operations if flagged as precise.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/723
--
v33: vkd3d-shader/dxil: Validate shader properties operand counts.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/648
This would eliminate the todo for the precise mad() test in !718. Maybe we need test results on nvidia and intel to decide if we actually want this.
--
v5: vkd3d-shader/ir: Implement MAD in two operations if flagged as precise.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/723
This would eliminate the todo for the precise mad() test in !718. Maybe we need test results on nvidia and intel to decide if we actually want this.
--
v4: vkd3d-shader/spirv: Implement MAD in two operations if flagged as precise.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/723
These tests cover code paths untested in DXIL, except for the last commit which is to catch any signed int resource issues.
--
v2: tests/hlsl: Add tests for texture UAV signed atomics.
tests/hlsl: Add tests for texture UAV atomics.
tests/hlsl: Add a test for UAV InterlockedExchange().
tests/hlsl: Add a test for a structured UAV scalar store.
tests/hlsl: Add tests for min() and integer max().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/684
Follow up to !5342. This adds the last missing piece for fixing how `ShellExecute` finds files, and restore the ability of running native unix programs with `ShellExecute`
--
v4: shell32: Restore the ability of running native unix programs with ShellExecute
https://gitlab.winehq.org/wine/wine/-/merge_requests/5400
I'm working on adding all the intrinsics we haven't implemented yet. Here's sinh, cosh, and tanh.
Sinh/cosh are implemented in the same commit because they forward to the same backing function (because the identities used only differ by a plus or minus).
--
v3: vkd3d-shader/hlsl: Implement tanh.
vkd3d-shader/hlsl: Implement hyperbolic sin and cos.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/740
--
v4: vkd3d-shader/hlsl: Use LOGIC_AND instead of MUL in all().
vkd3d-shader/hlsl: Use LOGIC_OR instead of BIT_OR in any().
vkd3d-shader/ir: Add missing src swizzle in vsir_program_lower_texkills().
tests: Add failing test for clip.shader_test in SM1.
vkd3d-shader/tpf: Use the extra_bits field for _nz on discard.
tests: Report missing signature element in openGL runner.
vkd3d-shader/hlsl: Merge HLSL_OP3_MOVC into HLSL_OP3_TERNARY.
vkd3d-shader/hlsl: Move lower of non-float expressions with the other SM1 passes.
vkd3d-shader/hlsl: Ensure that TERNARY condition is always bool.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/744
I think this has proven to be problematic a couple of times already.
With this patch, if there is an error or a trace on `[pixel shader]` or similar
blocks, they get reported in the line with the tag at the beginning of
the block and no on the line where the next block starts.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/761
--
v20: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use five clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
vkd3d-shader/spirv: Support no-op signature elements.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
--
v3: vkd3d-shader/hlsl: Use LOGIC_AND instead of MUL in all().
vkd3d-shader/hlsl: Use LOGIC_OR instead of BIT_OR in any().
vkd3d-shader/ir: Add missing src swizzle in vsir_program_lower_texkills().
tests: Add failing test for clip.shader_test in SM1.
vkd3d-shader/tpf: Use the extra_bits field for _nz on discard.
tests: Report missing signature element in openGL runner.
vkd3d-shader/hlsl: Move lower of non-float expressions with the other SM1 passes.
vkd3d-shader/hlsl: Ensure that TERNARY condition is always bool.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/744
--
v3: vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
tests: Add more tests for manual packing.
vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
tests: Test HLSL unbounded array syntax.
vkd3d-shader/hlsl: Add SM5.1 shader target strings.
vkd3d-shader/hlsl: Use hlsl_version_ge() when checking for unbounded arrays.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/757
Another round of optimizations for the CFG structurizer. Here we begin getting rid of many of the loops that were generated during structurization to represent forward jumps, but that are better expressed with selection constructs when possible. More optimizations will follow.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/764
--
v31: vkd3d-shader/dxil: Disable support for hull shaders.
vkd3d-shader: Force enable all extensions, features and Vulkan 1.1.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/648
Show the window after setting layered attributes in macdrv_UpdateLayeredWindow().
This corresponds to a22dd45 for winex11.drv. Fix a regression from 8892b79, which
called set_window_pos() before calling USER_Driver->pUpdateLayeredWindow().
Fix Active Trader Pro doesn't show splash screen at startup on macOS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51984
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5466
Overall this is simpler, results in less verbose SPIR-V code which is easier to debug, and eliminates stuttering issues in Horizon Zero Dawn when run in an SM 6 dev branch with Gio's cfg4 structuriser branch.
--
v7: vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions.
vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses.
vkd3d-shader/spirv: Handle uint2 to double bitcast in spirv_compiler_emit_mov().
vkd3d-shader/spirv: Emit a uint result for RESINFO_UINT if the dst register is SSA.
vkd3d-shader/ir: Materialise phis to temps in the incoming blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/749
Wine incorrectly inserts a sample copier. D3D awareness is handled per
node, and each node will have their own sample allocator created from
the D3D device manager provided by the session.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5464
--
v2: vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
tests: Add more tests for manual packing.
vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
tests: Test HLSL unbounded array syntax.
vkd3d-shader/hlsl: Add SM5.1 shader target strings.
vkd3d-shader/hlsl: Move shader version helpers to hlsl.h.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/757
Overall this is simpler, results in less verbose SPIR-V code which is easier to debug, and eliminates stuttering issues in Horizon Zero Dawn when run in an SM 6 dev branch with Gio's cfg4 structuriser branch.
--
v6: vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions.
vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses.
vkd3d-shader/spirv: Handle uint2 to double bitcast in spirv_compiler_emit_mov().
vkd3d-shader/spirv: Emit a uint result for RESINFO_UINT if the dst register is SSA.
vkd3d-shader/ir: Materialise phis to temps in the incoming blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/749
Overall this is simpler, results in less verbose SPIR-V code which is easier to debug, and eliminates stuttering issues in Horizon Zero Dawn when run in an SM 6 dev branch with Gio's cfg4 structuriser branch.
--
v5: vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions.
vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses.
vkd3d-shader/spirv: Handle uint2 to double bitcast in spirv_compiler_emit_mov().
vkd3d-shader/spirv: Emit a uint result for RESINFO_UINT if the dst register is SSA.
vkd3d-shader/ir: Materialise phis to temps in the incoming blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/749
~~This applies on top of !711, the last three commits belong here.~~
This MR and the following ones will introduce a number of optimization passes on the structured representation of the shader, with the goal of fixing the idiosyncrasies of the code generated by the new structurizer. The general pattern is that we want to recognize when the combination of loops and jumps can be rather written with selection constructs. Ideally that should bring to removing all the synthesized loop intervals, but that cannot be guaranteed in general. We still want to do remove all the loops we can, first to make the generated code easier to read and to recompile, and second because having fewer loops also means that more multilevel jumps become ordinary single level jumps, which do not require overhead to be represented in SPIR-V.
--
v6: vkd3d-shader/ir: Synthesize selection constructs from conditional jumps.
vkd3d-shader/ir: Remove trailing `continue's.
vkd3d-shader/ir: Move `continue's to the false branch when possible.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/722
--
v2: vkd3d-shader/dxil: Disable support for hull shaders.
vkd3d-shader: Force enable all extensions, features and Vulkan 1.1.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/758
--
v30: vkd3d-shader/dxil: Disable support for hull shaders.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/648
--
v29: vkd3d-shader: Force enable all extensions, features and Vulkan 1.1.
vkd3d: Use long number format in vkd3d_tls_key_set_value().
vkd3d-shader/dxil: Emit a specific warning for explicit wave size.
vkd3d-shader/dxil: Emit a specific warning for RT acceleration structs.
vkd3d-shader/spirv: Implement the UNPACK_4X8 instruction.
vkd3d-shader/dxil: Implement DX intrinsic Unpack4x8.
vkd3d-shader/spirv: Implement the PACK_4X8 instruction.
vkd3d-shader/dxil: Implement DX intrinsic Pack4x8.
vkd3d-shader/dxil: Add a second pre-pass for AnnotateHandle.
vkd3d-shader/dxil: Implement DX intrinsics Dot4AddI8Packed and Dot4AddU8Packed.
vkd3d-shader/spirv: Introduce DP4_I8 and DP4_U8 instructions.
vkd3d-shader/spirv: Support bool comparisons.
vkd3d-shader/dxil: Support scalar ALLOCA.
vkd3d-shader/dxil: Handle resource handle creation in a pre-pass.
vkd3d-shader/dxil: Emit an error for mesh, amplification and library shaders.
vkd3d: Enable KHR_fragment_shader_barycentric.
vkd3d-shader/dxil: Support the barycentrics register type.
vkd3d: Enable EXT_shader_image_atomic_int64.
vkd3d-shader/spirv: Support 64-bit UAV atomics.
vkd3d-shader/dxil: Implement DX intrinsic WaveQuadReadLaneAt.
vkd3d-shader/dxil: Implement DX intrinsic WavePrefixOp.
vkd3d-shader/dxil: Ignore "llvm.lifetime.*" intrinsics.
vkd3d-shader/dxil: Implement DX intrinsic AnnotateHandle.
vkd3d-shader/dxil: Implement DX intrinsic CreateHandleFromBinding.
vkd3d-shader/dxil: Also set the result type for cast to minimum-precision.
vkd3d-shader/dxil: Handle forward-referenced GEP.
vkd3d-shader/ir: Do not validate SSA with a zero write mask.
vkd3d-shader/dxil: Ignore the auto binding space property.
vkd3d-shader/dxil: Handle constexpr pointer cast.
tests/shader-runner: Add a clip distance array test.
vkd3d-shader/ir: Transform clip/cull inputs/outputs for DXIL shaders also.
tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use five clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
vkd3d-shader/spirv: Support no-op signature elements.
vkd3d: Return DXGI_ERROR_NOT_FOUND from GetProtectedResourceSession().
vkd3d: Add ID3D12CommandList6 interface stubs.
vkd3d: Replace the descriptor object cache with a thread-local implementation.
vkd3d-shader/spirv: Apply the sequentially consistent ordering flag to atomic instructions.
vkd3d-shader/spirv: Handle in-bounds register indices.
vkd3d-shader/spirv: Trace instead of warn for alignment of indexable temps.
vkd3d-shader/spirv: Emit aligned register copies.
vkd3d-shader/spirv: Emit aligned register loads.
vkd3d-shader/dxil: Use a bool for tracking loop merge targets.
vkd3d-shader/dxil: Use a bool for tracking reachability.
vkd3d-shader/dxil: Use node visit flag in cfg_structuriser_insert_phi().
vkd3d-shader/dxil: Use node visit flag in cfg_structuriser_find_break_target_for_selection_construct().
vkd3d-shader/dxil: Use node visit flag in cfg_structuriser_traverse_dominated_blocks_and_rewrite_branch().
vkd3d-shader/dxil: Use node visit flag in cfg_structuriser_can_backtrace_to().
vkd3d-shader/dxil: Use node visit flag in sm6_block_post_dominates_any_work().
vkd3d-shader/dxil: Use node visit flag in sm6_block_reaches_backward_visited_node().
vkd3d-shader/dxil: Use node visit flag in the loop tracer.
vkd3d-shader/dxil: Use node visit flag in sm6_block_dominates_all_reachable_exits().
vkd3d-shader/dxil: Introduce helpers for allocating flags to track node visits.
vkd3d-shader/spirv: Emit interpolation mode for outputs.
vkd3d-shader/dxil: Fix eliminate_node_links_preds_to_succ for multiple uses of inner PHI.
vkd3d-shader/dxil: Don't add fake_succ if we already have a normal succ.
vkd3d-shader/dxil: Invent a ladder block if we have to in loops.
vkd3d-shader/dxil: Refactor ladder creation in find_loops.
vkd3d-shader/dxil: Never duplicate back-edges.
vkd3d-shader/dxil: Reconsider continue breaks if they can reach more normal break nodes.
vkd3d-shader/dxil: Handle breaking return constructs better.
vkd3d-shader/dxil: Consider switch blocks that branch to continue block.
vkd3d-shader/dxil: Consider duplicate branches when eliminating degenerates.
vkd3d-shader/dxil: Handle scenario where switch breaks out unexpectedly.
vkd3d-shader/dxil: Reduce switch merge scope when appropriate.
vkd3d-shader/dxil: Refactor traverse_dominated_blocks to always filter multi-access.
vkd3d-shader/dxil: Try harder to tie-break merge fixups with early return.
vkd3d-shader/dxil: Don't consider vestigal breaks to be break candidates.
vkd3d-shader/dxil: Fix backwards traversal of nested loops that are not reachable.
vkd3d-shader/dxil: Rewrite multiple back edges if needed.
vkd3d-shader/dxil: Consider that split merge blocks can be hidden in pred blocks.
vkd3d-shader/dxil: Fix CFG validation error after last SPIRV-Tools.
vkd3d-shader/dxil: Consider more scenarios where we need to introduce dummy case labels.
vkd3d-shader/dxil: Consider multiple impossible switch merge candidates.
vkd3d-shader/dxil: Fix a scenario where we need loop merge rather than selection merge.
vkd3d-shader/dxil: Fix bug in find_common_post_dominator_with_ignored_break.
vkd3d-shader/dxil: Avoid catastrophic cancellation of PHI nodes when merging PHI nodes.
vkd3d-shader/dxil: Emit non-sysval bool inputs/outputs as uint.
vkd3d-shader/dxil: Emit register minimum precision.
vkd3d-shader/spirv: Emit minimum precision decoration.
vkd3d: Use FIXME_ONCE in d3d12_command_list_WriteBufferImmediate().
vkd3d-shader/dxil: Implement DX instruction CBufferLoad.
vkd3d-shader/spirv: Support scalar constant buffer load.
tests/shader_runner: Test wave ops.
vkd3d-shader/dxil: Implement DX instruction WaveActiveAllEqual.
vkd3d-shader/spirv: Introduce a WAVE_ACTIVE_ALL_EQUAL instruction.
vkd3d-shader/spirv: Enable capability GroupNonUniform for wave inputs.
vkd3d-shader/dxil: Implement DX instruction WaveActiveBallot.
vkd3d-shader/spirv: Introduce a WAVE_ACTIVE_BALLOT instruction.
vkd3d-shader/main: Deduplicate dumped shaders.
vkd3d-shader/dxil: Implement DX instruction WaveQuadOp.
vkd3d-shader/dxil: Implement DX instructions WaveAllTrue and WaveAnyTrue.
vkd3d-shader/dxil: Implement DX instruction WaveGetLaneCount.
vkd3d-shader/spirv: Introduce WAVE_QUAD_OP_D/H/V instructions.
vkd3d-shader/spirv: Introduce WAVE_ALL_TRUE and WAVE_ANY_TRUE instructions.
vkd3d-shader/spirv: Introduce a WAVELANECOUNT register.
vkd3d: Use FIXME_ONCE for BeginEvent() and EndEvent().
tests: Introduce test compilation with dxc.
tests/d3d12: Introduce DXC compiled shader buffers and a dxc_compiler header.
vkd3d: Report highest shader model as 6.0.
vkd3d-shader/spirv: Do not warn if unhandled global flags are zero.
vkd3d-shader/spirv: Silence more global flag fixmes.
vkd3d-shader/dxil: Implement DX instruction WaveReadLaneAt.
vkd3d-shader/dxil: Implement DX instruction WaveIsFirstLane.
vkd3d-shader/dxil: Implement DX instruction WaveGetLaneIndex.
vkd3d-shader/dxil: Implement DX instruction WaveActiveBit.
vkd3d-shader/dxil: Implement DX instruction WaveActiveOp.
vkd3d-shader/dxil: Implement DX instructions WaveAllBitCount, WavePrefixBitCount and WaveReadLaneFirst.
vkd3d-shader/spirv: Introduce a WAVELANEINDEX register type.
vkd3d-shader/spirv: Introduce a WAVE_READ_LANE_AT instruction.
vkd3d-shader/spirv: Introduce a WAVE_IS_FIRST_LANE instruction.
vkd3d-shader/spirv: Introduce WAVE_ACTIVE_BIT_* and WAVE_ACTIVE_OP_* instructions.
vkd3d-shader/spirv: Introduce a WAVE_READ_LANE_FIRST instruction.
vkd3d-shader/spirv: Introduce WAVE_ALL_BIT_COUNT and WAVE_PREFIX_BIT_COUNT instructions.
vkd3d: Initialise wave ops feature options.
vkd3d-shader: Introduce a wave ops feature flag.
vkd3d: Use Vulkan 1.1 and SPIR-V 1.3.
vkd3d-shader/dxil: Implement DX instruction OutputControlPointID.
vkd3d-shader/dxil: Implement DX instruction DomainLocation.
vkd3d-shader/dxil: Implement DX instruction StorePatchConstant.
vkd3d-shader/dxil: Implement DX instructions LoadOutputControlPoint and LoadPatchConstant.
vkd3d-shader/dxil: Support patch constant functions and signatures.
vkd3d-shader/dxil: Implement DX instruction Discard.
vkd3d-shader/dxil: Implement DX instructions EmitStream, CutStream and EmitThenCutStream.
vkd3d-shader/dxil: Implement DX instruction SampleIndex.
vkd3d-shader/dxil: Implement DX instructions EvalSampleIndex and EvalCentroid.
vkd3d-shader/dxil: Implement DX instruction PrimitiveID.
vkd3d-shader/dxil: Implement DX instruction Coverage.
vkd3d-shader/dxil: Implement DX instruction RenderTargetGetSampleCount.
vkd3d-shader/dxil: Implement DX instructions Texture2DMSGetSamplePosition and RenderTargetGetSamplePosition.
vkd3d-shader/dxil: Implement DX instruction CalculateLOD.
vkd3d-shader/dxil: Implement DX instructions Dot2, Dot3 and Dot4.
vkd3d-shader/dxil: Implement DX instruction MakeDouble.
vkd3d-shader/spirv: Support VKD3DSI_PRECISE_XYZW for SINCOS.
vkd3d-shader/spirv: Support VKD3DSI_PRECISE_XYZW for GLSL extension instructions.
vkd3d-shader/spirv: Do not assert data type is uint in spirv_compiler_emit_store_uav_raw_structured().
vkd3d-shader/dxil: Support I/O registers.
vkd3d-shader/dxil: Load hull shader properties.
vkd3d-shader/dxil: Load domain shader properties.
vkd3d-shader/dxil: Load geometry shader properties.
vkd3d-shader/dxil: Implement a CFG structuriser.
vkd3d-shader/dxil: Implement the DXIL CMPXCHG instruction.
vkd3d-shader/spirv: Support forward-referenced value ids.
tests: Add SM 6 shader runner tests.
vkd3d: Implement aliasing barriers.
vkd3d: Support formats DXGI_FORMAT_B5G6R5_UNORM, DXGI_FORMAT_B5G5R5A1_UNORM and DXGI_FORMAT_B4G4R4A4_UNORM.
vkd3d: Support depth stencil formats for resources without ALLOW_DEPTH_STENCIL.
vkd3d-shader/spirv: Ensure the data register is UINT in spirv_compiler_emit_store_tgsm().
vkd3d-shader/spirv: Bitcast if necessary in spirv_compiler_emit_store_dst_components().
vkd3d-shader/dxil: Support constexpr GEP.
vkd3d-shader/spirv: Emit a warning if atomic RMW flags are unhandled.
vkd3d-shader/dxil: Implement the DXIL ATOMICRMW instruction.
vkd3d-shader/dxil: Implement DX instructions ThreadId, GroupId, ThreadIdInGroup and FlattenedThreadIdInGroup.
tests/shader-runner: Add TGSM tests.
vkd3d-shader/dxil: Emit an error if a constant code is unhandled.
vkd3d-shader/spirv: Support 64-bit register info component type in spirv_compiler_emit_load_reg().
vkd3d-shader/spirv: Do not assert if a TGSM store data register is not UINT.
vkd3d-shader/spirv: Do not assert if a TGSM load dst register is not UINT.
vkd3d-shader/spirv: Handle the PHI instruction.
vkd3d-shader/spirv: Introduce an UNREACHABLE instruction.
vkd3d-shader/spirv: Support 64-bit switch.
tests/shader-runner: Run Shader Model 6 tests in the crossbuild.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/648
The Mesa version in Debian bookworm (22.3.6) we use for testing is now a bit outdated. While it's valuable to test on older drivers because they might be more representative of what users are running, it's also useful to test on recent drivers, which gives a less noisy signal to developers.
For the moment we enable it only for llvmpipe, because RADV is already passing all the tests anyway. And we don't bother with 32 bit here.
On llvmpipe using Mesa 24 fixes three shader runner tests.
--
v4: ci: Run tests on llvmpipe from Mesa 24.0.3.
ci: Make llvmpipe from Mesa 24.0.3 available in the CI image.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/743
The Mesa version in Debian bookworm (22.3.6) we use for testing is now a bit outdated. While it's valuable to test on older drivers because they might be more representative of what users are running, it's also useful to test on recent drivers, which gives a less noisy signal to developers.
For the moment we enable it only for llvmpipe, because RADV is already passing all the tests anyway. And we don't bother with 32 bit here.
On llvmpipe using Mesa 24 fixes three shader runner tests.
--
v3: ci: Make llvmpipe from Mesa 24.0.3 available in the CI image.
ci: Run tests on llvmpipe from Mesa 24.0.3.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/743
> > Would it make sense to start namespacing options that only apply to some shader types or profiles? For example using `--fx-include-empty-buffers` or even `--fx4-include-empty-buffers`. Not necessarily this time, but maybe start thinking about it. Also for HLSL options, for example: `--hlsl-profile` and `--hlsl-semantic-compat-map` instead of what we have now.
>
> Broadly yes, although I don't think we should just remove the existing options; at best we could deprecate them and remove them from --help.
Sure, it wouldn't be appropriate to break command lines that now work, so the current options could be added as aliases of the prefixed ones.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/742#note_66784
~~This applies on top of !711, the last three commits belong here.~~
This MR and the following ones will introduce a number of optimization passes on the structured representation of the shader, with the goal of fixing the idiosyncrasies of the code generated by the new structurizer. The general pattern is that we want to recognize when the combination of loops and jumps can be rather written with selection constructs. Ideally that should bring to removing all the synthesized loop intervals, but that cannot be guaranteed in general. We still want to do remove all the loops we can, first to make the generated code easier to read and to recompile, and second because having fewer loops also means that more multilevel jumps become ordinary single level jumps, which do not require overhead to be represented in SPIR-V.
--
v5: vkd3d-shader/ir: Synthesize selection constructs from conditional jumps.
vkd3d-shader/ir: Remove trailing `continue's.
vkd3d-shader/ir: Move `continue's to the false branch when possible.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/722
Overall this is simpler, results in less verbose SPIR-V code which is easier to debug, and eliminates stuttering issues in Horizon Zero Dawn when run in an SM 6 dev branch with Gio's cfg4 structuriser branch.
--
v4: vkd3d-shader/ir: Materialise SSAs to temps before lowering switch instructions.
vkd3d-shader/ir: Convert SSAs to temps only if the block of origin does not dominate all uses.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/749
--
v3: vkd3d-shader/spirv: Ensure the data register is UINT in spirv_compiler_emit_store_tgsm().
vkd3d-shader/spirv: Bitcast if necessary in spirv_compiler_emit_store_dst_components().
vkd3d-shader/dxil: Support constexpr GEP.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/750