Cleanup debug output

This commit is contained in:
dec05eba 2023-08-11 22:11:41 +02:00
parent ba00c20b47
commit 2765a5d476
2 changed files with 2 additions and 15 deletions

View File

@ -284,24 +284,14 @@ static bool gsr_capture_kms_register_egl_image_in_cuda(gsr_capture_kms_cuda *cap
if(res != CUDA_SUCCESS) { if(res != CUDA_SUCCESS) {
const char *err_str = "unknown"; const char *err_str = "unknown";
cap_kms->cuda.cuGetErrorString(res, &err_str); cap_kms->cuda.cuGetErrorString(res, &err_str);
fprintf(stderr, "gsr error: cuda_register_egl_image: cuGraphicsEGLRegisterImage failed, error %s (%d), egl image %p\n", fprintf(stderr, "gsr error: cuda_register_egl_image: cuGraphicsEGLRegisterImage failed, error: %s (%d), egl image %p\n",
err_str, res, image); err_str, res, image);
res = cap_kms->cuda.cuCtxPopCurrent_v2(&old_ctx); res = cap_kms->cuda.cuCtxPopCurrent_v2(&old_ctx);
return false; return false;
} }
if(res != CUDA_SUCCESS) {
fprintf(stderr, "cuda error 1\n");
}
res = cap_kms->cuda.cuGraphicsResourceSetMapFlags(cap_kms->cuda_graphics_resource, CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY); res = cap_kms->cuda.cuGraphicsResourceSetMapFlags(cap_kms->cuda_graphics_resource, CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY);
if(res != CUDA_SUCCESS) {
fprintf(stderr, "cuda error 2\n");
}
res = cap_kms->cuda.cuGraphicsSubResourceGetMappedArray(&cap_kms->mapped_array, cap_kms->cuda_graphics_resource, 0, 0); res = cap_kms->cuda.cuGraphicsSubResourceGetMappedArray(&cap_kms->mapped_array, cap_kms->cuda_graphics_resource, 0, 0);
if(res != CUDA_SUCCESS) {
fprintf(stderr, "cuda error 3\n");
}
res = cap_kms->cuda.cuCtxPopCurrent_v2(&old_ctx); res = cap_kms->cuda.cuCtxPopCurrent_v2(&old_ctx);
return true; return true;
} }

View File

@ -68,10 +68,7 @@ static bool cuda_register_opengl_texture(gsr_capture_xcomposite_cuda *cap_xcomp)
if (res != CUDA_SUCCESS) { if (res != CUDA_SUCCESS) {
const char *err_str = "unknown"; const char *err_str = "unknown";
cap_xcomp->cuda.cuGetErrorString(res, &err_str); cap_xcomp->cuda.cuGetErrorString(res, &err_str);
fprintf(stderr, fprintf(stderr, "gsr error: cuda_register_opengl_texture: cuGraphicsGLRegisterImage failed, error: %s, texture " "id: %u\n", err_str, cap_xcomp->target_texture_id);
"Error: cuGraphicsGLRegisterImage failed, error %s, texture "
"id: %u\n",
err_str, cap_xcomp->target_texture_id);
res = cap_xcomp->cuda.cuCtxPopCurrent_v2(&old_ctx); res = cap_xcomp->cuda.cuCtxPopCurrent_v2(&old_ctx);
return false; return false;
} }