Mesa (main): v3dv: check BO mapping result
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 13 16:22:37 UTC 2022
Module: Mesa
Branch: main
Commit: 57293dee2b11ba7e52052edc4d0437f08db19144
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57293dee2b11ba7e52052edc4d0437f08db19144
Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date: Fri May 13 10:38:43 2022 +0200
v3dv: check BO mapping result
Addresses error handling issue detected by Coverity.
Fixes: 89eb0ac23d9 ("v3dv: implement vkGetPipelineExecutableInternalRepresentationsKHR")
Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16495>
---
src/broadcom/vulkan/v3dv_pipeline.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index ed03fa88ece..3cba7834680 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -3527,7 +3527,11 @@ pipeline_collect_executable_data(struct v3dv_pipeline *pipeline)
/* Map the assembly BO so we can read the pipeline's QPU code */
struct v3dv_bo *qpu_bo = pipeline->shared_data->assembly_bo;
- v3dv_bo_map(pipeline->device, qpu_bo, qpu_bo->size);
+
+ if (!v3dv_bo_map(pipeline->device, qpu_bo, qpu_bo->size)) {
+ fprintf(stderr, "failed to map QPU buffer\n");
+ return;
+ }
for (int s = BROADCOM_SHADER_VERTEX; s <= BROADCOM_SHADER_COMPUTE; s++) {
VkShaderStageFlags vk_stage =
More information about the mesa-commit
mailing list