ttn: small logic cleanup

The only case where dim!=NULL is where op==load_ubo.  But using
op==load_ubo is less confusing.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
Rob Clark 2016-01-21 13:32:37 -05:00
parent b6cf98bc82
commit b1770235ed

View file

@ -614,7 +614,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
}
nir_ssa_def *offset;
if (dim) {
if (op == nir_intrinsic_load_ubo) {
/* UBO loads don't have a const_index[0] base offset. */
offset = nir_imm_int(b, index);
if (indirect) {