Skip to content

Commit

Permalink
Hopefully fixed ARB1 profile's output to work on Nvidia's OpenGL.
Browse files Browse the repository at this point in the history
It doesn't seem to like ALIASing of single elements of PARAM arrays.

--HG--
branch : trunk
  • Loading branch information
icculus committed Jun 2, 2008
1 parent 919af2d commit 25d5a9f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mojoshader.c
Expand Up @@ -3812,8 +3812,13 @@ static void emit_ARB1_uniform(Context *ctx, RegisterType regtype, int regnum)

if ((regtype == REG_TYPE_CONST) && (ctx->uniform_array))
{
const char *constarray = get_ARB1_const_array_varname(ctx);
output_line(ctx, "ALIAS %s = %s[%d];", varname, constarray, regnum);
// The ALIAS version works on Apple's OpenGL, but not Nvidia's.
//const char *constarray = get_ARB1_const_array_varname(ctx);
//output_line(ctx, "ALIAS %s = %s[%d];", varname, constarray, regnum);

// This works everywhere.
// !!! FIXME: does this eat more resources?
output_line(ctx, "PARAM %s = program.env[%d];", varname, regnum);
} // if
else
{
Expand Down

0 comments on commit 25d5a9f

Please sign in to comment.