Fix #134509: GPU: Add workaround for Intel ARC nodelink driver bug

This disables the instancing optimization for this specific
hardware.

Pull Request: https://projects.blender.org/blender/blender/pulls/135458
This commit is contained in:
Clément Foucault
2025-03-05 12:05:34 +01:00
committed by Clément Foucault
parent 70473d7589
commit 326ce59961
5 changed files with 18 additions and 1 deletions
@@ -35,6 +35,7 @@
#include "GPU_batch.hh"
#include "GPU_batch_presets.hh"
#include "GPU_capabilities.hh"
#include "GPU_framebuffer.hh"
#include "GPU_immediate.hh"
#include "GPU_matrix.hh"
@@ -2445,7 +2446,7 @@ static void node_draw_link_bezier_ex(const SpaceNode &snode,
nodelink_batch_init();
}
if (g_batch_link.enabled && !draw_config.highlighted) {
if (g_batch_link.enabled && !draw_config.highlighted && !GPU_node_link_instancing_workaround()) {
/* Add link to batch. */
nodelink_batch_add_link(snode, points, draw_config);
}
+1
View File
@@ -46,6 +46,7 @@ int GPU_texture_size_with_limit(int res);
bool GPU_use_parallel_compilation();
bool GPU_stencil_clasify_buffer_workaround();
bool GPU_node_link_instancing_workaround();
bool GPU_mip_render_workaround();
bool GPU_depth_blitting_workaround();
bool GPU_use_main_context_workaround();
@@ -167,6 +167,11 @@ bool GPU_stencil_clasify_buffer_workaround()
return GCaps.stencil_clasify_buffer_workaround;
}
bool GPU_node_link_instancing_workaround()
{
return GCaps.node_link_instancing_workaround;
}
bool GPU_vulkan_render_pass_workaround()
{
return GCaps.render_pass_workaround;
@@ -61,6 +61,7 @@ struct GPUCapabilities {
bool broken_amd_driver = false;
bool use_hq_normals_workaround = false;
bool stencil_clasify_buffer_workaround = false;
bool node_link_instancing_workaround = false;
/* Vulkan related workarounds. */
bool render_pass_workaround = false;
+9
View File
@@ -310,6 +310,7 @@ static void detect_workarounds()
GCaps.depth_blitting_workaround = true;
GCaps.mip_render_workaround = true;
GCaps.stencil_clasify_buffer_workaround = true;
GCaps.node_link_instancing_workaround = true;
GLContext::debug_layer_workaround = true;
/* Turn off Blender features. */
GCaps.hdr_viewport_support = false;
@@ -493,6 +494,14 @@ static void detect_workarounds()
GLContext::multi_bind_image_support = false;
}
/* #134509 Intel ARC GPU have a driver bug that break the display of batched nodelinks.
* Disabling batching fixes the issue. */
if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {
if (strstr(renderer, "Arc")) {
GCaps.node_link_instancing_workaround = true;
}
}
/* Multi viewport creates small triangle discard on RDNA2 GPUs with official drivers.
* Using geometry shader workaround fixes the issue. */
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {