Skip to content

Commit

Permalink
Fixed vs_2_0 output registers that don't need to be DCL'd in GLSL pro…
Browse files Browse the repository at this point in the history
…file.

--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 20, 2008
1 parent 897e1ad commit 0c4cd98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mojoshader.c
Expand Up @@ -1983,6 +1983,7 @@ static void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum,
if (regtype == REG_TYPE_RASTOUT)
{
regtype = REG_TYPE_OUTPUT;
index = regnum;
switch ((const RastOutType) regnum)
{
case RASTOUT_TYPE_POSITION:
Expand All @@ -2001,12 +2002,14 @@ static void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum,
{
regtype = REG_TYPE_OUTPUT;
usage = MOJOSHADER_USAGE_COLOR;
index = regnum;
} // else if

else if (regtype == REG_TYPE_TEXCRDOUT)
{
regtype = REG_TYPE_OUTPUT;
usage = MOJOSHADER_USAGE_TEXCOORD;
index = regnum;
} // else if
} // if

Expand All @@ -2032,7 +2035,6 @@ static void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum,

else if (regtype == REG_TYPE_OUTPUT)
{
const uint32 index = ctx->dwords[1];
const char *arrayleft = "";
const char *arrayright = "";

Expand Down

0 comments on commit 0c4cd98

Please sign in to comment.