In some cases, we need a register to be assigned up to three components
before the base. Since we can't have negative register #'s, just shift
everything up. May increase register usage for trivial shaders, but I
don't think we are shader limited in those cases. A proper solution is
going to require a better register assignment algorithm (which is on the
TODO list), this is just a hack to get us by until then.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
*/
if (ctx->type == SHADER_FRAGMENT) {
if (ctx->half_precision)
- return ctx->frag_face ? 1 : 0;
- return ctx->frag_coord ? 6 : 2;
+ return ctx->frag_face ? 4 : 3;
+ return ctx->frag_coord ? 8 : 4;
}
return 0;
}