copy_propagation_transform_object_load() currently retrieves true, which
indicates that there was progress, even if the input dereference remains
the same.
This can happen repeatedly if an uninitialized object is copied onto
itself, as in the tests added in this patch. This results on the
compilation getting stuck on an endless loop.
This patch checks if the deref didn't change, to retrieve false in that
case.
--
v8: vkd3d-shader/hlsl: Avoid infinite loop and invalid derefs in copy-prop.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/59
copy_propagation_transform_object_load() currently retrieves true, which
indicates that there was progress, even if the input dereference remains
the same.
This can happen repeatedly if an uninitialized object is copied onto
itself, as in the tests added in this patch. This results on the
compilation getting stuck on an endless loop.
This patch checks if the deref didn't change, to retrieve false in that
case.
--
v7: vkd3d-shader/hlsl: Avoid infinite loop in copy propagation.
tests: Test correct copy-prop object replacement.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/59
The test for ISmbiosInformationStatics_get_SerialNumber is broken on Window 10 testbot VMs, presumably because they don't have a serial number? It results in an HRESULT of E_UNEXPECTED. I added a broken test case for it. I'm assuming that normal installations of Windows return a valid serial number or at least something like "Not Specified" and not NULL. Also, on my Linux OS running cat /sys/class/dmi/id/product_serial returns "To be filled by O.E.M". So I added a fallback to return 0 as the number. Or is it fine to just return whatever string is found?
On the Windows 8 VMs, the test crashes at line 75, hr = ISmbiosInformationStatics_get_SerialNumber( smbios_statics, &serial ). Not sure what I should do in this case. I was hoping for a flag that checks if the VM is Windows 8, but there doesn't seem to be one. Should I wrap the test in if (0) or is there an alternative way?
Another weird thing is the test fails prematurely on only the 32-bit version of debian11b, saying that the runtimeclass is not registered. I'm assuming it's an issue with the testbot. Debian11 32 bit runs fine.
--
v7: windows.system.profile.systemmanufacturers: Implement ISmbiosInformationStatics_get_SerialNumber.
windows.system.profile.systemmanufacturers/tests: Add ISmbiosInformationStatics_get_SerialNumber tests.
windows.system.profile.systemmanufacturers: Stub ISmbiosInformationStatics interface.
windows.system.profile.systemmanufacturers: Add stub DLL.
include: Add windows.system.profile.systemmanufacturers.idl file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1588
Today, test_reuseaddr() triggers a buffer overflow when accept()-ing an
IPv6 client due to the supplied peer name buffer (`struct sockaddr`)
being too small to hold an AF_INET6 address (`struct sockaddr_in6`).
Fix this by changing the type of `saddr` from `struct sockaddr` to
`struct sockaddr_storage`.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54376
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2026
> (The TlsIndex field in the LDR_DATA_TABLE_ENTRY structure appears to be unused except as a flag that the module has TLS (being always set to -1), at least as far back as Windows XP. It is worth mentioning that the WINE implementation of implicit TLS incorrectly uses TlsIndex as the real module TLS index, so it may be unreliable to assume that it is always -1 if you care about working on WINE.)
>
> \- http://www.nynaeve.net/?p=186
and the "links to that article but still doesn't work in wine" award goes to... [the D runtime](https://github.com/dlang/dmd/blob/6bf60ea0eb174631ede0074a77d3898d…! (Admittedly, there aren't too many ways to do what they're trying to do.)
With this, the D runtime will now work in Wine, even if in a dll loaded into an exe with no tls (which gets it the tls index 0)
~~The changes to the debugger are a bit icky, a possible alternative is to find some other easily-debugger-accessible place to stuff the tls index.~~ Resolved
--
v9: ntdll: TlsIndex should not actually contain tls indices
winedbg: Fix read access to variables with thread local storage.
winedbg: Track loaded modules
https://gitlab.winehq.org/wine/wine/-/merge_requests/1578
First relevant commit:
windows.media.speech: Add a worker thread to the recognition session.
--
v10: windows.media.speech: Store recorded audio in a temporary ringbuffer.
windows.media.speech: Partially implement the speech recognizer state.
windows.media.speech: Add an audio capturing system.
windows.media.speech: Allow the recognition session worker to be paused.
windows.media.speech/tests: Check if stopping the session resets the paused state.
windows.media.speech: Add a worker thread to the recognition session.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1948
--
v3: vbscript: Implement SID_GetCaller for QueryService.
vbscript: Add a ServiceProvider stub.
jscript: Implement SID_GetCaller for QueryService.
mshtml: Set SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION properly.
mshtml: Implement location props when there's no URI.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1733
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54353
There are two issues which the patchset is fixing:
1. Using cert's serial is not quite right, we need to hash full certificate contents as the check result depends on the other certificate data.
2. The check result also depends on revocation check parameters. I think currently it is only issuer certificate from the parameters which can affect the result which is cached.
--
v2: cryptnet: Also hash issuer cert for cache id.
cryptnet: Use cert data hash as cache id instead of serial number.
cryptnet: Cache revocation status in verify_cert_revocation().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2009
The last major feature for compute shader support.
The tests are a bit ad-hoc, and ideally would be extended beyond d3d12. The
nonuniform readback is what makes this difficult.
My plan is to refactor the shader runner so that it exposes an interface usable
both from a file interpreter frontend and also directly from C code. That would
allow, in this case, declaring the shaders and drawing as a shader_test file
would, but then making use of C loops to test the readback. It would also make
it generally easier to port loop-based tests in e.g. d3d12.c.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/64
Allowing the job to fail to avoid failing the pipeline. Some new tests
are failing with it, and some are succeeding todo_wine.
--
v2: gitlab: Run user32 32-bit tests with nulldrv driver.
user32/tests: Update todos specific to the X11 display driver.
user32/tests: Check graphics driver and add todos for nulldrv.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1259
> I do think that as a matter of principle having test coverage for the different intrinsics we implement is simply a good idea. These tests don't necessarily need to be complicated; see e.g. "sqrt.shader_test" for a straightforward example.
For the record, at some point I duplicated some tests so that both the constant folding path and the real codegen path would be tested. See for example `arithmetic-float.shader_test` vs `arithmetic-float-uniform.shader_test`. It wouldn't probably be a bad idea to make that more systematic, but I agree that's not a requirement for this MR. Just saying.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/68#note_21781
The PE build of vkd3d uses Windows critical sections for synchronisation, and
these slow down on the very high lock/unlock rate during multithreaded
descriptor copying in Shadow of the Tomb Raider. This patch speeds up the
demo by about 8%. By comparison, using SRW locks in the allocators and
locking them for read only where applicable is about 4% faster.
--
v3: vkd3d: Store a heap array index in each CBV/SRV/UAV descriptor.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/67
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54353
There are two issues which the patchset is fixing:
1. Using cert's serial is not quite right, we need to hash full certificate contents as the check result depends on the other certificate data.
2. The check result also depends on revocation check parameters. I think currently it is only issuer certificate from the parameters which can affect the result which is cached.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2009
> (The TlsIndex field in the LDR_DATA_TABLE_ENTRY structure appears to be unused except as a flag that the module has TLS (being always set to -1), at least as far back as Windows XP. It is worth mentioning that the WINE implementation of implicit TLS incorrectly uses TlsIndex as the real module TLS index, so it may be unreliable to assume that it is always -1 if you care about working on WINE.)
>
> \- http://www.nynaeve.net/?p=186
and the "links to that article but still doesn't work in wine" award goes to... [the D runtime](https://github.com/dlang/dmd/blob/6bf60ea0eb174631ede0074a77d3898d…! (Admittedly, there aren't too many ways to do what they're trying to do.)
With this, the D runtime will now work in Wine, even if in a dll loaded into an exe with no tls (which gets it the tls index 0)
The changes to the debugger are a bit icky, a possible alternative is to find some other easily-debugger-accessible place to stuff the tls index.
--
v8: ntdll: TlsIndex should not actually contain tls indices
winedbg: Fix read access to variables with thread local storage.
winedbg: Track loaded modules
https://gitlab.winehq.org/wine/wine/-/merge_requests/1578
Vectors cannot be used as array indexes, however, single-component
swizzles (such as vec.x) can be used.
This suggests that single-component swizzles should actually be
scalars and not vectors of dimx = 1.
It is worth noting that the use of swizzles on scalars should still
be allowed.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/70
First part of v2 of !27, which aims to:
* Allow allocation of variables of complex types that contain both numerics and objects across multiple register sets (regsets).
* Support the tex2D and tex3D intrinsics, inferring generic samplers dimension from usage, writing sampler declarations, and writing sample instructions.
* Support for arrays of resources for both SM1 and SM4 (not to be confused with the resource-arrays of SM 5.1, which can have non-constant indexes).
* Support for resources declared within structs.
* Support for synthetic combined samplers for SM1 and synthetic separated samplers for SM4, considering that they can be arrays or members of structs.
* Imitate the way the native compiler assigns the register indexes of the resources on allocation, which proved to be the most difficult thing.
* Support for object components within complex input parameters.
* Small fixes to corner cases.
This part consists on parsing the `tex2D()` and `tex3D()` intrinsics and beginning to support the allocation of variables across multiple regsets.
The whole series, is on my [master6](https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6) branch.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/66
The PE build of vkd3d uses Windows critical sections for synchronisation, and
these slow down on the very high lock/unlock rate during multithreaded
descriptor copying in Shadow of the Tomb Raider. This patch speeds up the
demo by about 8%. By comparison, using SRW locks in the allocators and
locking them for read only where applicable is about 4% faster.
--
v2: vkd3d: Store a heap array index in each CBV/SRV/UAV descriptor.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/67
MemAvailable field in /proc/meminfo appeared in Linux kernel around 2015 and is recommended way to query free RAM. The way we currently estimate it consistently reports more free RAM available.
The old way of estimating free RAM should still work if MemAvailable field is not there.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2013
session_request_sample() calls session_request_sample_from_node() and increments sink.requests only if that succeeds. But session_request_sample_from_node() calls session_deliver_sample_to_node() synchronously for MF_TOPOLOGY_TRANSFORM_NODE if there are output samples available. Then, if sink.requests is zero before this session_request_sample() call that sample is silently dropped.
It might not be easily noticeable currently, but I have a patchset which implements _ProcessMessage(MFT_MESSAGE_COMMAND_DRAIN) needed for some games (and also improving end of playback by fully delivering output including few last frames). And currently if session_deliver_sample_to_node() performs drain and that drain produces any samples we get a data sample processed but end marker silently dropped resulting in hanging session. That market gets to session_request_sample / session_request_sample_from_node but gets dropped in session_deliver_sample_to_node due to the reason first patch is fixing.
Thus also the second patch. I am not sure it is strictly needed, but the current handling of that seems fragile to me, I suppose we shouldn't ever drop markers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2012
First relevant commit:
windows.media.speech: Add a worker thread to the recognition session.
--
v9: windows.media.speech: Store recorded audio in a temporary ringbuffer.
windows.media.speech: Partially implement the speech recognizer state.
windows.media.speech: Add an audio capturing system.
windows.media.speech: Allow the recognition session worker to be paused.
windows.media.speech/tests: Check if stopping the session resets the paused state.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1948
First relevant commit:
windows.media.speech: Add a worker thread to the recognition session.
--
v8: windows.media.speech: Store recorded audio in a temporary ringbuffer.
windows.media.speech: Partially implement the speech recognizer state.
windows.media.speech: Add an audio capturing system.
windows.media.speech: Allow the recognition session worker to be paused.
windows.media.speech/tests: Check if stopping the session resets the paused state.
windows.media.speech: Add a worker thread to the recognition session.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1948
Fixes Escape of Monkey Islands crashing on start with two monitors (it enumerates too many devices and accesses something out of bound, while better caps let it filter out unneeded devices).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2008
To avoid a crash on DLL unload if it wasn't initialized.
Found while running the kernel32:loader tests with warn+heap (somehow?). The dwrite DLL is unloaded before the list has been initialized and it crashes, failing some tests.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2005
SPIR-V doesn't support parallelisation in patch constant functions.
Merging into one phase allows generation of a single patch constant
function and normalises to the shader model 6 pattern.
--
v6: vkd3d-shader/spirv: Pass a parser pointer to spirv_compiler_generate_spirv().
vkd3d-shader/sm4: Use the instruction array interface in compile_dxbc_tpf().
vkd3d-shader/glsl: Use the instruction array interface in vkd3d_glsl_generator_generate().
vkd3d-shader: Use the instruction array interface in scan_with_parser().
vkd3d-shader/trace: Use the instruction array interface in vkd3d_dxbc_binary_to_text().
vkd3d-shader: Initialise the instruction array in vkd3d_shader_parser_init().
vkd3d-shader/sm4: Store parsed instructions in an array.
vkd3d-shader/sm1: Store parsed instructions in an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/60
Today, the Rich Edit control handles the WM_IME_STARTCOMPOSITION message
by the computing the composition start position (imeStartIndex) _before_
calling ME_DeleteSelection(), which shifts the character positions after
the range of deletion. If the selection were not empty, imeStartIndex
immediately becomes stale, since it does not take into account the
number of deleted characters before it.
Fix this by computing imeStartIndex after the ME_DeleteSelection() call.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54318
cc/ @aricstewart (has no Developer access to wine/wine; cannot be assigned as a reviewer yet)
--
v2: riched20: Obtain the composition start index after deleting selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2001
The pointer might be freed by RPC NdrPointerFree, which will try to use
a dedicated free call for the array elements, and fail.
Found by running advapi32:service test with warn+heap.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2007
The PE build of vkd3d uses Windows critical sections for synchronisation, and
these slow down on the very high lock/unlock rate during multithreaded
descriptor copying in Shadow of the Tomb Raider. This patch speeds up the
demo by about 8%. By comparison, using SRW locks in the allocators and
locking them for read only where applicable is about 4% faster.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/67
Today, the Rich Edit control handles the WM_IME_STARTCOMPOSITION message
by the computing the composition start position (imeStartIndex) _before_
calling ME_DeleteSelection(), which shifts the character positions after
the range of deletion. If the selection were not empty, imeStartIndex
immediately becomes stale, since it does not take into account the
number of deleted characters before it.
Fix this by computing imeStartIndex after the ME_DeleteSelection() call.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54318
cc/ @aricstewart (has no Developer access to wine/wine; cannot be assigned as a reviewer yet)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2001
## Summary
Tests for UrlFixupW and semi stub function implementaion.
## Test results
- Tests are 100% ok on my local WIN 10 pc. Wine test bot seems to be okay too.
- Wine tests on debian machine
| function type | result |
| ------ | ------ |
| stub | 0020:url: 69802 tests executed (0 marked as todo, 0 as flaky, **200** failures), 0 skipped. |
| semi stub| 0020:url: 69802 tests executed (0 marked as todo, 0 as flaky, **100** failures), 0 skipped. |
## Todos
For follow up merge request(s).
- [ ] Add more tests for priority investigation, who url scheme fix up is working on windows.
- [ ] Implement missing parts of fix up.
## Conclusion
Semi stub implementation is an improvement to the existing solution. A grep showed that wine internals do not call this function, therefore it should not introduce any new bugs. Windows applications using/relying on the function should now work better, if not they may reveal already existing bugs.
--
v5: shlwapi: fixup leading and trailing typos in UrlFixupW
shlwapi: check for colon in UrlFixupW
kernelbase: Restructure UrlFixupW()
shlwapi/tests: Add tests for UrlFixupW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825
First relevant commit:
windows.media.speech: Add a worker thread to the recognition session.
--
v7: windows.media.speech: Store recorded audio in a temporary ringbuffer.
windows.media.speech: Partially implement the speech recognizer state.
windows.media.speech: Add an audio capturing system.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1948
Call MoveFileWithProgress from MoveFileTransacted such that the stub functions.
This enables saving for Affinity Photo.
--
v5: kernel32: Unstub MoveFileTransactedW, Use MoveFileWithProgressW
https://gitlab.winehq.org/wine/wine/-/merge_requests/1444
If a hlsl_ir_load loads a variable whose components are stored from different
instructions, copy propagation doesn't replace it.
But if all these instructions are constants (which currently is the case
for value constructors), the load can be replaced with a constant value, which
is what the first patch of this series does.
For instance, this shader:
```
sampler s;
Texture2D t;
float4 main() : sv_target
{
return t.Gather(s, float2(0.6, 0.6), int2(0, 0));
}
```
results in the following IR before applying the patch:
```
float | 6.00000024e-01
float | 6.00000024e-01
uint | 0
| = (<constructor-2>[@4].x @2)
uint | 1
| = (<constructor-2>[@6].x @3)
float2 | <constructor-2>
int | 0
int | 0
uint | 0
| = (<constructor-5>[@11].x @9)
uint | 1
| = (<constructor-5>[@13].x @10)
int2 | <constructor-5>
float4 | gather_red(resource = t, sampler = s, coords = @8, offset = @15)
| return
| = (<output-sv_target0> @16)
```
and this IR afterwards:
```
float2 | {6.00000024e-01 6.00000024e-01 }
int2 | {0 0 }
float4 | gather_red(resource = t, sampler = s, coords = @2, offset = @3)
| return
| = (<output-sv_target0> @4)
```
This is required to write texel_offsets as aoffimmi modifiers in the sm4 backend, since it expects the texel_offset arguments to be hlsl_ir_constant.
This series also:
* Allows Gather() methods to use aoffimmi modifiers instead of an additional source register (which is the only way allowed for shader model 4.1), when possible.
* Adds support to texel_offsets in the Load() method via aoffimmi modifiers (the only allowed method).
--
v10: vkd3d-shader/hlsl: Fold swizzle chains.
vkd3d-shader/hlsl: Apply copy propagation to swizzled loads.
vkd3d-shader/hlsl: Use aoffimmis when writing gather resource loads.
vkd3d-shader/hlsl: Replace loads with constants in copy prop.
vkd3d-shader/hlsl: Synthesize the swizzle and replace the instruction inside of copy_propagation_compute_replacement().
vkd3d-shader/hlsl: Call copy_propagation_get_value() directly in copy_propagation_transform_object_load().
vkd3d-shader/hlsl: Add some swizzle manipulation definitions.
tests: Test constant propagation through swizzles.
vkd3d-shader/hlsl: Support offset argument for the texture Load() method.
tests: Test offset argument for the texture Load() method.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/51