diff options
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_extensions.py | 5 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index d4cd56dc177..d6311a66fa4 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -928,7 +928,7 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer) const uint32_t length = cmd_buffer->batch.next - cmd_buffer->batch.start; if (!cmd_buffer->device->can_chain_batches) { cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_GROW_AND_EMIT; - } else if (cmd_buffer->device->physical->use_softpin) { + } else if (cmd_buffer->device->physical->use_call_secondary) { cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_CALL_AND_RETURN; /* If the secondary command buffer begins & ends in the same BO and * its length is less than the length of CS prefetch, add some NOOPs diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 8178a128089..52f2ab44af5 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -454,6 +454,10 @@ anv_physical_device_try_create(struct anv_instance *instance, device->always_use_bindless = env_var_as_boolean("ANV_ALWAYS_BINDLESS", false); + device->use_call_secondary = + device->use_softpin && + !env_var_as_boolean("ANV_DISABLE_SECONDARY_CMD_BUFFER_CALLS", false); + /* We first got the A64 messages on broadwell and we can only use them if * we can pass addresses directly into the shader which requires softpin. */ diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index 82bdee9b90e..8ee1ab7230c 100644 --- a/src/intel/vulkan/anv_extensions.py +++ b/src/intel/vulkan/anv_extensions.py @@ -87,7 +87,10 @@ EXTENSIONS = [ Extension('VK_KHR_maintenance2', 1, True), Extension('VK_KHR_maintenance3', 1, True), Extension('VK_KHR_multiview', 1, True), - Extension('VK_KHR_performance_query', 1, 'device->use_softpin && device->perf && device->perf->i915_perf_version >= 3'), + Extension('VK_KHR_performance_query', 1, + 'device->use_softpin && device->perf && ' + + 'device->perf->i915_perf_version >= 3 && ' + + 'device->use_call_secondary'), Extension('VK_KHR_pipeline_executable_properties', 1, True), Extension('VK_KHR_push_descriptor', 1, True), Extension('VK_KHR_relaxed_block_layout', 1, True), diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 5f9bff5d5aa..56fadcd8e0a 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1084,6 +1084,7 @@ struct anv_physical_device { bool use_softpin; bool always_use_bindless; + bool use_call_secondary; /** True if we can access buffers using A64 messages */ bool has_a64_buffer_access; |