mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #157777: Vulkan: Backport texture pool workaround for Intel Windows
The following two commits are backported to blender-v5.1-release: -0bedd81f2b-bf20994350The former disabled the texture pool only for Intel 7th to 10th Gen Processor iGPUs, while the latter disabled it for a wider range of GPUs. Some refactoring happened on main where `workarounds.no_texture_pool` was renamed to `GCaps.texture_pool_workaround`, but I kept the old naming in the backport. Disabling the texture pool works around visual corruptions and memory leaks on older Intel iGPUs with certain driver versions. Pull Request: https://projects.blender.org/blender/blender/pulls/158641
This commit is contained in:
parent
f635ba83d8
commit
76c4dfd8d1
3 changed files with 16 additions and 3 deletions
|
|
@ -429,6 +429,7 @@ void VKBackend::detect_workarounds(VKDevice &device)
|
|||
|
||||
/* Force workarounds and disable extensions. */
|
||||
workarounds.not_aligned_pixel_formats = true;
|
||||
workarounds.no_texture_pool = true;
|
||||
extensions.shader_output_layer = false;
|
||||
extensions.shader_output_viewport_index = false;
|
||||
extensions.fragment_shader_barycentric = false;
|
||||
|
|
@ -445,6 +446,10 @@ void VKBackend::detect_workarounds(VKDevice &device)
|
|||
return;
|
||||
}
|
||||
|
||||
if (G.debug & G_DEBUG_GPU_NO_TEXTURE_POOL) {
|
||||
workarounds.no_texture_pool = true;
|
||||
}
|
||||
|
||||
extensions.shader_output_layer =
|
||||
device.physical_device_vulkan_12_features_get().shaderOutputLayer;
|
||||
extensions.shader_output_viewport_index =
|
||||
|
|
@ -558,7 +563,7 @@ void VKBackend::detect_workarounds(VKDevice &device)
|
|||
* Until the issues have been resolved, the texture pool workaround is used.
|
||||
*/
|
||||
if (GPU_type_matches(GPU_DEVICE_INTEL | GPU_DEVICE_INTEL_UHD, GPU_OS_WIN, GPU_DRIVER_OFFICIAL)) {
|
||||
GCaps.texture_pool_workaround = true;
|
||||
workarounds.no_texture_pool = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -691,7 +696,7 @@ Texture *VKBackend::texture_alloc(const char *name)
|
|||
|
||||
TexturePool *VKBackend::texturepool_alloc()
|
||||
{
|
||||
if (G.debug & G_DEBUG_GPU_NO_TEXTURE_POOL) {
|
||||
if (device.workarounds_get().no_texture_pool) {
|
||||
CLOG_TRACE(&LOG, "Using texture pool \"TexturePoolImpl\".");
|
||||
return new TexturePoolImpl();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ void VKWorkarounds::log() const
|
|||
CLOG_DEBUG(&LOG,
|
||||
"Activated workarounds\n"
|
||||
" - [%c] Not 16/32 bit aligned image formats",
|
||||
not_aligned_pixel_formats ? 'X' : ' ');
|
||||
" - [%c] Not 16/32 bit aligned image formats\n"
|
||||
" - [%c] No texture pool",
|
||||
not_aligned_pixel_formats ? 'X' : ' ',
|
||||
no_texture_pool ? 'X' : ' ');
|
||||
}
|
||||
|
||||
void VKDevice::reinit()
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ struct VKWorkarounds {
|
|||
*/
|
||||
bool not_aligned_pixel_formats = false;
|
||||
|
||||
/**
|
||||
* Certain Intel GPUs show visual artifacts with texture pool usage.
|
||||
*/
|
||||
bool no_texture_pool = false;
|
||||
|
||||
/** Log enabled workarounds. */
|
||||
void log() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue