Fixes assert seen in dEQP-Vk.api.smoke.triangle
Signed-off-by: Jarred Davies <jarred.davies@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22051>
/* Get the size of the program and then allocate that much memory. */
pvr_pds_coefficient_loading(&program, NULL, PDS_GENERATE_SIZES);
+ if (!program.code_size) {
+ pds_upload_out->pvr_bo = NULL;
+ pds_upload_out->code_size = 0;
+ pds_upload_out->data_size = 0;
+
+ return VK_SUCCESS;
+ }
+
staging_buffer_size =
(program.code_size + program.data_size) * sizeof(*staging_buffer);