Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-07-09 00:24:15 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-07-09 00:52:06 +0300
commitf04424a15d9c0f461f9c2f385696716d830b07f4 (patch)
treecf46367d0d3ee5451f5512f32ac3cd256f0f9291 /source/blender/gpu
parent96f59184078b08995d2e01c165943000859157de (diff)
Fix T66573 Heap Corruption when baking to irradiance volume probe
This is an AMD Proprietary driver bug. Will be reported upstream.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 6a92832d1e5..cd98da69469 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -1459,7 +1459,9 @@ void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat gpu_data_format, int mipl
break;
}
- void *buf = MEM_mallocN(buf_size, "GPU_texture_read");
+ /* AMD Pro driver have a bug that write 2 bytes past buffer size
+ * if the texture is big. (see T66573) */
+ void *buf = MEM_mallocN(buf_size + 8, "GPU_texture_read");
GLenum data_format = gpu_get_gl_dataformat(tex->format, &tex->format_flag);
GLenum data_type = gpu_get_gl_datatype(gpu_data_format);