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:
authorClément Foucault <foucault.clem@gmail.com>2020-03-26 23:10:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-03-26 23:10:44 +0300
commit56e0249489ce89954a54d5006ddf4147dd02e208 (patch)
tree11457e0f51ebfc2be718290da67637204c4621bf /source/blender/gpu/GPU_shader_interface.h
parentafb1a64ccb81b7ed792f64151986f40f53af8da5 (diff)
GPU: Add workaround for faulty default attrib values on some drivers
On some drivers, the default values is not respected correctly. To workaround this we create a small VBO that contains only 1 vec4 worth of data and just bind it using glBindVertexBuffer to ensure 0 stride. This fixes T75069 Instances not rendered correctly by workbench.
Diffstat (limited to 'source/blender/gpu/GPU_shader_interface.h')
-rw-r--r--source/blender/gpu/GPU_shader_interface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_shader_interface.h b/source/blender/gpu/GPU_shader_interface.h
index 8b0d25e51a3..7a8900997d0 100644
--- a/source/blender/gpu/GPU_shader_interface.h
+++ b/source/blender/gpu/GPU_shader_interface.h
@@ -88,6 +88,8 @@ typedef struct GPUShaderInterface {
char *name_buffer;
struct GPUBatch **batches; /* references to batches using this interface */
uint batches_len;
+ /** All enabled attribs in this shader. Used to set default values for unbound attribs. */
+ uint16_t enabled_attrib_mask;
} GPUShaderInterface;
GPUShaderInterface *GPU_shaderinterface_create(int32_t program_id);