nvk: Return a VkResult from nvk_shader_upload()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:12:00 -06:00 committed by Marge Bot
parent 52331a3406
commit b110445bb8
4 changed files with 12 additions and 4 deletions

View file

@ -108,7 +108,11 @@ nvk_compute_pipeline_create(struct nvk_device *device,
if (result != VK_SUCCESS)
goto fail;
nvk_shader_upload(device, &pipeline->base.shaders[MESA_SHADER_COMPUTE]);
result = nvk_shader_upload(device,
&pipeline->base.shaders[MESA_SHADER_COMPUTE]);
if (result != VK_SUCCESS)
goto fail;
gv100_compute_setup_launch_desc_template(pipeline->qmd_template, &pipeline->base.shaders[MESA_SHADER_COMPUTE]);
*pPipeline = nvk_pipeline_to_handle(&pipeline->base);
return VK_SUCCESS;

View file

@ -239,7 +239,9 @@ nvk_graphics_pipeline_create(struct nvk_device *device,
if (result != VK_SUCCESS)
goto fail;
nvk_shader_upload(device, &pipeline->base.shaders[stage]);
result = nvk_shader_upload(device, &pipeline->base.shaders[stage]);
if (result != VK_SUCCESS)
goto fail;
}
struct nv_push push;

View file

@ -711,7 +711,7 @@ nvk_compile_nir(struct nvk_physical_device *device, nir_shader *nir,
return VK_SUCCESS;
}
void
VkResult
nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader)
{
uint32_t hdr_size = 0;
@ -741,4 +741,6 @@ nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader)
if (debug_get_bool_option("NV50_PROG_DEBUG", false))
nvk_shader_dump(shader);
#endif
return VK_SUCCESS;
}

View file

@ -102,6 +102,6 @@ VkResult
nvk_compile_nir(struct nvk_physical_device *device, nir_shader *nir,
struct nvk_shader *shader);
void
VkResult
nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader);
#endif