This MR improves driver support for scaled HiDPI displays, by respecting the application/window DPI.
Since we don't support per-monitor DPI information and awareness modes yet, the user should set the Wine system DPI to match the DPI/scale of the display the app will be running on, for best results.
Here is how things look with a few scenarios:
1. Screen scaled at 2x, application at 96dpi (e.g., dpi unaware apps) => the compositor automatically scales the surface:
![wine-wayland-2x-96dpi](/uploads/712bf2e64991889c91861d63dfd4fd60/wine-wayland-2x-96dpi.png)
2. Screen scaled at 2x, application at 192dpi (dpi matches compositor scale) => no compositor scaling:
![wine-wayland-2x-192dpi](/uploads/85c1201e1208f8b7e1c63804c7f83d1c/wine-wayland-2x-192dpi.png)
3. Screen scaled at 1x, application at 96dpi (dpi matches compositor scale) => no compositor scaling:
![wine-wayland-1x-96dpi](/uploads/8dfaaff1fc62defdb26f57c78cf9a427/wine-wayland-1x-96dpi.png)
4. Screen scaled at 1x, application at 192dpi, not typically used, just wanted to show what happens with such a mismatch:
![wine-wayland-1x-192dpi](/uploads/bb035140dd9c91ee3a22832c7280ab1b/wine-wayland-1x-192dpi.png)
Thanks!
--
v4: winewayland.drv: Ignore spurious size hints.
winewayland.drv: Present cursors with the correct scale.
winewayland.drv: Refactor cursor code to prepare for scaling support.
winewayland.drv: Present surfaces with the correct scale.
winewayland.drv: Prepare to handle different coordinate spaces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4203
First part of a series that allows the shader-runner to test SM1 compilation on [shader] directives even if a backend to run these tests is not available and prepare they way for SM1-only tests.
Specifically:
- Compile [shader] directives separately from backend execution (on part 1).
- Allow specifying more detailed shader ranges for todo(), fail() and notimpl() qualifiers (on part 2).
- Always test shader compilation with SM1 profiles (on part 2).
The `minimum_shader_model` and `maximum_shader_model` parameters for run_shader_tests() are interpreted in the following way:
> Ask the pertaining backend to run the shader_test file so that each test is executed with the lowest profile it can support within the range of shader models specified, if any.
This allows us to control how many shader models we want to test for each backend, e.g.:
```
run_shader_tests(..., SHADER_MODEL_2_0, SHADER_MODEL_3_0)
run_shader_tests(..., SHADER_MODEL_4_0, SHADER_MODEL_5_1)
run_shader_tests(..., SHADER_MODEL_6_0, SHADER_MODEL_6_0)
```
versus
```
for (i = SHADER_MODEL_2_0, i <= SHADER_MODEL_6_0, ++i)
run_shader_tests(..., i, i);
```
Also, to allow to compile [shader] directives, which are not backend-specific, separately from the [test] directives, which are, the run_shader_tests() function is modified to skip backend specific directives if the shader_runner_ops is NULL.
Following patches are on my [master6i](https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6i) branch.
--
v3: tests/shader-runner: Compile [shader] directives separately from backend execution.
tests/shader-runner: Execute runner for many shader model ranges if it supports it.
tests/shader-runner: Discern between the minimum_shader_model and the selected_shader_model.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/418
Basically, @giomasce proposal of specifying shader models for tests individually.
Supersedes !418.
---
To make the shader_runner expressive enough to handle SM1 and SM6 shader
models on tests, we need to intercept the shader model ranges for which
we want to run the tests with the ranges that each backend is capable of
running, this is complicated.
So, to make it more clear, the test's shader models are specified
individually, and runner->minimum_shader_model and
runner->maximum_shader_model are replaced with just
runner->current_shader_model.
The supported ranges are removed from the backends (except for d3d12, which handles them internally)
and their check_requirements functions is always assumed to exist and
return either true or false for just a single shader model.
Something that must be kept in mind with these changes is that if two
tests with different shader models rely on the same resources, these
resources must be either specified twice, or after a [require] directive
that includes all the pertaining models. This was necessary for
gather.shader_test and gather-offset.shader_test.
---
The following patches would change:
```
run_compilation_tests(SHADER_MODEL_4_0, SHADER_MODEL_5_1, NULL);
```
to
```
run_compilation_tests(SHADER_MODEL_2_0, SHADER_MODEL_5_1, NULL);
```
for Unix and non-cross builds, so we can test SM1 compilation even if we don't have a backend available that can actually run the tests. Some improvements to the qualifiers are required before that, to mark sm1 todos properly.
Once we have a proper SM1 runner, maybe we could get rid of run_compilation_tests().
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/434