DRW: Fix builtin uniform name mismatch

This lead to severe unreported regression, like volume rendering broken
in workbench.
This commit is contained in:
2022-01-26 19:08:56 +01:00
parent 13f2df3c28
commit 57dfec79f4
2 changed files with 4 additions and 4 deletions

View File

@@ -106,8 +106,8 @@ uniform int drw_resourceChunk;
# if defined(UNIFORM_RESOURCE_ID)
/* This is in the case we want to do a special instance drawcall for one object but still want to
* have the right resourceId and all the correct ubo datas. */
uniform int drw_resourceId;
# define resource_id drw_resourceId
uniform int drw_ResourceID;
# define resource_id drw_ResourceID
# else
# define resource_id (gpu_BaseInstance + instanceId)
# endif

View File

@@ -191,9 +191,9 @@ inline const char *ShaderInterface::builtin_uniform_name(GPUUniformBuiltin u)
case GPU_UNIFORM_BASE_INSTANCE:
return "gpu_BaseInstance";
case GPU_UNIFORM_RESOURCE_CHUNK:
return "resourceChunk";
return "drw_resourceChunk";
case GPU_UNIFORM_RESOURCE_ID:
return "resourceId";
return "drw_ResourceID";
case GPU_UNIFORM_SRGB_TRANSFORM:
return "srgbTarget";