From 64bcf358387a17e60335a10442da666e8c3f71c1 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 26 Jan 2015 16:57:57 +0000 Subject: [PATCH] Make sure to copy across attrib location values from 'real' vs program --- renderdoc/driver/gl/gl_debug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 1dd88ab6d..51105764d 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -1705,6 +1705,13 @@ void GLReplay::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) // we don't want to do any work, so just discard before rasterizing gl.glEnable(eGL_RASTERIZER_DISCARD); + // copy attrib locations from real program + for(int32_t i=0; i < vsRefl->InputSig.count; i++) + { + GLint idx = gl.glGetAttribLocation(vsProgSrc, vsRefl->InputSig[i].varName.elems); + gl.glBindAttribLocation(vsProg, (GLuint)idx, vsRefl->InputSig[i].varName.elems); + } + varyings.clear(); uint32_t stride = 0;