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-09-19 17:17:50 +0300
committermano-wii <germano.costa@ig.com.br>2019-09-19 17:18:18 +0300
commitd0c772f68b84267e15630064fc21cc54fc7209f0 (patch)
treecd8bed7fec343ce76a82c26cdf7857973d5281dc /source/blender/draw/modes
parentcb5ed2e5f458190cbea2ba41d00f7fe001ab00a7 (diff)
Fix T69853: Object orientation is wrong with some AMD deprecated drivers.
This solution only reuses the performance workaround made for Intel. But the original problem was not solved. Not much we can do to solve it.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/shaders/common_view_lib.glsl7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/modes/shaders/common_view_lib.glsl b/source/blender/draw/modes/shaders/common_view_lib.glsl
index e669eb9d39a..fa4bb4f68c0 100644
--- a/source/blender/draw/modes/shaders/common_view_lib.glsl
+++ b/source/blender/draw/modes/shaders/common_view_lib.glsl
@@ -36,6 +36,11 @@ uniform int baseInstance;
# ifdef IN_PLACE_INSTANCES
/* When drawing instances of an object at the same position. */
# define instanceId 0
+# elif defined(GPU_DEPRECATED_AMD_DRIVER)
+/* A driver bug make it so that when using an attribute with GL_INT_2_10_10_10_REV as format,
+ * the gl_InstanceID is incremented by the 2 bit component of the attrib.
+ * Ignore gl_InstanceID then. */
+# define instanceId 0
# else
# define instanceId gl_InstanceID
# endif
@@ -66,7 +71,7 @@ flat in int resourceIDFrag;
# define resource_id resourceIDFrag
#endif
-#ifndef GPU_INTEL
+#if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER)
struct ObjectMatrices {
mat4 drw_modelMatrix;
mat4 drw_modelMatrixInverse;