Module: wine
Branch: master
Commit: 1205c33c90ed493fd26fc4bc102d55b8df28d9b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1205c33c90ed493fd26fc4bc1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Mon Mar 30 11:24:54 2009 +0200
wined3d: Use the output slot when we have one.
---
dlls/wined3d/device.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 84f216a..5d3f400 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -250,7 +250,19 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
if (use_vshader)
{
- stride_used = vshader_get_input(This->stateBlock->vertexShader, element->usage, element->usage_idx, &idx);
+ if (element->output_slot == ~0U)
+ {
+ /* TODO: Assuming vertexdeclarations are usually used with the
+ * same or a similar shader, it might be worth it to store the
+ * last used output slot and try that one first. */
+ stride_used = vshader_get_input(This->stateBlock->vertexShader,
+ element->usage, element->usage_idx, &idx);
+ }
+ else
+ {
+ idx = element->output_slot;
+ stride_used = TRUE;
+ }
}
else
{