Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW);
}
+ uint32_t surface_index = inst->opcode == SHADER_OPCODE_TG4
+ ? SURF_INDEX_GATHER_TEXTURE(inst->sampler)
+ : SURF_INDEX_TEXTURE(inst->sampler);
+
brw_SAMPLE(p,
retype(dst, BRW_REGISTER_TYPE_UW),
inst->base_mrf,
src,
- SURF_INDEX_TEXTURE(inst->sampler),
+ surface_index,
inst->sampler,
msg_type,
rlen,
simd_mode,
return_format);
- mark_surface_used(SURF_INDEX_TEXTURE(inst->sampler));
+ mark_surface_used(surface_index);
}
break;
}
+ uint32_t surface_index = inst->opcode == SHADER_OPCODE_TG4
+ ? SURF_INDEX_VEC4_GATHER_TEXTURE(inst->sampler)
+ : SURF_INDEX_VEC4_TEXTURE(inst->sampler);
+
brw_SAMPLE(p,
dst,
inst->base_mrf,
src,
- SURF_INDEX_VEC4_TEXTURE(inst->sampler),
+ surface_index,
inst->sampler,
msg_type,
1, /* response length */
BRW_SAMPLER_SIMD_MODE_SIMD4X2,
return_format);
- mark_surface_used(SURF_INDEX_VEC4_TEXTURE(inst->sampler));
+ mark_surface_used(surface_index);
}
void