Move readback format mapping to renderer gl
This commit is contained in:
@@ -116,6 +116,22 @@ void maps_image_channel_count_to_texture_format(pp::tests::Harness& h)
|
||||
PP_EXPECT(h, invalid.pixel_format == 0U);
|
||||
}
|
||||
|
||||
void maps_readback_formats(pp::tests::Harness& h)
|
||||
{
|
||||
const auto rgba8 = pp::renderer::gl::rgba8_readback_format();
|
||||
const auto rgba32f = pp::renderer::gl::rgba32f_readback_format();
|
||||
|
||||
PP_EXPECT(h, rgba8.pixel_format == 0x1908U);
|
||||
PP_EXPECT(h, rgba8.component_type == 0x1401U);
|
||||
PP_EXPECT(h, rgba8.bytes_per_pixel == 4U);
|
||||
PP_EXPECT(h, pp::renderer::gl::readback_byte_count(rgba8, 3U, 5U) == 60U);
|
||||
|
||||
PP_EXPECT(h, rgba32f.pixel_format == 0x1908U);
|
||||
PP_EXPECT(h, rgba32f.component_type == 0x1406U);
|
||||
PP_EXPECT(h, rgba32f.bytes_per_pixel == 16U);
|
||||
PP_EXPECT(h, pp::renderer::gl::readback_byte_count(rgba32f, 3U, 5U) == 240U);
|
||||
}
|
||||
|
||||
void names_framebuffer_status_codes(pp::tests::Harness& h)
|
||||
{
|
||||
PP_EXPECT(h, pp::renderer::gl::framebuffer_status_name(0x8CD5U) == std::string_view("GL_FRAMEBUFFER_COMPLETE"));
|
||||
@@ -322,6 +338,7 @@ int main()
|
||||
harness.run("ignores_gles_texture_extensions_for_webgl_runtime", ignores_gles_texture_extensions_for_webgl_runtime);
|
||||
harness.run("selects_texture_upload_type_from_internal_format", selects_texture_upload_type_from_internal_format);
|
||||
harness.run("maps_image_channel_count_to_texture_format", maps_image_channel_count_to_texture_format);
|
||||
harness.run("maps_readback_formats", maps_readback_formats);
|
||||
harness.run("names_framebuffer_status_codes", names_framebuffer_status_codes);
|
||||
harness.run("maps_framebuffer_blit_parameters", maps_framebuffer_blit_parameters);
|
||||
harness.run("maps_shape_index_and_primitive_modes", maps_shape_index_and_primitive_modes);
|
||||
|
||||
Reference in New Issue
Block a user