wined3d: In device_map_psamplers(), only touch the sampler mapping for samplers that are used by the shader.
This commit is contained in:
parent
99e3abab30
commit
92fc808b05
|
@ -3291,10 +3291,11 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void device_map_psamplers(IWineD3DDeviceImpl *This) {
|
static void device_map_psamplers(IWineD3DDeviceImpl *This) {
|
||||||
|
DWORD *sampler_tokens = ((IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader)->baseShader.reg_maps.samplers;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++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);
|
device_map_stage(This, i, i);
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i));
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i));
|
||||||
if (i < MAX_TEXTURES) {
|
if (i < MAX_TEXTURES) {
|
||||||
|
|
Loading…
Reference in New Issue