Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EXT_texture_filter_anisotropic extension #203

Merged
merged 2 commits into from
Sep 26, 2020
Merged

Add EXT_texture_filter_anisotropic extension #203

merged 2 commits into from
Sep 26, 2020

Conversation

Agamnentzar
Copy link

No description provided.

@dhritzkiv
Copy link
Member

dhritzkiv commented Sep 25, 2020

Thank you for contributing another extension.

Overall this looks good and tests pass in CI on both Linux and macOS.

Note: on Linux, the number of tests run hasn't increased, and remains at 16137. On macOS, the number of tests run has increased from 16177 to 16197 - about 20. This suggests that this extension isn't available on Linux in CI.

I couldn't find "anisotropic" in the list of extensions from the CI Linux debug output:

Linux GL debug output

name of display: :1
1081display: :1  screen: 0
1082direct rendering: Yes
1083server glx vendor string: SGI
1084server glx version string: 1.4
1085server glx extensions:
1086    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
1087    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
1088    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
1089    GLX_SGIX_pbuffer, GLX_SGI_make_current_read
1090client glx vendor string: Mesa Project and SGI
1091client glx version string: 1.4
1092client glx extensions:
1093    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
1094    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
1095    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
1096    GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float, 
1097    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
1098    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
1099    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
1100    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
1101    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
1102    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
1103    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
1104    GLX_SGI_swap_control, GLX_SGI_video_sync
1105GLX version: 1.4
1106GLX extensions:
1107    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
1108    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
1109    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, 
1110    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
1111    GLX_SGIX_pbuffer, GLX_SGI_make_current_read
1112OpenGL vendor string: VMware, Inc.
1113OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
1114OpenGL version string: 2.1 Mesa 10.1.3
1115OpenGL shading language version string: 1.30
1116OpenGL extensions:
1117    GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend, 
1118    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_trinary_minmax, 
1119    GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, 
1120    GL_ARB_ES2_compatibility, GL_ARB_blend_func_extended, 
1121    GL_ARB_clear_buffer_object, GL_ARB_color_buffer_float, 
1122    GL_ARB_conservative_depth, GL_ARB_copy_buffer, GL_ARB_debug_output, 
1123    GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_depth_texture, 
1124    GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, 
1125    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
1126    GL_ARB_explicit_attrib_location, GL_ARB_fragment_coord_conventions, 
1127    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
1128    GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
1129    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
1130    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
1131    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
1132    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment, 
1133    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
1134    GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
1135    GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
1136    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sampler_objects, 
1137    GL_ARB_seamless_cube_map, GL_ARB_shader_bit_encoding, 
1138    GL_ARB_shader_objects, GL_ARB_shader_texture_lod, 
1139    GL_ARB_shading_language_100, GL_ARB_shading_language_420pack, 
1140    GL_ARB_shading_language_packing, GL_ARB_shadow, GL_ARB_sync, 
1141    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
1142    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map, 
1143    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
1144    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
1145    GL_ARB_texture_float, GL_ARB_texture_mirror_clamp_to_edge, 
1146    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
1147    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, 
1148    GL_ARB_texture_storage, GL_ARB_texture_swizzle, GL_ARB_timer_query, 
1149    GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, 
1150    GL_ARB_transform_feedback_instanced, GL_ARB_transpose_matrix, 
1151    GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra, 
1152    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding, 
1153    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader, 
1154    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
1155    GL_ARB_window_pos, GL_ATI_blend_equation_separate, GL_ATI_draw_buffers, 
1156    GL_ATI_separate_stencil, GL_ATI_texture_compression_3dc, 
1157    GL_ATI_texture_env_combine3, GL_ATI_texture_float, 
1158    GL_ATI_texture_mirror_once, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
1159    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
1160    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array, 
1161    GL_EXT_copy_texture, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, 
1162    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, 
1163    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, 
1164    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
1165    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, 
1166    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
1167    GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
1168    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
1169    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, 
1170    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, 
1171    GL_EXT_texture_array, GL_EXT_texture_compression_latc, 
1172    GL_EXT_texture_compression_rgtc, GL_EXT_texture_cube_map, 
1173    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, 
1174    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, 
1175    GL_EXT_texture_integer, GL_EXT_texture_lod_bias, 
1176    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object, 
1177    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode, 
1178    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, 
1179    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, 
1180    GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
1181    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
1182    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, GL_KHR_debug, 
1183    GL_MESA_pack_invert, GL_MESA_texture_signed_rgba, GL_MESA_window_pos, 
1184    GL_MESA_ycbcr_texture, GL_NV_blend_square, GL_NV_conditional_render, 
1185    GL_NV_depth_clamp, GL_NV_fog_distance, GL_NV_light_max_exponent, 
1186    GL_NV_packed_depth_stencil, GL_NV_primitive_restart, 
1187    GL_NV_texgen_reflection, GL_NV_texture_env_combine4, 
1188    GL_NV_texture_rectangle, GL_NV_vdpau_interop, GL_OES_EGL_image, 
1189    GL_OES_read_format, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
1190    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays


That being said, while it passes CI, I'm having problems locally. On my iMac (macOS Catalina, AMD Radeon Pro 570 4 GB), at least one test fails:

Set value of TEXTURE_MAX_ANISOTROPY_EXT should be: 1.5 , returned value was: 1

This happens on this line of the tests: https://github.com/stackgl/gl-conformance/blob/cfb4649b21cd138c3a6870d4534422287e054d3f/conformance-suites/1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html#L177

Or, on line 2633 in the gl-conformance package's extensions_ext-texture-filter-anisotropic.js file.

Running this page on my machine makes it pass https://www.khronos.org/registry/webgl/conformance-suites/1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html?webglVersion=1

Any idea why this would be happening?

@Agamnentzar
Copy link
Author

Agamnentzar commented Sep 25, 2020

Did you rebuild C++ code? I had the same issue before I updated C++ code to use float overloads instead of default integer ones

@dhritzkiv
Copy link
Member

Oh! Good point. I forgot that you made changes to the native code. Let me try.

@dhritzkiv
Copy link
Member

All tests pass! Fantastic.

I'll do a final code review later this evening, merge it in, and release to npm.

Prefer if blocks to simply be handled outside of the switch case, if possible.
@dhritzkiv dhritzkiv merged commit d8acf21 into stackgl:master Sep 26, 2020
@dhritzkiv
Copy link
Member

dhritzkiv commented Sep 26, 2020

Released as 4.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants