Alexandre Julliard pushed to branch master at wine / wine
Commits: d2bed27b by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Move shader_trace().
- - - - - 2eb7397e by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Move shader parsing to shader_set_function().
The idea is that we will have wined3d_shader objects that represent shaders not yet in d3d form (specifically, in HLSL form or containing only an FFP settings struct.) Hence we need to make it possible to delay d3d shader parsing, but still keep the rest of shader_init().
- - - - - 484c6f9a by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Create stub FFP pixel shaders.
We only compute ffp_frag_settings and stash that in the shader byte_code. The HLSL shader will be compiled to sm2 bytecode on the CS side, and then parsed and interpreted by the shader backend (and all other code) as if it were a real shader.
In theory, we could take the extra step of retrieving the settings from this shader in the GLSL backend, instead of from the current state. This however requires changing a number of places which currently check "state->shader[WINED3D_SHADER_TYPE_PIXEL]" to also check "is_ffp_ps", and it also means we need to handle some more states (shade mode, fog, etc.) as part of ffp_frag_settings. Both of these will go away as soon as the GLSL backend can simply consume the generated HLSL shader.
- - - - - 04450b6e by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Create stub FFP vertex shaders.
- - - - - 3251015e by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Account for HLSL FFP shaders in find_ps_compile_args().
In most cases, it is possible to construct a D3D shader which behaves identically to a given FFP pipeline.
There are two exceptions, related to fog and texture transforms, where the FFP pipeline has special behaviour that cannot be emulated with shaders, and we handle those here by checking whether our shader is actually an FFP replacement shader.
- - - - - ff430720 by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Allow using the HLSL FFP replacement with GL.
This will allow us to replace the GLSL FFP pipes, and is useful for testing the FFP HLSL backend before the Vulkan backend is mature enough in other respects.
This patch introduces the d3d setting "ffp_hlsl", set to a DWORD value. It is disabled by default, and only has an effect on the GL renderer.
- - - - - eaef138d by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Use the FFP HLSL pipeline for pretransformed draws as well.
- - - - - a50dd339 by Elizabeth Figura at 2024-11-19T21:11:54+01:00 wined3d: Beginnings of an HLSL FFP vertex shader implementation.
- - - - -
13 changed files:
- dlls/wined3d/Makefile.in - dlls/wined3d/adapter_gl.c - dlls/wined3d/adapter_vk.c - dlls/wined3d/context.c - dlls/wined3d/cs.c - dlls/wined3d/device.c - + dlls/wined3d/ffp_hlsl.c - dlls/wined3d/glsl_shader.c - dlls/wined3d/shader.c - dlls/wined3d/stateblock.c - dlls/wined3d/utils.c - dlls/wined3d/wined3d_main.c - dlls/wined3d/wined3d_private.h
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/c2b9d2102e80623940f85b641a7884...