Remove base/logging.h in a whole lot more places.

This commit is contained in:
Henrik Rydgård 2020-08-15 16:13:24 +02:00
parent 5eb13378c6
commit c41f875df4
36 changed files with 136 additions and 127 deletions

View file

@ -21,9 +21,6 @@
#include <map>
#include <cassert>
#include "Core/Config.h"
#include "base/logging.h"
#include "base/display.h"
#include "base/stringutil.h"
#include "image/zim_load.h"
@ -32,10 +29,13 @@
#include "thin3d/thin3d.h"
#include "thin3d/VulkanRenderManager.h"
#include "Common/Log.h"
#include "Common/Vulkan/VulkanContext.h"
#include "Common/Vulkan/VulkanImage.h"
#include "Common/Vulkan/VulkanMemory.h"
#include "Core/Config.h"
// We use a simple descriptor set for all rendering: 1 sampler, 1 texture, 1 UBO binding point.
// binding 0 - uniform data
// binding 1 - sampler
@ -704,7 +704,7 @@ bool VKTexture::Create(VkCommandBuffer cmd, VulkanPushBuffer *push, const Textur
// Zero-sized textures not allowed.
_assert_(desc.width * desc.height * desc.depth > 0); // remember to set depth to 1!
if (desc.width * desc.height * desc.depth <= 0) {
ELOG("Bad texture dimensions %dx%dx%d", desc.width, desc.height, desc.depth);
ERROR_LOG(G3D, "Bad texture dimensions %dx%dx%d", desc.width, desc.height, desc.depth);
return false;
}
_assert_(push);
@ -727,7 +727,7 @@ bool VKTexture::Create(VkCommandBuffer cmd, VulkanPushBuffer *push, const Textur
}
if (!vkTex_->CreateDirect(cmd, alloc, width_, height_, mipLevels_, vulkanFormat, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, usageBits)) {
ELOG("Failed to create VulkanTexture: %dx%dx%d fmt %d, %d levels", width_, height_, depth_, (int)vulkanFormat, mipLevels_);
ERROR_LOG(G3D, "Failed to create VulkanTexture: %dx%dx%d fmt %d, %d levels", width_, height_, depth_, (int)vulkanFormat, mipLevels_);
return false;
}
if (desc.initData.size()) {
@ -1038,7 +1038,7 @@ Pipeline *VKContext::CreateGraphicsPipeline(const PipelineDesc &desc) {
for (auto &iter : desc.shaders) {
VKShaderModule *vkshader = (VKShaderModule *)iter;
if (!vkshader) {
ELOG("CreateGraphicsPipeline got passed a null shader");
ERROR_LOG(G3D, "CreateGraphicsPipeline got passed a null shader");
return nullptr;
}
VkPipelineShaderStageCreateInfo &stage = stages[i++];
@ -1100,7 +1100,7 @@ Pipeline *VKContext::CreateGraphicsPipeline(const PipelineDesc &desc) {
VkPipeline pipelines[2]{};
VkResult result = vkCreateGraphicsPipelines(device_, pipelineCache_, 2, createInfo, nullptr, pipelines);
if (result != VK_SUCCESS) {
ELOG("Failed to create graphics pipeline");
ERROR_LOG(G3D, "Failed to create graphics pipeline");
delete pipeline;
return nullptr;
}
@ -1177,14 +1177,14 @@ Texture *VKContext::CreateTexture(const TextureDesc &desc) {
VkCommandBuffer initCmd = renderManager_.GetInitCmd();
if (!push_ || !initCmd) {
// Too early! Fail.
ELOG("Can't create textures before the first frame has started.");
ERROR_LOG(G3D, "Can't create textures before the first frame has started.");
return nullptr;
}
VKTexture *tex = new VKTexture(vulkan_, initCmd, push_, desc);
if (tex->Create(initCmd, push_, desc, allocator_)) {
return tex;
} else {
ELOG("Failed to create texture");
ERROR_LOG(G3D, "Failed to create texture");
delete tex;
return nullptr;
}
@ -1271,7 +1271,7 @@ ShaderModule *VKContext::CreateShaderModule(ShaderStage stage, ShaderLanguage la
if (shader->Compile(vulkan_, language, data, size)) {
return shader;
} else {
ELOG("Failed to compile shader: %s", (const char *)data);
ERROR_LOG(G3D, "Failed to compile shader: %s", (const char *)data);
shader->Release();
return nullptr;
}