diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/genX_state.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index bf2a5a6dc75..856ae2abf11 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1804,7 +1804,7 @@ void genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer, const struct gen_l3_config *cfg) { - assert(cfg); + assert(cfg || GEN_GEN >= 12); if (cfg == cmd_buffer->state.current_l3_config) return; diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index 3c5033459d0..316a56ab730 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -294,6 +294,20 @@ genX(init_device_state)(struct anv_device *device) #endif } +#if GEN_GEN >= 12 + const struct gen_l3_config *cfg = gen_get_default_l3_config(&device->info); + if (!cfg) { + /* Platforms with no configs just setup full-way allocation. */ + uint32_t l3cr; + anv_pack_struct(&l3cr, GENX(L3ALLOC), + .L3FullWayAllocationEnable = true); + anv_batch_emit(&batch, GENX(MI_LOAD_REGISTER_IMM), lri) { + lri.RegisterOffset = GENX(L3ALLOC_num); + lri.DataDWord = l3cr; + } + } +#endif + anv_batch_emit(&batch, GENX(MI_BATCH_BUFFER_END), bbe); assert(batch.next <= batch.end); |