On Tue Mar 12 13:33:27 2024 +0000, Alfred Agrell wrote:
> If the mismatch is just compressed/uncompressed, then that's supposed to happen.
> If they are indeed switching audio/video, then yes, they probably got
> rearranged, and that does indeed sound like a bug. I didn't run into any
> such trouble during my testing, but that may just have been my testing
> being limited.
> I never checked how those Unix-side streams are created, so I'm not sure
> how that part should be solved. One solution would be to check the
> streams' media types, compare to the expected type, and swap if
> mismatched, but I don't know if it's the best answer; there may be a
> better solution somewhere deeper inside winegstreamer.
I spotted the problem. In `init_stream`:
```c
stream->wg_stream = wg_parser_get_stream(reader->wg_parser, reader->stream_count - i - 1);
```
vs `reinit_stream`:
```c
stream->wg_stream = wg_parser_get_stream(reader->wg_parser, i);
```
Though indeed the order of the streams is not guaranteed to stay the same (as per @rbernon)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64412
On Tue Mar 12 13:07:01 2024 +0000, Yuxuan Shui wrote:
> Like one is audio the other is video kind of mismatch.
If the mismatch is just compressed/uncompressed, then that's supposed to happen.
If they are indeed switching audio/video, then yes, they probably got rearranged, and that does indeed sound like a bug. I didn't run into any such trouble during my testing, but that may just have been my testing being limited.
I never checked how those Unix-side streams are created, so I'm not sure how that part should be solved. One solution would be to check the streams' media types, compare to the expected type, and swap if mismatched, but I don't know if it's the best answer; there may be a better solution somewhere deeper inside winegstreamer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64410
On Tue Mar 12 13:05:23 2024 +0000, Yuxuan Shui wrote:
> So what I am seeing is PE-side `reader->stream[i].format` and Unix-side
> wg_parser `stream[i].preferred_format` mismatch after reinit.
> I think the streams probably got re-ordered during reinit.
Like one is audio the other is video kind of mismatch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64405
On Tue Mar 12 12:58:04 2024 +0000, Yuxuan Shui wrote:
> oh, right. sorry i got the streams mixed up
So what I am seeing is PE-side `reader->stream[i].format` and Unix-side wg_parser `stream[i].preferred_format` mismatch after reinit.
I think the streams probably got re-ordered during reinit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64404
On Tue Mar 12 12:22:57 2024 +0000, Alfred Agrell wrote:
> `wg_parser_disconnect` and `wg_parser_destroy` frees the Unix-side
> streams. `reader->streams` is PE-side, and is not affected by wg_parser_disconnect/destroy.
oh, right. sorry i got the streams mixed up
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64403
This applies on top of !698, the last three commits belong here.
Here we reconstruct an internal representation of a structured program corresponding to the input CFG. The representation can be directly emitted (which will be the following MR) or other passes can be run on it to simplify the loop structure.
--
v2: vkd3d-shader/ir: Dump the reconstructed structured program.
vkd3d-shader/ir: Add jumps to the structured programs.
vkd3d-shader/ir: Reconstruct a structured program.
vkd3d-shader/ir: Sort loop intervals.
vkd3d-shader/ir: Generate synthetic intervals for forward edges.
vkd3d-shader/ir: Compute loop as intervals of the block order.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/704
On Tue Mar 12 12:12:59 2024 +0000, Yuxuan Shui wrote:
> @Alcaro `wg_parser_disconnect` frees all the streams
`wg_parser_disconnect` and `wg_parser_destroy` frees the Unix-side streams. `reader->streams` is PE-side, and is not affected by wg_parser_disconnect/destroy.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_64390