Fix #129715: Crash with GPU subdivision in wireframe mode

Mistake in 9b97ba1462.
This commit is contained in:
Hans Goudey
2024-11-02 14:32:20 +01:00
parent 7b3e2fd7dd
commit 65da82f67c

View File

@@ -307,7 +307,9 @@ static GPUShader *get_subdiv_shader(SubdivShaderType shader_type)
else if (shader_type == SHADER_BUFFER_EDGE_FAC) {
/* No separate shader for the AMD driver case as we assume that the GPU will not change
* during the execution of the program. */
defines = GPU_crappy_amd_driver() ? "#define GPU_AMD_DRIVER_BYTE_BUG\n" : nullptr;
if (GPU_crappy_amd_driver()) {
defines = "#define GPU_AMD_DRIVER_BYTE_BUG\n";
}
}
else if (shader_type == SHADER_BUFFER_CUSTOM_NORMALS_FINALIZE) {
defines = "#define CUSTOM_NORMALS\n";