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).
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/740
See also https://bugs.winehq.org/show_bug.cgi?id=56361
This patch makes piped commands work like for example "echo os get version|wmic" or "type file.txt | wmic" where file.txt contains some commands.
(probably used by program in aforementioned bugreport)
Also support interactive mode (wine wmic.exe)
Marked for now as draft.
--
v12: handle command buffer differently
https://gitlab.winehq.org/wine/wine/-/merge_requests/5402
Adds the registry key
`HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\unaccelerated_pointer`
witch allows raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
and sensitivity curves in libinput are more difficult
to calculate than in the games themselves.
--
v6: winewayland.drv: Add unaccelerated pointer support
https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl.y:
> if (!(modifiers & HLSL_STORAGE_STATIC))
> var->storage_modifiers |= HLSL_STORAGE_UNIFORM;
>
> - if (ctx->profile->major_version < 5 && (var->storage_modifiers & HLSL_STORAGE_UNIFORM) &&
> - type_has_object_components(var->data_type, true))
> + if (ctx->profile->major_version < 5 && (var->storage_modifiers & HLSL_STORAGE_UNIFORM)
> + && var->data_type->class == HLSL_CLASS_STRUCT && type_has_object_components(var->data_type))
I think we would lose coverage for when we have an array of structs with object components.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/745#note_66419
HLSL_CLASS_OBJECT does not really have much in common, and a lot of code currently uses it assuming that all objects are resources, which is not actually true. Most users of HLSL_CLASS_OBJECT want to check for specific types, and so we can simplify code a fair amount by promoting all object "base types" to top-level classes.
This series is a first step, comprising some cleanup towards that goal.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/745
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.
--
v4: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739
This is an attempt to invent a vkd3d-shader interface, and begin to implement
the relevant parts of ID3D12ShaderReflection in vkd3d-utils.
This series is missing most Doxygen documentation, mostly because I feel very
uncertain about this interface and don't want to put in the significant effort
to write documentation until I'm sure it's settled.
This series also has tests for bindings but not the implementation, mainly
because I didn't want to bother splitting those tests out to a separate patch
right now, and I see no harm in having them already there and marked todo...
Here is a long list of already open questions:
* As always, should anything be named differently?
* In particular, I've decided to give the variables names that make it clear
this is d3d-specific code. I think trying to make this generic enough to work
for other shader types is a fool's errand.
* Should we even try to use this interface for sm1? It's mostly already a
subset of dxbc; the only addition is the constant register set...
* Should we bother with interfaces? These count as "constant buffers", they have
a distinct type, and they have some extra data that we'd need to account for.
* Should we bother with lib_* targets? This mostly means allowing for a single
shader to hold multiple sets of reflection data. Note that this would also
affect descriptor info and STAT info, although not signature info.
* I've tried to pass through most data directly, partly out of a concern that
that's what d3dcompiler probably does, and so trying to interpret it could
break an extremely hypothetical and unlikely application. More saliently,
converting to a more sensible representation just to convert back is extra
work that I'm not really sure I see a point for.
But if we want to change the interface regardless, here are some ideas:
- enum vkd3d_shader_d3d_buffer_type could just be more flags.
- I think a buffer's size is redundant and can be calculated from its
contained variables.
Same for field offsets (unless packoffset affects this?)
- "constant_register" could be flags too? But we already have a type for them,
so I don't think that's better.
- The kind/type interface is weird in several ways. Majority could be a type
or var flag; objects could be classes...
* Fields of struct vkd3d_shader_d3d_type could be 16-bit (like they are in the
RDEF section). The main reason I didn't do this is because we can't force a
16-bit enum, although we could define the field as uint16_t. But we could also
just define the other "count" fields as 16-bit.
* I suspect I already know the answer to this one, but... If this is all going
to be d3d specific anyway... do we really care about having this in
vkd3d-shader?
Or, alternatively, we could provide an interface that's friendlier than COM,
but still use the d3d struct types instead of copy-pasting and changing all
the names to vkd3d-shader (which is a bit exhausting, honestly—not just
because of rewriting but because of documentation. The latter is certainly a
self-created problem, but so is the former.)
* vkd3d_shader_d3d_field currently has a hole in it on LP64; is that a problem?
(I think it's the only structure with a hole in it.)
* As long as this is a d3d interface, should we go ahead and make it
"scan_d3d_info" and add all the d3d-specific STAT block stuff?
One extra anticipatory note on how this differs from Wine's implementation:
This implementation does *not* store types in an rbtree, nor deduplicate them.
The main reason for this is that native doesn't deduplicate types (I have tests
for this, later in my local branch) and it avoids what seems like a significant
complication to the vkd3d-shader interface.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/606