diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-07-10 12:02:23 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-07-11 08:29:32 -0700 |
commit | b390ff35170fdc2b7f1fb1709a79d81edcd56981 (patch) | |
tree | 7de3a499d1cab78265da8ff678c2cd3bb486537e /src/intel/compiler/brw_eu_emit.c | |
parent | 838374b6dd818b6ca09808c4f922d7486ecbd329 (diff) |
intel/fs: Add support for SLM fence in Gen11
Gen11 SLM is not on L3 anymore, so now the hardware has two separate
fences. Add a way to control which fence types to use.
At this time, we don't have enough information in NIR to control the
visibility of the memory being fenced, so for now be conservative and
assume that fences will need a stall. With more information later
we'll be able to reduce those.
Fixes Vulkan CTS tests in ICL:
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_nonlocal.workgroup.guard_local.buffer.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.buffer.guard_nonlocal.workgroup.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.image.guard_nonlocal.workgroup.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.buffer.guard_nonlocal.workgroup.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.image.guard_nonlocal.workgroup.comp
The whole set of supported tests in dEQP-VK.memory_model.* group
should be passing in ICL now.
v2: Pass BTI around instead of having an enum. (Jason)
Emit two SHADER_OPCODE_MEMORY_FENCE instead of one that gets
transformed into two. (Jason)
List tests fixed. (Lionel)
v3: For clarity, split the decision of which fences to emit from the
emission code. (Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
Acked-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_eu_emit.c')
-rw-r--r-- | src/intel/compiler/brw_eu_emit.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index 8e7263ce447..60761e83c62 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -3012,7 +3012,8 @@ static void brw_set_memory_fence_message(struct brw_codegen *p, struct brw_inst *insn, enum brw_message_target sfid, - bool commit_enable) + bool commit_enable, + unsigned bti) { const struct gen_device_info *devinfo = p->devinfo; @@ -3034,6 +3035,9 @@ brw_set_memory_fence_message(struct brw_codegen *p, if (commit_enable) brw_inst_set_dp_msg_control(devinfo, insn, 1 << 5); + + assert(devinfo->gen >= 11 || bti == 0); + brw_inst_set_binding_table_index(devinfo, insn, bti); } void @@ -3041,7 +3045,8 @@ brw_memory_fence(struct brw_codegen *p, struct brw_reg dst, struct brw_reg src, enum opcode send_op, - bool stall) + bool stall, + unsigned bti) { const struct gen_device_info *devinfo = p->devinfo; const bool commit_enable = stall || @@ -3062,7 +3067,7 @@ brw_memory_fence(struct brw_codegen *p, brw_set_dest(p, insn, dst); brw_set_src0(p, insn, src); brw_set_memory_fence_message(p, insn, GEN7_SFID_DATAPORT_DATA_CACHE, - commit_enable); + commit_enable, bti); if (devinfo->gen == 7 && !devinfo->is_haswell) { /* IVB does typed surface access through the render cache, so we need to @@ -3073,7 +3078,7 @@ brw_memory_fence(struct brw_codegen *p, brw_set_dest(p, insn, offset(dst, 1)); brw_set_src0(p, insn, src); brw_set_memory_fence_message(p, insn, GEN6_SFID_DATAPORT_RENDER_CACHE, - commit_enable); + commit_enable, bti); /* Now write the response of the second message into the response of the * first to trigger a pipeline stall -- This way future render and data |