From 31262bbce085c69ef7a654528f509cb37415b41f Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sat, 12 Nov 2016 23:36:35 +0100 Subject: st/nine: use get_pipe_acquire/release when possible Use the acquire/release semantic when we don't need to wait for any pending command. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/vertexshader9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/nine/vertexshader9.c') diff --git a/src/gallium/state_trackers/nine/vertexshader9.c b/src/gallium/state_trackers/nine/vertexshader9.c index 79a49d13b6c..a4228af157e 100644 --- a/src/gallium/state_trackers/nine/vertexshader9.c +++ b/src/gallium/state_trackers/nine/vertexshader9.c @@ -56,7 +56,6 @@ NineVertexShader9_ctor( struct NineVertexShader9 *This, } device = This->base.device; - pipe = NineDevice9_GetPipe(device); info.type = PIPE_SHADER_VERTEX; info.byte_code = pFunction; @@ -70,6 +69,7 @@ NineVertexShader9_ctor( struct NineVertexShader9 *This, info.swvp_on = !!(device->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING); info.process_vertices = false; + pipe = nine_context_get_pipe_acquire(device); hr = nine_translate_shader(device, &info, pipe); if (hr == D3DERR_INVALIDCALL && (device->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING)) { @@ -77,6 +77,7 @@ NineVertexShader9_ctor( struct NineVertexShader9 *This, info.swvp_on = true; hr = nine_translate_shader(device, &info, pipe); } + nine_context_get_pipe_release(device); if (hr == D3DERR_INVALIDCALL) ERR("Encountered buggy shader\n"); if (FAILED(hr)) -- cgit v1.2.3