Cleanup: use STRNCPY, SNPRINTF macros

This commit is contained in:
2023-05-09 12:50:37 +10:00
parent 2f9538a8c7
commit 3958ae7241
402 changed files with 1550 additions and 1822 deletions

View File

@@ -794,9 +794,7 @@ static PyObject *pygpu_shader_info_push_constant(BPyGPUShaderCreateInfo *self,
#define VULKAN_LIMIT 128
int size = constants_calc_size(info);
if (size > VULKAN_LIMIT) {
printf("Push constants have a minimum supported size of "
STRINGIFY(VULKAN_LIMIT)
" bytes, however the constants added so far already reach %d bytes. Consider using UBO.\n", size);
printf("Push constants have a minimum supported size of " STRINGIFY(VULKAN_LIMIT) " bytes, however the constants added so far already reach %d bytes. Consider using UBO.\n", size);
}
#undef VULKAN_LIMIT