tgsi: don't fail on unknown property

They should mostly be fine, as long the shader compiles. The reported
error should be enough to diagnose something going wrong in case of
failure.

This should help avoiding temporary regressions when new properties are
introduced in mesa.git before they are either handled or filtered out by
virgl, as was the case with commit fbe6e92899.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent fee6e71c70
commit 6fc22d35f7
  1. 13
      src/gallium/auxiliary/tgsi/tgsi_text.c

@ -119,6 +119,14 @@ static boolean str_match_nocase_whole( const char **pcur, const char *str )
return FALSE;
}
/* Eat until eol
*/
static void eat_until_eol( const char **pcur )
{
while (**pcur != '\0' && **pcur != '\n')
(*pcur)++;
}
/* Eat zero or more whitespaces.
*/
static void eat_opt_white( const char **pcur )
@ -1593,8 +1601,9 @@ static boolean parse_property( struct translate_ctx *ctx )
}
}
if (property_name >= TGSI_PROPERTY_COUNT) {
debug_printf( "\nError: Unknown property : '%s'", id );
return FALSE;
eat_until_eol( &ctx->cur );
report_error(ctx, "\nError: Unknown property : '%s'\n", id);
return TRUE;
}
eat_opt_white( &ctx->cur );

Loading…
Cancel
Save