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"}
]
},
"input step mode": {
"category": "typedef",
"type": "vertex step mode"
},
"vertex step mode": {
"category": "enum",
"values": [
@ -1350,11 +1346,6 @@
]
},
"render pass color attachment descriptor": {
"category": "typedef",
"type": "render pass color attachment"
},
"render pass depth stencil attachment": {
"category": "structure",
"members": [
@ -1371,11 +1362,6 @@
]
},
"render pass depth stencil attachment descriptor": {
"category": "typedef",
"type": "render pass depth stencil attachment"
},
"render pass descriptor": {
"category": "structure",
"extensible": true,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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