anv: improve error reporting when creating pipelines
Specifically, report 'out of memory' errors that might have happened while emitting the pipeline's batch. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
@@ -1201,6 +1201,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
|
|||||||
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;
|
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;
|
||||||
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
|
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
|
||||||
pipeline->batch.relocs = &pipeline->batch_relocs;
|
pipeline->batch.relocs = &pipeline->batch_relocs;
|
||||||
|
pipeline->batch.status = VK_SUCCESS;
|
||||||
|
|
||||||
copy_non_dynamic_state(pipeline, pCreateInfo);
|
copy_non_dynamic_state(pipeline, pCreateInfo);
|
||||||
pipeline->depth_clamp_enable = pCreateInfo->pRasterizationState &&
|
pipeline->depth_clamp_enable = pCreateInfo->pRasterizationState &&
|
||||||
|
@@ -1677,7 +1677,7 @@ genX(graphics_pipeline_create)(
|
|||||||
|
|
||||||
*pPipeline = anv_pipeline_to_handle(pipeline);
|
*pPipeline = anv_pipeline_to_handle(pipeline);
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return pipeline->batch.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VkResult
|
static VkResult
|
||||||
@@ -1716,6 +1716,7 @@ compute_pipeline_create(
|
|||||||
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;
|
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;
|
||||||
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
|
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
|
||||||
pipeline->batch.relocs = &pipeline->batch_relocs;
|
pipeline->batch.relocs = &pipeline->batch_relocs;
|
||||||
|
pipeline->batch.status = VK_SUCCESS;
|
||||||
|
|
||||||
/* When we free the pipeline, we detect stages based on the NULL status
|
/* When we free the pipeline, we detect stages based on the NULL status
|
||||||
* of various prog_data pointers. Make them NULL by default.
|
* of various prog_data pointers. Make them NULL by default.
|
||||||
@@ -1805,7 +1806,7 @@ compute_pipeline_create(
|
|||||||
|
|
||||||
*pPipeline = anv_pipeline_to_handle(pipeline);
|
*pPipeline = anv_pipeline_to_handle(pipeline);
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return pipeline->batch.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult genX(CreateGraphicsPipelines)(
|
VkResult genX(CreateGraphicsPipelines)(
|
||||||
|
Reference in New Issue
Block a user