[Mesa-dev] Request to revert commit [3d81e11b49366b5636b8524ba0f8c7076e3fdf34] mesa: remove, unnecessary, 'sort by year' for the GL extensions

Roland Scheidegger sroland at vmware.com
Fri Sep 21 13:34:29 UTC 2018


Am 21.09.2018 um 14:55 schrieb Ian Romanick:
> On 09/21/2018 05:36 AM, Federico Dossena wrote:
>> Do you know of other applications that are affected by the order or
>> extensions? This is the first time I encounter this problem.
> 
> Just the idTech2 and idTech3 games.  One thing I think we can do... for
> the game where you hit this, can you provide the output of 'strings
> game_executable | grep 'GL_[A-Z3]' ?  I'll make a piglit test that
> verifies that all the supported extensions from that list occur in the
> first 4k of the extension string.  Having tests will help prevent this
> issue from coming back.
FWIW the game seems to print out all extensions it can potentially use
(not many...). Of course it could theoretically try to use more without
printing them out...
And apparently the limit at least for star trek voyager appears to be
only 2kB (the extension string it prints out is truncated right there at
least).

>From log files Federico sent to me:

mesa 17.3.9:

Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 32, 24, 8 )
...47 PFDs found
...hardware acceleration found
...PIXELFORMAT 45 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...GL_S3_s3tc available
...GL_EXT_texture_compression_s3tc available
...ignoring texture compression
...using GL_EXT_texture_env_add
...GL_EXT_texture_filter_anisotropic not found
...Using GL_EXT_texture_edge_clamp
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...WGL_3DFX_gamma_control not found

GL_VENDOR: VMware, Inc.
GL_RENDERER: llvmpipe (LLVM 6.0, 256 bits)
GL_VERSION: 3.0 Mesa 17.3.9
GL_EXTENSIONS: GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra
GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract
GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture
GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array
GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip
GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels
GL_EXT_point_parameters GL_EXT_rescale_normal
GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp
GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB
GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays
GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map
GL_ARB_texture_env_add GL_ARB_transpose_matrix
GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays
GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_lod_bias
GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent
GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc
GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp
GL_ARB_texture_compression GL_EXT_framebuffer_object
GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil
GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query
GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos
GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map
GL_NV_depth_clamp GL_NV_fog_distance GL_APPLE_packed_pixels
GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader
GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader
GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float
GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert
GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_depth_clamp
GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel
GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_sha
GL_MAX_TEXTURE_SIZE: 8192
GL_MAX_ACTIVE_TEXTURES_ARB: 8

PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits)
MODE: 6, 1024 x 768 fullscreen hz:60
GAMMA: hardware w/ 0 overbright bits
CPU: Intel Pentium IV
rendering primitives: single glDrawElements
texturemode: GL_LINEAR_MIPMAP_NEAREST
picmip: 1
picmipmin: 8
texture bits: 0
lightmap texture bits: 0
multitexture: enabled
compiled vertex arrays: enabled
texenv add: enabled
compressed textures: disabled
compressed lightmaps: disabled
texture compression method: None
anisotropic filtering: disabled
Forcing glFinish
Initializing Shaders
----- finished R_Init -----

mesa 18.2.0:
Initializing OpenGL driver
...getting DC: succeeded
...GLW_ChoosePFD( 32, 24, 8 )
...47 PFDs found
...hardware acceleration found
...PIXELFORMAT 45 selected
...creating GL context: succeeded
...making context current: succeeded
Initializing OpenGL extensions
...ignoring texture compression
...GL_EXT_texture_env_add not found
...GL_EXT_texture_filter_anisotropic not found
...using WGL_EXT_swap_control
...using GL_ARB_multitexture
...GL_EXT_compiled_vertex_array not found
...WGL_3DFX_gamma_control not found

GL_VENDOR: VMware, Inc.
GL_RENDERER: llvmpipe (LLVM 6.0, 256 bits)
GL_VERSION: 3.1 Mesa 18.2.0
GL_EXTENSIONS: GL_AMD_conservative_depth GL_AMD_draw_buffers_blend
GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export
GL_AMD_shader_trinary_minmax GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5 GL_APPLE_packed_pixels
GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility
GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended
GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture
GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compatibility
GL_ARB_compressed_texture_pixel_storage
GL_ARB_conditional_render_inverted GL_ARB_conservative_depth
GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance
GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp
GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_buffers_blend
GL_ARB_draw_elements_base_vertex GL_ARB_draw_indirect
GL_ARB_draw_instanced GL_ARB_enhanced_layouts
GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport
GL_ARB_fragment_program GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB
GL_ARB_get_program_binary GL_ARB_get_texture_sub_image
GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_instanced_arrays
GL_ARB_internalformat_query GL_ARB_internalformat_query2
GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment
GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect
GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query
GL_ARB_occlusion_query2 GL_ARB_pipeline_statistics_query
GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite
GL_ARB_polygon_offset_clamp GL_ARB_program_interface_query
GL_ARB_provoking_vertex GL_ARB_robustness GL_ARB_sampler_objects
GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture
GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding
GL_ARB_shader_objects GL_ARB_shader_stencil_export
GL_ARB_shader_subroutine GL_ARB_shader_texture_lod
GL_ARB_shading_language_100 GL_ARB_shading_language_420pack
GL_MAX_TEXTURE_SIZE: 8192
GL_MAX_ACTIVE_TEXTURES_ARB: 8

PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits)
MODE: 6, 1024 x 768 fullscreen hz:60
GAMMA: hardware w/ 0 overbright bits
CPU: Intel Pentium IV
rendering primitives: multiple glArrayElement
texturemode: GL_LINEAR_MIPMAP_NEAREST
picmip: 1
picmipmin: 8
texture bits: 0
lightmap texture bits: 0
multitexture: enabled
compiled vertex arrays: disabled
texenv add: disabled
compressed textures: disabled
compressed lightmaps: disabled
texture compression method: None
anisotropic filtering: disabled
Forcing glFinish
Initializing Shaders
----- finished R_Init -----

So the only extension it still finds with alphabetic ordering is
GL_ARB_multitexture, since everything else it wants to use are EXT
extensions (actually in the "Initializing OpenGL driver" it does not
seem to print out quite all extensions if they aren't there as evidenced
by the 17.3.9 and 18.2.0 differences). It'll even fall back to using
different rendering primitives (maybe due to missing compiled vertex
arrays?).

Roland


> 
>> On 2018-09-21 13:56, Ian Romanick wrote:
>>> On 09/20/2018 04:42 PM, Timothy Arceri wrote:
>>>> On 20/9/18 11:09 pm, Ian Romanick wrote:
>>>>> On 09/19/2018 11:36 PM, Federico Dossena wrote:
>>>>>> As most of you are probably aware of, id2 and id3 games store GL
>>>>>> extensions in a buffer that's too small for modern systems. This
>>>>>> usually
>>>>>> leads to a crash when MESA_EXTENSION_MAX_YEAR is not set, but what the
>>>>>> creator of this commit didn't know is that some id3 games (the more
>>>>>> "recent" ones) don't crash, they just truncate the string. As a result
>>>>>> of this commit, these games can't detect some extensions and therefore
>>>>>> don't work properly.
>>>>> It sounds like the problem is still that MESA_EXTENSION_MAX_YEAR is not
>>>>> set, so why not just set it?  Doesn't that fix the problem?
>>>> There is no driconfig option for this currently. Personally I'd rather
>>>> just sort the extensions (even if it was only for 32bit builds of Mesa)
>>>> rather than adding a bunch of code and extra entry's into driconfig.
>>>>
>>>> Or are you saying you would prefer we do nothing and people should use
>>>> MESA_EXTENSION_MAX_YEAR be required to use?
>>> I was mostly trying to feel out the current (and possible future) extent
>>> of the problem space.  I've never been fond of the by-year sorting, but
>>> I don't hate it either.  My biggest annoyance is that it feels like
>>> we've made a bunch of changes to this area over the years without really
>>> thinking it through... and now we're back here.  I don't want to be back
>>> here in another 2 years. :)
>>>
>>>>>> I discovered this while trying to figure out why dynamic lights in
>>>>>> Star
>>>>>> Trek Voyager Elite Force (2000) suddenly broke with Mesa 18. I
>>>>>> discussed
>>>>>> this with Ronald Scheidegger, who's been very helpful and helped me
>>>>>> figure out what was going on.
>>>>>>
>>>>>> Personally, I see nothing wrong with reverting this commit and keeping
>>>>>> the extensions sorted by year, it doesn't impact performance and it
>>>>>> doesn't break anything modern. What do you think about it?
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> mesa-dev mailing list
>>>>>> mesa-dev at lists.freedesktop.org
>>>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Csroland%40vmware.com%7C0dd18df7508a4f38910208d61fc1a0d3%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636731313839590238&sdata=B97CIe8Zqriq0HnaKsmdfK8qD%2BTnjg%2BdUnLIF98PJO0%3D&reserved=0
>>>>> _______________________________________________
>>>>> mesa-dev mailing list
>>>>> mesa-dev at lists.freedesktop.org
>>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Csroland%40vmware.com%7C0dd18df7508a4f38910208d61fc1a0d3%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636731313839590238&sdata=B97CIe8Zqriq0HnaKsmdfK8qD%2BTnjg%2BdUnLIF98PJO0%3D&reserved=0
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Csroland%40vmware.com%7C0dd18df7508a4f38910208d61fc1a0d3%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636731313839590238&sdata=B97CIe8Zqriq0HnaKsmdfK8qD%2BTnjg%2BdUnLIF98PJO0%3D&reserved=0
> 



More information about the mesa-dev mailing list