diff --git a/AUTHORS b/AUTHORS index 01176762f6..32a6c3cec6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -# This is the list of NXT authors for copyright purposes. +# This is the list of Dawn authors for copyright purposes. # # This does not necessarily list everyone who has contributed code, since in # some cases, their employer may be the copyright holder. To see the full list diff --git a/README.md b/README.md index 93e911c497..1c83d135dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NXT, standalone part -NXT is an unoriginal name for Chromium’s investigation and prototyping of a NeXT generation graphics API for the Web. This repository contains a native library implementing NXT on multiple backends, as well as some code generators used for the integration in Chromium. NXT is not an official Google product. +NXT is an unoriginal name for Chromium’s investigation and prototyping of a NeXT generation graphics API for the Web. This repository contains a native library implementing Dawn on multiple backends, as well as some code generators used for the integration in Chromium. Dawn is not an official Google product. We focused on efforts on two axis: @@ -64,9 +64,9 @@ What we call the wire is an API command buffer for NXT. The name was chosen to a Originally OpenGL was designed as a client-server architecture with asynchronous errors and objects that could be used by the client before they were created by server. Over time more client state-tracking was added but the core asynchronous structure remained. This enabled OpenGL ES 2 / WebGL to be implemented in Chromium in which the web page and the GPU driver live in different processes. In addition to security this separation helps with performance in CPU-bound WebGL apps. -For this reason we built NXT as a network-transparent API so that it could integrate nicely in the Chromium architecture, and we believe any next-generation Web API would have to be network-transparent too. +For this reason we built Dawn as a network-transparent API so that it could integrate nicely in the Chromium architecture, and we believe any next-generation Web API would have to be network-transparent too. -In NXT, as in OpenGL, API objects can be used immediately after they have been created on the client, even if the server hasn’t seen the creation command yet. If object creation succeeds, everything happens transparently otherwise the object is tagged as being an error. NXT calls with error-tagged objects use the following rules: +In NXT, as in OpenGL, API objects can be used immediately after they have been created on the client, even if the server hasn’t seen the creation command yet. If object creation succeeds, everything happens transparently otherwise the object is tagged as being an error. Dawn calls with error-tagged objects use the following rules: - Functions result in a noop. - Functions returning an object return an error value. @@ -80,11 +80,11 @@ Currently the wire only has client to server communication and there is no way t Our prototype heavily relies on code generation. It greatly improved iteration time on the API as the generators kept the Javascript bindings, IDL files, wire, C++ bindings and friends up to date. But it reduced flexibility in the API shape as adding as changing the shape required modifying all generators in non-trivial ways. -For example, NXT can only return objects which prevents mapping buffers or even reading back single pixel values. There is currently no way to know the error status on the client side. These improvements, and more, are planned, and contributions are welcome. +For example, Dawn can only return objects which prevents mapping buffers or even reading back single pixel values. There is currently no way to know the error status on the client side. These improvements, and more, are planned, and contributions are welcome. Other generators include: -- A C-header with the definition of dawnProcTable that is the “real” underlying NXT API exposed by the backends. +- A C-header with the definition of dawnProcTable that is the “real” underlying Dawn API exposed by the backends. - Glue code generating dawnProcTable for a backend with simple validation included (enum value checks etc.) - A mock API for testing diff --git a/examples/glTFViewer/README.md b/examples/glTFViewer/README.md index 0dafad35fe..d1ddf6bde9 100644 --- a/examples/glTFViewer/README.md +++ b/examples/glTFViewer/README.md @@ -1,6 +1,6 @@ -# NXT glTF Viewer +# Dawn glTF Viewer -This is a barebones glTF model viewer using the NXT API. It is intended as a +This is a barebones glTF model viewer using the Dawn API. It is intended as a proof of concept for the API and is not a robust model viewer. It can load basic mesh/texture data from a few [glTF sample models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/1.0), diff --git a/examples/glTFViewer/glTFViewer.cpp b/examples/glTFViewer/glTFViewer.cpp index d6dfe28054..6347fb2ea0 100644 --- a/examples/glTFViewer/glTFViewer.cpp +++ b/examples/glTFViewer/glTFViewer.cpp @@ -609,7 +609,7 @@ int main(int argc, const char* argv[]) { return 1; } if (argc < 2) { - fprintf(stderr, "Usage: %s model.gltf [... NXT Options]\n", argv[0]); + fprintf(stderr, "Usage: %s model.gltf [... Dawn Options]\n", argv[0]); return 1; } diff --git a/generator/templates/wire/WireClient.cpp b/generator/templates/wire/WireClient.cpp index 5e22509086..9d551738fe 100644 --- a/generator/templates/wire/WireClient.cpp +++ b/generator/templates/wire/WireClient.cpp @@ -192,7 +192,7 @@ namespace dawn { namespace wire { Device* mDevice; }; - //* The client wire uses the global NXT device to store its global data such as the serializer + //* The client wire uses the global Dawn device to store its global data such as the serializer //* and the object id allocators. class Device : public ObjectBase, public wire::ObjectIdProvider { public: diff --git a/generator/templates/wire/WireCmd.h b/generator/templates/wire/WireCmd.h index 2f1fe6c13c..72da4fdcd0 100644 --- a/generator/templates/wire/WireCmd.h +++ b/generator/templates/wire/WireCmd.h @@ -68,7 +68,7 @@ namespace dawn { namespace wire { {% set Suffix = as_MethodSuffix(type.name, method.name) %} {% set Cmd = Suffix + "Cmd" %} - //* These are "structure" version of the list of arguments to the different NXT methods. + //* These are "structure" version of the list of arguments to the different Dawn methods. //* They provide helpers to serialize/deserialize to/from a buffer. struct {{Cmd}} { //* From a filled structure, compute how much size will be used in the serialization buffer. diff --git a/src/backend/CommandAllocator.cpp b/src/backend/CommandAllocator.cpp index ca3342aae6..c1829acab9 100644 --- a/src/backend/CommandAllocator.cpp +++ b/src/backend/CommandAllocator.cpp @@ -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() diff --git a/src/backend/Device.h b/src/backend/Device.h index 8e9a4522d9..ada648bd8b 100644 --- a/src/backend/Device.h +++ b/src/backend/Device.h @@ -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. // diff --git a/src/backend/d3d12/CommandBufferD3D12.cpp b/src/backend/d3d12/CommandBufferD3D12.cpp index ae61691574..dbe08a547f 100644 --- a/src/backend/d3d12/CommandBufferD3D12.cpp +++ b/src/backend/d3d12/CommandBufferD3D12.cpp @@ -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(attachmentInfo.clearStencil); commandList->ClearDepthStencilView( diff --git a/src/backend/metal/CommandBufferMTL.mm b/src/backend/metal/CommandBufferMTL.mm index 0a1130c132..af9cacf2b6 100644 --- a/src/backend/metal/CommandBufferMTL.mm +++ b/src/backend/metal/CommandBufferMTL.mm @@ -503,7 +503,7 @@ namespace backend { namespace metal { std::array 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(); diff --git a/src/backend/opengl/CommandBufferGL.cpp b/src/backend/opengl/CommandBufferGL.cpp index 5b4a17bed0..83a2ea3222 100644 --- a/src/backend/opengl/CommandBufferGL.cpp +++ b/src/backend/opengl/CommandBufferGL.cpp @@ -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: diff --git a/src/backend/vulkan/BlendStateVk.cpp b/src/backend/vulkan/BlendStateVk.cpp index 3dd2afe662..2269dd1265 100644 --- a/src/backend/vulkan/BlendStateVk.cpp +++ b/src/backend/vulkan/BlendStateVk.cpp @@ -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(dawn::ColorWriteMask::Red) == VK_COLOR_COMPONENT_R_BIT, ""); diff --git a/src/backend/vulkan/CommandBufferVk.cpp b/src/backend/vulkan/CommandBufferVk.cpp index 57f784673a..bab5ee353b 100644 --- a/src/backend/vulkan/CommandBufferVk.cpp +++ b/src/backend/vulkan/CommandBufferVk.cpp @@ -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, ®ion); } break; diff --git a/src/backend/vulkan/DepthStencilStateVk.cpp b/src/backend/vulkan/DepthStencilStateVk.cpp index eb40dcf2dd..c4837d2822 100644 --- a/src/backend/vulkan/DepthStencilStateVk.cpp +++ b/src/backend/vulkan/DepthStencilStateVk.cpp @@ -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; diff --git a/src/backend/vulkan/DeviceVk.cpp b/src/backend/vulkan/DeviceVk.cpp index 9cfb7c6be0..47c4343dda 100644 --- a/src/backend/vulkan/DeviceVk.cpp +++ b/src/backend/vulkan/DeviceVk.cpp @@ -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 diff --git a/src/backend/vulkan/PipelineLayoutVk.cpp b/src/backend/vulkan/PipelineLayoutVk.cpp index f790090369..09057a2a75 100644 --- a/src/backend/vulkan/PipelineLayoutVk.cpp +++ b/src/backend/vulkan/PipelineLayoutVk.cpp @@ -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 setLayouts; for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) { diff --git a/src/backend/vulkan/RenderPipelineVk.cpp b/src/backend/vulkan/RenderPipelineVk.cpp index b6b65a17cb..9d93c6d82c 100644 --- a/src/backend/vulkan/RenderPipelineVk.cpp +++ b/src/backend/vulkan/RenderPipelineVk.cpp @@ -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 diff --git a/src/backend/vulkan/TextureVk.cpp b/src/backend/vulkan/TextureVk.cpp index ab270c0620..c5cd456602 100644 --- a/src/backend/vulkan/TextureVk.cpp +++ b/src/backend/vulkan/TextureVk.cpp @@ -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; diff --git a/src/common/Assert.h b/src/common/Assert.h index 1957e99441..b9e36ca00b 100644 --- a/src/common/Assert.h +++ b/src/common/Assert.h @@ -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. // diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index 440d9e68c2..f3325ef781 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -17,7 +17,7 @@ #include #include -// 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. diff --git a/src/tests/end2end/SamplerTests.cpp b/src/tests/end2end/SamplerTests.cpp index 2024c7852c..c9cbcdb25b 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/tests/end2end/SamplerTests.cpp @@ -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; diff --git a/src/tests/unittests/validation/ValidationTest.cpp b/src/tests/unittests/validation/ValidationTest.cpp index 344dd2b88c..2b8fee3160 100644 --- a/src/tests/unittests/validation/ValidationTest.cpp +++ b/src/tests/unittests/validation/ValidationTest.cpp @@ -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);