Commit 10ffa291 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Remove the sharing of mapping code for fixed function and pixel shader samplers.

parent 2aa891c1
......@@ -3214,6 +3214,19 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
device_update_fixed_function_usage_map(This);
if (This->stateBlock->lowest_disabled_stage <= GL_LIMITS(textures)) {
for (i = 0; i < MAX_SAMPLERS; ++i) {
if (This->texUnitMap[i] != i) {
device_map_stage(This, i, i);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i));
if (i < MAX_TEXTURES) {
markTextureStagesDirty(This, i);
}
}
}
return;
}
/* No pixel shader, and we do not have enough texture units available. Try to skip NULL textures
* First, see if we can succeed at all
*/
......@@ -3266,7 +3279,7 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) {
* -> Whith a 1:1 mapping oneToOneTexUnitMap is set to avoid checking MAX_SAMPLERS array
* entries to make pixel shaders cheaper. MAX_SAMPLERS will be 128 in dx10
*/
if(This->stateBlock->pixelShader || This->stateBlock->lowest_disabled_stage <= GL_LIMITS(textures)) {
if (This->stateBlock->pixelShader) {
if(This->oneToOneTexUnitMap) {
TRACE("Not touching 1:1 map\n");
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment