[PATCH vkd3d 1/5] tests: Use a vertex buffer to draw quads for shader tests.

Zebediah Figura zfigura at codeweavers.com
Thu Apr 7 13:05:44 CDT 2022


On 4/7/22 08:07, Henri Verbeet wrote:
> On Wed, 6 Apr 2022 at 23:05, Zebediah Figura <zfigura at codeweavers.com> wrote:
>> @@ -326,17 +344,44 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
> [...]
>> +        memset(&params, 0, sizeof(params));
>> +        params.slot = 0;
>> +        params.type = RESOURCE_TYPE_VERTEX_BUFFER;
>> +        params.data = malloc(sizeof(quad));
>> +        memcpy(params.data, quad, sizeof(quad));
>> +        params.data_size = sizeof(quad);
>> +        set_resource(runner, runner->ops->create_resource(runner, &params));
>> +
> I don't think this is an issue right now, but note that this means
> "draw quad" is going to override previously set resources, so a
> subsequent "draw" might not do what you'd expect.

It is, yes. That might be avoidable by reorganizing the way vertex 
buffers are defined and bound, but it doesn't seem worthwhile at the 
moment...



More information about the wine-devel mailing list