mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
Rename last references of NXT to Dawn
This commit is contained in:
parent
9fc65344f4
commit
6ed9cbf894
@ -77,7 +77,7 @@ dawn::Device CreateCppDawnDevice() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding->SetupGLFWWindowHints();
|
binding->SetupGLFWWindowHints();
|
||||||
window = glfwCreateWindow(640, 480, "NXT window", nullptr, nullptr);
|
window = glfwCreateWindow(640, 480, "Dawn window", nullptr, nullptr);
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return dawn::Device();
|
return dawn::Device();
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace backend { namespace opengl {
|
|||||||
|
|
||||||
std::string GetBindingName(uint32_t group, uint32_t binding) {
|
std::string GetBindingName(uint32_t group, uint32_t binding) {
|
||||||
std::ostringstream o;
|
std::ostringstream o;
|
||||||
o << "nxt_binding_" << group << "_" << binding;
|
o << "dawn_binding_" << group << "_" << binding;
|
||||||
return o.str();
|
return o.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ namespace backend { namespace opengl {
|
|||||||
|
|
||||||
std::string CombinedSampler::GetName() const {
|
std::string CombinedSampler::GetName() const {
|
||||||
std::ostringstream o;
|
std::ostringstream o;
|
||||||
o << "nxt_combined";
|
o << "dawn_combined";
|
||||||
o << "_" << samplerLocation.group << "_" << samplerLocation.binding;
|
o << "_" << samplerLocation.group << "_" << samplerLocation.binding;
|
||||||
o << "_with_" << textureLocation.group << "_" << textureLocation.binding;
|
o << "_with_" << textureLocation.group << "_" << textureLocation.binding;
|
||||||
return o.str();
|
return o.str();
|
||||||
@ -104,7 +104,7 @@ namespace backend { namespace opengl {
|
|||||||
compiler.set_name(combined.combined_id, info.GetName());
|
compiler.set_name(combined.combined_id, info.GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change binding names to be "nxt_binding_<group>_<binding>".
|
// Change binding names to be "dawn_binding_<group>_<binding>".
|
||||||
// Also unsets the SPIRV "Binding" decoration as it outputs "layout(binding=)" which
|
// Also unsets the SPIRV "Binding" decoration as it outputs "layout(binding=)" which
|
||||||
// isn't supported on OSX's OpenGL.
|
// isn't supported on OSX's OpenGL.
|
||||||
for (uint32_t group = 0; group < kMaxBindGroups; ++group) {
|
for (uint32_t group = 0; group < kMaxBindGroups; ++group) {
|
||||||
|
@ -47,7 +47,7 @@ namespace backend { namespace vulkan {
|
|||||||
VkBufferImageCopy region;
|
VkBufferImageCopy region;
|
||||||
|
|
||||||
region.bufferOffset = bufferLocation.offset;
|
region.bufferOffset = bufferLocation.offset;
|
||||||
// In Vulkan the row length is in texels while it is in bytes for NXT
|
// In Vulkan the row length is in texels while it is in bytes for Dawn
|
||||||
region.bufferRowLength = rowPitch / TextureFormatPixelSize(texture->GetFormat());
|
region.bufferRowLength = rowPitch / TextureFormatPixelSize(texture->GetFormat());
|
||||||
region.bufferImageHeight = rowPitch * textureLocation.height;
|
region.bufferImageHeight = rowPitch * textureLocation.height;
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ namespace backend { namespace vulkan {
|
|||||||
}
|
}
|
||||||
// RenderDoc installs a layer at the system level for its capture but we don't want to use
|
// RenderDoc installs a layer at the system level for its capture but we don't want to use
|
||||||
// it unless we are debugging in RenderDoc so we hide it behind a macro.
|
// it unless we are debugging in RenderDoc so we hide it behind a macro.
|
||||||
#if defined(NXT_USE_RENDERDOC)
|
#if defined(DAWN_USE_RENDERDOC)
|
||||||
if (mGlobalInfo.renderDocCapture) {
|
if (mGlobalInfo.renderDocCapture) {
|
||||||
layersToRequest.push_back(kLayerNameRenderDocCapture);
|
layersToRequest.push_back(kLayerNameRenderDocCapture);
|
||||||
usedKnobs->renderDocCapture = true;
|
usedKnobs->renderDocCapture = true;
|
||||||
|
@ -34,7 +34,7 @@ namespace backend { namespace vulkan {
|
|||||||
numSetLayouts++;
|
numSetLayouts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specify NXT's push constant range on all pipeline layouts because we don't know which
|
// Specify Dawn's push constant range on all pipeline layouts because we don't know which
|
||||||
// pipelines might use it.
|
// pipelines might use it.
|
||||||
VkPushConstantRange pushConstantRange;
|
VkPushConstantRange pushConstantRange;
|
||||||
pushConstantRange.stageFlags = VK_SHADER_STAGE_ALL;
|
pushConstantRange.stageFlags = VK_SHADER_STAGE_ALL;
|
||||||
|
@ -239,7 +239,7 @@ namespace backend { namespace vulkan {
|
|||||||
Device* device = ToBackend(GetDevice());
|
Device* device = ToBackend(GetDevice());
|
||||||
|
|
||||||
// Create the Vulkan image "container". We don't need to check that the format supports the
|
// Create the Vulkan image "container". We don't need to check that the format supports the
|
||||||
// combination of sample, usage etc. because validation should have been done in the NXT
|
// combination of sample, usage etc. because validation should have been done in the Dawn
|
||||||
// frontend already based on the minimum supported formats in the Vulkan spec
|
// frontend already based on the minimum supported formats in the Vulkan spec
|
||||||
VkImageCreateInfo createInfo;
|
VkImageCreateInfo createInfo;
|
||||||
createInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
createInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
||||||
|
@ -78,7 +78,7 @@ namespace {
|
|||||||
glfwDefaultWindowHints();
|
glfwDefaultWindowHints();
|
||||||
binding->SetupGLFWWindowHints();
|
binding->SetupGLFWWindowHints();
|
||||||
|
|
||||||
std::string windowName = "NXT " + ParamName(type) + " test window";
|
std::string windowName = "Dawn " + ParamName(type) + " test window";
|
||||||
*window = glfwCreateWindow(400, 400, windowName.c_str(), nullptr, nullptr);
|
*window = glfwCreateWindow(400, 400, windowName.c_str(), nullptr, nullptr);
|
||||||
|
|
||||||
return *window;
|
return *window;
|
||||||
|
@ -246,7 +246,7 @@ TEST(ErrorTests, TRY_RESULT_ConversionToError) {
|
|||||||
delete errorData;
|
delete errorData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check a MaybeError can be NXT_TRIED in a function that returns an ResultOrError
|
// Check a MaybeError can be DAWN_TRIED in a function that returns an ResultOrError
|
||||||
// Check DAWN_TRY handles errors correctly.
|
// Check DAWN_TRY handles errors correctly.
|
||||||
TEST(ErrorTests, TRY_ConversionToErrorOrResult) {
|
TEST(ErrorTests, TRY_ConversionToErrorOrResult) {
|
||||||
auto ReturnError = []() -> MaybeError {
|
auto ReturnError = []() -> MaybeError {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "utils/DawnHelpers.h"
|
#include "utils/DawnHelpers.h"
|
||||||
|
|
||||||
// Maximums for NXT, tests will start failing when this changes
|
// Maximums for Dawn, tests will start failing when this changes
|
||||||
static constexpr uint32_t kMaxVertexAttributes = 16u;
|
static constexpr uint32_t kMaxVertexAttributes = 16u;
|
||||||
static constexpr uint32_t kMaxVertexInputs = 16u;
|
static constexpr uint32_t kMaxVertexInputs = 16u;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ ValidationTest::ValidationTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ValidationTest::~ValidationTest() {
|
ValidationTest::~ValidationTest() {
|
||||||
// We need to destroy Dawn 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 dawn*Release
|
||||||
// will call a nullptr
|
// will call a nullptr
|
||||||
device = dawn::Device();
|
device = dawn::Device();
|
||||||
dawnSetProcs(nullptr);
|
dawnSetProcs(nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user