Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-07-31 22:35:06 +0300
committermano-wii <germano.costa@ig.com.br>2019-07-31 22:36:18 +0300
commitd8fb63661b3218e536f548e763675a08221e18cd (patch)
treed47dd711b72180345811457f243f0877905b2415 /source/blender/gpu/intern/gpu_batch.c
parentea3690e32974005c6ccb871f4e2f49471ad837ab (diff)
Fix T67951: Bone selection is broken on some Intel GPUs
The problem is that the `glDrawArraysInstancedBaseInstance` is ignoring the last parameter. The solution is to indicate that `GLEW_ARB_base_instance` is not supported in these cases. Reviewers: fclem, brecht, jbakker Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5383
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r--source/blender/gpu/intern/gpu_batch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index ba3c7f68518..11b487f7be4 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -28,6 +28,7 @@
#include "GPU_batch.h"
#include "GPU_batch_presets.h"
+#include "GPU_extensions.h"
#include "GPU_matrix.h"
#include "GPU_shader.h"
@@ -599,7 +600,7 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first, int v_count, int i_fi
i_count = (batch->inst) ? batch->inst->vertex_len : 1;
}
- if (!GLEW_ARB_base_instance) {
+ if (!GPU_arb_base_instance_is_supported()) {
if (i_first > 0 && i_count > 0) {
/* If using offset drawing with instancing, we must
* use the default VAO and redo bindings. */
@@ -624,7 +625,7 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first, int v_count, int i_fi
#endif
void *v_first_ofs = elem_offset(el, v_first);
- if (GLEW_ARB_base_instance) {
+ if (GPU_arb_base_instance_is_supported()) {
glDrawElementsInstancedBaseVertexBaseInstance(
batch->gl_prim_type, v_count, index_type, v_first_ofs, i_count, base_index, i_first);
}
@@ -637,7 +638,7 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first, int v_count, int i_fi
#ifdef __APPLE__
glDisable(GL_PRIMITIVE_RESTART);
#endif
- if (GLEW_ARB_base_instance) {
+ if (GPU_arb_base_instance_is_supported()) {
glDrawArraysInstancedBaseInstance(batch->gl_prim_type, v_first, v_count, i_count, i_first);
}
else {