[Bf-blender-cvs] [282d207] temp_custom_loop_normals: Selection: avoid uninitialized memory read with occlusion queries
Antony Riakiotakis
noreply at git.blender.org
Mon Feb 2 20:22:47 CET 2015
Commit: 282d207f0533067dedcfb68d6d141feb0a0061d0
Author: Antony Riakiotakis
Date: Mon Feb 2 17:45:07 2015 +0100
Branches: temp_custom_loop_normals
https://developer.blender.org/rB282d207f0533067dedcfb68d6d141feb0a0061d0
Selection: avoid uninitialized memory read with occlusion queries
===================================================================
M source/blender/gpu/intern/gpu_select.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index 0515334..5172142 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -158,7 +158,7 @@ bool GPU_select_load_id(unsigned int id)
g_query_state.active_query++;
g_query_state.query_issued = true;
- if (g_query_state.mode == GPU_SELECT_NEAREST_SECOND_PASS) {
+ if (g_query_state.mode == GPU_SELECT_NEAREST_SECOND_PASS && g_query_state.index < g_query_state.oldhits) {
if (g_query_state.buffer[g_query_state.index * 4 + 3] == id) {
g_query_state.index++;
return true;
More information about the Bf-blender-cvs
mailing list