[PATCH 3/7] wined3d: Don't skip FFP vertex pipeline state handlers when STATE_VDECL is dirty.

Henri Verbeet hverbeet at gmail.com
Tue Jun 1 11:54:17 CDT 2021


On Mon, 31 May 2021 at 21:13, Matteo Bruni <mbruni at codeweavers.com> wrote:
> This fixes the non-default ARB shader backend, broken since
> 2ddb6b66a7cda0bf6aaddc0c6899e35cc92ceee9, although the
> fundamental issue was there long before that.
>
> Originally the STATE_VDECL handler did some bookkeeping (basically,
> computing what is now the stream info data) that's a prerequisite for
> running other state handlers. For this reason a somewhat complicated
> dance was put in place, with the dependent handlers returning right
> away until the STATE_VDECL handler could prepare everything up and the
> STATE_VDECL handler in turn explicitly calling these "downstream"
> handlers so that they could do their job. With the commit mentioned
> above the state dirty flags are cleared after the corresponding
> handlers are executed, which means that the relevant handlers are
> skipped twice and some stuff is never set up properly.
>
> Stream info is computed by context_apply_draw_state() before going
> through the state handler table for a long time now, getting rid of
> this obscure handler interdependency. So let's just get rid of the
> skipping altogether.
>
Although now handlers may end up getting called twice. I'm tempted to
think we should clear the "dirty_graphics_states" bitmap only after
all handlers have run, similar to what we do in
wined3d_context_vk_apply_draw_state().



More information about the wine-devel mailing list