radeonsi: use the correct LLVMTargetMachineRef in si_build_shader_variant
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Jun 2017 20:33:56 +0000 (22:33 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 22 Jun 2017 07:45:23 +0000 (09:45 +0200)
commitda2e52b382351fea6f0321ad9a24c099b360e685
treed280eb37c207f20452ba29b951ed748b1c7aade5
parent79bd1d4f8b9f176b099854c6954960dc7fc53b02
radeonsi: use the correct LLVMTargetMachineRef in si_build_shader_variant

si_build_shader_variant can actually be called directly from one of
normal-priority compiler threads. In that case, the thread_index is
only valid for the normal tm array.

v2:
- use the correct sel/shader->compiler_ctx_state

Fixes: 86cc8097266c ("radeonsi: use a compiler queue with a low priority for optimized shaders")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c