summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-12-18 19:38:53 +0100
committerSamuel Pitoiset <[email protected]>2017-12-19 21:22:09 +0100
commit00162b210864db1af13d86a113ccd4894d011500 (patch)
tree5559365bacfc9c3bcd06f7a3f2a27b460db1e136
parent3595a116489d6f3b2f7fd2aa3eeff6376b82beb2 (diff)
radv: add assertions to make sure pipeline layout objects are valid
The spec requires it. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/amd/vulkan/radv_pipeline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index fedabcd73f7..3fc21bb501f 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2023,6 +2023,7 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
pipeline->device = device;
pipeline->layout = radv_pipeline_layout_from_handle(pCreateInfo->layout);
+ assert(pipeline->layout);
radv_pipeline_init_dynamic_state(pipeline, pCreateInfo);
radv_pipeline_init_blend_state(pipeline, pCreateInfo, extra);
@@ -2370,6 +2371,7 @@ static VkResult radv_compute_pipeline_create(
pipeline->device = device;
pipeline->layout = radv_pipeline_layout_from_handle(pCreateInfo->layout);
+ assert(pipeline->layout);
pStages[MESA_SHADER_COMPUTE] = &pCreateInfo->stage;
radv_create_shaders(pipeline, device, cache, (struct radv_pipeline_key) {0}, pStages);