Module: wine Branch: master Commit: c8a98e03c8f13664c6d3c43897da5e2443b79ab1 URL: https://gitlab.winehq.org/wine/wine/-/commit/c8a98e03c8f13664c6d3c43897da5e2...
Author: Zebediah Figura zfigura@codeweavers.com Date: Sat Nov 11 13:57:55 2023 -0600
wined3d: Merge shader_load_constants() into shader_select().
Arguably there is a benefit here in that it reduces shader backend state application down to a single method, although whether that is an improvement may be up for debate.
More saliently, we would like to move FFP state application out of the state table and into a linear state function. In practice that function will probably be vp_enable / fp_enable. In that case we will need those functions, and hence also shader_select(), to be called when more states are dirty.
This does not in itself mean that shader_load_constants() needs to be merged with shader_select(), but it does remove the primary impetus for keeping them separate.
Rename to shader_apply_draw_state() to reflect the adjusted purpose, as suggested by Henri Verbeet.
---
dlls/wined3d/arb_program_shader.c | 40 +++++++++++++++++++-------------------- dlls/wined3d/context_gl.c | 16 +++++----------- dlls/wined3d/context_vk.c | 2 +- dlls/wined3d/glsl_shader.c | 38 ++++++++++++++++++++++--------------- dlls/wined3d/shader.c | 7 ++----- dlls/wined3d/shader_spirv.c | 11 ++--------- dlls/wined3d/wined3d_private.h | 4 +--- 7 files changed, 54 insertions(+), 64 deletions(-)