When calculating the binding table index for non-constant sampler array indexing it needs to add the base binding table index which is a constant within the generated code. Often this base is zero so we can avoid a redundant instruction in that case.
It looks like nothing in shader-db is doing non-constant sampler array indexing so this patch doesn't make any difference but it might be worth having anyway.
7f62fda i965: Don't add base_binding_table_index if it's zero
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 ++-
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
Upstream: cgit.freedesktop.org