Assigning nullptr to descriptor's nextInChain in C++ is unneeded
It has already been initialized to nullptr by C++ autogen code. BUG=dawn:82 Change-Id: I2c1cad003a7a12227cb3d17a90e12c16739ee9a0 Reviewed-on: https://dawn-review.googlesource.com/c/3600 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
2b9d702c09
commit
74ec15010f
|
@ -139,7 +139,6 @@ class BlendStateTest : public DawnTest {
|
||||||
descriptor.blendEnabled = true;
|
descriptor.blendEnabled = true;
|
||||||
descriptor.alphaBlend = blend;
|
descriptor.alphaBlend = blend;
|
||||||
descriptor.colorBlend = blend;
|
descriptor.colorBlend = blend;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.colorWriteMask = dawn::ColorWriteMask::All;
|
descriptor.colorWriteMask = dawn::ColorWriteMask::All;
|
||||||
|
|
||||||
SetupSingleSourcePipelines(descriptor);
|
SetupSingleSourcePipelines(descriptor);
|
||||||
|
@ -165,7 +164,6 @@ class BlendStateTest : public DawnTest {
|
||||||
descriptor.blendEnabled = true;
|
descriptor.blendEnabled = true;
|
||||||
descriptor.colorBlend = colorBlend;
|
descriptor.colorBlend = colorBlend;
|
||||||
descriptor.alphaBlend = alphaBlend;
|
descriptor.alphaBlend = alphaBlend;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.colorWriteMask = dawn::ColorWriteMask::All;
|
descriptor.colorWriteMask = dawn::ColorWriteMask::All;
|
||||||
|
|
||||||
SetupSingleSourcePipelines(descriptor);
|
SetupSingleSourcePipelines(descriptor);
|
||||||
|
@ -283,7 +281,6 @@ TEST_P(BlendStateTest, Basic) {
|
||||||
blend.srcFactor = dawn::BlendFactor::One;
|
blend.srcFactor = dawn::BlendFactor::One;
|
||||||
blend.dstFactor = dawn::BlendFactor::Zero;
|
blend.dstFactor = dawn::BlendFactor::Zero;
|
||||||
dawn::BlendStateDescriptor descriptor;
|
dawn::BlendStateDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.blendEnabled = false;
|
descriptor.blendEnabled = false;
|
||||||
descriptor.alphaBlend = blend;
|
descriptor.alphaBlend = blend;
|
||||||
descriptor.colorBlend = blend;
|
descriptor.colorBlend = blend;
|
||||||
|
@ -640,7 +637,6 @@ TEST_P(BlendStateTest, ColorWriteMask) {
|
||||||
blend.dstFactor = dawn::BlendFactor::One;
|
blend.dstFactor = dawn::BlendFactor::One;
|
||||||
|
|
||||||
dawn::BlendStateDescriptor descriptor;
|
dawn::BlendStateDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.blendEnabled = true;
|
descriptor.blendEnabled = true;
|
||||||
descriptor.colorBlend = blend;
|
descriptor.colorBlend = blend;
|
||||||
descriptor.alphaBlend = blend;
|
descriptor.alphaBlend = blend;
|
||||||
|
@ -688,7 +684,6 @@ TEST_P(BlendStateTest, ColorWriteMaskBlendingDisabled) {
|
||||||
blend.srcFactor = dawn::BlendFactor::One;
|
blend.srcFactor = dawn::BlendFactor::One;
|
||||||
blend.dstFactor = dawn::BlendFactor::Zero;
|
blend.dstFactor = dawn::BlendFactor::Zero;
|
||||||
dawn::BlendStateDescriptor descriptor;
|
dawn::BlendStateDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.alphaBlend = blend;
|
descriptor.alphaBlend = blend;
|
||||||
descriptor.colorBlend = blend;
|
descriptor.colorBlend = blend;
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,6 @@ protected:
|
||||||
mTexture = Create2DTexture(
|
mTexture = Create2DTexture(
|
||||||
device, textureWidthLevel0, textureHeightLevel0, layerCount, levelCount, kUsage);
|
device, textureWidthLevel0, textureHeightLevel0, layerCount, levelCount, kUsage);
|
||||||
|
|
||||||
mDefaultTextureViewDescriptor.nextInChain = nullptr;
|
|
||||||
mDefaultTextureViewDescriptor.dimension = dawn::TextureViewDimension::e2DArray;
|
mDefaultTextureViewDescriptor.dimension = dawn::TextureViewDimension::e2DArray;
|
||||||
mDefaultTextureViewDescriptor.format = kDefaultFormat;
|
mDefaultTextureViewDescriptor.format = kDefaultFormat;
|
||||||
mDefaultTextureViewDescriptor.baseMipLevel = 0;
|
mDefaultTextureViewDescriptor.baseMipLevel = 0;
|
||||||
|
|
|
@ -141,7 +141,6 @@ TEST_F(BindGroupValidationTest, SamplerBindingType) {
|
||||||
binding.size = 0;
|
binding.size = 0;
|
||||||
|
|
||||||
dawn::BindGroupDescriptor descriptor;
|
dawn::BindGroupDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.layout = layout;
|
descriptor.layout = layout;
|
||||||
descriptor.numBindings = 1;
|
descriptor.numBindings = 1;
|
||||||
descriptor.bindings = &binding;
|
descriptor.bindings = &binding;
|
||||||
|
@ -179,7 +178,6 @@ TEST_F(BindGroupValidationTest, TextureBindingType) {
|
||||||
binding.size = 0;
|
binding.size = 0;
|
||||||
|
|
||||||
dawn::BindGroupDescriptor descriptor;
|
dawn::BindGroupDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.layout = layout;
|
descriptor.layout = layout;
|
||||||
descriptor.numBindings = 1;
|
descriptor.numBindings = 1;
|
||||||
descriptor.bindings = &binding;
|
descriptor.bindings = &binding;
|
||||||
|
@ -217,7 +215,6 @@ TEST_F(BindGroupValidationTest, BufferBindingType) {
|
||||||
binding.size = 0;
|
binding.size = 0;
|
||||||
|
|
||||||
dawn::BindGroupDescriptor descriptor;
|
dawn::BindGroupDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.layout = layout;
|
descriptor.layout = layout;
|
||||||
descriptor.numBindings = 1;
|
descriptor.numBindings = 1;
|
||||||
descriptor.bindings = &binding;
|
descriptor.bindings = &binding;
|
||||||
|
|
|
@ -32,7 +32,6 @@ constexpr dawn::TextureFormat kDefaultTextureFormat = dawn::TextureFormat::R8G8B
|
||||||
|
|
||||||
dawn::TextureDescriptor CreateDefaultTextureDescriptor() {
|
dawn::TextureDescriptor CreateDefaultTextureDescriptor() {
|
||||||
dawn::TextureDescriptor descriptor;
|
dawn::TextureDescriptor descriptor;
|
||||||
descriptor.nextInChain = nullptr;
|
|
||||||
descriptor.size.width = kWidth;
|
descriptor.size.width = kWidth;
|
||||||
descriptor.size.height = kHeight;
|
descriptor.size.height = kHeight;
|
||||||
descriptor.size.depth = 1;
|
descriptor.size.depth = 1;
|
||||||
|
@ -65,4 +64,4 @@ TEST_F(TextureValidationTest, SampleCount) {
|
||||||
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
|
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // namespace
|
||||||
|
|
|
@ -62,7 +62,6 @@ namespace utils {
|
||||||
blend.srcFactor = dawn::BlendFactor::One;
|
blend.srcFactor = dawn::BlendFactor::One;
|
||||||
blend.dstFactor = dawn::BlendFactor::Zero;
|
blend.dstFactor = dawn::BlendFactor::Zero;
|
||||||
dawn::BlendStateDescriptor blendStateDescriptor;
|
dawn::BlendStateDescriptor blendStateDescriptor;
|
||||||
blendStateDescriptor.nextInChain = nullptr;
|
|
||||||
blendStateDescriptor.blendEnabled = false;
|
blendStateDescriptor.blendEnabled = false;
|
||||||
blendStateDescriptor.alphaBlend = blend;
|
blendStateDescriptor.alphaBlend = blend;
|
||||||
blendStateDescriptor.colorBlend = blend;
|
blendStateDescriptor.colorBlend = blend;
|
||||||
|
|
Loading…
Reference in New Issue