[PATCH 2/2] vkd3d/tests: Enable ReadFromSubresource() read-back test and remove todo.

Józef Kucia joseph.kucia at gmail.com
Thu Aug 1 09:35:20 CDT 2019


On Thu, Aug 1, 2019 at 4:17 PM Conor McCarthy <cmccarthy at codeweavers.com> wrote:
>
> Hi Józef,
>
> August 1, 2019 5:33 PM, "Józef Kucia" <joseph.kucia at gmail.com> wrote:
> >> + /* WriteToSubresource() is not implemented so upload test data */
> >> + transition_resource_state(command_list, src_texture,
> >> + D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_STATE_COPY_DEST);
> >> + texture_data.pData = dst_buffer;
> >> + texture_data.RowPitch = row_pitch;
> >> + texture_data.SlicePitch = slice_pitch;
> >> + upload_texture_data(src_texture, &texture_data, 1, queue, command_list);
> >> + reset_command_list(command_list, context.allocator);
> >> + transition_resource_state(command_list, src_texture,
> >> + D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_COMMON);
> >
> > This makes a bunch of WriteToSubresource() and
> > ID3D12Resource_ReadFromSubresource() tests much less interesting.
> > Please try to extends tests instead and add this as a separate test
> > case as suggested above.
>
> I'm not sure what you mean. The two ReadFromSubresource() tests which follow this do almost nothing useful without the test data. They return S_OK and junk data. This extra code can be deleted if/when WriteToSubresource() is implemented.

The test are for WriteToSubresource() and ReadFromSubresource()
interaction. They work as expected on Windows. After your change the
test doesn't check the behavior of WriteToSubresource() anymore. If we
are worried about junk data we can initialize the resource with data
different than expected by the test. In other words, I would prefer to
not add workarounds just so we can remove a todo. Keeping todo is
perfectly fine if something is not implemented yet.



More information about the wine-devel mailing list