llvmpipe: fix check for a no-op shader
authorBrian Paul <brianp@vmware.com>
Fri, 18 May 2018 01:57:21 +0000 (19:57 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 18 May 2018 15:09:41 +0000 (09:09 -0600)
commit42aee8f4f68d9fd3ece5ece57f23f63a60e7d1fa
treee2dba54712e91e11b80a679f2a481016e3735874
parent03c4816093b5ca1f72436fdb9576893690cfdd0e
llvmpipe: fix check for a no-op shader

The tgsi_info.num_tokens fix broke llvmpipe's detection of no-op shaders.
Fix the code to check for num_instructions <= 1 instead.

Fixes: 8fde9429c36b75 ("tgsi: fix incorrect tgsi_shader_info::num_tokens
computation")
Tested-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_state_fs.c