51 "atomicCounterDecrement",
52 "atomicCounterIncrement",
118 "groupMemoryBarrier",
122 "imageAtomicCompSwap",
123 "imageAtomicExchange",
134 "interpolateAtCentriod",
135 "interpolateAtOffset",
136 "interpolateAtSample",
165 "memoryBarrierAtomicCounter",
166 "memoryBarrierBuffer",
167 "memoryBarrierImage",
168 "memoryBarrierShared",
190 "sampler1DArrayShadow",
194 "sampler2DArrayShadow",
203 "samplerCubeArrayShadow",
219 "textureGatherOffset",
220 "textureGatherOffsets",
228 "textureProjGradOffset",
230 "textureProjLodOffset",
232 "textureQueryLevels",
302 "gl_GlobalInvocationID",
306 "gl_LocalInvocationID",
307 "gl_LocalInvocationIndex",
310 "gl_PatchVerticesIn",
369 if (
string[0] ==
'#') {
411 char cont_orig, cont, find, prev =
' ';
415 if (line->prev && line->prev->format !=
nullptr) {
416 fmt = line->prev->format;
417 cont = fmt[strlen(fmt) + 1];
425 if (line->format !=
nullptr) {
427 cont_orig = fmt[strlen(fmt) + 1];
460 if (*
str ==
'*' && *(
str + 1) ==
'/') {
485 if (*
str ==
'/' && *(
str + 1) ==
'/') {
490 else if (*
str ==
'/' && *(
str + 1) ==
'*') {
497 else if (
ELEM(*
str,
'"',
'\'')) {
504 else if (*
str ==
' ') {
562 if (cont != cont_orig && do_next && line->next) {
578 static const char *ext[] = {
"glsl",
nullptr};
bool text_check_digit(char ch)
bool text_check_identifier(char ch)
bool text_check_delim(char ch)
bool text_check_whitespace(char ch)
int BLI_str_utf8_size_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
const char * comment_line
char(* format_identifier)(const char *string)
void(* format_line)(SpaceText *st, TextLine *line, bool do_next)
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len)
void flatten_string_free(FlattenString *fs)
const bool text_format_string_literals_check_sorted_array(const Span< const char * > string_literals)
int text_format_string_literal_find(const Span< const char * > string_literals, const char *text)
void text_format_fill_ascii(const char **str_p, char **fmt_p, const char type, const int len)
void ED_text_format_register(TextFormatType *tft)
int text_check_format_len(TextLine *line, uint len)
static char txtfmt_glsl_format_identifier(const char *str)
static const char * text_format_glsl_literals_reserved_data[]
static int txtfmt_glsl_find_builtinfunc(const char *string)
static void txtfmt_glsl_format_line(SpaceText *st, TextLine *line, const bool do_next)
void ED_text_format_register_glsl()
static const Span< const char * > text_format_glsl_literals_builtinfunc(text_format_glsl_literals_builtinfunc_data, ARRAY_SIZE(text_format_glsl_literals_builtinfunc_data))
static int txtfmt_glsl_find_preprocessor(const char *string)
static const char * text_format_glsl_literals_builtinfunc_data[]
static int txtfmt_glsl_find_specialvar(const char *string)
static const char * text_format_glsl_literals_specialvar_data[]
static const Span< const char * > text_format_glsl_literals_reserved(text_format_glsl_literals_reserved_data, ARRAY_SIZE(text_format_glsl_literals_reserved_data))
static int txtfmt_glsl_find_reserved(const char *string)
static const Span< const char * > text_format_glsl_literals_specialvar(text_format_glsl_literals_specialvar_data, ARRAY_SIZE(text_format_glsl_literals_specialvar_data))