spirv: add SPV_KHR_shader_draw_parameters support

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Lionel Landwerlin
2017-01-25 13:58:14 +00:00
parent bd46040162
commit 875b15eec4
3 changed files with 17 additions and 0 deletions

View File

@@ -1010,6 +1010,18 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_GLOBAL_INVOCATION_ID;
set_mode_system_value(mode);
break;
case SpvBuiltInBaseVertex:
*location = SYSTEM_VALUE_BASE_VERTEX;
set_mode_system_value(mode);
break;
case SpvBuiltInBaseInstance:
*location = SYSTEM_VALUE_BASE_INSTANCE;
set_mode_system_value(mode);
break;
case SpvBuiltInDrawIndex:
*location = SYSTEM_VALUE_DRAW_ID;
set_mode_system_value(mode);
break;
case SpvBuiltInHelperInvocation:
default:
unreachable("unsupported builtin");