wined3d: Use the output slot when we have one.
Henri Verbeet
hverbeet at codeweavers.com
Mon Mar 30 04:24:54 CDT 2009
---
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
{
--
1.6.0.6
--------------030904010707040100040007--
More information about the wine-patches
mailing list