From 1112106db02b3de4864ebd0477983d685cccaefc Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Wed, 2 Feb 2022 12:58:02 +0100 Subject: [PATCH] tests: Verify that runtime validates invalid PSO description for blob. Signed-off-by: Hans-Kristian Arntzen --- tests/d3d12_pso_blob.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/d3d12_pso_blob.c b/tests/d3d12_pso_blob.c index 39197d6e..da12f775 100644 --- a/tests/d3d12_pso_blob.c +++ b/tests/d3d12_pso_blob.c @@ -259,6 +259,13 @@ void test_pipeline_library(void) ok(hr == S_OK, "Failed to load graphics pipeline from pipeline library, hr %#x.\n", hr); ID3D12PipelineState_Release(state); + /* Verify that modifying a PSO description must be invalidated by runtime. */ + graphics_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE; + hr = ID3D12PipelineLibrary_LoadGraphicsPipeline(pipeline_library, + graphics_name, &graphics_desc, &IID_ID3D12PipelineState, (void**)&state); + ok(hr == E_INVALIDARG, "Unexpected result, hr %#x.\n", hr); + graphics_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; + serialized_size = ID3D12PipelineLibrary_GetSerializedSize(pipeline_library); ok(serialized_size > 0, "Serialized size for pipeline library is 0.\n");