20 if (GetContentContext()
21 .GetDeviceCapabilities()
22 .SupportsImplicitResolvingMSAA()) {
23 GTEST_SKIP() <<
"Implicit MSAA is used on this device.";
28 GetContentContext().GetRenderTargetCache()->CreateOffscreenMSAA(
34 auto color0 = entity_pass_target.GetRenderTarget().GetColorAttachment(0);
35 auto msaa_tex = color0.texture;
36 auto resolve_tex = color0.resolve_texture;
38 entity_pass_target.Flip(content_context);
40 color0 = entity_pass_target.GetRenderTarget().GetColorAttachment(0);
42 ASSERT_EQ(msaa_tex, color0.texture);
43 ASSERT_NE(resolve_tex, color0.resolve_texture);
57 context->GetCapabilities()->GetDefaultColorFormat();
65 color0_tex_desc.
format = pixel_format;
69 auto color0_msaa_tex =
allocator.CreateTexture(color0_tex_desc);
76 color0.
texture = color0_msaa_tex;
85 auto color0 = entity_pass_target.GetRenderTarget().GetColorAttachment(0);
86 auto msaa_tex = color0.texture;
87 auto resolve_tex = color0.resolve_texture;
89 ASSERT_EQ(msaa_tex, resolve_tex);
91 entity_pass_target.Flip(content_context);
93 color0 = entity_pass_target.GetRenderTarget().GetColorAttachment(0);
95 ASSERT_NE(msaa_tex, color0.texture);
96 ASSERT_NE(resolve_tex, color0.resolve_texture);
97 ASSERT_EQ(color0.texture, color0.resolve_texture);
std::shared_ptr< Context > GetContext() const
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...