Skip to content

Commit

Permalink
Fixed DCL'ing of vFace and vPos registers in D3D profile.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed May 12, 2008
1 parent 4f75cee commit 9da5504
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mojoshader.c
Expand Up @@ -1498,8 +1498,7 @@ static void emit_D3D_DCL(Context *ctx)

if (arg->regtype == REG_TYPE_SAMPLER)
{
const TextureType ttype = (const TextureType) ctx->dwords[0];
switch (ttype)
switch ((const TextureType) ctx->dwords[0])
{
case TEXTURE_TYPE_2D: usage_str = "_2d"; break;
case TEXTURE_TYPE_CUBE: usage_str = "_cube"; break;
Expand All @@ -1508,6 +1507,18 @@ static void emit_D3D_DCL(Context *ctx)
} // switch
} // if

else if (arg->regtype == REG_TYPE_MISCTYPE)
{
switch ((const MiscTypeType) arg->regnum)
{
case MISCTYPE_TYPE_POSITION:
case MISCTYPE_TYPE_FACE:
usage_str = ""; // just become "dcl vFace" or whatever.
break;
default: fail(ctx, "unknown misc register type"); return;
} // switch
} // else if

else
{
const uint32 usage = ctx->dwords[0];
Expand Down

0 comments on commit 9da5504

Please sign in to comment.