[Bf-blender-cvs] [0dd5281ab29] master: GPU: Windows+Intel Selection Fix

Jeroen Bakker noreply at git.blender.org
Tue May 14 14:55:49 CEST 2019


Commit: 0dd5281ab295361bea348874cf841a5937352ba3
Author: Jeroen Bakker
Date:   Tue May 14 13:55:35 2019 +0200
Branches: master
https://developer.blender.org/rB0dd5281ab295361bea348874cf841a5937352ba3

GPU: Windows+Intel Selection Fix

On Windows 10 with a post Februari 2019 Intel driver, the box selection
is not working. It only detects the object centers, but not the drawn
triangles of the basic engine.

Reviewed By: fclem

Maniphest Tasks: T62947

Differential Revision: https://developer.blender.org/D4857

===================================================================

M	source/blender/gpu/intern/gpu_select_sample_query.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c
index 3fbc24d6089..56f9ef69221 100644
--- a/source/blender/gpu/intern/gpu_select_sample_query.c
+++ b/source/blender/gpu/intern/gpu_select_sample_query.c
@@ -104,8 +104,11 @@ void gpu_select_query_begin(
   /* occlusion queries operates on fragments that pass tests and since we are interested on all
    * objects in the view frustum independently of their order, we need to disable the depth test */
   if (mode == GPU_SELECT_ALL) {
-    glDisable(GL_DEPTH_TEST);
-    glDepthMask(GL_FALSE);
+    /* glQueries on Windows+Intel drivers only works with depth testing turned on.
+     * See T62947 for details */
+    glEnable(GL_DEPTH_TEST);
+    glDepthFunc(GL_ALWAYS);
+    glDepthMask(GL_TRUE);
   }
   else if (mode == GPU_SELECT_NEAREST_FIRST_PASS) {
     glClear(GL_DEPTH_BUFFER_BIT);



More information about the Bf-blender-cvs mailing list