From: Rob Clark <[email protected]> Unlike glsl/vk compute shaders, this isn't a builtin constant.
Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Karol Herbst <[email protected]> --- src/compiler/spirv/vtn_variables.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index df7edb3915..3ca084801a 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1276,8 +1276,8 @@ vtn_get_builtin_location(struct vtn_builder *b, set_mode_system_value(b, mode); break; case SpvBuiltInWorkgroupSize: - /* This should already be handled */ - vtn_fail("unsupported builtin"); + *location = SYSTEM_VALUE_LOCAL_GROUP_SIZE; + set_mode_system_value(b, mode); break; case SpvBuiltInWorkgroupId: *location = SYSTEM_VALUE_WORK_GROUP_ID; @@ -1407,7 +1407,7 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var, case SpvDecorationBuiltIn: { SpvBuiltIn builtin = dec->literals[0]; - if (builtin == SpvBuiltInWorkgroupSize) { + if ((builtin == SpvBuiltInWorkgroupSize) && !b->kernel_mode) { /* This shouldn't be a builtin. It's actually a constant. */ nir_var->data.mode = nir_var_global; nir_var->data.read_only = true; -- 2.14.3 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
