Am Dienstag, 4. Dezember 2007 01:34:55 schrieb Gerald Pfeifer:
This looks like a mistaken consistency check. The code where mapped_stage is set looks as follows:
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[texUnit];
and at other places we do check for -1, so this looks like another bug in error handling.
In fact the texUnitMap entries are never set to any value < 0 other than -1, so it doesn't make much difference, but for the sake of consistency we should check for -1 here as well