Commit a05052a9 authored by Erik Faye-Lund 's avatar Erik Faye-Lund

d3d12: ensure resources are actually in the stream-out state

If we don't use the pre-draw flag here, we won't end up transitioning
these until some time after the draw, which isn't what we want.
parent cfb3fe53
...@@ -678,9 +678,9 @@ d3d12_draw_vbo(struct pipe_context *pctx, ...@@ -678,9 +678,9 @@ d3d12_draw_vbo(struct pipe_context *pctx,
} }
d3d12_transition_resource_state(ctx, so_buffer, D3D12_RESOURCE_STATE_STREAM_OUT, d3d12_transition_resource_state(ctx, so_buffer, D3D12_RESOURCE_STATE_STREAM_OUT,
SubresourceTransitionFlags::SubresourceTransitionFlags_None); SubresourceTransitionFlags_TransitionPreDraw);
d3d12_transition_resource_state(ctx, fill_buffer, D3D12_RESOURCE_STATE_STREAM_OUT, d3d12_transition_resource_state(ctx, fill_buffer, D3D12_RESOURCE_STATE_STREAM_OUT,
SubresourceTransitionFlags::SubresourceTransitionFlags_None); SubresourceTransitionFlags_TransitionPreDraw);
} }
if (ctx->cmdlist_dirty & D3D12_DIRTY_STREAM_OUTPUT) if (ctx->cmdlist_dirty & D3D12_DIRTY_STREAM_OUTPUT)
ctx->cmdlist->SOSetTargets(0, 4, so_buffer_views); ctx->cmdlist->SOSetTargets(0, 4, so_buffer_views);
......
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