Enable playgrounds in all tests and fix default sample counts.
The sample counts were invalid after the default assumed rendering to an MSAA target.
This commit is contained in:
@@ -47,7 +47,7 @@ TEST_F(AiksTest, CanRenderColoredRect) {
|
||||
.AddRect(Rect::MakeXYWH(100.0, 100.0, 100.0, 100.0))
|
||||
.TakePath(),
|
||||
paint);
|
||||
// ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
|
||||
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
|
||||
}
|
||||
|
||||
TEST_F(AiksTest, CanRenderImage) {
|
||||
@@ -83,7 +83,7 @@ TEST_F(AiksTest, CanRenderStrokes) {
|
||||
paint.style = Paint::Style::kStroke;
|
||||
canvas.DrawPath(PathBuilder{}.AddLine({200, 100}, {800, 100}).TakePath(),
|
||||
paint);
|
||||
// ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
|
||||
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
|
||||
}
|
||||
|
||||
TEST_F(AiksTest, CanRenderCurvedStrokes) {
|
||||
|
||||
@@ -22,7 +22,7 @@ TEST_F(EntityTest, CanDrawRect) {
|
||||
Entity entity;
|
||||
entity.SetPath(PathBuilder{}.AddRect({100, 100, 100, 100}).TakePath());
|
||||
entity.SetContents(SolidColorContents::Make(Color::Red()));
|
||||
// ASSERT_TRUE(OpenPlaygroundHere(entity));
|
||||
ASSERT_TRUE(OpenPlaygroundHere(entity));
|
||||
}
|
||||
|
||||
} // namespace testing
|
||||
|
||||
@@ -409,7 +409,12 @@ bool RenderPassMTL::EncodeCommands(Allocator& allocator,
|
||||
if (target_sample_count !=
|
||||
command.pipeline->GetDescriptor().GetSampleCount()) {
|
||||
VALIDATION_LOG << "Pipeline for command and the render target disagree "
|
||||
"on sample counts.";
|
||||
"on sample counts (target was "
|
||||
<< static_cast<uint64_t>(target_sample_count)
|
||||
<< " but pipeline wanted "
|
||||
<< static_cast<uint64_t>(
|
||||
command.pipeline->GetDescriptor().GetSampleCount())
|
||||
<< ").";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ TEST_F(RendererTest, CanCreateBoxPrimitive) {
|
||||
ASSERT_TRUE(context);
|
||||
using BoxPipelineBuilder = PipelineBuilder<VS, FS>;
|
||||
auto desc = BoxPipelineBuilder::MakeDefaultPipelineDescriptor(*context);
|
||||
ASSERT_TRUE(desc.has_value());
|
||||
desc->SetSampleCount(SampleCount::kCount4);
|
||||
auto box_pipeline =
|
||||
context->GetPipelineLibrary()->GetRenderPipeline(std::move(desc)).get();
|
||||
ASSERT_TRUE(box_pipeline);
|
||||
@@ -89,7 +91,7 @@ TEST_F(RendererTest, CanCreateBoxPrimitive) {
|
||||
}
|
||||
return true;
|
||||
};
|
||||
// OpenPlaygroundHere(callback);
|
||||
OpenPlaygroundHere(callback);
|
||||
}
|
||||
|
||||
TEST_F(RendererTest, CanRenderMultiplePrimitives) {
|
||||
@@ -159,7 +161,7 @@ TEST_F(RendererTest, CanRenderMultiplePrimitives) {
|
||||
|
||||
return true;
|
||||
};
|
||||
// OpenPlaygroundHere(callback);
|
||||
OpenPlaygroundHere(callback);
|
||||
}
|
||||
|
||||
TEST_F(RendererTest, CanRenderToTexture) {
|
||||
|
||||
Reference in New Issue
Block a user