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
@@ -1910,10 +1910,13 @@ generate_code(struct brw_codegen *p,
send_count++;
break;
case SHADER_OPCODE_MEMORY_FENCE:
brw_memory_fence(p, dst, src[0], BRW_OPCODE_SEND, false, /* bti */ 0);
send_count++;
case SHADER_OPCODE_MEMORY_FENCE: {
const unsigned sends =
brw_memory_fence(p, dst, src[0], BRW_OPCODE_SEND, false,
/* bti */ 0);
send_count += sends;
break;
}
case SHADER_OPCODE_FIND_LIVE_CHANNEL: {
const struct brw_reg mask =