class CommandBuffer
Defined at line 22 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
Public Methods
std::unique_ptr<CommandBuffer> Create (std::weak_ptr<MsdIntelContext> context, msd::magma_command_buffer * cmd_buf, magma_exec_resource * exec_resources, msd::Buffer ** msd_buffers, msd::Semaphore ** msd_wait_semaphores, msd::Semaphore ** msd_signal_semaphores)
Takes a weak reference on the context which it locks for the duration of its execution
holds a shared reference to the buffers backing |abi_cmd_buf| and |exec_buffers| for the
lifetime of this object
Defined at line 16 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
std::unique_ptr<CommandBuffer> Create (std::shared_ptr<MsdVsiContext> context, msd::msd_client_id_t client_id, std::unique_ptr<msd::magma_command_buffer> cmd_buf, std::vector<ExecResource> resources, std::vector<std::shared_ptr<magma::PlatformSemaphore>> signal_semaphores)
Defined at line 24 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
void CommandBuffer (std::weak_ptr<MsdVsiContext> context, uint64_t connection_id, std::unique_ptr<msd::magma_command_buffer> command_buffer, std::optional<uint32_t> csb_resource_index)
Defined at line 46 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
std::vector<std::shared_ptr<magma::PlatformSemaphore>> wait_semaphores ()
Takes ownership of the wait semaphores array
Defined at line 52 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
magma::PlatformBuffer * GetBatchBuffer ()
Returns a pointer to the batch buffer.
Defined at line 54 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
void GetMappings (std::vector<GpuMappingView *> * mappings_out)
Defined at line 56 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
const GpuMappingView * GetBatchMapping ()
Defined at line 63 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
uint32_t GetBatchBufferWriteOffset ()
Returns the offset into the batch buffer that points to the end of the user data.
Defined at line 63 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
void CommandBuffer (std::weak_ptr<MsdIntelContext> context, std::unique_ptr<msd::magma_command_buffer> command_buffer)
Defined at line 64 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
uint64_t GetFlags ()
Defined at line 68 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
const ExecResource * GetContextStateBufferResource ()
Returns a pointer to the resource for the context state buffer.
May be null if no context state buffer is present.
Defined at line 70 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
uint32_t batch_buffer_resource_index ()
Defined at line 73 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
uint32_t num_resources ()
Defined at line 78 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
uint32_t wait_semaphore_count ()
Defined at line 80 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
const GpuMappingView * GetContextStateBufferMapping ()
Returns a read only view of the context state buffer's GPU mapping.
May be null if no context state buffer is present.
Defined at line 81 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
uint32_t signal_semaphore_count ()
Defined at line 82 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
void ~CommandBuffer ()
Defined at line 83 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
uint32_t batch_start_offset ()
Defined at line 84 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.h
bool IsValidBatch ()
Returns whether the batch buffer and context state buffer (if present) are valid.
This should only be called after |PrepareForExecution|.
Defined at line 93 of file ../../src/graphics/drivers/msd-vsi-vip/src/command_buffer.h
bool PrepareForExecution ()
Map all execution resources into the gpu address space and locks the weak reference to the
context for the rest of the lifetime of this object.
Defined at line 178 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
std::weak_ptr<MsdIntelContext> GetContext ()
Defined at line 141 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
void SetSequenceNumber (uint32_t sequence_number)
Defined at line 114 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
bool GetGpuAddress (gpu_addr_t * gpu_addr_out)
Defined at line 161 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
uint64_t GetBatchBufferId ()
Returns 0 if the command buffer has no resources.
Defined at line 169 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
uint32_t GetPipeControlFlags ()
Defined at line 143 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
bool MapResourcesGpu (std::shared_ptr<AddressSpace> address_space, std::vector<std::shared_ptr<GpuMapping>> & mappings)
maps all execution resources into the given |address_space|.
fills |resource_gpu_addresses_out| with the mapped addresses of every object in
exec_resources_
Defined at line 199 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
void UnmapResourcesGpu ()
Defined at line 176 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
bool InitializeResources (std::vector<ExecResource> resources, std::vector<std::shared_ptr<magma::PlatformSemaphore>> wait_semaphores, std::vector<std::shared_ptr<magma::PlatformSemaphore>> signal_semaphores)
Defined at line 119 of file ../../src/graphics/drivers/msd-intel-gen/src/command_buffer.cc
Records
Friends
class TestCommandBuffer