intel/fs,vec4: Properly account SENDs in IVB memory fence

Change brw_memory_fence to return the number of messages emitted, and
use that to update the send_count statistic in code generation.

This will fix the book-keeping for IVB since the memory fences will
result in two SEND messages.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4646>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2020-01-03 10:05:39 -08:00
parent c3c1f4d6bc
commit c76f2292b5
4 changed files with 20 additions and 8 deletions
+6 -3
View File
@@ -2216,12 +2216,15 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
generate_shader_time_add(inst, src[0], src[1], src[2]);
break;
case SHADER_OPCODE_MEMORY_FENCE:
case SHADER_OPCODE_MEMORY_FENCE: {
assert(src[1].file == BRW_IMMEDIATE_VALUE);
assert(src[2].file == BRW_IMMEDIATE_VALUE);
brw_memory_fence(p, dst, src[0], BRW_OPCODE_SEND, src[1].ud, src[2].ud);
send_count++;
const unsigned sends =
brw_memory_fence(p, dst, src[0], BRW_OPCODE_SEND, src[1].ud,
src[2].ud);
send_count += sends;
break;
}
case FS_OPCODE_SCHEDULING_FENCE:
if (unlikely(debug_flag))