Commit 6bdf6411 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Use YieldProcessor().

parent 86fc30c1
...@@ -646,7 +646,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw ...@@ -646,7 +646,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
* ahead of the worker thread. */ * ahead of the worker thread. */
while (pending >= swapchain->max_frame_latency) while (pending >= swapchain->max_frame_latency)
{ {
wined3d_pause(); YieldProcessor();
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0); pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
} }
} }
...@@ -2822,7 +2822,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id ...@@ -2822,7 +2822,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
return wined3d_cs_st_finish(cs, queue_id); return wined3d_cs_st_finish(cs, queue_id);
while (cs->queue[queue_id].head != *(volatile LONG *)&cs->queue[queue_id].tail) while (cs->queue[queue_id].head != *(volatile LONG *)&cs->queue[queue_id].tail)
wined3d_pause(); YieldProcessor();
} }
static const struct wined3d_cs_ops wined3d_cs_mt_ops = static const struct wined3d_cs_ops wined3d_cs_mt_ops =
......
...@@ -424,13 +424,6 @@ static inline unsigned int wined3d_popcount(unsigned int x) ...@@ -424,13 +424,6 @@ static inline unsigned int wined3d_popcount(unsigned int x)
#endif #endif
} }
static inline void wined3d_pause(void)
{
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
__asm__ __volatile__( "rep;nop" : : : "memory" );
#endif
}
#define ORM_BACKBUFFER 0 #define ORM_BACKBUFFER 0
#define ORM_FBO 1 #define ORM_FBO 1
...@@ -4817,7 +4810,7 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource) ...@@ -4817,7 +4810,7 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
return; return;
while (InterlockedCompareExchange(&resource->access_count, 0, 0)) while (InterlockedCompareExchange(&resource->access_count, 0, 0))
wined3d_pause(); YieldProcessor();
} }
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
......
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