wined3d: Use slightly nicer loops in device_map_fixed_function_samplers().
This commit is contained in:
parent
e9569d9c4e
commit
0657e8d87a
|
@ -3671,13 +3671,16 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) {
|
||||||
|
|
||||||
static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
|
static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
|
||||||
int i, tex;
|
int i, tex;
|
||||||
|
WORD ffu_map;
|
||||||
|
|
||||||
device_update_fixed_function_usage_map(This);
|
device_update_fixed_function_usage_map(This);
|
||||||
|
ffu_map = This->fixed_function_usage_map;
|
||||||
|
|
||||||
if (This->max_ffp_textures == This->max_ffp_texture_stages ||
|
if (This->max_ffp_textures == This->max_ffp_texture_stages ||
|
||||||
This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) {
|
This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) {
|
||||||
for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) {
|
for (i = 0; ffu_map; ffu_map >>= 1, ++i)
|
||||||
if (!(This->fixed_function_usage_map & (1 << i))) continue;
|
{
|
||||||
|
if (!(ffu_map & 1)) continue;
|
||||||
|
|
||||||
if (This->texUnitMap[i] != i) {
|
if (This->texUnitMap[i] != i) {
|
||||||
device_map_stage(This, i, i);
|
device_map_stage(This, i, i);
|
||||||
|
@ -3690,8 +3693,9 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
|
||||||
|
|
||||||
/* Now work out the mapping */
|
/* Now work out the mapping */
|
||||||
tex = 0;
|
tex = 0;
|
||||||
for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) {
|
for (i = 0; ffu_map; ffu_map >>= 1, ++i)
|
||||||
if (!(This->fixed_function_usage_map & (1 << i))) continue;
|
{
|
||||||
|
if (!(ffu_map & 1)) continue;
|
||||||
|
|
||||||
if (This->texUnitMap[i] != tex) {
|
if (This->texUnitMap[i] != tex) {
|
||||||
device_map_stage(This, i, tex);
|
device_map_stage(This, i, tex);
|
||||||
|
|
Loading…
Reference in New Issue