Page MenuHome

Fix crash running GPU shader.format_calc() with attributes like gl_VertexID
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Jul 11 2019, 4:22 PM.

Details

Summary

When using opengl attributes such as gl_VertexID in a shader its
location is set to -1. This location was used without checking in an
attribute array. This fails big time when called from python. For
example print(shader.format_calc()) made python crash immediately.

this fixes https://github.com/JacquesLucke/animation_nodes/issues/1141

Diff Detail

Repository
rB Blender
Branch
python_gpu (branched from master)
Build Status
Buildable 4031
Build 4031: arc lint + arc unit

Event Timeline

Please use a more descriptive subject for code reviews and the following commit message. For example:

Fix crash running GPU shader.format_calc() with attributes like gl_VertexID
This revision is now accepted and ready to land.Jul 11 2019, 6:15 PM
Jeroen Bakker (jbakker) retitled this revision from GPU: Access Unallocated Memory to Fix crash running GPU shader.format_calc() with attributes like gl_VertexID.Jul 11 2019, 6:20 PM