Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set relative_component correctly when parsing source registers.
Fixes address a0.(y|z|w) from unconditionally becoming a0.x ...
  • Loading branch information
icculus committed Oct 24, 2011
1 parent dd8c2b5 commit baf58a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojoshader.c
Expand Up @@ -5708,6 +5708,8 @@ static int parse_source_token(Context *ctx, SourceArgInfo *info)
if (!replicate_swizzle(relswiz))
fail(ctx, "relative address needs replicate swizzle");

info->relative_component = (relswiz & 0x3);

if (info->regtype == REG_TYPE_INPUT)
{
if ( (shader_is_pixel(ctx)) || (!shader_version_atleast(ctx, 3, 0)) )
Expand Down

0 comments on commit baf58a3

Please sign in to comment.