[2/3] wined3d: In device_map_psamplers(),
only touch the sampler mapping for samplers that are used by the
shader
H. Verbeet
hverbeet at gmail.com
Thu Jun 28 16:32:53 CDT 2007
Should potentially cut down a bit on dirtification of samplers and
related states.
Changelog:
- In device_map_psamplers(), only touch the sampler mapping for
samplers that are used by the shader
-------------- next part --------------
---
dlls/wined3d/device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5d3a7ce..947038a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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) {
More information about the wine-patches
mailing list