Udev monitor monitors the whole input subsystem, but not all devices
in the input subsystem have devnodes associated to them.
This MR makes the event processing ignore such devices.
All device handling assumes devices have devnodes, so here we just
simply ignore all devices which do not have one. They are irrelevant.
Previously, udev bus thread aborted when an event for a device without
a devnode was processed:
```
10111.330:0068:0084:trace:hid:process_monitor_event Received action "remove" for udev device (null)
10111.330:0068:0084:warn:hid:bus_main_thread L"UDEV" bus wait returned status 0xc0000005
```
Just plugging in and out a normal mouse was enough cause this.
This was because root input devices (which do not have devnodes) were
handled too and `find_device_from_devnode()` choked on NULL argument.
--
v3: winebus: change debugging class of an error case from WARN to ERR.
winebus: change debugging class of an error case from FIXME to ERR
winebus: group local variable declarations
winebus: ignore udev events of devices which do not have devnodes
winebus: log ERR if find_device_from_devnode() somehow gets called with NULL
https://gitlab.winehq.org/wine/wine/-/merge_requests/5385
Udev monitor monitors the whole input subsystem, but not all devices
in the input subsystem have devnodes associated to them.
This MR makes the event processing ignore such devices.
All device handling assumes devices have devnodes, so here we just
simply ignore all devices which do not have one. They are irrelevant.
Previously, udev bus thread aborted when an event for a device without
a devnode was processed:
```
10111.330:0068:0084:trace:hid:process_monitor_event Received action "remove" for udev device (null)
10111.330:0068:0084:warn:hid:bus_main_thread L"UDEV" bus wait returned status 0xc0000005
```
Just plugging in and out a normal mouse was enough cause this.
This was because root input devices (which do not have devnodes) were
handled too and `find_device_from_devnode()` choked on NULL argument.
--
v2: winebus: group local variable declarations
https://gitlab.winehq.org/wine/wine/-/merge_requests/5385
Udev monitor monitors the whole input subsystem, but not all devices
in the input subsystem have devnodes associated to them.
This MR makes the event processing ignore such devices.
All device handling assumes devices have devnodes, so here we just
simply ignore all devices which do not have one. They are irrelevant.
Previously, udev bus thread aborted when an event for a device without
a devnode was processed:
```
10111.330:0068:0084:trace:hid:process_monitor_event Received action "remove" for udev device (null)
10111.330:0068:0084:warn:hid:bus_main_thread L"UDEV" bus wait returned status 0xc0000005
```
Just plugging in and out a normal mouse was enough cause this.
This was because root input devices (which do not have devnodes) were
handled too and `find_device_from_devnode()` choked on NULL argument.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5385
This is a heavily simplified version of Michael Müller's staging patch
(the staging version got broken by the PE/Unix split)
I rebased that staging patch but I thought it was too big for what it
does (so I did this instead)
As for automatically changing the status, SM_MEDIACENTER would require
Windows version checks (which are never used in Wine) and SM_TABLETPC
would likely require touchscreen/tablet detection (rbernon is working
on some touch stuff so that could be useful)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5234
Part 1 of a set of changes for making the recording of highlights and "Play of the Game"s to mp4 in Overwatch work.
This MR contains most of the required IMFMediaSink changes.
--
v4: winegstreamer: Avoid an assert in Gstreamer code.
mfplat: Return NULL for *stream_sink on error in IMFMediaSink::AddStreamSink.
mfplat: Accept any media types without a MF_MT_USER_DATA attribute in MFCreateWaveFormatExFromMFMediaType.
mf/tests: Add test for MEStreamSinkStarted and MEStreamSinkRequestSample events.
winegstreamer: Add support for ADTS container format (.aac files).
winegstreamer: Request new samples after starting media sink and after processing a sample.
mf/tests: Test media sink creation with a media type without MF_MT_USER_DATA attribute.
winegstreamer: Generate AAC codec data if not provided in a media type.
winegstreamer: Implement IMFStreamSink::IMFMediaTypeHandler.GetMajorType.
winegstreamer: Copy media type instead of returning a reference in IMFStreamSink::IMFMediaTypeHandler.GetCurrentMediaType.
winegstreamer: Implement IMFMediaSink::GetPresentationClock.
winegstreamer: Implement IMFMediaSink::SetPresentationClock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5159
On Mon Mar 25 12:06:39 2024 +0000, Nikolay Sivov wrote:
> It is correct. We should check for negative values only. Constant
> evaluated expressions are not allowed.
We should have tests for that then; I don't think we do currently.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_66028
When present, the aperture indicates the area of the sample's buffers to display. The frame size instead includes some undesired padding. This is the case when color planes are aligned, such as with YUV output from a decoder MFT.
--
v3: evr/mixer: Respect input media type MF_MT_GEOMETRIC_APERTURE.
evr/tests: Add more video mixer input media type aperture tests.
evr/tests: Split check_presenter_output to a separate helper.
evr/tests: Split create_d3d_sample to a separate helper.
mf/tests: Check that pan scan and geometric apertures are set.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5297
When present, the aperture indicates the area of the sample's buffers to display. The frame size instead includes some undesired padding. This is the case when color planes are aligned, such as with YUV output from a decoder MFT.
--
v2: evr/mixer: Respect input media type MF_MT_GEOMETRIC_APERTURE.
evr/tests: Add more video mixer input media type aperture tests.
evr/tests: Split check_presenter_output to a separate helper.
evr/tests: Split create_d3d_sample to a separate helper.
mf/tests: Check that pan scan and geometric apertures are set.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5297
With some intermediate refactoring to make the code simpler.
I believe the failures that happened previously were coming from how NtGdiDdDDIOpenAdapterFromLuid initialized desc->hAdapter in win32u while winex11 was then relying on it. I missed this detail before and it should be working fine now that the vulkan path is only used to retrieve the physical device.
--
v3: win32u: Move D3DKMT vulkan implementation out of winex11.
winex11: Introduce a new find_adapter_from_handle helper.
winex11: Introduce a new get_vulkan_physical_device helper.
winex11: Initialize D3DKMT vulkan instance only once.
win32u: Open adapters in NtGdiDdDDIEnumAdapters2 outside of the display devices lock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5306
On Fri Mar 22 21:12:59 2024 +0000, Zebediah Figura wrote:
> You could probably avoid the duplication with a separate "%empty |
> [int]" rule. Or alternatively use "arrays" and add an explicit check for
> count > 1.
> Is C_INTEGER correct here, or should we allow compile-time constants?
It is correct. We should check for negative values only. Constant evaluated expressions are not allowed.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65991
This is a split from MR3572. It's needed for Underworld Island (2150830) video seeking.
Changes compared to the patches in MR3572:
1. Avoid making session state changes when in paused state.
2. Add tests to show that the MF_MEDIA_ENGINE_EVENT_SEEKING notification is most likely blocking because notify->seeking_event_received is TRUE right after a SetCurrentTime() call. Same for MF_MEDIA_ENGINE_EVENT_TIMEUPDATE when in paused state.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5130
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v28: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
--
v7: explorer: Restore display settings on process exit.
winex11.drv: Process RRNotify events in xrandr14_get_id.
user32/tests: Test that display settings are restored on process exit.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060
With some intermediate refactoring to make the code simpler.
I believe the failures that happened previously were coming from how NtGdiDdDDIOpenAdapterFromLuid initialized desc->hAdapter in win32u while winex11 was then relying on it. I missed this detail before and it should be working fine now that the vulkan path is only used to retrieve the physical device.
--
v2: win32u: Move D3DKMT vulkan implementation out of winex11.
winex11: Introduce a new find_adapter_from_handle helper.
winex11: Introduce a new get_vulkan_physical_device helper.
winex11: Initialize D3DKMT vulkan instance only once.
win32u: Open adapters in NtGdiDdDDIEnumAdapters2 outside of the display devices lock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5306
Brendan Shanks (@bshanks) commented about configure.ac:
> WINE_CHECK_SONAME(vulkan, vkGetInstanceProcAddr)
> if test "x$ac_cv_lib_soname_vulkan" = "x"
> then
> - WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr)
> + WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr, [AC_DEFINE_UNQUOTED(SONAME_LIBVULKAN,[$ac_cv_lib_soname_MoltenVK])])
This is causing build errors for me:
```
../dlls/win32u/vulkan.c:91:35: error: use of undeclared identifier 'libMoltenVK'
if (!(vulkan_handle = dlopen( SONAME_LIBVULKAN, RTLD_NOW )))
^
include/config.h:773:26: note: expanded from macro 'SONAME_LIBVULKAN'
#define SONAME_LIBVULKAN libMoltenVK.dylib
^
../dlls/win32u/vulkan.c:93:37: error: use of undeclared identifier 'libMoltenVK'
ERR( "Failed to load %s\n", SONAME_LIBVULKAN );
^
include/config.h:773:26: note: expanded from macro 'SONAME_LIBVULKAN'
#define SONAME_LIBVULKAN libMoltenVK.dylib
^
2 errors generated.
make[1]: *** [dlls/win32u/vulkan.o] Error 1
```
I think quotes are needed around `$ac_cv_lib_soname_MoltenVK`, that results in `SONAME_LIBVULKAN` being correctly quoted.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5365#note_65955
Actual issue is uninitialized has_gpos_attachment flag, it might be harmless in practice
but it's better to avoid.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5395
This resolves the issue in StudioTax where the bounding box dimensions is reported as 0.
Because the height is less than 0, the check for height in GdipAddPathRectangle fails,
and the X and Y coordinates of the points is never set.
I am fairly ignorant of this code, this seems like a good approach, however I am happy for guidance from others more familiar in how gdiplus works.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5360
On Sat Mar 23 07:46:33 2024 +0000, eszlari wrote:
> I guess @julliard is waiting for a review by @rbernon.
It's perhaps instead that approval only show up if the person is assigned as a reviewer, or that it was overlooked.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5178#note_65890
On Fri Mar 22 22:09:42 2024 +0000, Francisco Casas wrote:
> > Another case that does not fit into "args" array is examples like
> "compile ps_2_0, main(var)", or asm {} blocks, or asm{} blocks with
> leading decl{} part. Those will have to be handled separately.
> The approach I am writing for the `compile ps_2_0 main(var)` compile
> expressions is creating a HLSL_IR_COMPILE_SHADER node type. I think this
> is necessary because these can also appear outside state blocks (which
> means they are part of regular HLSL syntax):
> ```
> PixelShader ps1 = compile ps_2_0 main();
> technique
> {
> pass
> {
> SetPixelShader(ps1);
> }
> }
> ```
> so it would be a matter of checking if rhs's arg[0] is of this type of node.
> I haven't hear of asm{} blocks before, but I assume something similar
> would happen.
...which means we would have to somewhat propagate the loads to pixel|vertex shader variables into these HLSL_IR_COMPILE_SHADER. Maybe something worth adding to the copy-propagation pass if we end up using it for rhs.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65874
On Fri Mar 22 22:01:20 2024 +0000, Francisco Casas wrote:
> We are currently lowering all dereferences into a single offset node and
> a regset (which is used to discern when variables belong to multiple
> regsets). Copy propagation also relies on this.
> Dereferences to pixel shaders and vertex shaders are created on the
> instructions originated from prepend_uniform_copy(), when the original
> uniform is copied into the temp.
> It can happen merely by declaring PixelShader or VertexShader variables
> ```
> PixelShader ps1;
> float4 main() : sv_target { return 0; }
> ```
Shouldn't DCE be killing off those dereferences?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65872
> Another case that does not fit into "args" array is examples like "compile ps_2_0, main(var)", or asm {} blocks, or asm{} blocks with leading decl{} part. Those will have to be handled separately.
The approach I am writing for the `compile ps_2_0 main(var)` compile expressions is creating a HLSL_IR_COMPILE_SHADER node type. I think this is necessary because these can also appear outside state blocks (which means they are part of regular HLSL syntax):
```
PixelShader ps1 = compile ps_2_0 main();
technique
{
pass
{
SetPixelShader(ps1);
}
}
```
so it would be a matter of checking if rhs's arg[0] is of this type of node.
I haven't hear of asm{} blocks before, but I assume something similar would happen.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65871
On Fri Mar 22 22:01:20 2024 +0000, Zebediah Figura wrote:
> > This is required before introducing the upcoming tests because otherwise
> > we reach unreacheable code when new_offset_instr_from_deref() calls
> > type_get_regset() on pixel or vertex shaders.
> Why are we creating offset instrs for objects?
We are currently lowering all dereferences into a single offset node and a regset (which is used to discern when variables belong to multiple regsets). Copy propagation also relies on this.
Dereferences to pixel shaders and vertex shaders are created on the instructions originated from prepend_uniform_copy(), when the original uniform is copied into the temp.
It can happen merely by declaring PixelShader or VertexShader variables
```
PixelShader ps1;
float4 main() : sv_target { return 0; }
```
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65870
This fixes a performance regression introduced by 8b3944e1341baaf693927c8b758851d2dbba725a ("ntdll: Only allocate debug info in critical sections with RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO.").
Critical section was using a fallback semaphore path if no debug info is present. That was apparently to support MakeCriticalSectionGlobal() which was deprecated and removed from kernel32 exports around Win2000.
--
v2: kernel32: Make MakeCriticalSectionGlobal() a noop.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5379
On Fri Mar 22 21:20:30 2024 +0000, Francisco Casas wrote:
> well, first we have to find out if native does some compilation passes
> such as copy-propagation and constant folding to lower complicated
> expressions into constants, and apply those passes. For instance, are
> rhs expressions such as `ANISOTROPIC + 1` marked as a of the _constant
> load_ type in the effects metadata?
> After applying the passes we have to check the type of the last
> instruction of the block (or args[0], in case ths is not a complex
> initializer with braces) which represents the whole expression, and see
> if it is HLSL_IR_CONSTANT, HLSL_IR_INDEX (in which case we have to check
> if the index part is constant) or HLSL_IR_EXPR.
> We should also probably introduce a pass exclusive to fx.c to lower
> known HLSL_IR_UNDECLARED_LOAD into constants, so constant folding (if
> required) can work.
> I don't know yet how complex initializers with braces work in this case,
> if at all, but they parse.
They are evaluated, yes. Destination index is not evaluated, it has to be an integer literal.
So full format would be like this:
property_name[<literal index>] = ( literal_constant | variable[literal_constant] | variable[index_variable] | <expression-for-anything-more-complicated> )
Expression case does not map directly to our internal opcodes, it does not follow the same conventions as d3dbc/tpf binaries do. But we can leave that out for now.
Another case that does not fit into "args" array is examples like "compile ps_2_0, main(var)", or asm {} blocks, or asm{} blocks with leading decl{} part. Those will have to be handled separately.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65867
On Fri Mar 22 20:59:49 2024 +0000, Nikolay Sivov wrote:
> My concern, just by looking at it, is about how hard would it be to
> extract relevant cases from instructions. Is it easy to tell already
> that we got a constant load, array variable load with constant index,
> array variable load with variable index, or more complicated expression?
> Those are important to distinguish, because they are encoded differently.
well, first we have to find out if native does some compilation passes such as copy-propagation and constant folding to lower complicated expressions into constants, and apply those passes. For instance, are rhs expressions such as `ANISOTROPIC + 1` marked as a of the _constant load_ type in the effects metadata?
After applying the passes we have to check the type of the last instruction of the block (or args[0], in case ths is not a complex initializer with braces) which represents the whole expression, and see if it is HLSL_IR_CONSTANT, HLSL_IR_INDEX (in which case we have to check if the index part is constant) or HLSL_IR_EXPR.
We should also probably introduce a pass exclusive to fx.c to lower known HLSL_IR_UNDECLARED_LOAD into constants, so constant folding (if required) can work.
I don't know yet how complex initializers with braces work in this case, if at all, but they parse.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65852
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
> /* Scope that contains annotations for this variable. */
> struct hlsl_scope *annotations;
>
> - /* The state block on the variable's declaration, if any.
> + /* A list containing the state block on the variable's declaration, if any.
> + * An array variable may contain multiple state blocks.
> * These are only really used for effect profiles. */
> - struct hlsl_state_block *state_block;
> + struct list state_blocks;
Do we really want this to be a list? I feel like an array is probably going to be nicer to work with...
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65851
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
> HLSL_IR_STORE,
> HLSL_IR_SWIZZLE,
> HLSL_IR_SWITCH,
> + HLSL_IR_UNDECLARED_LOAD,
I don't like this name. It's not a load, since it's not coming from a variable. I would rather say something like "effect constant" or "stateblock constant".
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65850
Zebediah Figura (@zfigura) commented about tests/hlsl/fx-syntax.shader_test:
> +float3 vec;
> +
> +float4 main() : sv_target { return 0; }
> +
> +DepthStencilState dss1
> +{
> + RandomField = vec.w;
> +};
> +
> +
> +% Test function call syntax for state blocks. Unlike assignment syntax, only these names are allowed.
> +% The parameter count is also checked.
> +[pixel shader todo]
> +sampler sam
> +{
> + SetBlendState(foo, bar, baz); // 3 parameters
Can you mix function calls and assignments? I'd assume so but it'd be trivial to test.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65848
Zebediah Figura (@zfigura) commented about tests/hlsl/fx-syntax.shader_test:
> + pass
> + {
> + cat = SetPixelShader(foobar);
> + }
> +}
> +
> +
> +% Test use of a DepthStencilState in SetDepthStencilState().
> +[pixel shader todo]
> +DepthStencilState dss1
> +{
> + DepthEnable = false;
> + DepthWriteMask = Zero;
> + DepthFunc = Less;
> + foobar_Field = 22;
> +};
This test is a bit weird, because as we've seen, SetDepthStencilState() doesn't even validate anything [unless we're in an effect target, presumably]. Is this actually testing anything?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65849
Zebediah Figura (@zfigura) commented about tests/hlsl/fx-syntax.shader_test:
> + }
> + },
> + {
> + {
> + Filter = ANISOTROPIC;
> + },
> + {
> + Filter = ANISOTROPIC;
> + }
> + }
> +};
> +
> +float4 main() : sv_target { return 0; }
> +
> +
> +% Arrays of size 1 can still use a single state block without the need to put it inside a list.
There's a lot of tests for valid array usage, but not invalid array usage. What if the count is mismatched? Can an array of size 1 take interior braces? Can a non-array take interior braces?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65847
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
>
> state_block:
> %empty
> - | state_block state
> + {
> + if (!($$ = hlsl_alloc(ctx, sizeof(*$$))))
> + YYABORT;
> + }
> + | state_block any_identifier '[' C_INTEGER ']' '=' complex_initializer ';'
You could probably avoid the duplication with a separate "%empty | [int]" rule. Or alternatively use "arrays" and add an explicit check for count > 1.
Is C_INTEGER correct here, or should we allow compile-time constants?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65846
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
> /* Scope that contains annotations for this variable. */
> struct hlsl_scope *annotations;
>
> + /* The state block on the variable's declaration, if any.
> + * These are only really used for effect profiles. */
> + struct hlsl_state_block *state_block;
Does this need to be a pointer?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65845
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
> %type <variable_def> variable_def
> %type <variable_def> variable_def_typed
>
> +%type <state_block> state_block
> +
This is out of alphabetical order.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65843
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
> struct parse_attribute_list attr_list;
> struct hlsl_ir_switch_case *switch_case;
> struct hlsl_scope *scope;
> + struct hlsl_state_block *state_block;
Does this need to be a pointer?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65844
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
>
> +/* This struct is used to represent the two main types of state block entries:
> + * Assignment:
> + * name = {args[0], args[1], ...};
> + * - or -
> + * name = args[0]
> + * - or -
> + * name[lhs_array_size] = args[0]
> + * - or -
> + * name[lhs_array_size] = {args[0], args[1], ...};
> + * FX function call:
> + * name(args[0], args[1], ...);
> + */
> +struct hlsl_state_block_entry
> +{
> + bool is_function_call;
This is especially dead code if we aren't even parsing functions yet.
And... do we really want to do it this way? Could we store them in a separate array?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65842
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
> + * name[lhs_array_size] = args[0]
> + * - or -
> + * name[lhs_array_size] = {args[0], args[1], ...};
> + * FX function call:
> + * name(args[0], args[1], ...);
> + */
> +struct hlsl_state_block_entry
> +{
> + bool is_function_call;
> +
> + /* For assignments, the name in the lhs. For function calls, the name of the function. */
> + char *name;
> +
> + /* Whether the lhs in an assignment is an array and, in that case, its size. */
> + bool lhs_is_array;
> + unsigned int lhs_array_size;
I suspect this is rather an index. Effect documentation is nonexistent, but [1] shows some hints, this is probably how you set per-RT blend states.
It's probably worth testing with an actual effect target to see if BlendEnable is different from BlendEnable[0].
[1] https://learn.microsoft.com/en-us/windows/win32/direct3d11/d3d11-effect-var…
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65841
Nikolay Sivov (@nsivov) commented about libs/vkd3d-shader/hlsl.h:
> + /* Whether the lhs in an assignment is an array and, in that case, its size. */
> + bool lhs_is_array;
> + unsigned int lhs_array_size;
> +
> + /* For assignments, instructions present in the rhs. For function calls, instructions present
> + * in the function arguments. */
> + struct hlsl_block *instrs;
> +
> + /* For assignments, arguments of the rhs initializer. For function calls, the function
> + * arguments. */
> + struct hlsl_ir_node **args;
> + unsigned int args_count;
> +
> + /* For assignments, whether the rhs is wrapped in braces or not. */
> + bool rhs_braces;
> +};
My concern, just by looking at it, is about how hard would it be to extract relevant cases from instructions. Is it easy to tell already that we got a constant load, array variable load with constant index, array variable load with variable index, or more complicated expression? Those are important to distinguish, because they are encoded differently.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65840
> +% For now, these tests are just to check proper parsing of effects syntax.
> +% Most of these tests are useless as effects.
This file is very large; I'd propose splitting it into state-block-syntax (which already exists) and something more like effect-state and effect-shaders?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65839
> This is required before introducing the upcoming tests because otherwise
> we reach unreacheable code when new_offset_instr_from_deref() calls
> type_get_regset() on pixel or vertex shaders.
Why are we creating offset instrs for objects?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65838
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.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739
Currently we are assuming that unknown identifiers within state blocks are scalar integers. This proposal keeps doing this.
The lower_static_constant_folding() meta-pass is introduced to fold as much as possible these state state block expressions. And I plan to reuse it for constant buffer default values.
A lower_state_block_identifier_loads() pass is included in the last commit. The idea is to start filling a table with numeric values for the unknown identifiers as we start discovering them.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: include: Remove XMLSchemaCache60 from msxml2.idl.
msxml/tests: Move version-specific schema tests to corresponding modules.
msxml/tests: Move some of the validation tests to their modules.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5387
Fixes Sim City 3000 Building Architect.
--
v4: ddraw/tests: Add tests for multiple devices.
ddraw: Support multiple devices per ddraw object.
ddraw: Sync wined3d render target in d3d_device_sync_rendertarget().
ddraw: Store wined3d state in d3d_device.
wined3d: Factor out wined3d_texture_set_lod() function.
ddraw: Don't apply state in ddraw_surface_blt().
ddraw: Store matrix handle in the global table.
ddraw: Store surface handles in the global table.
ddraw: Store material handles in the global table.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5329
On Fri Mar 22 03:18:49 2024 +0000, Zebediah Figura wrote:
> Is fixing the headers undesirable, then?
> Is it necessary in some way to implement FreeThreadedXMLHTTP60, or can
> that be done differently?
No, I think it is desirable. I'm going to move some more tests out, to build with either msxml2.idl or msxml6.idl, and then we'll see what's left. XMLHTTP60 patches in the form they currently are in staging needs some work done, specifically not using rtworkq.dll.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1060#note_65806
I missed that Zhiyi was out so I've just reordered this, calling __wine_get_vulkan_driver from winex11 d3dkmt instead.
--
v3: win32u: Move vkGet(Device|Instance)ProcAddr helpers inline.
winevulkan: Stop generating the wine/vulkan_driver.h header.
win32u: Move vkGet(Instance|Device)ProcAddr out the drivers.
win32u: Move vulkan loading and init guard out of the drivers.
winemac: Use SONAME_LIBVULKAN as an alias for MoltenVK.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5365
This issue originated on IRC (a person complained about Tomato Jones II
not working but the ole errors in the log weren't actually an issue).
With this patch the game boots to the main menu (at least with
wine-staging).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5372
Please investigate this further as I am not sure why. From other internet sources, it internally calls the NtUserLoadKeyboardLayoutEx. I am not sure how the this internal function works and it seems there was a famous exploit using this internal function.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5361#note_65791
There's not much point rebasing this every day. The test seems to break some other tests and it also somehow messes with the loaded keyboard layouts list. I want to investigate a bit further how this function behaves.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5361#note_65790
On Sat Mar 16 23:37:29 2024 +0000, Alistair Leslie-Hughes wrote:
> I currently don't have one.
> Through wine-staging patches for FreeThreadedXMLHTTP60 interface rely on
> this change.
Is fixing the headers undesirable, then?
Is it necessary in some way to implement FreeThreadedXMLHTTP60, or can that be done differently?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1060#note_65760
Since we are adding more and more media formats to wg_format, the current wg_format struct is getting ugly.
Everytime we add a video format, we need to duplicate width, height, fps. Everytime we add a audio format, we need to duplicate channels, rate. So it would be better if we could share width, height, fps fields between different video formats, also share channels and rate fields between different audio formats.
What makes me found the current wg_format is not in a good shape is when I was writting code for Proton, I found that I need to write some code like this if want to get width/height/fps from a wg_format:
```
static bool get_video_info_from_wg_format(struct wg_format *format,
int32_t *width, int32_t *height, uint32_t *fps_n, uint32_t *fps_d)
{
switch (format->major_type)
{
case WG_MAJOR_TYPE_VIDEO:
*width = format->u.video.width;
*height = format->u.video.height;
*fps_n = format->u.video.fps_n;
*fps_d = format->u.video.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_CINEPAK:
*width = format->u.video_cinepak.width;
*height = format->u.video_cinepak.height;
*fps_n = format->u.video_cinepak.fps_n;
*fps_d = format->u.video_cinepak.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_H264:
*width = format->u.video_h264.width;
*height = format->u.video_h264.height;
*fps_n = format->u.video_h264.fps_n;
*fps_d = format->u.video_h264.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_WMV:
*width = format->u.video_wmv.width;
*height = format->u.video_wmv.height;
*fps_n = format->u.video_wmv.fps_n;
*fps_d = format->u.video_wmv.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_INDEO:
*width = format->u.video_indeo.width;
*height = format->u.video_indeo.height;
*fps_n = format->u.video_indeo.fps_n;
*fps_d = format->u.video_indeo.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_MPEG1:
*width = format->u.video_mpeg1.width;
*height = format->u.video_mpeg1.height;
*fps_n = format->u.video_mpeg1.fps_n;
*fps_d = format->u.video_mpeg1.fps_d;
return true;
default:
GST_ERROR("Type %d is not a video format.\n", format->major_type);
return false;
}
}
```
Apparently, the code above is ugly. By refactoring wg_format, we can avoid code like this.
This patch is a draft now, it only contains unixlib.h code.
Zeb, I'd like to confirm that if this refactoring would be acceptable for you. If do, I'll continue finishing the remaining parts.
--
v3: winegstreamer: Refactor wg_format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5369
Since we are adding more and more media formats to wg_format, the current wg_format struct is getting ugly.
Everytime we add a video format, we need to duplicate width, height, fps. Everytime we add a audio format, we need to duplicate channels, rate. So it would be better if we could share width, height, fps fields between different video formats, also share channels and rate fields between different audio formats.
What makes me found the current wg_format is not in a good shape is when I was writting code for Proton, I found that I need to write some code like this if want to get width/height/fps from a wg_format:
```
static bool get_video_info_from_wg_format(struct wg_format *format,
int32_t *width, int32_t *height, uint32_t *fps_n, uint32_t *fps_d)
{
switch (format->major_type)
{
case WG_MAJOR_TYPE_VIDEO:
*width = format->u.video.width;
*height = format->u.video.height;
*fps_n = format->u.video.fps_n;
*fps_d = format->u.video.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_CINEPAK:
*width = format->u.video_cinepak.width;
*height = format->u.video_cinepak.height;
*fps_n = format->u.video_cinepak.fps_n;
*fps_d = format->u.video_cinepak.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_H264:
*width = format->u.video_h264.width;
*height = format->u.video_h264.height;
*fps_n = format->u.video_h264.fps_n;
*fps_d = format->u.video_h264.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_WMV:
*width = format->u.video_wmv.width;
*height = format->u.video_wmv.height;
*fps_n = format->u.video_wmv.fps_n;
*fps_d = format->u.video_wmv.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_INDEO:
*width = format->u.video_indeo.width;
*height = format->u.video_indeo.height;
*fps_n = format->u.video_indeo.fps_n;
*fps_d = format->u.video_indeo.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_MPEG1:
*width = format->u.video_mpeg1.width;
*height = format->u.video_mpeg1.height;
*fps_n = format->u.video_mpeg1.fps_n;
*fps_d = format->u.video_mpeg1.fps_d;
return true;
default:
GST_ERROR("Type %d is not a video format.\n", format->major_type);
return false;
}
}
```
Apparently, the code above is ugly. By refactoring wg_format, we can avoid code like this.
This patch is a draft now, it only contains unixlib.h code.
Zeb, I'd like to confirm that if this refactoring would be acceptable for you. If do, I'll continue finishing the remaining parts.
--
v2: winegstreamer: Refactor wg_format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5369
dlls/shell32/resources/ietoolbar.bmp is very similar to
dlls/ieframe/ietoolbar.bmp. In Windows XP, the IE toolbar icons were
only in shell32.dll, and there were 16 of them. Internet Explorer 7
added ieframe.dll that had the same 16 icons plus 7 more icons for a
total of 23. The 7 new icons were never added to shell32.dll, and in
Windows Vista and later, shell32.dll does not include the IE toolbar
bitmap resource at all.
dlls/shell32/resources/ietoolbar*.bmp was created with ImageMagick from
the public domain Tango icon theme using the following shell script:
ICONS='
actions/go-previous.png
actions/go-next.png
actions/process-stop.png
actions/view-refresh.png
actions/go-home.png
actions/system-search.png
emblems/emblem-favorite.png
actions/document-print.png
actions/format-text-bold.png
apps/accessories-text-editor.png
categories/preferences-system.png
mimetypes/audio-x-generic.png
apps/office-calendar.png
apps/internet-mail.png
actions/view-fullscreen.png
actions/document-new.png
'
pushd 32x32
convert +append $ICONS ietoolbar.bmp
popd
pushd 16x16
convert +append $ICONS ietoolbar_small.bmp
popd
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40236
--
v4: shell32: Add Internet Explorer toolbar icons.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4174