Remove typedefs for deprecated types.

Bug: dawn:762
Change-Id: I1581d80898d4a98010bb14c5823a1a343c229664
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63383
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@google.com>
Reviewed-by: Brandon Jones <bajones@google.com>
This commit is contained in:
Corentin Wallez 2021-09-10 15:50:19 +00:00 committed by Dawn LUCI CQ
parent d4b85fbd76
commit 363c28e5d1
8 changed files with 13 additions and 30 deletions

View File

@ -1036,10 +1036,6 @@
{"name": "attributes", "type": "vertex attribute", "annotation": "const*", "length": "attribute count"} {"name": "attributes", "type": "vertex attribute", "annotation": "const*", "length": "attribute count"}
] ]
}, },
"input step mode": {
"category": "typedef",
"type": "vertex step mode"
},
"vertex step mode": { "vertex step mode": {
"category": "enum", "category": "enum",
"values": [ "values": [
@ -1350,11 +1346,6 @@
] ]
}, },
"render pass color attachment descriptor": {
"category": "typedef",
"type": "render pass color attachment"
},
"render pass depth stencil attachment": { "render pass depth stencil attachment": {
"category": "structure", "category": "structure",
"members": [ "members": [
@ -1371,11 +1362,6 @@
] ]
}, },
"render pass depth stencil attachment descriptor": {
"category": "typedef",
"type": "render pass depth stencil attachment"
},
"render pass descriptor": { "render pass descriptor": {
"category": "structure", "category": "structure",
"extensible": true, "extensible": true,

View File

@ -108,7 +108,7 @@ void init() {
void frame() { void frame() {
WGPUTextureView backbufferView = wgpuSwapChainGetCurrentTextureView(swapchain); WGPUTextureView backbufferView = wgpuSwapChainGetCurrentTextureView(swapchain);
WGPURenderPassDescriptor renderpassInfo = {}; WGPURenderPassDescriptor renderpassInfo = {};
WGPURenderPassColorAttachmentDescriptor colorAttachment = {}; WGPURenderPassColorAttachment colorAttachment = {};
{ {
colorAttachment.attachment = backbufferView; colorAttachment.attachment = backbufferView;
colorAttachment.resolveTarget = nullptr; colorAttachment.resolveTarget = nullptr;

View File

@ -163,9 +163,8 @@ namespace dawn_native {
return {}; return {};
} }
MaybeError ValidateResolveTarget( MaybeError ValidateResolveTarget(const DeviceBase* device,
const DeviceBase* device, const RenderPassColorAttachment& colorAttachment) {
const RenderPassColorAttachmentDescriptor& colorAttachment) {
if (colorAttachment.resolveTarget == nullptr) { if (colorAttachment.resolveTarget == nullptr) {
return {}; return {};
} }
@ -217,7 +216,7 @@ namespace dawn_native {
MaybeError ValidateRenderPassColorAttachment( MaybeError ValidateRenderPassColorAttachment(
DeviceBase* device, DeviceBase* device,
const RenderPassColorAttachmentDescriptor& colorAttachment, const RenderPassColorAttachment& colorAttachment,
uint32_t* width, uint32_t* width,
uint32_t* height, uint32_t* height,
uint32_t* sampleCount) { uint32_t* sampleCount) {
@ -274,7 +273,7 @@ namespace dawn_native {
MaybeError ValidateRenderPassDepthStencilAttachment( MaybeError ValidateRenderPassDepthStencilAttachment(
DeviceBase* device, DeviceBase* device,
const RenderPassDepthStencilAttachmentDescriptor* depthStencilAttachment, const RenderPassDepthStencilAttachment* depthStencilAttachment,
uint32_t* width, uint32_t* width,
uint32_t* height, uint32_t* height,
uint32_t* sampleCount) { uint32_t* sampleCount) {

View File

@ -405,7 +405,7 @@ namespace dawn_native {
device->CreateTextureView(destination->texture, &dstTextureViewDesc)); device->CreateTextureView(destination->texture, &dstTextureViewDesc));
// Prepare render pass color attachment descriptor. // Prepare render pass color attachment descriptor.
RenderPassColorAttachmentDescriptor colorAttachmentDesc; RenderPassColorAttachment colorAttachmentDesc;
colorAttachmentDesc.view = dstView.Get(); colorAttachmentDesc.view = dstView.Get();
colorAttachmentDesc.loadOp = wgpu::LoadOp::Load; colorAttachmentDesc.loadOp = wgpu::LoadOp::Load;

View File

@ -42,7 +42,7 @@ TEST_P(DeprecationTests, SetAttachmentDescriptorAttachment) {
wgpu::RenderPassEncoder pass; wgpu::RenderPassEncoder pass;
// Check that using .attachment with color attachments gives the warning. // Check that using .attachment with color attachments gives the warning.
wgpu::RenderPassColorAttachmentDescriptor* colorAttachment = wgpu::RenderPassColorAttachment* colorAttachment =
&renderPass.renderPassInfo.cColorAttachments[0]; &renderPass.renderPassInfo.cColorAttachments[0];
colorAttachment->attachment = colorAttachment->view; colorAttachment->attachment = colorAttachment->view;
colorAttachment->view = nullptr; colorAttachment->view = nullptr;
@ -63,7 +63,7 @@ TEST_P(DeprecationTests, SetAttachmentDescriptorAttachment) {
descriptor.usage = wgpu::TextureUsage::RenderAttachment; descriptor.usage = wgpu::TextureUsage::RenderAttachment;
wgpu::Texture depthStencil = device.CreateTexture(&descriptor); wgpu::Texture depthStencil = device.CreateTexture(&descriptor);
wgpu::RenderPassDepthStencilAttachmentDescriptor* depthAttachment = wgpu::RenderPassDepthStencilAttachment* depthAttachment =
&renderPass.renderPassInfo.cDepthStencilAttachmentInfo; &renderPass.renderPassInfo.cDepthStencilAttachmentInfo;
renderPass.renderPassInfo.depthStencilAttachment = depthAttachment; renderPass.renderPassInfo.depthStencilAttachment = depthAttachment;
depthAttachment->attachment = depthStencil.CreateView(); depthAttachment->attachment = depthStencil.CreateView();
@ -106,7 +106,7 @@ TEST_P(DeprecationTests, StoreOpClear) {
descriptor.usage = wgpu::TextureUsage::RenderAttachment; descriptor.usage = wgpu::TextureUsage::RenderAttachment;
wgpu::Texture depthStencil = device.CreateTexture(&descriptor); wgpu::Texture depthStencil = device.CreateTexture(&descriptor);
wgpu::RenderPassDepthStencilAttachmentDescriptor* depthAttachment = wgpu::RenderPassDepthStencilAttachment* depthAttachment =
&renderPass.renderPassInfo.cDepthStencilAttachmentInfo; &renderPass.renderPassInfo.cDepthStencilAttachmentInfo;
renderPass.renderPassInfo.depthStencilAttachment = depthAttachment; renderPass.renderPassInfo.depthStencilAttachment = depthAttachment;
depthAttachment->view = depthStencil.CreateView(); depthAttachment->view = depthStencil.CreateView();

View File

@ -101,8 +101,7 @@ namespace {
// Test OOB color attachment indices are handled // Test OOB color attachment indices are handled
TEST_F(RenderPassDescriptorValidationTest, ColorAttachmentOutOfBounds) { TEST_F(RenderPassDescriptorValidationTest, ColorAttachmentOutOfBounds) {
std::array<wgpu::RenderPassColorAttachmentDescriptor, kMaxColorAttachments + 1> std::array<wgpu::RenderPassColorAttachment, kMaxColorAttachments + 1> colorAttachments;
colorAttachments;
for (uint32_t i = 0; i < colorAttachments.size(); i++) { for (uint32_t i = 0; i < colorAttachments.size(); i++) {
colorAttachments[i].view = colorAttachments[i].view =
Create2DAttachment(device, 1, 1, wgpu::TextureFormat::RGBA8Unorm); Create2DAttachment(device, 1, 1, wgpu::TextureFormat::RGBA8Unorm);

View File

@ -91,7 +91,7 @@ class ValidationTest : public testing::Test {
uint32_t height; uint32_t height;
private: private:
wgpu::RenderPassColorAttachmentDescriptor mColorAttachment; wgpu::RenderPassColorAttachment mColorAttachment;
}; };
bool HasToggleEnabled(const char* toggle) const; bool HasToggleEnabled(const char* toggle) const;

View File

@ -66,9 +66,8 @@ namespace utils {
const ComboRenderPassDescriptor& operator=( const ComboRenderPassDescriptor& operator=(
const ComboRenderPassDescriptor& otherRenderPass); const ComboRenderPassDescriptor& otherRenderPass);
std::array<wgpu::RenderPassColorAttachmentDescriptor, kMaxColorAttachments> std::array<wgpu::RenderPassColorAttachment, kMaxColorAttachments> cColorAttachments;
cColorAttachments; wgpu::RenderPassDepthStencilAttachment cDepthStencilAttachmentInfo = {};
wgpu::RenderPassDepthStencilAttachmentDescriptor cDepthStencilAttachmentInfo = {};
}; };
struct BasicRenderPass { struct BasicRenderPass {