Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
if (simd16_instructions) {
/* align to 64 byte boundary. */
- while ((p->nr_insn * sizeof(struct brw_instruction)) % 64) {
+ while (p->next_insn_offset % 64) {
brw_NOP(p);
}
/* Save off the start of this SIMD16 program */
- prog_data->prog_offset_16 = p->nr_insn * sizeof(struct brw_instruction);
+ prog_data->prog_offset_16 = p->next_insn_offset;
brw_set_compression_control(p, BRW_COMPRESSION_COMPRESSED);
if (simd16_instructions) {
/* Align to a 64-byte boundary. */
- while ((nr_inst * sizeof(gen8_instruction)) % 64)
+ while (next_inst_offset % 64)
NOP();
/* Save off the start of this SIMD16 program */
- prog_data->prog_offset_16 = nr_inst * sizeof(gen8_instruction);
+ prog_data->prog_offset_16 = next_inst_offset;
struct annotation_info annotation;
memset(&annotation, 0, sizeof(annotation));