From 8d0fe0594b68745c507013b11b453f16411ecbcb Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 2 Jul 2008 16:00:47 -0400 Subject: [PATCH] Fixed output to POSITION0. We have a separate loop to find the POSITION0 input register, so it always becomes vertex array #0...but an incorrect test was causing it to ignore output registers for POSITION0. --HG-- branch : trunk --- mojoshader.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 2e6dc4e5..1be92083 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -7335,10 +7335,11 @@ static void process_definitions(Context *ctx) (TextureType) item->index); } // for - // ...and attributes... (find POSITION0 here, so it's always first). + // ...and attributes... (find input POSITION0 here, so it's always first). for (item = ctx->attributes.next; item != NULL; item = item->next) { - if ((item->usage == MOJOSHADER_USAGE_POSITION) && (item->index == 0)) + if ( (item->regtype == REG_TYPE_INPUT) && + (item->usage == MOJOSHADER_USAGE_POSITION) && (item->index == 0) ) { ctx->attribute_count++; ctx->profile->attribute_emitter(ctx, item->regtype, item->regnum, @@ -7348,10 +7349,11 @@ static void process_definitions(Context *ctx) } // if } // for - // ...and attributes... (everything but POSITION0). + // ...and attributes... (everything but input POSITION0). for (item = ctx->attributes.next; item != NULL; item = item->next) { - if ((item->usage != MOJOSHADER_USAGE_POSITION) || (item->index != 0)) + if ( (item->regtype != REG_TYPE_INPUT) || + (item->usage != MOJOSHADER_USAGE_POSITION) || (item->index != 0) ) { ctx->attribute_count++; ctx->profile->attribute_emitter(ctx, item->regtype, item->regnum,