Rename NXT -> Dawn in the comments
This commit is contained in:
parent
923574eed5
commit
9fc65344f4
2
AUTHORS
2
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
|
# 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
|
# some cases, their employer may be the copyright holder. To see the full list
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,6 +1,6 @@
|
||||||
# NXT, standalone part
|
# 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:
|
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.
|
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 result in a noop.
|
||||||
- Functions returning an object return an error value.
|
- 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.
|
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:
|
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.)
|
- Glue code generating dawnProcTable for a backend with simple validation included (enum value checks etc.)
|
||||||
- A mock API for testing
|
- A mock API for testing
|
||||||
|
|
||||||
|
|
|
@ -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
|
proof of concept for the API and is not a robust model viewer. It can load
|
||||||
basic mesh/texture data from a few
|
basic mesh/texture data from a few
|
||||||
[glTF sample models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/1.0),
|
[glTF sample models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/1.0),
|
||||||
|
|
|
@ -609,7 +609,7 @@ int main(int argc, const char* argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (argc < 2) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ namespace dawn { namespace wire {
|
||||||
Device* mDevice;
|
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.
|
//* and the object id allocators.
|
||||||
class Device : public ObjectBase, public wire::ObjectIdProvider {
|
class Device : public ObjectBase, public wire::ObjectIdProvider {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace dawn { namespace wire {
|
||||||
{% set Suffix = as_MethodSuffix(type.name, method.name) %}
|
{% set Suffix = as_MethodSuffix(type.name, method.name) %}
|
||||||
{% set Cmd = Suffix + "Cmd" %}
|
{% 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.
|
//* They provide helpers to serialize/deserialize to/from a buffer.
|
||||||
struct {{Cmd}} {
|
struct {{Cmd}} {
|
||||||
//* From a filled structure, compute how much size will be used in the serialization buffer.
|
//* From a filled structure, compute how much size will be used in the serialization buffer.
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace backend {
|
||||||
// in Allocate
|
// in Allocate
|
||||||
// - Be able to optimize allocation to one block, for command buffers expected to live long to
|
// - Be able to optimize allocation to one block, for command buffers expected to live long to
|
||||||
// avoid cache misses
|
// 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
|
// close to another
|
||||||
|
|
||||||
CommandAllocator::CommandAllocator()
|
CommandAllocator::CommandAllocator()
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace backend {
|
||||||
|
|
||||||
virtual void TickImpl() = 0;
|
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
|
// 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.
|
// objects will help make comparisons between objects by a single pointer comparison.
|
||||||
//
|
//
|
||||||
|
|
|
@ -489,7 +489,7 @@ namespace backend { namespace d3d12 {
|
||||||
|
|
||||||
if (clearFlags) {
|
if (clearFlags) {
|
||||||
auto handle = renderPass->GetDSVDescriptor();
|
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?
|
// stencil type be uint8_t?
|
||||||
uint8_t clearStencil = static_cast<uint8_t>(attachmentInfo.clearStencil);
|
uint8_t clearStencil = static_cast<uint8_t>(attachmentInfo.clearStencil);
|
||||||
commandList->ClearDepthStencilView(
|
commandList->ClearDepthStencilView(
|
||||||
|
|
|
@ -503,7 +503,7 @@ namespace backend { namespace metal {
|
||||||
std::array<NSUInteger, kMaxVertexInputs> mtlOffsets;
|
std::array<NSUInteger, kMaxVertexInputs> mtlOffsets;
|
||||||
|
|
||||||
// Perhaps an "array of vertex buffers(+offsets?)" should be
|
// 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) {
|
for (uint32_t i = 0; i < cmd->count; ++i) {
|
||||||
Buffer* buffer = ToBackend(buffers[i].Get());
|
Buffer* buffer = ToBackend(buffers[i].Get());
|
||||||
mtlBuffers[i] = buffer->GetMTLBuffer();
|
mtlBuffers[i] = buffer->GetMTLBuffer();
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace backend { namespace opengl {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Vertex buffers and index buffers are implemented as part of an OpenGL VAO that
|
// 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.
|
// This means that we have to re-apply these buffers on an InputState change.
|
||||||
class InputBufferTracker {
|
class InputBufferTracker {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace backend { namespace vulkan {
|
||||||
}
|
}
|
||||||
|
|
||||||
VkColorComponentFlagBits VulkanColorWriteMask(dawn::ColorWriteMask mask) {
|
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) ==
|
static_assert(static_cast<VkColorComponentFlagBits>(dawn::ColorWriteMask::Red) ==
|
||||||
VK_COLOR_COMPONENT_R_BIT,
|
VK_COLOR_COMPONENT_R_BIT,
|
||||||
"");
|
"");
|
||||||
|
|
|
@ -176,7 +176,7 @@ namespace backend { namespace vulkan {
|
||||||
VkBufferImageCopy region =
|
VkBufferImageCopy region =
|
||||||
ComputeBufferImageCopyRegion(copy->rowPitch, src, dst);
|
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
|
// TRANSFER_DST_OPTIMAL layout
|
||||||
device->fn.CmdCopyBufferToImage(commands, srcBuffer, dstImage,
|
device->fn.CmdCopyBufferToImage(commands, srcBuffer, dstImage,
|
||||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1,
|
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1,
|
||||||
|
@ -199,7 +199,7 @@ namespace backend { namespace vulkan {
|
||||||
VkBufferImageCopy region =
|
VkBufferImageCopy region =
|
||||||
ComputeBufferImageCopyRegion(copy->rowPitch, dst, src);
|
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,
|
device->fn.CmdCopyImageToBuffer(commands, srcImage, VK_IMAGE_LAYOUT_GENERAL,
|
||||||
dstBuffer, 1, ®ion);
|
dstBuffer, 1, ®ion);
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace backend { namespace vulkan {
|
||||||
mCreateInfo.back.depthFailOp = VulkanStencilOp(stencil.back.depthFail);
|
mCreateInfo.back.depthFailOp = VulkanStencilOp(stencil.back.depthFail);
|
||||||
mCreateInfo.back.compareOp = VulkanCompareOp(stencil.back.compareFunction);
|
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.front.compareMask = stencil.readMask;
|
||||||
mCreateInfo.back.compareMask = stencil.readMask;
|
mCreateInfo.back.compareMask = stencil.readMask;
|
||||||
mCreateInfo.front.writeMask = stencil.writeMask;
|
mCreateInfo.front.writeMask = stencil.writeMask;
|
||||||
|
|
|
@ -491,7 +491,7 @@ namespace backend { namespace vulkan {
|
||||||
usedKnobs->swapchain = true;
|
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;
|
usedKnobs->features.independentBlend = VK_TRUE;
|
||||||
|
|
||||||
// Find a universal queue family
|
// Find a universal queue family
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace backend { namespace vulkan {
|
||||||
: PipelineLayoutBase(device, descriptor) {
|
: PipelineLayoutBase(device, descriptor) {
|
||||||
// Compute the array of VkDescriptorSetLayouts that will be chained in the create info.
|
// 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
|
// 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;
|
uint32_t numSetLayouts = 0;
|
||||||
std::array<VkDescriptorSetLayout, kMaxBindGroups> setLayouts;
|
std::array<VkDescriptorSetLayout, kMaxBindGroups> setLayouts;
|
||||||
for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) {
|
for (uint32_t setIndex : IterateBitSet(GetBindGroupLayoutsMask())) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace backend { namespace vulkan {
|
||||||
inputAssembly.pNext = nullptr;
|
inputAssembly.pNext = nullptr;
|
||||||
inputAssembly.flags = 0;
|
inputAssembly.flags = 0;
|
||||||
inputAssembly.topology = VulkanPrimitiveTopology(GetPrimitiveTopology());
|
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;
|
inputAssembly.primitiveRestartEnable = VK_TRUE;
|
||||||
|
|
||||||
// A dummy viewport/scissor info. The validation layers force use to provide at least one
|
// A dummy viewport/scissor info. The validation layers force use to provide at least one
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
namespace backend { namespace vulkan {
|
namespace backend { namespace vulkan {
|
||||||
|
|
||||||
namespace {
|
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
|
// 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.
|
// via the array size and a "cubemap compatible" flag.
|
||||||
VkImageType VulkanImageType(dawn::TextureDimension dimension) {
|
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
|
// Contrary to image types, image view types include arrayness and cubemapness
|
||||||
VkImageViewType VulkanImageViewType(dawn::TextureDimension dimension) {
|
VkImageViewType VulkanImageViewType(dawn::TextureDimension dimension) {
|
||||||
switch (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 VulkanAccessFlags(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
|
||||||
VkAccessFlags flags = 0;
|
VkAccessFlags flags = 0;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ namespace backend { namespace vulkan {
|
||||||
return flags;
|
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) {
|
VkImageLayout VulkanImageLayout(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
|
||||||
if (usage == dawn::TextureUsageBit::None) {
|
if (usage == dawn::TextureUsageBit::None) {
|
||||||
return VK_IMAGE_LAYOUT_UNDEFINED;
|
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,
|
VkPipelineStageFlags VulkanPipelineStage(dawn::TextureUsageBit usage,
|
||||||
dawn::TextureFormat format) {
|
dawn::TextureFormat format) {
|
||||||
VkPipelineStageFlags flags = 0;
|
VkPipelineStageFlags flags = 0;
|
||||||
|
@ -162,7 +162,7 @@ namespace backend { namespace vulkan {
|
||||||
return flags;
|
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) {
|
VkImageAspectFlags VulkanAspectMask(dawn::TextureFormat format) {
|
||||||
bool isDepth = TextureFormatHasDepth(format);
|
bool isDepth = TextureFormatHasDepth(format);
|
||||||
bool isStencil = TextureFormatHasStencil(format);
|
bool isStencil = TextureFormatHasStencil(format);
|
||||||
|
@ -183,7 +183,7 @@ namespace backend { namespace vulkan {
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// Converts NXT texture format to Vulkan formats.
|
// Converts Dawn texture format to Vulkan formats.
|
||||||
VkFormat VulkanImageFormat(dawn::TextureFormat format) {
|
VkFormat VulkanImageFormat(dawn::TextureFormat format) {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case dawn::TextureFormat::R8G8B8A8Unorm:
|
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.
|
// between color and depth attachment usages.
|
||||||
VkImageUsageFlags VulkanImageUsage(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
|
VkImageUsageFlags VulkanImageUsage(dawn::TextureUsageBit usage, dawn::TextureFormat format) {
|
||||||
VkImageUsageFlags flags = 0;
|
VkImageUsageFlags flags = 0;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "common/Compiler.h"
|
#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
|
// yet, you should start now!). In debug ASSERT(condition) will trigger an error, otherwise in
|
||||||
// release it does nothing at runtime.
|
// release it does nothing at runtime.
|
||||||
//
|
//
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <memory>
|
#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
|
// 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
|
// so resources should have the TransferSrc allowed usage bit if you want to add expectations on
|
||||||
// them.
|
// them.
|
||||||
|
|
|
@ -149,7 +149,7 @@ protected:
|
||||||
EXPECT_PIXEL_RGBA8_EQ(expectedU3, mRenderPass.color, 3, 0);
|
EXPECT_PIXEL_RGBA8_EQ(expectedU3, mRenderPass.color, 3, 0);
|
||||||
EXPECT_PIXEL_RGBA8_EQ(expectedV2, mRenderPass.color, 0, 2);
|
EXPECT_PIXEL_RGBA8_EQ(expectedV2, mRenderPass.color, 0, 2);
|
||||||
EXPECT_PIXEL_RGBA8_EQ(expectedV3, mRenderPass.color, 0, 3);
|
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;
|
utils::BasicRenderPass mRenderPass;
|
||||||
|
|
|
@ -34,7 +34,7 @@ ValidationTest::ValidationTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
// will call a nullptr
|
||||||
device = dawn::Device();
|
device = dawn::Device();
|
||||||
dawnSetProcs(nullptr);
|
dawnSetProcs(nullptr);
|
||||||
|
|
Loading…
Reference in New Issue