wined3d: In device_map_psamplers(), only touch the sampler mapping for samplers that are used by the shader.

This commit is contained in:
H. Verbeet 2007-06-28 23:32:53 +02:00 committed by Alexandre Julliard
parent 99e3abab30
commit 92fc808b05
1 changed files with 2 additions and 1 deletions

View File

@ -3291,10 +3291,11 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
}
static void device_map_psamplers(IWineD3DDeviceImpl *This) {
DWORD *sampler_tokens = ((IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader)->baseShader.reg_maps.samplers;
int i;
for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) {
if (This->texUnitMap[i] != i) {
if (sampler_tokens[i] && This->texUnitMap[i] != i) {
device_map_stage(This, i, i);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i));
if (i < MAX_TEXTURES) {