Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Report the main function name in testparse.
  • Loading branch information
icculus committed May 29, 2016
1 parent 6d0ae93 commit 97f5849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mojoshader.h
Expand Up @@ -538,9 +538,11 @@ typedef struct MOJOSHADER_parseData
int minor_ver;

/*
* This is the main function name of the shader. On profiles that need
* the caller to supply this, this will be the caller-supplied string.
* Otherwise, it'll be the name chosen by the profile ("main") or
* This is the main function name of the shader. This will be the
* caller-supplied string even if a given profile ignores it (GLSL,
* for example, always uses "main" in the shader output out of necessity,
* and Direct3D assembly has no concept of a "main function", etc).
* Otherwise, it'll be a default name chosen by the profile ("main") or
* whatnot.
*/
const char *mainfn;
Expand Down
1 change: 1 addition & 0 deletions utils/testparse.c
Expand Up @@ -296,6 +296,7 @@ static void print_shader(const char *fname, const MOJOSHADER_parseData *pd,
INDENT(); printf("SHADER TYPE: %s\n", shader_type(pd->shader_type));
INDENT(); printf("VERSION: %d.%d\n", pd->major_ver, pd->minor_ver);
INDENT(); printf("INSTRUCTION COUNT: %d\n", (int) pd->instruction_count);
INDENT(); printf("MAIN FUNCTION: %s\n", pd->mainfn);
print_attrs("INPUTS", pd->attribute_count, pd->attributes, indent);
print_attrs("OUTPUTS", pd->output_count, pd->outputs, indent);

Expand Down

0 comments on commit 97f5849

Please sign in to comment.