Skip to content
Permalink
Browse files
Handle MOJOSHADER_USAGE_UNKNOWN in SPIR-V linker
  • Loading branch information
flibitijibibo committed Aug 26, 2020
1 parent 27548b2 commit 16900dfa4a8315ea264282ec0204115f3113a2fa
Showing with 3 additions and 0 deletions.
  1. +3 −0 mojoshader_common.c
@@ -1073,6 +1073,8 @@ void MOJOSHADER_spirv_link_attributes(const MOJOSHADER_parseData *vertex,
for (i = 0; i < pixel->attribute_count; i++)
{
const MOJOSHADER_attribute *pAttr = &pixel->attributes[i];
if (pAttr->usage == MOJOSHADER_USAGE_UNKNOWN)
continue; // Probably something like VPOS, ignore!
if (pAttr->usage == MOJOSHADER_USAGE_COLOR && pAttr->index == 0)
continue;

@@ -1089,6 +1091,7 @@ void MOJOSHADER_spirv_link_attributes(const MOJOSHADER_parseData *vertex,
for (i = 0; i < vertex->output_count; i++)
{
const MOJOSHADER_attribute *vAttr = &vertex->outputs[i];
assert(vAttr->usage != MOJOSHADER_USAGE_UNKNOWN);
if (vAttr->usage == MOJOSHADER_USAGE_POSITION && vAttr->index == 0)
continue;
if (vAttr->usage == MOJOSHADER_USAGE_POINTSIZE && vAttr->index == 0)

0 comments on commit 16900df

Please sign in to comment.