Draw: Fix RenderDoc compatibility (Windows+Nvidia) #109214

Merged
Miguel Pozo merged 2 commits from pragma37/blender:pull-renderdoc-fix into main 2023-06-23 16:02:27 +02:00
1 changed files with 7 additions and 0 deletions

View File

@ -264,6 +264,13 @@ static void drw_deferred_shader_add(GPUMaterial *mat, bool deferred)
deferred = false;
}
/* Avoid crashes with RenderDoc on Windows + Nvidia. */
if (G.debug & G_DEBUG_GPU_RENDERDOC &&
GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL))

Is this a windows only issue. I would assume that we should check on GPU_OS_ANY as the drivers between linux/windows are 'the same'. I am aware that renderdoc doesn't support multithreading so we might consider to do this for all platforms.

Is this a windows only issue. I would assume that we should check on `GPU_OS_ANY` as the drivers between linux/windows are 'the same'. I am aware that renderdoc doesn't support multithreading so we might consider to do this for all platforms.

Is this a windows only issue.

Not sure. I don't have a working Linux installation on my desktop at the moment.

I am aware that renderdoc doesn't support multithreading so we might consider to do this for all platforms.

Doesn't AMD work just fine? Without this fix, Blender crashes when switching to EEVEE on Windows+Nvidia.

> Is this a windows only issue. Not sure. I don't have a working Linux installation on my desktop at the moment. > I am aware that renderdoc doesn't support multithreading so we might consider to do this for all platforms. Doesn't AMD work just fine? Without this fix, Blender crashes when switching to EEVEE on Windows+Nvidia.
{
deferred = false;
}
if (!deferred) {
DRW_deferred_shader_remove(mat);
/* Shaders could already be compiling. Have to wait for compilation to finish. */