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_extensions.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_extensions.c')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index ba5cf214a42..61f7ba6da7c 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -77,6 +77,9 @@ static struct GPUGlobal {
* number is factor on screen and second is off-screen */
float dfdyfactors[2];
float max_anisotropy;
+ /* Some Intel drivers have limited support for `GLEW_ARB_base_instance` so in
+ * these cases it is best to indicate that it is not supported. See T67951 */
+ bool glew_arb_base_instance_is_supported;
/* Some Intel drivers have issues with using mips as framebuffer targets if
* GL_TEXTURE_MAX_LEVEL is higher than the target mip.
* We need a workaround in this cases. */
@@ -197,6 +200,11 @@ void GPU_get_dfdy_factors(float fac[2])
copy_v2_v2(fac, GG.dfdyfactors);
}
+bool GPU_arb_base_instance_is_supported(void)
+{
+ return GG.glew_arb_base_instance_is_supported;
+}
+
bool GPU_mip_render_workaround(void)
{
return GG.mip_render_workaround;
@@ -343,6 +351,7 @@ void gpu_extensions_init(void)
GG.os = GPU_OS_UNIX;
#endif
+ GG.glew_arb_base_instance_is_supported = GLEW_ARB_base_instance;
gpu_detect_mip_render_workaround();
if (G.debug & G_DEBUG_GPU_FORCE_WORKAROUNDS) {
@@ -383,6 +392,9 @@ void gpu_extensions_init(void)
strstr(version, "Build 10.18.10.4653") || strstr(version, "Build 10.18.10.5069") ||
strstr(version, "Build 10.18.14.4264") || strstr(version, "Build 10.18.14.4432") ||
strstr(version, "Build 10.18.14.5067")) {
+ /* Maybe not all of these drivers have problems with `GLEW_ARB_base_instance`.
+ * But it's hard to test each case. */
+ GG.glew_arb_base_instance_is_supported = false;
GG.context_local_shaders_workaround = true;
}
}