Plan renderer diagnostics in app status
This commit is contained in:
@@ -71,6 +71,47 @@ void recording_label_only_shows_when_recording_with_encoder(pp::tests::Harness&
|
||||
PP_EXPECT(harness, active.text == "Recorded 12 frames");
|
||||
}
|
||||
|
||||
void renderer_diagnostics_report_framebuffer_fetch(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto unsupported = pp::app::plan_renderer_diagnostics({});
|
||||
PP_EXPECT(harness, !unsupported.framebuffer_fetch.supported);
|
||||
PP_EXPECT(harness, unsupported.framebuffer_fetch.label == "FBF");
|
||||
|
||||
const auto supported = pp::app::plan_renderer_diagnostics({
|
||||
.framebuffer_fetch = true,
|
||||
});
|
||||
PP_EXPECT(harness, supported.framebuffer_fetch.supported);
|
||||
PP_EXPECT(harness, supported.framebuffer_fetch.label == "FBF");
|
||||
}
|
||||
|
||||
void renderer_diagnostics_prefer_highest_float_capability_label(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto none = pp::app::plan_renderer_diagnostics({});
|
||||
PP_EXPECT(harness, !none.floating_point_targets.supported);
|
||||
PP_EXPECT(harness, none.floating_point_targets.label.empty());
|
||||
|
||||
const auto float16 = pp::app::plan_renderer_diagnostics({
|
||||
.float16_render_targets = true,
|
||||
});
|
||||
PP_EXPECT(harness, float16.floating_point_targets.supported);
|
||||
PP_EXPECT(harness, float16.floating_point_targets.label == "F16");
|
||||
|
||||
const auto float32 = pp::app::plan_renderer_diagnostics({
|
||||
.float32_render_targets = true,
|
||||
.float16_render_targets = true,
|
||||
});
|
||||
PP_EXPECT(harness, float32.floating_point_targets.supported);
|
||||
PP_EXPECT(harness, float32.floating_point_targets.label == "F32");
|
||||
|
||||
const auto float32_linear = pp::app::plan_renderer_diagnostics({
|
||||
.float32_render_targets = true,
|
||||
.float32_linear_filtering = true,
|
||||
.float16_render_targets = true,
|
||||
});
|
||||
PP_EXPECT(harness, float32_linear.floating_point_targets.supported);
|
||||
PP_EXPECT(harness, float32_linear.floating_point_targets.label == "F32L");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -82,5 +123,7 @@ int main()
|
||||
harness.run("document title survives unknown resolution", document_title_survives_unknown_resolution);
|
||||
harness.run("status labels match legacy text", status_labels_match_legacy_text);
|
||||
harness.run("recording label only shows when recording with encoder", recording_label_only_shows_when_recording_with_encoder);
|
||||
harness.run("renderer diagnostics report framebuffer fetch", renderer_diagnostics_report_framebuffer_fetch);
|
||||
harness.run("renderer diagnostics prefer highest float capability label", renderer_diagnostics_prefer_highest_float_capability_label);
|
||||
return harness.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user