mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Rename DeviceDescriptor -> DawnDeviceDescriptor
This is preventing supporting DeviceDescriptor from upstream webgpu.h because the name conflicts with the existing struct. A typedef using the original name DeviceDescriptor is added until all embedders of Dawn are updated to use the new name. Bug: dawn:160, dawn:689 Change-Id: Ib9cb7443b7e46e3ffe29d2ec109f2f1a831754e7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70581 Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -2046,7 +2046,7 @@ TEST_F(CopyCommandTest_T2T, CopyWithinSameTexture) {
|
||||
class CopyCommandTest_CompressedTextureFormats : public CopyCommandTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures = {"texture-compression-bc", "texture-compression-etc2",
|
||||
"texture-compression-astc"};
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST_F(TextureInternalUsageValidationDisabledTest, RequiresFeature) {
|
||||
|
||||
class TextureInternalUsageValidationTest : public ValidationTest {
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures.push_back("dawn-internal-usages");
|
||||
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
|
||||
@@ -225,7 +225,7 @@ TEST_F(OcclusionQueryValidationTest, InvalidBeginAndEnd) {
|
||||
class TimestampQueryValidationTest : public QuerySetValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures.push_back("timestamp-query");
|
||||
descriptor.forceDisabledToggles.push_back("disallow_unsafe_apis");
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
@@ -429,7 +429,7 @@ TEST_F(TimestampQueryValidationTest, WriteTimestampOnRenderPassEncoder) {
|
||||
class PipelineStatisticsQueryValidationTest : public QuerySetValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures.push_back("pipeline-statistics-query");
|
||||
// TODO(crbug.com/1177506): Pipeline statistic query is an unsafe API, disable disallowing
|
||||
// unsafe APIs to test it.
|
||||
|
||||
@@ -557,7 +557,7 @@ namespace {
|
||||
class WriteTextureTest_CompressedTextureFormats : public QueueWriteTextureValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures = {"texture-compression-bc", "texture-compression-etc2",
|
||||
"texture-compression-astc"};
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
|
||||
@@ -1124,7 +1124,7 @@ TEST_F(RenderPipelineValidationTest, BindingsFromCorrectEntryPoint) {
|
||||
class DepthClampingValidationTest : public RenderPipelineValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures = {"depth-clamping"};
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class RequestDeviceValidationTest : public ValidationTest {
|
||||
|
||||
// Test that requesting a device without specifying limits is valid.
|
||||
TEST_F(RequestDeviceValidationTest, NoRequiredLimits) {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
adapter.RequestDevice(&descriptor, ExpectRequestDeviceSuccess,
|
||||
CheckDevice([](wgpu::Device device) {
|
||||
// Check one of the default limits.
|
||||
@@ -71,7 +71,7 @@ TEST_F(RequestDeviceValidationTest, NoRequiredLimits) {
|
||||
// Test that requesting a device with the default limits is valid.
|
||||
TEST_F(RequestDeviceValidationTest, DefaultLimits) {
|
||||
wgpu::RequiredLimits limits = {};
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredLimits = reinterpret_cast<const WGPURequiredLimits*>(&limits);
|
||||
adapter.RequestDevice(&descriptor, ExpectRequestDeviceSuccess,
|
||||
CheckDevice([](wgpu::Device device) {
|
||||
@@ -85,7 +85,7 @@ TEST_F(RequestDeviceValidationTest, DefaultLimits) {
|
||||
// Test that requesting a device where a required limit is above the maximum value.
|
||||
TEST_F(RequestDeviceValidationTest, HigherIsBetter) {
|
||||
wgpu::RequiredLimits limits = {};
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredLimits = reinterpret_cast<const WGPURequiredLimits*>(&limits);
|
||||
|
||||
wgpu::SupportedLimits supportedLimits;
|
||||
@@ -138,7 +138,7 @@ TEST_F(RequestDeviceValidationTest, HigherIsBetter) {
|
||||
// Test that requesting a device where a required limit is below the minimum value.
|
||||
TEST_F(RequestDeviceValidationTest, LowerIsBetter) {
|
||||
wgpu::RequiredLimits limits = {};
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredLimits = reinterpret_cast<const WGPURequiredLimits*>(&limits);
|
||||
|
||||
wgpu::SupportedLimits supportedLimits;
|
||||
@@ -199,7 +199,7 @@ TEST_F(RequestDeviceValidationTest, InvalidChainedStruct) {
|
||||
wgpu::RequiredLimits limits = {};
|
||||
limits.nextInChain = &depthClamp;
|
||||
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredLimits = reinterpret_cast<const WGPURequiredLimits*>(&limits);
|
||||
adapter.RequestDevice(&descriptor, ExpectRequestDeviceError, nullptr);
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ namespace {
|
||||
class CompressedTextureFormatsValidationTests : public TextureValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures = {"texture-compression-bc", "texture-compression-etc2",
|
||||
"texture-compression-astc"};
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace {
|
||||
// Create device with a valid name of a toggle
|
||||
{
|
||||
const char* kValidToggleName = "emulate_store_and_msaa_resolve";
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.forceEnabledToggles.push_back(kValidToggleName);
|
||||
|
||||
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
|
||||
@@ -60,7 +60,7 @@ namespace {
|
||||
// Create device with an invalid toggle name
|
||||
{
|
||||
const char* kInvalidToggleName = "!@#$%^&*";
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.forceEnabledToggles.push_back(kInvalidToggleName);
|
||||
|
||||
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
|
||||
@@ -77,7 +77,7 @@ namespace {
|
||||
|
||||
TEST_F(ToggleValidationTest, TurnOffVsyncWithToggle) {
|
||||
const char* kValidToggleName = "turn_off_vsync";
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.forceEnabledToggles.push_back(kValidToggleName);
|
||||
|
||||
WGPUDevice deviceWithToggle = adapter.CreateDevice(&descriptor);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
class UnsafeAPIValidationTest : public ValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.forceEnabledToggles.push_back("disallow_unsafe_apis");
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
}
|
||||
@@ -109,7 +109,7 @@ TEST_F(UnsafeAPIValidationTest, PipelineOverridableConstants) {
|
||||
class UnsafeQueryAPIValidationTest : public ValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures.push_back("pipeline-statistics-query");
|
||||
descriptor.requiredFeatures.push_back("timestamp-query");
|
||||
descriptor.forceEnabledToggles.push_back("disallow_unsafe_apis");
|
||||
|
||||
@@ -195,7 +195,7 @@ wgpu::SupportedLimits ValidationTest::GetSupportedLimits() {
|
||||
|
||||
WGPUDevice ValidationTest::CreateTestDevice() {
|
||||
// Disabled disallowing unsafe APIs so we can test them.
|
||||
dawn_native::DeviceDescriptor deviceDescriptor;
|
||||
dawn_native::DawnDeviceDescriptor deviceDescriptor;
|
||||
deviceDescriptor.forceDisabledToggles.push_back("disallow_unsafe_apis");
|
||||
|
||||
for (const std::string& toggle : gToggleParser->GetEnabledToggles()) {
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace {
|
||||
class VideoViewsValidation : public ValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
dawn_native::DeviceDescriptor descriptor;
|
||||
dawn_native::DawnDeviceDescriptor descriptor;
|
||||
descriptor.requiredFeatures = {"multiplanar-formats"};
|
||||
return adapter.CreateDevice(&descriptor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user