[PATCH] wined3d: Don't discard buffer data if buffer is not bound.
Stefan Dösinger
stefandoesinger at gmail.com
Wed Jul 8 17:36:56 CDT 2020
> Am 08.07.2020 um 22:44 schrieb Paul Gofman <pgofman at codeweavers.com>:
>
> + hr = IDirect3DVertexBuffer9_Lock(buffer, 0, size, (void **)&quads, 0);
> + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
> +
> + /* The data has been reset for the whole buffer. */
> + for (i = 0; i < quad_count - 1; ++i)
> + ok(memcmp(&quads[i], &quad1, sizeof(quad1)), "Quads match, i %u.\n", i);
> +
> + ok(!memcmp(&quads[i], &quad2, sizeof(quad2)), "Quads do not match, i %u.\n", i);
> +
> + for (i = 0; i < quad_count; ++i)
> + quads[i] = quad1;
> +
> + hr = IDirect3DVertexBuffer9_Unlock(buffer);
> + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
> +
> + hr = IDirect3DDevice9_SetStreamSource(device, 0, buffer2, 0, sizeof(*quads->strip));
> + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
What happens if you draw something from 'buffer' between the Unlock and SetStreamSource? See test_vb_discard() in ddraw7.c, although I think Henri ported the test to d3d8/9 at some point. I couldn't find it on a quick search though.
What happens if you bind the a to a stream that is not used by the vertex declaration?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200709/21b02d34/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200709/21b02d34/attachment-0001.sig>
More information about the wine-devel
mailing list