Route grid render state through GL backend
This commit is contained in:
@@ -2321,6 +2321,24 @@ void clears_color_buffer_with_write_mask_and_restores_previous_mask(pp::tests::H
|
||||
PP_EXPECT(h, recorded_clear_calls[1].mask == 0x00004000U);
|
||||
}
|
||||
|
||||
void applies_color_write_mask_through_dispatch(pp::tests::Harness& h)
|
||||
{
|
||||
recorded_color_mask_calls.clear();
|
||||
|
||||
const auto status = pp::renderer::gl::apply_opengl_color_write_mask(
|
||||
pp::renderer::gl::OpenGlColorWriteMask { .r = 1U, .g = 0U, .b = 1U, .a = 0U },
|
||||
pp::renderer::gl::OpenGlColorWriteMaskDispatch {
|
||||
.color_mask = record_color_mask,
|
||||
});
|
||||
|
||||
PP_EXPECT(h, status.ok());
|
||||
PP_EXPECT(h, recorded_color_mask_calls.size() == 1U);
|
||||
PP_EXPECT(h, recorded_color_mask_calls[0].r == 1U);
|
||||
PP_EXPECT(h, recorded_color_mask_calls[0].g == 0U);
|
||||
PP_EXPECT(h, recorded_color_mask_calls[0].b == 1U);
|
||||
PP_EXPECT(h, recorded_color_mask_calls[0].a == 0U);
|
||||
}
|
||||
|
||||
void rejects_invalid_render_target_clear_dispatch(pp::tests::Harness& h)
|
||||
{
|
||||
const auto missing_clear = pp::renderer::gl::clear_opengl_render_target(
|
||||
@@ -5304,6 +5322,7 @@ int main()
|
||||
harness.run("rejects_incomplete_app_clear_dispatch", rejects_incomplete_app_clear_dispatch);
|
||||
harness.run("clears_render_target_through_dispatch", clears_render_target_through_dispatch);
|
||||
harness.run("clears_color_buffer_with_write_mask_and_restores_previous_mask", clears_color_buffer_with_write_mask_and_restores_previous_mask);
|
||||
harness.run("applies_color_write_mask_through_dispatch", applies_color_write_mask_through_dispatch);
|
||||
harness.run("rejects_invalid_render_target_clear_dispatch", rejects_invalid_render_target_clear_dispatch);
|
||||
harness.run("activates_texture_unit_through_dispatch", activates_texture_unit_through_dispatch);
|
||||
harness.run("rejects_incomplete_active_texture_dispatch", rejects_incomplete_active_texture_dispatch);
|
||||
|
||||
Reference in New Issue
Block a user