Skip to content

Commit e8b268b

Browse files
committed
replace AutoresolveDifferingSampleCounts test
It's not clear what this test was trying to test and its golden was wrong. Removed this test, and replaced it with a simple "autoresolve" test.
1 parent 88ef82a commit e8b268b

File tree

3 files changed

+5
-35
lines changed

3 files changed

+5
-35
lines changed
3.7 KB
Loading
Binary file not shown.

filament/backend/test/test_Autoresolve.cpp

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ using namespace filament;
3131
using namespace filament::backend;
3232
using namespace filament::math;
3333

34-
TEST_F(BackendTest, AutoresolveDifferingSampleCounts) {
35-
SKIP_IF(SkipEnvironment(OperatingSystem::CI, Backend::OPENGL), "see b/486954356");
36-
SKIP_IF(SkipEnvironment(OperatingSystem::CI, Backend::VULKAN), "see b/486954356");
37-
34+
TEST_F(BackendTest, Autoresolve) {
3835
auto& api = getDriverApi();
3936
constexpr int kRenderTargetSize = 512;
4037

@@ -61,18 +58,18 @@ TEST_F(BackendTest, AutoresolveDifferingSampleCounts) {
6158
TextureFormat::RGBA8, 1, kRenderTargetSize, kRenderTargetSize, 1,
6259
TextureUsage::COLOR_ATTACHMENT | TextureUsage::SAMPLEABLE));
6360

64-
// First render pass: render a red triangle to a RenderTarget with 8 samples.
61+
// render a red triangle to a RenderTarget with 4 samples.
6562
{
6663
Handle<HwRenderTarget> renderTarget =
6764
addCleanup(api.createRenderTarget(TargetBufferFlags::COLOR, kRenderTargetSize,
68-
kRenderTargetSize, 8, 1, { { texture } }, {}, {}));
65+
kRenderTargetSize, 4, 1, { { texture } }, {}, {}));
6966

7067
shader.uploadUniform(api, ubuffer,
7168
SimpleMaterialParams{
7269
.color = float4(1, 0, 0, 1),
7370
});
7471

75-
RenderPassParams params = getClearColorRenderPass(float4(0));
72+
RenderPassParams params = getClearColorRenderPass(float4(1));
7673
params.viewport = { 0, 0, kRenderTargetSize, kRenderTargetSize };
7774

7875
RenderFrame frame(api);
@@ -84,36 +81,9 @@ TEST_F(BackendTest, AutoresolveDifferingSampleCounts) {
8481
api.draw2(0, 3, 1);
8582
api.endRenderPass();
8683
api.commit(swapChain);
87-
}
88-
89-
// Second render pass: render a green triangle to a RenderTarget with 4 samples, attached to
90-
// the same texture.
91-
{
92-
Handle<HwRenderTarget> renderTarget =
93-
addCleanup(api.createRenderTarget(TargetBufferFlags::COLOR, kRenderTargetSize,
94-
kRenderTargetSize, 4, 1, { { texture } }, {}, {}));
95-
96-
shader.uploadUniform(api, ubuffer,
97-
SimpleMaterialParams{
98-
.color = float4(0, 1, 0, 1),
99-
});
100-
101-
RenderPassParams params = getClearColorRenderPass(float4(0));
102-
params.viewport = { 0, 0, kRenderTargetSize, kRenderTargetSize };
103-
104-
RenderFrame frame(api);
105-
api.beginRenderPass(renderTarget, params);
106-
ps.primitiveType = PrimitiveType::TRIANGLES;
107-
ps.vertexBufferInfo = triangle.getVertexBufferInfo();
108-
api.bindPipeline(ps);
109-
api.bindRenderPrimitive(triangle.getRenderPrimitive());
110-
api.draw2(0, 3, 1);
111-
api.endRenderPass();
11284

11385
EXPECT_IMAGE(renderTarget, ScreenshotParams(kRenderTargetSize, kRenderTargetSize,
114-
"AutoresolveDifferingSampleCounts", 1048576));
115-
116-
api.commit(swapChain);
86+
"Autoresolve", 545665143));
11787
}
11888
}
11989

0 commit comments

Comments
 (0)