From 3b73ca9fe4879b95a66029f2f3923ef51b3321e8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 19 Feb 2018 18:40:15 +0000 Subject: [PATCH] Fix double-application of index byte offset in GL vertex picking --- renderdoc/driver/gl/gl_debug.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 8e21a4edb..6b1f27463 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -1430,9 +1430,8 @@ uint32_t GLReplay::PickVertex(uint32_t eventId, int32_t width, int32_t height, gl.glBufferSubData(eGL_SHADER_STORAGE_BUFFER, 0, sizeof(uint32_t) * 4, &reset); gl.glBindBufferBase(eGL_SHADER_STORAGE_BUFFER, 1, DebugData.pickVBBuf); - gl.glBindBufferRange( - eGL_SHADER_STORAGE_BUFFER, 2, DebugData.pickIBBuf, (GLintptr)cfg.position.indexByteOffset, - (GLsizeiptr)(cfg.position.indexByteOffset + sizeof(uint32_t) * cfg.position.numIndices)); + gl.glBindBufferRange(eGL_SHADER_STORAGE_BUFFER, 2, DebugData.pickIBBuf, (GLintptr)0, + (GLsizeiptr)(sizeof(uint32_t) * cfg.position.numIndices)); gl.glBindBufferBase(eGL_SHADER_STORAGE_BUFFER, 3, DebugData.pickResultBuf); gl.glDispatchCompute(GLuint((cfg.position.numIndices) / 128 + 1), 1, 1);