Skip to content

Commit

Permalink
Maybe fix scalar operations in preshader interpreter.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 9, 2011
1 parent 7551d0f commit 68df6a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mojoshader_effects.c
Expand Up @@ -39,14 +39,15 @@ void MOJOSHADER_runPreshader(const MOJOSHADER_preshader *preshader,
for (instit = 0; instit < preshader->instruction_count; instit++, inst++)
{
const MOJOSHADER_preshaderOperand *operand = inst->operands;
const int isscalar = (inst->opcode >= scalarstart);
const int elems = inst->element_count;
const int elemsbytes = sizeof (double) * elems;
const int isscalarop = (inst->opcode >= scalarstart);

// load up our operands...
int opiter, elemiter;
for (opiter = 0; opiter < inst->operand_count-1; opiter++, operand++)
{
const int isscalar = ((isscalarop) && (opiter == 0));
const unsigned int index = operand->index;
switch (operand->type)
{
Expand Down

0 comments on commit 68df6a2

Please sign in to comment.