Skip to content

Commit 97ba8cf

Browse files
committed
rename executeCommandBuffers -> submit
1 parent b58c00d commit 97ba8cf

15 files changed

+20
-31
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
| API | CPU | CUDA | D3D11 | D3D12 | Vulkan | Metal | WGPU |
174174
|------------------------------|-----|------|-------|-------|--------|-------|------|
175175
| `getDesc` | yes | yes | yes | yes | yes | yes | yes |
176-
| `executeCommandBuffers` | yes | yes | yes | yes | yes | yes | yes |
176+
| `submit` | yes | yes | yes | yes | yes | yes | yes |
177177
| `getNativeHandle` | :x: | :x: | :x: | yes | yes | yes | yes |
178178
| `waitOnHost` | yes | yes | yes | yes | yes | :x: | yes |
179179
| `waitForFenceValuesOnDevice` | :x: | :x: | :x: | yes | yes | yes | :x: |

include/slang-rhi.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,20 +1937,16 @@ class ICommandQueue : public ISlangUnknown
19371937
public:
19381938
virtual SLANG_NO_THROW QueueType SLANG_MCALL getType() = 0;
19391939

1940-
virtual SLANG_NO_THROW void SLANG_MCALL executeCommandBuffers(
1941-
GfxCount count,
1942-
ICommandBuffer* const* commandBuffers,
1943-
IFence* fenceToSignal,
1944-
uint64_t newFenceValue
1945-
) = 0;
1940+
virtual SLANG_NO_THROW void SLANG_MCALL
1941+
submit(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fenceToSignal, uint64_t newFenceValue) = 0;
19461942

19471943
inline void executeCommandBuffer(
19481944
ICommandBuffer* commandBuffer,
19491945
IFence* fenceToSignal = nullptr,
19501946
uint64_t newFenceValue = 0
19511947
)
19521948
{
1953-
executeCommandBuffers(1, &commandBuffer, fenceToSignal, newFenceValue);
1949+
submit(1, &commandBuffer, fenceToSignal, newFenceValue);
19541950
}
19551951

19561952
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(NativeHandle* outHandle) = 0;
@@ -1997,7 +1993,7 @@ class ITransientResourceHeap : public ISlangUnknown
19971993
virtual SLANG_NO_THROW Result SLANG_MCALL finish() = 0;
19981994

19991995
// Command buffers are one-time use. Once it is submitted to the queue via
2000-
// `executeCommandBuffers` a command buffer is no longer valid to be used any more. Command
1996+
// `submit` a command buffer is no longer valid to be used any more. Command
20011997
// buffers must be closed before submission. The current D3D12 implementation has a limitation
20021998
// that only one command buffer maybe recorded at a time. User must finish recording a command
20031999
// buffer before creating another command buffer.

src/cuda/cuda-command-queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CommandQueueImpl::~CommandQueueImpl()
2020
currentRootObject = nullptr;
2121
}
2222

23-
void CommandQueueImpl::executeCommandBuffers(
23+
void CommandQueueImpl::submit(
2424
GfxCount count,
2525
ICommandBuffer* const* commandBuffers,
2626
IFence* fence,

src/cuda/cuda-command-queue.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class CommandQueueImpl : public CommandQueue<DeviceImpl>
1919
~CommandQueueImpl();
2020

2121
virtual SLANG_NO_THROW void SLANG_MCALL
22-
executeCommandBuffers(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal)
23-
override;
22+
submit(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal) override;
2423

2524
virtual SLANG_NO_THROW void SLANG_MCALL waitOnHost() override;
2625

src/d3d12/d3d12-command-queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Result CommandQueueImpl::init(uint32_t queueIndex)
3131
return SLANG_OK;
3232
}
3333

34-
void CommandQueueImpl::executeCommandBuffers(
34+
void CommandQueueImpl::submit(
3535
GfxCount count,
3636
ICommandBuffer* const* commandBuffers,
3737
IFence* fence,

src/d3d12/d3d12-command-queue.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ class CommandQueueImpl : public CommandQueue<DeviceImpl>
2121
Result init(uint32_t queueIndex);
2222

2323
virtual SLANG_NO_THROW void SLANG_MCALL
24-
executeCommandBuffers(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal)
25-
override;
24+
submit(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal) override;
2625

2726
virtual SLANG_NO_THROW void SLANG_MCALL waitOnHost() override;
2827

src/debug-layer/debug-command-queue.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ QueueType DebugCommandQueue::getType()
1414
return baseObject->getType();
1515
}
1616

17-
void DebugCommandQueue::executeCommandBuffers(
17+
void DebugCommandQueue::submit(
1818
GfxCount count,
1919
ICommandBuffer* const* commandBuffers,
2020
IFence* fence,
@@ -42,13 +42,13 @@ void DebugCommandQueue::executeCommandBuffers(
4242
if (cmdBufferImpl->m_transientHeap != getDebugObj(commandBuffers[0])->m_transientHeap)
4343
{
4444
RHI_VALIDATION_ERROR(
45-
"Command buffers passed to a single executeCommandBuffers "
45+
"Command buffers passed to a single submit "
4646
"call must be allocated from the same transient heap."
4747
);
4848
}
4949
}
5050
}
51-
baseObject->executeCommandBuffers(count, innerCommandBuffers.data(), getInnerObj(fence), valueToSignal);
51+
baseObject->submit(count, innerCommandBuffers.data(), getInnerObj(fence), valueToSignal);
5252
if (fence)
5353
{
5454
getDebugObj(fence)->maxValueToSignal = max(getDebugObj(fence)->maxValueToSignal, valueToSignal);

src/debug-layer/debug-command-queue.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class DebugCommandQueue : public DebugObject<ICommandQueue>
1515
ICommandQueue* getInterface(const Guid& guid);
1616
virtual SLANG_NO_THROW QueueType SLANG_MCALL getType() override;
1717
virtual SLANG_NO_THROW void SLANG_MCALL
18-
executeCommandBuffers(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal)
19-
override;
18+
submit(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal) override;
2019
virtual SLANG_NO_THROW void SLANG_MCALL waitOnHost() override;
2120
virtual SLANG_NO_THROW Result SLANG_MCALL
2221
waitForFenceValuesOnDevice(GfxCount fenceCount, IFence** fences, uint64_t* waitValues) override;

src/immediate-device.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,7 @@ class CommandQueueImpl : public ImmediateCommandQueueBase
611611
~CommandQueueImpl() {}
612612

613613
virtual SLANG_NO_THROW void SLANG_MCALL
614-
executeCommandBuffers(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal)
615-
override
614+
submit(GfxCount count, ICommandBuffer* const* commandBuffers, IFence* fence, uint64_t valueToSignal) override
616615
{
617616
// TODO: implement fence signal.
618617
SLANG_RHI_ASSERT(fence == nullptr);

src/metal/metal-command-queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void CommandQueueImpl::queueSubmitImpl(
8484
}
8585
}
8686

87-
void CommandQueueImpl::executeCommandBuffers(
87+
void CommandQueueImpl::submit(
8888
GfxCount count,
8989
ICommandBuffer* const* commandBuffers,
9090
IFence* fence,

0 commit comments

Comments
 (0)