mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 18:05:31 +00:00
dawn_native: Prefix all API methods with API
This means that calling wgpu::Object::DoStuff will translate to a call to dawn_native::ObjectBase::APIDoStuff. This will clarify the difference between reentrant calls and internal calls in dawn_native. Avoiding issues in the future. This CL only changes the code generator to prefix with "API", performs renames needed to make the code compile, and adds TODOs for things that should be fixed in follow-up CLs. Bug: dawn:723 Change-Id: Ie24471fa093adc4179d33d13323429847d076ecb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45921 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b745df8537
commit
2ce4b905b2
@@ -45,7 +45,7 @@ namespace dawn_native {
|
||||
return new ComputePassEncoder(device, commandEncoder, encodingContext, ObjectBase::kError);
|
||||
}
|
||||
|
||||
void ComputePassEncoder::EndPass() {
|
||||
void ComputePassEncoder::APIEndPass() {
|
||||
if (mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(ValidateProgrammableEncoderEnd());
|
||||
@@ -59,7 +59,7 @@ namespace dawn_native {
|
||||
}
|
||||
}
|
||||
|
||||
void ComputePassEncoder::Dispatch(uint32_t x, uint32_t y, uint32_t z) {
|
||||
void ComputePassEncoder::APIDispatch(uint32_t x, uint32_t y, uint32_t z) {
|
||||
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(mCommandBufferState.ValidateCanDispatch());
|
||||
@@ -78,7 +78,8 @@ namespace dawn_native {
|
||||
});
|
||||
}
|
||||
|
||||
void ComputePassEncoder::DispatchIndirect(BufferBase* indirectBuffer, uint64_t indirectOffset) {
|
||||
void ComputePassEncoder::APIDispatchIndirect(BufferBase* indirectBuffer,
|
||||
uint64_t indirectOffset) {
|
||||
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(GetDevice()->ValidateObject(indirectBuffer));
|
||||
@@ -116,7 +117,7 @@ namespace dawn_native {
|
||||
});
|
||||
}
|
||||
|
||||
void ComputePassEncoder::SetPipeline(ComputePipelineBase* pipeline) {
|
||||
void ComputePassEncoder::APISetPipeline(ComputePipelineBase* pipeline) {
|
||||
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(GetDevice()->ValidateObject(pipeline));
|
||||
@@ -132,7 +133,7 @@ namespace dawn_native {
|
||||
});
|
||||
}
|
||||
|
||||
void ComputePassEncoder::WriteTimestamp(QuerySetBase* querySet, uint32_t queryIndex) {
|
||||
void ComputePassEncoder::APIWriteTimestamp(QuerySetBase* querySet, uint32_t queryIndex) {
|
||||
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(GetDevice()->ValidateObject(querySet));
|
||||
|
||||
Reference in New Issue
Block a user