mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
dawn_native: don't uncache error objects
Error objects that are cached still have mIsBlueprint to false and would try to uncache themselves, which isn't valid. Also adds a regression test. BUG=dawn:143 Change-Id: Icd8bab52982b8520519d52296fffa6ed85088b8e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6900 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
1152bbaf8e
commit
00f6b1af41
@@ -31,6 +31,14 @@ TEST_P(ObjectCachingTest, BindGroupLayoutDeduplication) {
|
||||
EXPECT_EQ(bgl.Get() == sameBgl.Get(), !UsesWire());
|
||||
}
|
||||
|
||||
// Test that an error object doesn't try to uncache itself
|
||||
TEST_P(ObjectCachingTest, ErrorObjectDoesntUncache) {
|
||||
ASSERT_DEVICE_ERROR(
|
||||
dawn::BindGroupLayout bgl = utils::MakeBindGroupLayout(
|
||||
device, {{0, dawn::ShaderStageBit::Fragment, dawn::BindingType::UniformBuffer},
|
||||
{0, dawn::ShaderStageBit::Fragment, dawn::BindingType::UniformBuffer}}));
|
||||
}
|
||||
|
||||
// Test that PipelineLayouts are correctly deduplicated.
|
||||
TEST_P(ObjectCachingTest, PipelineLayoutDeduplication) {
|
||||
dawn::BindGroupLayout bgl = utils::MakeBindGroupLayout(
|
||||
|
||||
Reference in New Issue
Block a user