diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-29 18:23:37 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-29 18:23:50 +0400 |
commit | 78b79a91f2aea012c6ba9181ac3c32aeb66d392c (patch) | |
tree | f36c857601f9b204feb5635b1405f6656faa18c9 /source/blender/gpu/intern/gpu_codegen.c | |
parent | c1ec73f52218900b1ce101b3154816205aa75d0d (diff) |
Fix T41596 GLSL error on ATIs after clipping workaround commit.
This was a little difficult to track down, basically it was a missing
escape sequence that only manifested itself when GPU did not support
bicubic filtering.
Extra:
* Fix memory leaks when an error occurs in shader compilation
* Display full shader when a compilation error occurs. Makes it easier
to diagnose if problem is caused by a syntax or compatibility error.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index d60525dd34a..6b46db89a93 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1410,6 +1410,10 @@ GPUPass *GPU_generate_pass(ListBase *nodes, GPUNodeLink *outlink, GPUVertexAttri /* failed? */ if (!shader) { + if (fragmentcode) + MEM_freeN(fragmentcode); + if (vertexcode) + MEM_freeN(vertexcode); memset(attribs, 0, sizeof(*attribs)); memset(builtins, 0, sizeof(*builtins)); GPU_nodes_free(nodes); |