DRW: Fix builtin uniform name mismatch
This lead to severe unreported regression, like volume rendering broken in workbench.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user