Commit: 99e4bfd5e48787a9ac8796a061ad7ebd143a5868 Author: Jeroen Bakker Date: Fri Dec 2 12:24:03 2022 +0100 Branches: temp-vulkan-shader https://developer.blender.org/rB99e4bfd5e48787a9ac8796a061ad7ebd143a5868
Tweaked gpu_InstanceIndex. =================================================================== M source/blender/gpu/vulkan/vk_shader.cc =================================================================== diff --git a/source/blender/gpu/vulkan/vk_shader.cc b/source/blender/gpu/vulkan/vk_shader.cc index 58b13ea8747..e8580b66c22 100644 --- a/source/blender/gpu/vulkan/vk_shader.cc +++ b/source/blender/gpu/vulkan/vk_shader.cc @@ -502,10 +502,8 @@ static char *glsl_patch_get() /* Version need to go first. */ STR_CONCAT(patch, slen, "#version 450\n"); STR_CONCAT(patch, slen, "#define gl_VertexID gl_VertexIndex\n"); - // TODO(jbakker): How does base instance work in vulkan. There seems to be a difference between - // OpenGL and Vulkan here. But I am not able to map the change to our code-base yet. - STR_CONCAT(patch, slen, "#define gpu_BaseInstance 0\n"); - STR_CONCAT(patch, slen, "#define gpu_InstanceIndex (gl_InstanceIndex + gpu_BaseInstance)\n"); + STR_CONCAT(patch, slen, "#define gpu_BaseInstance (0)\n"); + STR_CONCAT(patch, slen, "#define gpu_InstanceIndex (gl_InstanceIndex)\n"); // TODO: we should remove usage of gl_InstanceID/gl_VertexID. STR_CONCAT(patch, slen, "#define gl_InstanceID gpu_InstanceIndex\n"); _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
