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>2020-03-30 20:57:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-03-30 20:57:24 +0300
commit91b334b2f2fcd50366da38a71b16aa0512f3779a (patch)
tree26c24d286a9c418aa856c43e2e02586f6c566131 /source/blender/nodes
parent248873603fec2558c408d9eb7c80d17936da38ef (diff)
Fix T74547 EEVEE: Image texture crash with use after free
Same fix than for the other mapping types.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
index b4b1c1d3698..bfef9341913 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -154,6 +154,12 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat,
/* equivalent to normal_world_to_object */
GPU_link(mat, "normal_transform_transposed_m4v3", vnor, ob_mat, &norm);
+ {
+ /* See SHD_PROJ_FLAT for explanation. */
+ GPU_link(mat, "set_rgb", *texco, texco);
+ GPU_link(mat, "set_rgb", *texco, &input_coords);
+ in[0].link = input_coords;
+ }
GPU_link(
mat, gpu_node_name, *texco, norm, GPU_image(mat, ima, iuser), &col1, &col2, &col3);
GPU_stack_link(