Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl_codegen.c:
if ((string = hlsl_type_to_string(ctx, type)))
hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Wrong type for argument %u of [numthreads]: expected int or uint, but got %s.",
i, string->buffer);
hlsl_release_string_buffer(ctx, string);
break;
}
if (instr->type != HLSL_IR_CONSTANT)
{
hlsl_fixme(ctx, &instr->loc, "Non-constant expression in [numthreads] initializer.");
break;
}
if (!(ctx->thread_count[i] = hlsl_ir_constant(instr)->value[0].u))
I don't think this is covering the case when instr is a negative signed integer.