Rename NXT -> Dawn in the comments

This commit is contained in:
Corentin Wallez
2018-07-18 15:28:38 +02:00
committed by Corentin Wallez
parent 923574eed5
commit 9fc65344f4
22 changed files with 35 additions and 35 deletions

View File

@@ -145,7 +145,7 @@ namespace backend {
// in Allocate
// - Be able to optimize allocation to one block, for command buffers expected to live long to
// avoid cache misses
// - Better block allocation, maybe have NXT API to say command buffer is going to have size
// - Better block allocation, maybe have Dawn API to say command buffer is going to have size
// close to another
CommandAllocator::CommandAllocator()

View File

@@ -62,7 +62,7 @@ namespace backend {
virtual void TickImpl() = 0;
// Many NXT objects are completely immutable once created which means that if two
// Many Dawn objects are completely immutable once created which means that if two
// builders are given the same arguments, they can return the same object. Reusing
// objects will help make comparisons between objects by a single pointer comparison.
//

View File

@@ -489,7 +489,7 @@ namespace backend { namespace d3d12 {
if (clearFlags) {
auto handle = renderPass->GetDSVDescriptor();
// TODO(kainino@chromium.org): investigate: should the NXT clear
// TODO(kainino@chromium.org): investigate: should the Dawn clear
// stencil type be uint8_t?
uint8_t clearStencil = static_cast<uint8_t>(attachmentInfo.clearStencil);
commandList->ClearDepthStencilView(

View File

@@ -503,7 +503,7 @@ namespace backend { namespace metal {
std::array<NSUInteger, kMaxVertexInputs> mtlOffsets;
// Perhaps an "array of vertex buffers(+offsets?)" should be
// a NXT API primitive to avoid reconstructing this array?
// a Dawn API primitive to avoid reconstructing this array?
for (uint32_t i = 0; i < cmd->count; ++i) {
Buffer* buffer = ToBackend(buffers[i].Get());
mtlBuffers[i] = buffer->GetMTLBuffer();

View File

@@ -148,7 +148,7 @@ namespace backend { namespace opengl {
};
// Vertex buffers and index buffers are implemented as part of an OpenGL VAO that
// corresponds to an InputState. On the contrary in NXT they are part of the global state.
// corresponds to an InputState. On the contrary in Dawn they are part of the global state.
// This means that we have to re-apply these buffers on an InputState change.
class InputBufferTracker {
public:

View File

@@ -70,7 +70,7 @@ namespace backend { namespace vulkan {
}
VkColorComponentFlagBits VulkanColorWriteMask(dawn::ColorWriteMask mask) {
// Vulkan and NXT color write masks match, static assert it and return the mask
// Vulkan and Dawn color write masks match, static assert it and return the mask
static_assert(static_cast<VkColorComponentFlagBits>(dawn::ColorWriteMask::Red) ==
VK_COLOR_COMPONENT_R_BIT,
"");

View File

@@ -176,7 +176,7 @@ namespace backend { namespace vulkan {
VkBufferImageCopy region =
ComputeBufferImageCopyRegion(copy->rowPitch, src, dst);
// The image is written to so the NXT guarantees make sure it is in the
// The image is written to so the Dawn guarantees make sure it is in the
// TRANSFER_DST_OPTIMAL layout
device->fn.CmdCopyBufferToImage(commands, srcBuffer, dstImage,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1,
@@ -199,7 +199,7 @@ namespace backend { namespace vulkan {
VkBufferImageCopy region =
ComputeBufferImageCopyRegion(copy->rowPitch, dst, src);
// The NXT TransferSrc usage is always mapped to GENERAL
// The Dawn TransferSrc usage is always mapped to GENERAL
device->fn.CmdCopyImageToBuffer(commands, srcImage, VK_IMAGE_LAYOUT_GENERAL,
dstBuffer, 1, &region);
} break;

View File

@@ -94,7 +94,7 @@ namespace backend { namespace vulkan {
mCreateInfo.back.depthFailOp = VulkanStencilOp(stencil.back.depthFail);
mCreateInfo.back.compareOp = VulkanCompareOp(stencil.back.compareFunction);
// NXT doesn't have separate front and back stencil masks.
// Dawn doesn't have separate front and back stencil masks.
mCreateInfo.front.compareMask = stencil.readMask;
mCreateInfo.back.compareMask = stencil.readMask;
mCreateInfo.front.writeMask = stencil.writeMask;

View File

@@ -491,7 +491,7 @@ namespace backend { namespace vulkan {
usedKnobs->swapchain = true;
}
// Always require independentBlend because it is a core NXT feature,
// Always require independentBlend because it is a core Dawn feature,
usedKnobs->features.independentBlend = VK_TRUE;
// Find a universal queue family

View File

@@ -26,7 +26,7 @@ namespace backend { namespace vulkan {
: PipelineLayoutBase(device, descriptor) {
// Compute the array of VkDescriptorSetLayouts that will be chained in the create info.
// TODO(cwallez@chromium.org) Vulkan doesn't allow holes in this array, should we expose
// this constraints at the NXT level?
// this constraints at the Dawn level?
uint32_t numSetLayouts = 0;
std::array<VkDescriptorSetLayout, kMaxBindGroups> setLayouts;
for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) {

View File

@@ -80,7 +80,7 @@ namespace backend { namespace vulkan {
inputAssembly.pNext = nullptr;
inputAssembly.flags = 0;
inputAssembly.topology = VulkanPrimitiveTopology(GetPrimitiveTopology());
// Primitive restart is always enabled in NXT (because of Metal)
// Primitive restart is always enabled in Dawn (because of Metal)
inputAssembly.primitiveRestartEnable = VK_TRUE;
// A dummy viewport/scissor info. The validation layers force use to provide at least one

View File

@@ -20,7 +20,7 @@
namespace backend { namespace vulkan {
namespace {
// Converts an NXT texture dimension to a Vulkan image type.
// Converts an Dawn texture dimension to a Vulkan image type.
// Note that in Vulkan dimensionality is only 1D, 2D, 3D. Arrays and cube maps are expressed
// via the array size and a "cubemap compatible" flag.
VkImageType VulkanImageType(dawn::TextureDimension dimension) {
@@ -32,7 +32,7 @@ namespace backend { namespace vulkan {
}
}
// Converts an NXT texture dimension to a Vulkan image view type.
// Converts an Dawn texture dimension to a Vulkan image view type.
// Contrary to image types, image view types include arrayness and cubemapness
VkImageViewType VulkanImageViewType(dawn::TextureDimension dimension) {
switch (dimension) {
@@ -43,7 +43,7 @@ namespace backend { namespace vulkan {
}
}
// Computes which vulkan access type could be required for the given NXT usage.
// Computes which vulkan access type could be required for the given Dawn usage.
VkAccessFlags VulkanAccessFlags(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
VkAccessFlags flags = 0;
@@ -80,7 +80,7 @@ namespace backend { namespace vulkan {
return flags;
}
// Chooses which Vulkan image layout should be used for the given NXT usage
// Chooses which Vulkan image layout should be used for the given Dawn usage
VkImageLayout VulkanImageLayout(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
if (usage == dawn::TextureUsageBit::None) {
return VK_IMAGE_LAYOUT_UNDEFINED;
@@ -119,7 +119,7 @@ namespace backend { namespace vulkan {
}
}
// Computes which Vulkan pipeline stage can access a texture in the given NXT usage
// Computes which Vulkan pipeline stage can access a texture in the given Dawn usage
VkPipelineStageFlags VulkanPipelineStage(dawn::TextureUsageBit usage,
dawn::TextureFormat format) {
VkPipelineStageFlags flags = 0;
@@ -162,7 +162,7 @@ namespace backend { namespace vulkan {
return flags;
}
// Computes which Vulkan texture aspects are relevant for the given NXT format
// Computes which Vulkan texture aspects are relevant for the given Dawn format
VkImageAspectFlags VulkanAspectMask(dawn::TextureFormat format) {
bool isDepth = TextureFormatHasDepth(format);
bool isStencil = TextureFormatHasStencil(format);
@@ -183,7 +183,7 @@ namespace backend { namespace vulkan {
} // namespace
// Converts NXT texture format to Vulkan formats.
// Converts Dawn texture format to Vulkan formats.
VkFormat VulkanImageFormat(dawn::TextureFormat format) {
switch (format) {
case dawn::TextureFormat::R8G8B8A8Unorm:
@@ -207,7 +207,7 @@ namespace backend { namespace vulkan {
}
}
// Converts the NXT usage flags to Vulkan usage flags. Also needs the format to choose
// Converts the Dawn usage flags to Vulkan usage flags. Also needs the format to choose
// between color and depth attachment usages.
VkImageUsageFlags VulkanImageUsage(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
VkImageUsageFlags flags = 0;

View File

@@ -17,7 +17,7 @@
#include "common/Compiler.h"
// NXT asserts to be used instead of the regular C stdlib assert function (if you don't use assert
// Dawn asserts to be used instead of the regular C stdlib assert function (if you don't use assert
// yet, you should start now!). In debug ASSERT(condition) will trigger an error, otherwise in
// release it does nothing at runtime.
//

View File

@@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <memory>
// Getting data back from NXT is done in an async manners so all expectations are "deferred"
// Getting data back from Dawn is done in an async manners so all expectations are "deferred"
// until the end of the test. Also expectations use a copy to a MapRead buffer to get the data
// so resources should have the TransferSrc allowed usage bit if you want to add expectations on
// them.

View File

@@ -149,7 +149,7 @@ protected:
EXPECT_PIXEL_RGBA8_EQ(expectedU3, mRenderPass.color, 3, 0);
EXPECT_PIXEL_RGBA8_EQ(expectedV2, mRenderPass.color, 0, 2);
EXPECT_PIXEL_RGBA8_EQ(expectedV3, mRenderPass.color, 0, 3);
// TODO: add tests for W address mode, once NXT supports 3D textures
// TODO: add tests for W address mode, once Dawn supports 3D textures
}
utils::BasicRenderPass mRenderPass;

View File

@@ -34,7 +34,7 @@ ValidationTest::ValidationTest() {
}
ValidationTest::~ValidationTest() {
// We need to destroy NXT objects before setting the procs to null otherwise the nxt*Release
// We need to destroy Dawn objects before setting the procs to null otherwise the nxt*Release
// will call a nullptr
device = dawn::Device();
dawnSetProcs(nullptr);