Make validation error formatting more consistent
- Updates error message formatting to ensure they end with a newline to prevent errors from running together. - Updated all encoder/device context messages to normalize their format and include more information. - Update Abseil formatter to make objects indicate if they are an error object in the formatted string. (ie: [Invalid BindGroup]) - Added fallback code in case a context message doesn't format correctly to aid in debugging. Bug: dawn:1154 Change-Id: Id27b11305cf8efcca343597f90489dde5552c775 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68200 Commit-Queue: Brandon Jones <bajones@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
0a873d8eb1
commit
2514566d82
|
@ -113,6 +113,6 @@ Context messages should follow these guidelines:
|
|||
* Example: `("validating % against %", descriptor, descriptor->layout)`
|
||||
* Output: `- While validating [BindGroupDescriptor "Label"] against [BindGroupLayout]`
|
||||
|
||||
**When possible, indicate the function call being made as the top-level context.**
|
||||
* Example: `("calling CreatePipelineLayout")`
|
||||
* Output: `- While calling CreatePipelineLayout`
|
||||
**When possible, indicate the function call being made as the top-level context, as well as the parameters passed.**
|
||||
* Example: `("calling %s.CreatePipelineLayout(%s).", this, descriptor)`
|
||||
* Output: `- While calling [Device].CreatePipelineLayout([PipelineLayoutDescriptor]).`
|
||||
|
|
|
@ -94,6 +94,9 @@ namespace dawn_native {
|
|||
return {true};
|
||||
}
|
||||
s->Append("[");
|
||||
if (value->IsError()) {
|
||||
s->Append("Invalid ");
|
||||
}
|
||||
s->Append(ObjectTypeAsString(value->GetType()));
|
||||
const std::string& label = value->GetLabel();
|
||||
if (!label.empty()) {
|
||||
|
@ -112,6 +115,9 @@ namespace dawn_native {
|
|||
return {true};
|
||||
}
|
||||
s->Append("[");
|
||||
if (value->IsError()) {
|
||||
s->Append("Invalid ");
|
||||
}
|
||||
s->Append(ObjectTypeAsString(value->GetType()));
|
||||
const std::string& label = value->GetLabel();
|
||||
if (!label.empty()) {
|
||||
|
|
|
@ -344,7 +344,7 @@ namespace dawn_native {
|
|||
|
||||
WGPUBufferMapAsyncStatus status;
|
||||
if (GetDevice()->ConsumedError(ValidateMapAsync(mode, offset, size, &status),
|
||||
"calling %s.MapAsync(%s, %u, %u, ...)", this, mode, offset,
|
||||
"calling %s.MapAsync(%s, %u, %u, ...).", this, mode, offset,
|
||||
size)) {
|
||||
if (callback) {
|
||||
callback(status, userdata);
|
||||
|
@ -416,7 +416,7 @@ namespace dawn_native {
|
|||
}
|
||||
|
||||
void BufferBase::APIUnmap() {
|
||||
if (GetDevice()->ConsumedError(ValidateUnmap(), "calling %s.Unmap()", this)) {
|
||||
if (GetDevice()->ConsumedError(ValidateUnmap(), "calling %s.Unmap().", this)) {
|
||||
return;
|
||||
}
|
||||
Unmap();
|
||||
|
|
|
@ -513,7 +513,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding BeginComputePass(%s).", descriptor);
|
||||
"encoding %s.BeginComputePass(%s).", this, descriptor);
|
||||
|
||||
if (success) {
|
||||
ComputePassEncoder* passEncoder =
|
||||
|
@ -618,7 +618,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding BeginRenderPass(%s).", descriptor);
|
||||
"encoding %s.BeginRenderPass(%s).", this, descriptor);
|
||||
|
||||
if (success) {
|
||||
RenderPassEncoder* passEncoder =
|
||||
|
@ -673,8 +673,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding CopyBufferToBuffer(%s, %u, %s, %u, %u).", source, sourceOffset, destination,
|
||||
destinationOffset, size);
|
||||
"encoding %s.CopyBufferToBuffer(%s, %u, %s, %u, %u).", this, source, sourceOffset,
|
||||
destination, destinationOffset, size);
|
||||
}
|
||||
|
||||
void CommandEncoder::APICopyBufferToTexture(const ImageCopyBuffer* source,
|
||||
|
@ -732,8 +732,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding CopyBufferToTexture(%s, %s, %s).", source->buffer, destination->texture,
|
||||
copySize);
|
||||
"encoding %s.CopyBufferToTexture(%s, %s, %s).", this, source->buffer,
|
||||
destination->texture, copySize);
|
||||
}
|
||||
|
||||
void CommandEncoder::APICopyTextureToBuffer(const ImageCopyTexture* source,
|
||||
|
@ -790,8 +790,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding CopyTextureToBuffer(%s, %s, %s).", source->texture, destination->buffer,
|
||||
copySize);
|
||||
"encoding %s.CopyTextureToBuffer(%s, %s, %s).", this, source->texture,
|
||||
destination->buffer, copySize);
|
||||
}
|
||||
|
||||
void CommandEncoder::APICopyTextureToTexture(const ImageCopyTexture* source,
|
||||
|
@ -862,8 +862,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding CopyTextureToTexture(%s, %s, %s).", source->texture, destination->texture,
|
||||
copySize);
|
||||
"encoding %s.CopyTextureToTexture(%s, %s, %s).", this, source->texture,
|
||||
destination->texture, copySize);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIInjectValidationError(const char* message) {
|
||||
|
@ -885,7 +885,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding InsertDebugMarker(\"%s\").", groupLabel);
|
||||
"encoding %s.InsertDebugMarker(\"%s\").", this, groupLabel);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIPopDebugGroup() {
|
||||
|
@ -903,7 +903,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding PopDebugGroup().");
|
||||
"encoding %s.PopDebugGroup().", this);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIPushDebugGroup(const char* groupLabel) {
|
||||
|
@ -922,7 +922,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding PushDebugGroup(\"%s\").", groupLabel);
|
||||
"encoding %s.PushDebugGroup(\"%s\").", this, groupLabel);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIResolveQuerySet(QuerySetBase* querySet,
|
||||
|
@ -962,8 +962,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding ResolveQuerySet(%s, %u, %u, %s, %u).", querySet, firstQuery, queryCount,
|
||||
destination, destinationOffset);
|
||||
"encoding %s.ResolveQuerySet(%s, %u, %u, %s, %u).", this, querySet, firstQuery,
|
||||
queryCount, destination, destinationOffset);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIWriteBuffer(BufferBase* buffer,
|
||||
|
@ -989,7 +989,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding WriteBuffer(%s, %u, ..., %u).", buffer, bufferOffset, size);
|
||||
"encoding %s.WriteBuffer(%s, %u, ..., %u).", this, buffer, bufferOffset, size);
|
||||
}
|
||||
|
||||
void CommandEncoder::APIWriteTimestamp(QuerySetBase* querySet, uint32_t queryIndex) {
|
||||
|
@ -1010,7 +1010,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding WriteTimestamp(%s, %u).", querySet, queryIndex);
|
||||
"encoding %s.WriteTimestamp(%s, %u).", this, querySet, queryIndex);
|
||||
}
|
||||
|
||||
CommandBufferBase* CommandEncoder::APIFinish(const CommandBufferDescriptor* descriptor) {
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding EndPass()")) {
|
||||
"encoding %s.EndPass().", this)) {
|
||||
mEncodingContext->ExitComputePass(this, mUsageTracker.AcquireResourceUsage());
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding Dispatch (x: %u, y: %u, z: %u)", x, y, z);
|
||||
"encoding %s.Dispatch(%u, %u, %u).", this, x, y, z);
|
||||
}
|
||||
|
||||
ResultOrError<std::pair<Ref<BufferBase>, uint64_t>>
|
||||
|
@ -348,7 +348,7 @@ namespace dawn_native {
|
|||
dispatch->indirectOffset = indirectOffset;
|
||||
return {};
|
||||
},
|
||||
"encoding DispatchIndirect with %s", indirectBuffer);
|
||||
"encoding %s.DispatchIndirect(%s, %u).", this, indirectBuffer, indirectOffset);
|
||||
}
|
||||
|
||||
void ComputePassEncoder::APISetPipeline(ComputePipelineBase* pipeline) {
|
||||
|
@ -367,7 +367,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetPipeline with %s", pipeline);
|
||||
"encoding %s.SetPipeline(%s).", this, pipeline);
|
||||
}
|
||||
|
||||
void ComputePassEncoder::APISetBindGroup(uint32_t groupIndexIn,
|
||||
|
@ -392,7 +392,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetBindGroup with %s at index %u", group, groupIndexIn);
|
||||
"encoding %s.SetBindGroup(%u, %s, %u, ...).", this, groupIndexIn, group,
|
||||
dynamicOffsetCount);
|
||||
}
|
||||
|
||||
void ComputePassEncoder::APIWriteTimestamp(QuerySetBase* querySet, uint32_t queryIndex) {
|
||||
|
@ -413,7 +414,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding WriteTimestamp to %s.", querySet);
|
||||
"encoding %s.WriteTimestamp(%s, %u).", this, querySet, queryIndex);
|
||||
}
|
||||
|
||||
void ComputePassEncoder::AddDispatchSyncScope(SyncScopeUsageTracker scope) {
|
||||
|
|
|
@ -506,7 +506,7 @@ namespace dawn_native {
|
|||
object->GetDevice(), this);
|
||||
|
||||
// TODO(dawn:563): Preserve labels for error objects.
|
||||
DAWN_INVALID_IF(object->IsError(), "%s is an error.", object);
|
||||
DAWN_INVALID_IF(object->IsError(), "%s is invalid.", object);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
@ -868,8 +868,8 @@ namespace dawn_native {
|
|||
|
||||
BindGroupBase* DeviceBase::APICreateBindGroup(const BindGroupDescriptor* descriptor) {
|
||||
Ref<BindGroupBase> result;
|
||||
if (ConsumedError(CreateBindGroup(descriptor), &result, "calling CreateBindGroup(%s).",
|
||||
descriptor)) {
|
||||
if (ConsumedError(CreateBindGroup(descriptor), &result, "calling %s.CreateBindGroup(%s).",
|
||||
this, descriptor)) {
|
||||
return BindGroupBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
|
@ -878,14 +878,14 @@ namespace dawn_native {
|
|||
const BindGroupLayoutDescriptor* descriptor) {
|
||||
Ref<BindGroupLayoutBase> result;
|
||||
if (ConsumedError(CreateBindGroupLayout(descriptor), &result,
|
||||
"calling CreateBindGroupLayout(%s).", descriptor)) {
|
||||
"calling %s.CreateBindGroupLayout(%s).", this, descriptor)) {
|
||||
return BindGroupLayoutBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
}
|
||||
BufferBase* DeviceBase::APICreateBuffer(const BufferDescriptor* descriptor) {
|
||||
Ref<BufferBase> result = nullptr;
|
||||
if (ConsumedError(CreateBuffer(descriptor), &result, "calling CreateBuffer(%s).",
|
||||
if (ConsumedError(CreateBuffer(descriptor), &result, "calling %s.CreateBuffer(%s).", this,
|
||||
descriptor)) {
|
||||
ASSERT(result == nullptr);
|
||||
return BufferBase::MakeError(this, descriptor);
|
||||
|
@ -901,7 +901,7 @@ namespace dawn_native {
|
|||
TRACE_EVENT0(GetPlatform(), General, "DeviceBase::APICreateComputePipeline");
|
||||
Ref<ComputePipelineBase> result;
|
||||
if (ConsumedError(CreateComputePipeline(descriptor), &result,
|
||||
"calling CreateComputePipeline(%s).", descriptor)) {
|
||||
"calling %s.CreateComputePipeline(%s).", this, descriptor)) {
|
||||
return ComputePipelineBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
|
@ -925,22 +925,22 @@ namespace dawn_native {
|
|||
const PipelineLayoutDescriptor* descriptor) {
|
||||
Ref<PipelineLayoutBase> result;
|
||||
if (ConsumedError(CreatePipelineLayout(descriptor), &result,
|
||||
"calling CreatePipelineLayout(%s).", descriptor)) {
|
||||
"calling %s.CreatePipelineLayout(%s).", this, descriptor)) {
|
||||
return PipelineLayoutBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
}
|
||||
QuerySetBase* DeviceBase::APICreateQuerySet(const QuerySetDescriptor* descriptor) {
|
||||
Ref<QuerySetBase> result;
|
||||
if (ConsumedError(CreateQuerySet(descriptor), &result, "calling CreateQuerySet(%s).",
|
||||
descriptor)) {
|
||||
if (ConsumedError(CreateQuerySet(descriptor), &result, "calling %s.CreateQuerySet(%s).",
|
||||
this, descriptor)) {
|
||||
return QuerySetBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
}
|
||||
SamplerBase* DeviceBase::APICreateSampler(const SamplerDescriptor* descriptor) {
|
||||
Ref<SamplerBase> result;
|
||||
if (ConsumedError(CreateSampler(descriptor), &result, "calling CreateSampler(%s).",
|
||||
if (ConsumedError(CreateSampler(descriptor), &result, "calling %s.CreateSampler(%s).", this,
|
||||
descriptor)) {
|
||||
return SamplerBase::MakeError(this);
|
||||
}
|
||||
|
@ -966,7 +966,7 @@ namespace dawn_native {
|
|||
const RenderBundleEncoderDescriptor* descriptor) {
|
||||
Ref<RenderBundleEncoder> result;
|
||||
if (ConsumedError(CreateRenderBundleEncoder(descriptor), &result,
|
||||
"calling CreateRenderBundleEncoder(%s).", descriptor)) {
|
||||
"calling %s.CreateRenderBundleEncoder(%s).", this, descriptor)) {
|
||||
return RenderBundleEncoder::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
|
@ -976,7 +976,7 @@ namespace dawn_native {
|
|||
TRACE_EVENT0(GetPlatform(), General, "DeviceBase::APICreateRenderPipeline");
|
||||
Ref<RenderPipelineBase> result;
|
||||
if (ConsumedError(CreateRenderPipeline(descriptor), &result,
|
||||
"calling CreateRenderPipeline(%s).", descriptor)) {
|
||||
"calling %s.CreateRenderPipeline(%s).", this, descriptor)) {
|
||||
return RenderPipelineBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
|
@ -987,7 +987,7 @@ namespace dawn_native {
|
|||
std::unique_ptr<OwnedCompilationMessages> compilationMessages(
|
||||
std::make_unique<OwnedCompilationMessages>());
|
||||
if (ConsumedError(CreateShaderModule(descriptor, compilationMessages.get()), &result,
|
||||
"calling CreateShaderModule(%s).", descriptor)) {
|
||||
"calling %s.CreateShaderModule(%s).", this, descriptor)) {
|
||||
DAWN_ASSERT(result == nullptr);
|
||||
result = ShaderModuleBase::MakeError(this);
|
||||
}
|
||||
|
@ -1001,14 +1001,14 @@ namespace dawn_native {
|
|||
const SwapChainDescriptor* descriptor) {
|
||||
Ref<SwapChainBase> result;
|
||||
if (ConsumedError(CreateSwapChain(surface, descriptor), &result,
|
||||
"calling CreateSwapChain(%s).", descriptor)) {
|
||||
"calling %s.CreateSwapChain(%s).", this, descriptor)) {
|
||||
return SwapChainBase::MakeError(this);
|
||||
}
|
||||
return result.Detach();
|
||||
}
|
||||
TextureBase* DeviceBase::APICreateTexture(const TextureDescriptor* descriptor) {
|
||||
Ref<TextureBase> result;
|
||||
if (ConsumedError(CreateTexture(descriptor), &result, "calling CreateTexture(%s).",
|
||||
if (ConsumedError(CreateTexture(descriptor), &result, "calling %s.CreateTexture(%s).", this,
|
||||
descriptor)) {
|
||||
return TextureBase::MakeError(this);
|
||||
}
|
||||
|
@ -1077,7 +1077,7 @@ namespace dawn_native {
|
|||
const ExternalTextureDescriptor* descriptor) {
|
||||
Ref<ExternalTextureBase> result = nullptr;
|
||||
if (ConsumedError(CreateExternalTexture(descriptor), &result,
|
||||
"calling CreateExternalTexture(%s).", descriptor)) {
|
||||
"calling %s.CreateExternalTexture(%s).", this, descriptor)) {
|
||||
return ExternalTextureBase::MakeError(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,9 @@ namespace dawn_native {
|
|||
absl::UntypedFormatSpec format(formatStr);
|
||||
if (absl::FormatUntyped(&out, format, {absl::FormatArg(args)...})) {
|
||||
error->AppendContext(std::move(out));
|
||||
} else {
|
||||
error->AppendContext(
|
||||
absl::StrFormat("[Failed to format error: \"%s\"]", formatStr));
|
||||
}
|
||||
}
|
||||
ConsumeError(std::move(error));
|
||||
|
@ -108,6 +111,9 @@ namespace dawn_native {
|
|||
absl::UntypedFormatSpec format(formatStr);
|
||||
if (absl::FormatUntyped(&out, format, {absl::FormatArg(args)...})) {
|
||||
error->AppendContext(std::move(out));
|
||||
} else {
|
||||
error->AppendContext(
|
||||
absl::StrFormat("[Failed to format error: \"%s\"]", formatStr));
|
||||
}
|
||||
}
|
||||
ConsumeError(std::move(error));
|
||||
|
|
|
@ -62,6 +62,9 @@ namespace dawn_native {
|
|||
absl::UntypedFormatSpec format(formatStr);
|
||||
if (absl::FormatUntyped(&out, format, {absl::FormatArg(args)...})) {
|
||||
error->AppendContext(std::move(out));
|
||||
} else {
|
||||
error->AppendContext(absl::StrFormat(
|
||||
"[Failed to format error message: \"%s\"].", formatStr));
|
||||
}
|
||||
}
|
||||
HandleError(std::move(error));
|
||||
|
|
|
@ -73,23 +73,23 @@ namespace dawn_native {
|
|||
|
||||
std::string ErrorData::GetFormattedMessage() const {
|
||||
std::ostringstream ss;
|
||||
ss << mMessage;
|
||||
ss << mMessage << "\n";
|
||||
|
||||
if (!mContexts.empty()) {
|
||||
for (auto context : mContexts) {
|
||||
ss << "\n - While " << context;
|
||||
ss << " - While " << context << "\n";
|
||||
}
|
||||
} else {
|
||||
for (const auto& callsite : mBacktrace) {
|
||||
ss << "\n at " << callsite.function << " (" << callsite.file << ":"
|
||||
<< callsite.line << ")";
|
||||
ss << " at " << callsite.function << " (" << callsite.file << ":"
|
||||
<< callsite.line << ")\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!mDebugGroups.empty()) {
|
||||
ss << "\n\nDebug group stack: ";
|
||||
ss << "\nDebug group stack:\n";
|
||||
for (auto label : mDebugGroups) {
|
||||
ss << "\n > \"" << label << "\"";
|
||||
ss << " > \"" << label << "\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding InsertDebugMarker(\"%s\")", groupLabel);
|
||||
"encoding %s.InsertDebugMarker(\"%s\").", this, groupLabel);
|
||||
}
|
||||
|
||||
void ProgrammablePassEncoder::APIPopDebugGroup() {
|
||||
|
@ -92,7 +92,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding PopDebugGroup()");
|
||||
"encoding %s.PopDebugGroup().", this);
|
||||
}
|
||||
|
||||
void ProgrammablePassEncoder::APIPushDebugGroup(const char* groupLabel) {
|
||||
|
@ -111,7 +111,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding PushDebugGroup(\"%s\")", groupLabel);
|
||||
"encoding %s.PushDebugGroup(\"%s\").", this, groupLabel);
|
||||
}
|
||||
|
||||
MaybeError ProgrammablePassEncoder::ValidateSetBindGroup(
|
||||
|
|
|
@ -123,8 +123,8 @@ namespace dawn_native {
|
|||
RenderBundleBase* RenderBundleEncoder::APIFinish(const RenderBundleDescriptor* descriptor) {
|
||||
RenderBundleBase* result = nullptr;
|
||||
|
||||
if (GetDevice()->ConsumedError(FinishImpl(descriptor), &result, "calling Finish(%s).",
|
||||
descriptor)) {
|
||||
if (GetDevice()->ConsumedError(FinishImpl(descriptor), &result, "calling %s.Finish(%s).",
|
||||
this, descriptor)) {
|
||||
return RenderBundleBase::MakeError(GetDevice());
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding Draw(%u, %u, %u, %u).", vertexCount, instanceCount, firstVertex,
|
||||
"encoding %s.Draw(%u, %u, %u, %u).", this, vertexCount, instanceCount, firstVertex,
|
||||
firstInstance);
|
||||
}
|
||||
|
||||
|
@ -140,8 +140,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding DrawIndexed(%u, %u, %u, %i, %u).", indexCount, instanceCount, firstIndex,
|
||||
baseVertex, firstInstance);
|
||||
"encoding %s.DrawIndexed(%u, %u, %u, %i, %u).", this, indexCount, instanceCount,
|
||||
firstIndex, baseVertex, firstInstance);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APIDrawIndirect(BufferBase* indirectBuffer, uint64_t indirectOffset) {
|
||||
|
@ -171,7 +171,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding DrawIndirect(%s, %u).", indirectBuffer, indirectOffset);
|
||||
"encoding %s.DrawIndirect(%s, %u).", this, indirectBuffer, indirectOffset);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APIDrawIndexedIndirect(BufferBase* indirectBuffer,
|
||||
|
@ -220,7 +220,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding DrawIndexedIndirect(%s, %u).", indirectBuffer, indirectOffset);
|
||||
"encoding %s.DrawIndexedIndirect(%s, %u).", this, indirectBuffer, indirectOffset);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APISetPipeline(RenderPipelineBase* pipeline) {
|
||||
|
@ -254,7 +254,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetPipeline(%s).", pipeline);
|
||||
"encoding %s.SetPipeline(%s).", this, pipeline);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APISetIndexBuffer(BufferBase* buffer,
|
||||
|
@ -325,7 +325,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetIndexBuffer(%s, %s, %u, %u).", buffer, format, offset, size);
|
||||
"encoding %s.SetIndexBuffer(%s, %s, %u, %u).", this, buffer, format, offset, size);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APISetVertexBuffer(uint32_t slot,
|
||||
|
@ -393,7 +393,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetVertexBuffer(%u, %s, %u, %u).", slot, buffer, offset, size);
|
||||
"encoding %s.SetVertexBuffer(%u, %s, %u, %u).", this, slot, buffer, offset, size);
|
||||
}
|
||||
|
||||
void RenderEncoderBase::APISetBindGroup(uint32_t groupIndexIn,
|
||||
|
@ -418,7 +418,8 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetBindGroup(%u, %s, %u).", groupIndexIn, group, dynamicOffsetCount);
|
||||
"encoding %s.SetBindGroup(%u, %s, %u, ...).", this, groupIndexIn, group,
|
||||
dynamicOffsetCount);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace dawn_native {
|
|||
std::move(mIndirectDrawMetadata)));
|
||||
return {};
|
||||
},
|
||||
"encoding EndPass().")) {
|
||||
"encoding %s.EndPass().", this)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetStencilReference(%u)", reference);
|
||||
"encoding %s.SetStencilReference(%u).", this, reference);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APISetBlendConstant(const Color* color) {
|
||||
|
@ -144,7 +144,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetBlendConstant(%s).", color);
|
||||
"encoding %s.SetBlendConstant(%s).", this, color);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APISetViewport(float x,
|
||||
|
@ -195,7 +195,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetViewport(%f, %f, %f, %f, %f, %f).", x, y, width, height, minDepth,
|
||||
"encoding %s.SetViewport(%f, %f, %f, %f, %f, %f).", this, x, y, width, height, minDepth,
|
||||
maxDepth);
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding SetScissorRect(%u, %u, %u, %u).", x, y, width, height);
|
||||
"encoding %s.SetScissorRect(%u, %u, %u, %u).", this, x, y, width, height);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APIExecuteBundles(uint32_t count,
|
||||
|
@ -290,7 +290,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding ExecuteBundles(%u, ...)", count);
|
||||
"encoding %s.ExecuteBundles(%u, ...).", this, count);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APIBeginOcclusionQuery(uint32_t queryIndex) {
|
||||
|
@ -330,7 +330,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding BeginOcclusionQuery(%u)", queryIndex);
|
||||
"encoding %s.BeginOcclusionQuery(%u).", this, queryIndex);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APIEndOcclusionQuery() {
|
||||
|
@ -352,7 +352,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding EndOcclusionQuery()");
|
||||
"encoding %s.EndOcclusionQuery().", this);
|
||||
}
|
||||
|
||||
void RenderPassEncoder::APIWriteTimestamp(QuerySetBase* querySet, uint32_t queryIndex) {
|
||||
|
@ -377,7 +377,7 @@ namespace dawn_native {
|
|||
|
||||
return {};
|
||||
},
|
||||
"encoding WriteTimestamp(%s, %u).", querySet, queryIndex);
|
||||
"encoding %s.WriteTimestamp(%s, %u).", this, querySet, queryIndex);
|
||||
}
|
||||
|
||||
} // namespace dawn_native
|
||||
|
|
Loading…
Reference in New Issue