mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
Use TextureFormat::None for RenderBundleEncoder and AttachmentState
Bug: dawn:214 Change-Id: Ia9432582b0a5627c00d46ebcfa63ebf1ba246651 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10520 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
45ea7e66bf
commit
f0b17d00b9
@@ -580,8 +580,7 @@ TEST_F(RenderBundleValidationTest, RequiresAtLeastOneTextureFormat) {
|
||||
// Test success with a depth stencil format.
|
||||
{
|
||||
utils::ComboRenderBundleEncoderDescriptor desc = {};
|
||||
desc.cDepthStencilFormat = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
desc.depthStencilFormat = &desc.cDepthStencilFormat;
|
||||
desc.depthStencilFormat = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
device.CreateRenderBundleEncoder(&desc);
|
||||
}
|
||||
}
|
||||
@@ -595,8 +594,7 @@ TEST_F(RenderBundleValidationTest, ColorFormatNone) {
|
||||
|
||||
TEST_F(RenderBundleValidationTest, DepthStencilFormatNone) {
|
||||
utils::ComboRenderBundleEncoderDescriptor desc = {};
|
||||
const dawn::TextureFormat kFormatNone = dawn::TextureFormat::None;
|
||||
desc.depthStencilFormat = &kFormatNone;
|
||||
desc.depthStencilFormat = dawn::TextureFormat::None;
|
||||
ASSERT_DEVICE_ERROR(device.CreateRenderBundleEncoder(&desc));
|
||||
}
|
||||
|
||||
@@ -750,8 +748,7 @@ TEST_F(RenderBundleValidationTest, PipelineDepthStencilFormatMismatch) {
|
||||
utils::ComboRenderBundleEncoderDescriptor renderBundleDesc = {};
|
||||
renderBundleDesc.colorFormatsCount = 1;
|
||||
renderBundleDesc.cColorFormats[0] = dawn::TextureFormat::RGBA8Unorm;
|
||||
renderBundleDesc.cDepthStencilFormat = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
renderBundleDesc.depthStencilFormat = &renderBundleDesc.cDepthStencilFormat;
|
||||
renderBundleDesc.depthStencilFormat = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
|
||||
utils::ComboRenderPipelineDescriptor renderPipelineDesc(device);
|
||||
InitializeRenderPipelineDescriptor(&renderPipelineDesc);
|
||||
@@ -905,8 +902,7 @@ TEST_F(RenderBundleValidationTest, RenderPassDepthStencilFormatMismatch) {
|
||||
utils::ComboRenderBundleEncoderDescriptor renderBundleDesc = {};
|
||||
renderBundleDesc.colorFormatsCount = 1;
|
||||
renderBundleDesc.cColorFormats[0] = dawn::TextureFormat::RGBA8Unorm;
|
||||
renderBundleDesc.cDepthStencilFormat = dawn::TextureFormat::Depth24Plus;
|
||||
renderBundleDesc.depthStencilFormat = &renderBundleDesc.cDepthStencilFormat;
|
||||
renderBundleDesc.depthStencilFormat = dawn::TextureFormat::Depth24Plus;
|
||||
|
||||
dawn::RenderBundleEncoder renderBundleEncoder =
|
||||
device.CreateRenderBundleEncoder(&renderBundleDesc);
|
||||
@@ -1024,8 +1020,7 @@ TEST_F(RenderBundleValidationTest, TextureFormats) {
|
||||
// Test that depth/stencil formats are validated as depth/stencil.
|
||||
{
|
||||
utils::ComboRenderBundleEncoderDescriptor desc = {};
|
||||
desc.cDepthStencilFormat = dawn::TextureFormat::RGBA8Unorm;
|
||||
desc.depthStencilFormat = &desc.cDepthStencilFormat;
|
||||
desc.depthStencilFormat = dawn::TextureFormat::RGBA8Unorm;
|
||||
ASSERT_DEVICE_ERROR(device.CreateRenderBundleEncoder(&desc));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user