HomePhabricator
Diffusion Mesa 8fde9429c36b

tgsi: fix incorrect tgsi_shader_info::num_tokens computation

Authored by Brian Paul <brianp@vmware.com> on May 17 2018, 9:38 PM.

Description

tgsi: fix incorrect tgsi_shader_info::num_tokens computation

We were incrementing num_tokens in each loop iteration while parsing
the shader. But each call to tgsi_parse_token() can consume more than
one token (and often does). Instead, just call the tgsi_num_tokens()
function.

Luckily, this issue doesn't seem to effect any current users of this
field (llvmpipe just checks for <= 1, for example).

Reviewed-by: Neha Bhende<bhenden@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>

Details

Committed
Brian Paul <brianp@vmware.com>May 17 2018, 11:02 PM
Pushed
pmoreauMay 22 2018, 7:03 PM
Parents
rMESAfcba3934fc13: radv: add radv_emit_shader_pointer() helper
Branches
Unknown
Tags
Unknown