[PATCH 2/2] wined3d: Store and use stream offset in state block.

Henri Verbeet hverbeet at gmail.com
Thu Apr 4 09:39:51 CDT 2019


On Wed, 3 Apr 2019 at 21:57, Paul Gofman <gofmanp at gmail.com> wrote:
> @@ -433,7 +437,7 @@ static void execute_test_chain_all(IDirect3DDevice9 *device, struct state_test *
>      execute_test_chain(device, test, ntests, apply_stateblock_events, 3, &arg);
>
>      trace("Running stateblock capture/reapply state tests\n");
> -    execute_test_chain(device, test, ntests, capture_reapply_stateblock_events, 4, &arg);
> +    execute_test_chain(device, test, ntests, capture_reapply_stateblock_events, 5, &arg);
We'll probably want ARRAY_SIZE there.

> @@ -749,7 +753,7 @@ static void light_check_data(IDirect3DDevice9 *device, const struct state_test *
>              "Chain stage %u: expected get_light_result %#x, got %#x.\n",
>              chain_stage, ldata->get_light_result, value.get_light_result);
>
> -    ok(value.enabled == ldata->enabled,
> +    ok(!value.enabled == !ldata->enabled,
Is that an unrelated change? I remember us caring about the specific
value GetLightEnable() returns, so the test was probably intentionally
written this way.

> @@ -3641,6 +3641,7 @@ struct wined3d_saved_states
>  {
>      DWORD transform[(WINED3D_HIGHEST_TRANSFORM_STATE >> 5) + 1];
>      WORD streamSource;                          /* WINED3D_MAX_STREAMS, 16 */
> +    BOOL stream_offset_ignore;
>      WORD streamFreq;                            /* WINED3D_MAX_STREAMS, 16 */
Putting a BOOL between two WORDs really isn't ideal for structure
packing. Rather than just moving the BOOL though, perhaps it makes
more sense to invert its meaning, take a bit out of "padding", and add
a "DWORD stream_offset : 1;" instead?



More information about the wine-devel mailing list