[PATCH vkd3d 3/3] tests: Add test for indirect draws with count buffer

Józef Kucia joseph.kucia at gmail.com
Mon May 20 02:22:25 CDT 2019


On Sat, May 18, 2019 at 4:34 PM Philip Rebohle
<philip.rebohle at tu-dortmund.de> wrote:
>
> Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
> ---
>  tests/d3d12.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 51 insertions(+), 1 deletion(-)

The test isn't very interesting. The test succeeds even with a dummy
implementation that ignores count buffers.

>
> diff --git a/tests/d3d12.c b/tests/d3d12.c
> index c7dfd8a..4f8e8f5 100644
> --- a/tests/d3d12.c
> +++ b/tests/d3d12.c
> @@ -21557,7 +21557,7 @@ static void test_execute_indirect(void)
>      D3D12_ROOT_SIGNATURE_DESC root_signature_desc;
>      ID3D12CommandSignature *command_signature;
>      ID3D12GraphicsCommandList *command_list;
> -    ID3D12Resource *argument_buffer, *uav;
> +    ID3D12Resource *argument_buffer, *count_buffer, *uav;
>      D3D12_INPUT_LAYOUT_DESC input_layout;
>      D3D12_ROOT_PARAMETER root_parameter;
>      ID3D12PipelineState *pipeline_state;
> @@ -21682,6 +21682,7 @@ static void test_execute_indirect(void)
>          {2, 3, 4},
>          {{6, 1, 0, 0, 0}, {6, 1, 0, 4, 0}},
>      };
> +    static const uint32_t count_data[] = {1, 2};
>      static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
>
>      memset(&desc, 0, sizeof(desc));
> @@ -21692,6 +21693,7 @@ static void test_execute_indirect(void)
>      queue = context.queue;
>
>      argument_buffer = create_upload_buffer(context.device, sizeof(argument_data), &argument_data);
> +    count_buffer = create_upload_buffer(context.device, sizeof(count_data), count_data);
>
>      command_signature = create_command_signature(context.device, D3D12_INDIRECT_ARGUMENT_TYPE_DRAW);
>
> @@ -21711,6 +21713,23 @@ static void test_execute_indirect(void)
>
>      reset_command_list(command_list, context.allocator);
>
> +    ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);

The render target should be transitioned from
D3D12_RESOURCE_STATE_COPY_SOURCE to
D3D12_RESOURCE_STATE_RENDER_TARGET.



More information about the wine-devel mailing list