mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 22:56:09 +00:00
Fix clang/GCC warnings
This commit is contained in:
committed by
Corentin Wallez
parent
f30dffa75f
commit
98c90d4faa
@@ -69,7 +69,7 @@ namespace backend {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ComputeTextureCopyBufferSize(CommandBufferBuilder* builder, const TextureCopyLocation& location, uint32_t* bufferSize) {
|
||||
bool ComputeTextureCopyBufferSize(CommandBufferBuilder*, const TextureCopyLocation& location, uint32_t* bufferSize) {
|
||||
// TODO(cwallez@chromium.org): check for overflows
|
||||
uint32_t pixelSize = TextureFormatPixelSize(location.texture->GetFormat());
|
||||
*bufferSize = location.width * location.height * location.depth * pixelSize;
|
||||
@@ -503,7 +503,7 @@ namespace backend {
|
||||
|
||||
case Command::SetStencilReference:
|
||||
{
|
||||
SetStencilReferenceCmd* cmd = iterator.NextCommand<SetStencilReferenceCmd>();
|
||||
iterator.NextCommand<SetStencilReferenceCmd>();
|
||||
if (!state->HaveRenderPass()) {
|
||||
HandleError("Can't set stencil reference without an active render pass");
|
||||
return false;
|
||||
|
||||
@@ -97,6 +97,10 @@ namespace backend {
|
||||
return renderPass.Get();
|
||||
}
|
||||
|
||||
uint32_t PipelineBase::GetSubPass() {
|
||||
return subpass;
|
||||
}
|
||||
|
||||
InputStateBase* PipelineBase::GetInputState() {
|
||||
return inputState.Get();
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace backend {
|
||||
|
||||
PipelineLayoutBase* GetLayout();
|
||||
RenderPassBase* GetRenderPass();
|
||||
uint32_t GetSubPass();
|
||||
InputStateBase* GetInputState();
|
||||
DepthStencilStateBase* GetDepthStencilState();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace backend {
|
||||
|
||||
// SamplerBase
|
||||
|
||||
SamplerBase::SamplerBase(SamplerBuilder* builder) {
|
||||
SamplerBase::SamplerBase(SamplerBuilder*) {
|
||||
}
|
||||
|
||||
// SamplerBuilder
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace metal {
|
||||
uploader->BufferSubData(mtlBuffer, start * sizeof(uint32_t), count * sizeof(uint32_t), data);
|
||||
}
|
||||
|
||||
void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) {
|
||||
void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t) {
|
||||
MapReadRequestTracker* tracker = ToBackend(GetDevice())->GetMapReadTracker();
|
||||
tracker->Track(this, serial, start);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace metal {
|
||||
// Nothing to do, Metal StorageModeShared buffers are always mapped.
|
||||
}
|
||||
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit currentUsage, nxt::BufferUsageBit targetUsage) {
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit, nxt::BufferUsageBit) {
|
||||
}
|
||||
|
||||
BufferView::BufferView(BufferViewBuilder* builder)
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace metal {
|
||||
// so this-> works as expected. However it is unclear how members are captured, (are they
|
||||
// captured using this-> or by value?) so we make a copy of the pendingCommandSerial on the stack.
|
||||
Serial pendingSerial = pendingCommandSerial;
|
||||
[pendingCommands addCompletedHandler:^(id<MTLCommandBuffer> commandBuffer) {
|
||||
[pendingCommands addCompletedHandler:^(id<MTLCommandBuffer>) {
|
||||
this->finishedCommandSerial = pendingSerial;
|
||||
}];
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace metal {
|
||||
return mtlTexture;
|
||||
}
|
||||
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit currentUsage, nxt::TextureUsageBit targetUsage) {
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit, nxt::TextureUsageBit) {
|
||||
}
|
||||
|
||||
TextureView::TextureView(TextureViewBuilder* builder)
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace null {
|
||||
void Buffer::UnmapImpl() {
|
||||
}
|
||||
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit currentUsage, nxt::BufferUsageBit targetUsage) {
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit, nxt::BufferUsageBit) {
|
||||
}
|
||||
|
||||
// CommandBuffer
|
||||
@@ -193,7 +193,7 @@ namespace null {
|
||||
Queue::~Queue() {
|
||||
}
|
||||
|
||||
void Queue::Submit(uint32_t numCommands, CommandBuffer* const * commands) {
|
||||
void Queue::Submit(uint32_t numCommands, CommandBuffer* const* commands) {
|
||||
auto operations = ToBackend(GetDevice())->AcquirePendingOperations();
|
||||
|
||||
for (auto& operation : operations) {
|
||||
@@ -216,7 +216,7 @@ namespace null {
|
||||
Texture::~Texture() {
|
||||
}
|
||||
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit currentUsage, nxt::TextureUsageBit targetUsage) {
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit, nxt::TextureUsageBit) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace opengl {
|
||||
|
||||
case Command::CopyTextureToBuffer:
|
||||
{
|
||||
CopyTextureToBufferCmd* copy = commands.NextCommand<CopyTextureToBufferCmd>();
|
||||
commands.NextCommand<CopyTextureToBufferCmd>();
|
||||
// TODO(cwallez@chromium.org): implement using a temporary FBO and ReadPixels
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace opengl {
|
||||
glBufferSubData(GL_ARRAY_BUFFER, start * sizeof(uint32_t), count * sizeof(uint32_t), data);
|
||||
}
|
||||
|
||||
void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) {
|
||||
void Buffer::MapReadAsyncImpl(uint32_t, uint32_t, uint32_t) {
|
||||
// TODO(cwallez@chromium.org): Implement Map Read for the GL backend
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace opengl {
|
||||
// TODO(cwallez@chromium.org): Implement Map Read for the GL backend
|
||||
}
|
||||
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit currentUsage, nxt::BufferUsageBit targetUsage) {
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit, nxt::BufferUsageBit) {
|
||||
}
|
||||
|
||||
// BufferView
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace opengl {
|
||||
return GetGLFormatInfo(GetFormat());
|
||||
}
|
||||
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit currentUsage, nxt::TextureUsageBit targetUsage) {
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit, nxt::TextureUsageBit) {
|
||||
}
|
||||
|
||||
// TextureView
|
||||
|
||||
Reference in New Issue
Block a user