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

Fix selection buffer crash after resizing window #446

Merged
merged 32 commits into from
Dec 1, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 1, 2021

🦟 Bug fix

Summary

Fix crash when resizing ign-gazebo window. The problem was due to invalid camera projection matrix after a resize.

This PR makes sure all selection buffer resources are deleted and recreated after the window size is changed.

To test

launch ign gazebo and drag the corners to resize the window. The application would crash without this fix.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #446 (dc985f5) into ign-rendering6 (8e7b7fb) will increase coverage by 1.97%.
The diff coverage is 78.78%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering6     #446      +/-   ##
==================================================
+ Coverage           53.55%   55.53%   +1.97%     
==================================================
  Files                 195      195              
  Lines               19698    19697       -1     
==================================================
+ Hits                10550    10938     +388     
+ Misses               9148     8759     -389     
Impacted Files Coverage Δ
ogre2/src/Ogre2Camera.cc 87.34% <ø> (+13.92%) ⬆️
ogre2/src/Ogre2RayQuery.cc 72.63% <0.00%> (+33.92%) ⬆️
src/Utils.cc 98.70% <ø> (+22.91%) ⬆️
ogre2/src/Ogre2SelectionBuffer.cc 93.17% <83.87%> (+93.17%) ⬆️
ogre2/src/Ogre2RenderTarget.cc 86.99% <0.00%> (+0.94%) ⬆️
src/base/BaseScene.cc 73.91% <0.00%> (+1.88%) ⬆️
ogre2/src/Ogre2Scene.cc 76.80% <0.00%> (+2.46%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e7b7fb...dc985f5. Read the comment docs.

Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me and fixes the crash as well as the selection offset problem. However, I'm not familiar with the code, so I'll defer the review to someone else.

@iche033 iche033 added the 🏯 fortress Ignition Fortress label Oct 1, 2021
@chapulina chapulina added beta Targeting beta release of upcoming collection bug Something isn't working labels Oct 1, 2021
@chapulina
Copy link
Contributor

Selection doesn't seem to be working for me with this branch on Bionic 😕

@iche033
Copy link
Contributor Author

iche033 commented Oct 1, 2021

Selection doesn't seem to be working for me with this branch on Bionic

#447 switches back to the old cpu based method. We can get that in first while we debug the issue here.

@iche033
Copy link
Contributor Author

iche033 commented Oct 1, 2021

I'm testing this in a focal docker container which I was able to reproduce the issue in but the issues went away with these changes so I'll need more info to help debug this.

  • Is the offset always constant?
  • Do you have a high dpi display?
  • Does this still crash on resize?
  • Can you post the ~/.ignition/rendering/ogre2.log

@chapulina
Copy link
Contributor

Ah sorry I merged with ign-rendering6. I'm testing this with this commented out:

diff --git a/ogre2/src/Ogre2RayQuery.cc b/ogre2/src/Ogre2RayQuery.cc
index 0ceaee80..81c63178 100644
--- a/ogre2/src/Ogre2RayQuery.cc
+++ b/ogre2/src/Ogre2RayQuery.cc
@@ -98,7 +98,7 @@ RayQueryResult Ogre2RayQuery::ClosestPoint()
   // ray query using selection buffer does not seem to work on some machines
   // using cpu based ray-triangle intersection method
   // \todo remove this line if selection buffer is working again
-  return this->ClosestPointByIntersection();
+  //return this->ClosestPointByIntersection();
 
 #ifdef __APPLE__
   return this->ClosestPointByIntersection();

Is the offset always constant?

I don't seem to have an offset, I've clicked all over shapes.sdf and I can't select any of the models.

Do you have a high dpi display?

No

Does this still crash on resize?

No

Can you post the ~/.ignition/rendering/ogre2.log

I don't see anything added to the Ogre log while I'm hovering / clicking the scene


I added these debug statements:

diff --git a/ogre2/src/Ogre2SelectionBuffer.cc b/ogre2/src/Ogre2SelectionBuffer.cc
index 0082f0ad..e76730bc 100644
--- a/ogre2/src/Ogre2SelectionBuffer.cc
+++ b/ogre2/src/Ogre2SelectionBuffer.cc
@@ -495,6 +495,7 @@ bool Ogre2SelectionBuffer::ExecuteQuery(const int _x, const int _y,
   const std::string &entName =
     this->dataPtr->materialSwitcher->EntityName(cv);
 
+ignerr << "ExecuteQuery : " << entName << std::endl;
   if (entName.empty())
   {
     return false;
@@ -507,6 +508,7 @@ bool Ogre2SelectionBuffer::ExecuteQuery(const int _x, const int _y,
       return false;
     else
     {
+ignerr << "ExecuteQuery" << std::endl;
       _item = dynamic_cast<Ogre::Item *>(collection[0]);
       _point = point;
       return true;

And I only see empty entNames, no matter where I hover / click. It never reaches the 2nd ignerr.

@chapulina
Copy link
Contributor

Here's my ogre2.log just in case:

ogre2.log

18:54:23: Creating resource group General
18:54:23: Creating resource group Internal
18:54:23: Creating resource group Autodetect
18:54:23: SceneManagerFactory for type 'DefaultSceneManager' registered.
18:54:23: Registering ResourceManager for type Material
18:54:23: Registering ResourceManager for type Mesh
18:54:23: Registering ResourceManager for type Mesh2
18:54:23: Registering ResourceManager for type OldSkeleton
18:54:23: MovableObjectFactory for type 'ParticleSystem' registered.
18:54:23: ArchiveFactory for archive type FileSystem registered.
18:54:23: ArchiveFactory for archive type Zip registered.
18:54:23: ArchiveFactory for archive type EmbeddedZip registered.
18:54:23: DDS codec registering
18:54:23: FreeImage version: 3.17.0
18:54:23: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
18:54:23: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
18:54:23: OITD codec registering
18:54:23: Registering ResourceManager for type HighLevelGpuProgram
18:54:23: MovableObjectFactory for type 'Decal' registered.
18:54:23: MovableObjectFactory for type 'InternalCubemapProbe' registered.
18:54:23: MovableObjectFactory for type 'Entity' registered.
18:54:23: MovableObjectFactory for type 'Item' registered.
18:54:23: MovableObjectFactory for type 'Light' registered.
18:54:23: MovableObjectFactory for type 'Rectangle2Dv2' registered.
18:54:23: MovableObjectFactory for type 'BillboardSet' registered.
18:54:23: MovableObjectFactory for type 'ManualObject2' registered.
18:54:23: MovableObjectFactory for type 'BillboardChain' registered.
18:54:23: MovableObjectFactory for type 'RibbonTrail' registered.
18:54:23: MovableObjectFactory for type 'WireAabb' registered.
18:54:23: *-*-* OGRE Initialising
18:54:23: *-*-* Version 2.2.6 (Cerberus)
18:54:23: OverlayElementFactory for type Panel registered.
18:54:23: OverlayElementFactory for type BorderPanel registered.
18:54:23: OverlayElementFactory for type TextArea registered.
18:54:23: Registering ResourceManager for type Font
18:54:23: Loading library /usr/lib/x86_64-linux-gnu/OGRE-2.2/OGRE/RenderSystem_GL3Plus.so
18:54:23: Installing plugin: GL 3+ RenderSystem
18:54:23: OpenGL 3+ Rendering Subsystem created.
18:54:23: Plugin successfully installed
18:54:23: Loading library /usr/lib/x86_64-linux-gnu/OGRE-2.2/OGRE/Plugin_ParticleFX.so
18:54:23: Installing plugin: ParticleFX
18:54:23: Particle Emitter Type 'Point' registered
18:54:23: Particle Emitter Type 'Box' registered
18:54:23: Particle Emitter Type 'Ellipsoid' registered
18:54:23: Particle Emitter Type 'Cylinder' registered
18:54:23: Particle Emitter Type 'Ring' registered
18:54:23: Particle Emitter Type 'HollowEllipsoid' registered
18:54:23: Particle Affector Type 'LinearForce' registered
18:54:23: Particle Affector Type 'ColourFader' registered
18:54:23: Particle Affector Type 'ColourFader2' registered
18:54:23: Particle Affector Type 'ColourImage' registered
18:54:23: Particle Affector Type 'ColourInterpolator' registered
18:54:23: Particle Affector Type 'Scaler' registered
18:54:23: Particle Affector Type 'Rotator' registered
18:54:23: Particle Affector Type 'DirectionRandomiser' registered
18:54:23: Particle Affector Type 'DeflectorPlane' registered
18:54:23: Plugin successfully installed
18:54:23: CPU Identifier & Features
18:54:23: -------------------------
18:54:23:  *   CPU ID: AuthenticAMD: AMD Ryzen 9 5900X 12-Core Processor
18:54:23:  *   Logical cores: 24
18:54:23:  *      SSE: yes
18:54:23:  *     SSE2: yes
18:54:23:  *     SSE3: yes
18:54:23:  *      MMX: yes
18:54:23:  *   MMXEXT: yes
18:54:23:  *    3DNOW: no
18:54:23:  * 3DNOWEXT: no
18:54:23:  *     CMOV: yes
18:54:23:  *      TSC: yes
18:54:23:  *      FPU: yes
18:54:23:  *      PRO: yes
18:54:23:  *       HT: no
18:54:23: -------------------------
18:54:23: ******************************
*** Starting GLX Subsystem ***
******************************
18:54:23: GL3PlusRenderSystem::_createRenderWindow "OgreWindow(0)_0", 1x1 windowed  miscParams: FSAA=0 border=none contentScalingFactor=1.000000 currentGLContext=true externalGLControl=true gamma=Yes parentWindowHandle=56623113 stereoMode=Frame Sequential 
18:54:23: GLXWindow::create used FBConfigID = 165
18:54:23: GL Version = 4.6.0.0
18:54:23: GL_VERSION = 4.6.0 NVIDIA 470.63.01
18:54:23: GL_VENDOR = NVIDIA Corporation
18:54:23: GL_RENDERER = NVIDIA GeForce RTX 3060/PCIe/SSE2
18:54:23: GL_EXTENSIONS = 
18:54:23: GL_AMD_multi_draw_indirect
18:54:23: GL_AMD_seamless_cubemap_per_texture
18:54:23: GL_AMD_vertex_shader_viewport_index
18:54:23: GL_AMD_vertex_shader_layer
18:54:23: GL_ARB_arrays_of_arrays
18:54:23: GL_ARB_base_instance
18:54:23: GL_ARB_bindless_texture
18:54:23: GL_ARB_blend_func_extended
18:54:23: GL_ARB_buffer_storage
18:54:23: GL_ARB_clear_buffer_object
18:54:23: GL_ARB_clear_texture
18:54:23: GL_ARB_clip_control
18:54:23: GL_ARB_color_buffer_float
18:54:23: GL_ARB_compatibility
18:54:23: GL_ARB_compressed_texture_pixel_storage
18:54:23: GL_ARB_conservative_depth
18:54:23: GL_ARB_compute_shader
18:54:23: GL_ARB_compute_variable_group_size
18:54:23: GL_ARB_conditional_render_inverted
18:54:23: GL_ARB_copy_buffer
18:54:23: GL_ARB_copy_image
18:54:23: GL_ARB_cull_distance
18:54:23: GL_ARB_debug_output
18:54:23: GL_ARB_depth_buffer_float
18:54:23: GL_ARB_depth_clamp
18:54:23: GL_ARB_depth_texture
18:54:23: GL_ARB_derivative_control
18:54:23: GL_ARB_direct_state_access
18:54:23: GL_ARB_draw_buffers
18:54:23: GL_ARB_draw_buffers_blend
18:54:23: GL_ARB_draw_indirect
18:54:23: GL_ARB_draw_elements_base_vertex
18:54:23: GL_ARB_draw_instanced
18:54:23: GL_ARB_enhanced_layouts
18:54:23: GL_ARB_ES2_compatibility
18:54:23: GL_ARB_ES3_compatibility
18:54:23: GL_ARB_ES3_1_compatibility
18:54:23: GL_ARB_ES3_2_compatibility
18:54:23: GL_ARB_explicit_attrib_location
18:54:23: GL_ARB_explicit_uniform_location
18:54:23: GL_ARB_fragment_coord_conventions
18:54:23: GL_ARB_fragment_layer_viewport
18:54:23: GL_ARB_fragment_program
18:54:23: GL_ARB_fragment_program_shadow
18:54:23: GL_ARB_fragment_shader
18:54:23: GL_ARB_fragment_shader_interlock
18:54:23: GL_ARB_framebuffer_no_attachments
18:54:23: GL_ARB_framebuffer_object
18:54:23: GL_ARB_framebuffer_sRGB
18:54:23: GL_ARB_geometry_shader4
18:54:23: GL_ARB_get_program_binary
18:54:23: GL_ARB_get_texture_sub_image
18:54:23: GL_ARB_gl_spirv
18:54:23: GL_ARB_gpu_shader5
18:54:23: GL_ARB_gpu_shader_fp64
18:54:23: GL_ARB_gpu_shader_int64
18:54:23: GL_ARB_half_float_pixel
18:54:23: GL_ARB_half_float_vertex
18:54:23: GL_ARB_imaging
18:54:23: GL_ARB_indirect_parameters
18:54:23: GL_ARB_instanced_arrays
18:54:23: GL_ARB_internalformat_query
18:54:23: GL_ARB_internalformat_query2
18:54:23: GL_ARB_invalidate_subdata
18:54:23: GL_ARB_map_buffer_alignment
18:54:23: GL_ARB_map_buffer_range
18:54:23: GL_ARB_multi_bind
18:54:23: GL_ARB_multi_draw_indirect
18:54:23: GL_ARB_multisample
18:54:23: GL_ARB_multitexture
18:54:23: GL_ARB_occlusion_query
18:54:23: GL_ARB_occlusion_query2
18:54:23: GL_ARB_parallel_shader_compile
18:54:23: GL_ARB_pipeline_statistics_query
18:54:23: GL_ARB_pixel_buffer_object
18:54:23: GL_ARB_point_parameters
18:54:23: GL_ARB_point_sprite
18:54:23: GL_ARB_polygon_offset_clamp
18:54:23: GL_ARB_post_depth_coverage
18:54:23: GL_ARB_program_interface_query
18:54:23: GL_ARB_provoking_vertex
18:54:23: GL_ARB_query_buffer_object
18:54:23: GL_ARB_robust_buffer_access_behavior
18:54:23: GL_ARB_robustness
18:54:23: GL_ARB_sample_locations
18:54:23: GL_ARB_sample_shading
18:54:23: GL_ARB_sampler_objects
18:54:23: GL_ARB_seamless_cube_map
18:54:23: GL_ARB_seamless_cubemap_per_texture
18:54:23: GL_ARB_separate_shader_objects
18:54:23: GL_ARB_shader_atomic_counter_ops
18:54:23: GL_ARB_shader_atomic_counters
18:54:23: GL_ARB_shader_ballot
18:54:23: GL_ARB_shader_bit_encoding
18:54:23: GL_ARB_shader_clock
18:54:23: GL_ARB_shader_draw_parameters
18:54:23: GL_ARB_shader_group_vote
18:54:23: GL_ARB_shader_image_load_store
18:54:23: GL_ARB_shader_image_size
18:54:23: GL_ARB_shader_objects
18:54:23: GL_ARB_shader_precision
18:54:23: GL_ARB_shader_storage_buffer_object
18:54:23: GL_ARB_shader_subroutine
18:54:23: GL_ARB_shader_texture_image_samples
18:54:23: GL_ARB_shader_texture_lod
18:54:23: GL_ARB_shading_language_100
18:54:23: GL_ARB_shader_viewport_layer_array
18:54:23: GL_ARB_shading_language_420pack
18:54:23: GL_ARB_shading_language_include
18:54:23: GL_ARB_shading_language_packing
18:54:23: GL_ARB_shadow
18:54:23: GL_ARB_sparse_buffer
18:54:23: GL_ARB_sparse_texture
18:54:23: GL_ARB_sparse_texture2
18:54:23: GL_ARB_sparse_texture_clamp
18:54:23: GL_ARB_spirv_extensions
18:54:23: GL_ARB_stencil_texturing
18:54:23: GL_ARB_sync
18:54:23: GL_ARB_tessellation_shader
18:54:23: GL_ARB_texture_barrier
18:54:23: GL_ARB_texture_border_clamp
18:54:23: GL_ARB_texture_buffer_object
18:54:23: GL_ARB_texture_buffer_object_rgb32
18:54:23: GL_ARB_texture_buffer_range
18:54:23: GL_ARB_texture_compression
18:54:23: GL_ARB_texture_compression_bptc
18:54:23: GL_ARB_texture_compression_rgtc
18:54:23: GL_ARB_texture_cube_map
18:54:23: GL_ARB_texture_cube_map_array
18:54:23: GL_ARB_texture_env_add
18:54:23: GL_ARB_texture_env_combine
18:54:23: GL_ARB_texture_env_crossbar
18:54:23: GL_ARB_texture_env_dot3
18:54:23: GL_ARB_texture_filter_anisotropic
18:54:23: GL_ARB_texture_filter_minmax
18:54:23: GL_ARB_texture_float
18:54:23: GL_ARB_texture_gather
18:54:23: GL_ARB_texture_mirror_clamp_to_edge
18:54:23: GL_ARB_texture_mirrored_repeat
18:54:23: GL_ARB_texture_multisample
18:54:23: GL_ARB_texture_non_power_of_two
18:54:23: GL_ARB_texture_query_levels
18:54:23: GL_ARB_texture_query_lod
18:54:23: GL_ARB_texture_rectangle
18:54:23: GL_ARB_texture_rg
18:54:23: GL_ARB_texture_rgb10_a2ui
18:54:23: GL_ARB_texture_stencil8
18:54:23: GL_ARB_texture_storage
18:54:23: GL_ARB_texture_storage_multisample
18:54:23: GL_ARB_texture_swizzle
18:54:23: GL_ARB_texture_view
18:54:23: GL_ARB_timer_query
18:54:23: GL_ARB_transform_feedback2
18:54:23: GL_ARB_transform_feedback3
18:54:23: GL_ARB_transform_feedback_instanced
18:54:23: GL_ARB_transform_feedback_overflow_query
18:54:23: GL_ARB_transpose_matrix
18:54:23: GL_ARB_uniform_buffer_object
18:54:23: GL_ARB_vertex_array_bgra
18:54:23: GL_ARB_vertex_array_object
18:54:23: GL_ARB_vertex_attrib_64bit
18:54:23: GL_ARB_vertex_attrib_binding
18:54:23: GL_ARB_vertex_buffer_object
18:54:23: GL_ARB_vertex_program
18:54:23: GL_ARB_vertex_shader
18:54:23: GL_ARB_vertex_type_10f_11f_11f_rev
18:54:23: GL_ARB_vertex_type_2_10_10_10_rev
18:54:23: GL_ARB_viewport_array
18:54:23: GL_ARB_window_pos
18:54:23: GL_ATI_draw_buffers
18:54:23: GL_ATI_texture_float
18:54:23: GL_ATI_texture_mirror_once
18:54:23: GL_S3_s3tc
18:54:23: GL_EXT_texture_env_add
18:54:23: GL_EXT_abgr
18:54:23: GL_EXT_bgra
18:54:23: GL_EXT_bindable_uniform
18:54:23: GL_EXT_blend_color
18:54:23: GL_EXT_blend_equation_separate
18:54:23: GL_EXT_blend_func_separate
18:54:23: GL_EXT_blend_minmax
18:54:23: GL_EXT_blend_subtract
18:54:23: GL_EXT_compiled_vertex_array
18:54:23: GL_EXT_Cg_shader
18:54:23: GL_EXT_depth_bounds_test
18:54:23: GL_EXT_direct_state_access
18:54:23: GL_EXT_draw_buffers2
18:54:23: GL_EXT_draw_instanced
18:54:23: GL_EXT_draw_range_elements
18:54:23: GL_EXT_fog_coord
18:54:23: GL_EXT_framebuffer_blit
18:54:23: GL_EXT_framebuffer_multisample
18:54:23: GL_EXTX_framebuffer_mixed_formats
18:54:23: GL_EXT_framebuffer_multisample_blit_scaled
18:54:23: GL_EXT_framebuffer_object
18:54:23: GL_EXT_framebuffer_sRGB
18:54:23: GL_EXT_geometry_shader4
18:54:23: GL_EXT_gpu_program_parameters
18:54:23: GL_EXT_gpu_shader4
18:54:23: GL_EXT_multi_draw_arrays
18:54:23: GL_EXT_multiview_texture_multisample
18:54:23: GL_EXT_multiview_timer_query
18:54:23: GL_EXT_packed_depth_stencil
18:54:23: GL_EXT_packed_float
18:54:23: GL_EXT_packed_pixels
18:54:23: GL_EXT_pixel_buffer_object
18:54:23: GL_EXT_point_parameters
18:54:23: GL_EXT_polygon_offset_clamp
18:54:23: GL_EXT_post_depth_coverage
18:54:23: GL_EXT_provoking_vertex
18:54:23: GL_EXT_raster_multisample
18:54:23: GL_EXT_rescale_normal
18:54:23: GL_EXT_secondary_color
18:54:23: GL_EXT_separate_shader_objects
18:54:23: GL_EXT_separate_specular_color
18:54:23: GL_EXT_shader_image_load_formatted
18:54:23: GL_EXT_shader_image_load_store
18:54:23: GL_EXT_shader_integer_mix
18:54:23: GL_EXT_shadow_funcs
18:54:23: GL_EXT_sparse_texture2
18:54:23: GL_EXT_stencil_two_side
18:54:23: GL_EXT_stencil_wrap
18:54:23: GL_EXT_texture3D
18:54:23: GL_EXT_texture_array
18:54:23: GL_EXT_texture_buffer_object
18:54:23: GL_EXT_texture_compression_dxt1
18:54:23: GL_EXT_texture_compression_latc
18:54:23: GL_EXT_texture_compression_rgtc
18:54:23: GL_EXT_texture_compression_s3tc
18:54:23: GL_EXT_texture_cube_map
18:54:23: GL_EXT_texture_edge_clamp
18:54:23: GL_EXT_texture_env_combine
18:54:23: GL_EXT_texture_env_dot3
18:54:23: GL_EXT_texture_filter_anisotropic
18:54:23: GL_EXT_texture_filter_minmax
18:54:23: GL_EXT_texture_integer
18:54:23: GL_EXT_texture_lod
18:54:23: GL_EXT_texture_lod_bias
18:54:23: GL_EXT_texture_mirror_clamp
18:54:23: GL_EXT_texture_object
18:54:23: GL_EXT_texture_shadow_lod
18:54:23: GL_EXT_texture_shared_exponent
18:54:23: GL_EXT_texture_sRGB
18:54:23: GL_EXT_texture_sRGB_R8
18:54:23: GL_EXT_texture_sRGB_decode
18:54:23: GL_EXT_texture_storage
18:54:23: GL_EXT_texture_swizzle
18:54:23: GL_EXT_timer_query
18:54:23: GL_EXT_transform_feedback2
18:54:23: GL_EXT_vertex_array
18:54:23: GL_EXT_vertex_array_bgra
18:54:23: GL_EXT_vertex_attrib_64bit
18:54:23: GL_EXT_window_rectangles
18:54:23: GL_EXT_x11_sync_object
18:54:23: GL_EXT_import_sync_object
18:54:23: GL_NV_robustness_video_memory_purge
18:54:23: GL_IBM_rasterpos_clip
18:54:23: GL_IBM_texture_mirrored_repeat
18:54:23: GL_KHR_context_flush_control
18:54:23: GL_KHR_debug
18:54:23: GL_EXT_memory_object
18:54:23: GL_EXT_memory_object_fd
18:54:23: GL_NV_memory_object_sparse
18:54:23: GL_KHR_parallel_shader_compile
18:54:23: GL_KHR_no_error
18:54:23: GL_KHR_robust_buffer_access_behavior
18:54:23: GL_KHR_robustness
18:54:23: GL_EXT_semaphore
18:54:23: GL_EXT_semaphore_fd
18:54:23: GL_NV_timeline_semaphore
18:54:23: GL_KHR_shader_subgroup
18:54:23: GL_KTX_buffer_region
18:54:23: GL_NV_alpha_to_coverage_dither_control
18:54:23: GL_NV_bindless_multi_draw_indirect
18:54:23: GL_NV_bindless_multi_draw_indirect_count
18:54:23: GL_NV_bindless_texture
18:54:23: GL_NV_blend_equation_advanced
18:54:23: GL_NV_blend_equation_advanced_coherent
18:54:23: GL_NVX_blend_equation_advanced_multi_draw_buffers
18:54:23: GL_NV_blend_minmax_factor
18:54:23: GL_NV_blend_square
18:54:23: GL_NV_clip_space_w_scaling
18:54:23: GL_NV_command_list
18:54:23: GL_NV_compute_program5
18:54:23: GL_NV_compute_shader_derivatives
18:54:23: GL_NV_conditional_render
18:54:23: GL_NV_conservative_raster
18:54:23: GL_NV_conservative_raster_dilate
18:54:23: GL_NV_conservative_raster_pre_snap
18:54:23: GL_NV_conservative_raster_pre_snap_triangles
18:54:23: GL_NV_conservative_raster_underestimation
18:54:23: GL_NV_copy_depth_to_color
18:54:23: GL_NV_copy_image
18:54:23: GL_NV_depth_buffer_float
18:54:23: GL_NV_depth_clamp
18:54:23: GL_NV_draw_texture
18:54:23: GL_NV_draw_vulkan_image
18:54:23: GL_NV_ES1_1_compatibility
18:54:23: GL_NV_ES3_1_compatibility
18:54:23: GL_NV_explicit_multisample
18:54:23: GL_NV_feature_query
18:54:23: GL_NV_fence
18:54:23: GL_NV_fill_rectangle
18:54:23: GL_NV_float_buffer
18:54:23: GL_NV_fog_distance
18:54:23: GL_NV_fragment_coverage_to_color
18:54:23: GL_NV_fragment_program
18:54:23: GL_NV_fragment_program_option
18:54:23: GL_NV_fragment_program2
18:54:23: GL_NV_fragment_shader_barycentric
18:54:23: GL_NV_fragment_shader_interlock
18:54:23: GL_NV_framebuffer_mixed_samples
18:54:23: GL_NV_framebuffer_multisample_coverage
18:54:23: GL_NV_geometry_shader4
18:54:23: GL_NV_geometry_shader_passthrough
18:54:23: GL_NV_gpu_program4
18:54:23: GL_NV_internalformat_sample_query
18:54:23: GL_NV_gpu_program4_1
18:54:23: GL_NV_gpu_program5
18:54:23: GL_NV_gpu_program5_mem_extended
18:54:23: GL_NV_gpu_program_fp64
18:54:23: GL_NV_gpu_shader5
18:54:23: GL_NV_half_float
18:54:23: GL_NV_light_max_exponent
18:54:23: GL_NV_memory_attachment
18:54:23: GL_NV_mesh_shader
18:54:23: GL_NV_multisample_coverage
18:54:23: GL_NV_multisample_filter_hint
18:54:23: GL_NV_occlusion_query
18:54:23: GL_NV_packed_depth_stencil
18:54:23: GL_NV_parameter_buffer_object
18:54:23: GL_NV_parameter_buffer_object2
18:54:23: GL_NV_path_rendering
18:54:23: GL_NV_path_rendering_shared_edge
18:54:23: GL_NV_pixel_data_range
18:54:23: GL_NV_point_sprite
18:54:23: GL_NV_primitive_restart
18:54:23: GL_NV_primitive_shading_rate
18:54:23: GL_NV_query_resource
18:54:23: GL_NV_query_resource_tag
18:54:23: GL_NV_register_combiners
18:54:23: GL_NV_register_combiners2
18:54:23: GL_NV_representative_fragment_test
18:54:23: GL_NV_sample_locations
18:54:23: GL_NV_sample_mask_override_coverage
18:54:23: GL_NV_scissor_exclusive
18:54:23: GL_NV_shader_atomic_counters
18:54:23: GL_NV_shader_atomic_float
18:54:23: GL_NV_shader_atomic_float64
18:54:23: GL_NV_shader_atomic_fp16_vector
18:54:23: GL_NV_shader_atomic_int64
18:54:23: GL_NV_shader_buffer_load
18:54:23: GL_NV_shader_storage_buffer_object
18:54:23: GL_NV_shader_subgroup_partitioned
18:54:23: GL_NV_shader_texture_footprint
18:54:23: GL_NV_shading_rate_image
18:54:23: GL_NV_stereo_view_rendering
18:54:23: GL_NV_texgen_reflection
18:54:23: GL_NV_texture_barrier
18:54:23: GL_NV_texture_compression_vtc
18:54:23: GL_NV_texture_dirty_tile_map
18:54:23: GL_NV_texture_env_combine4
18:54:23: GL_NV_texture_multisample
18:54:23: GL_NV_texture_rectangle
18:54:23: GL_NV_texture_rectangle_compressed
18:54:23: GL_NV_texture_shader
18:54:23: GL_NV_texture_shader2
18:54:23: GL_NV_texture_shader3
18:54:23: GL_NV_transform_feedback
18:54:23: GL_NV_transform_feedback2
18:54:23: GL_NV_uniform_buffer_unified_memory
18:54:23: GL_NV_vdpau_interop
18:54:23: GL_NV_vdpau_interop2
18:54:23: GL_NV_vertex_array_range
18:54:23: GL_NV_vertex_array_range2
18:54:23: GL_NV_vertex_attrib_integer_64bit
18:54:23: GL_NV_vertex_buffer_unified_memory
18:54:23: GL_NV_vertex_program
18:54:23: GL_NV_vertex_program1_1
18:54:23: GL_NV_vertex_program2
18:54:23: GL_NV_vertex_program2_option
18:54:23: GL_NV_vertex_program3
18:54:23: GL_NV_viewport_array2
18:54:23: GL_NV_viewport_swizzle
18:54:23: GL_NVX_conditional_render
18:54:23: GL_NV_gpu_multicast
18:54:23: GL_NVX_progress_fence
18:54:23: GL_NVX_gpu_memory_info
18:54:23: GL_NVX_nvenc_interop
18:54:23: GL_NV_shader_thread_group
18:54:23: GL_NV_shader_thread_shuffle
18:54:23: GL_KHR_blend_equation_advanced
18:54:23: GL_KHR_blend_equation_advanced_coherent
18:54:23: GL_OVR_multiview
18:54:23: GL_OVR_multiview2
18:54:23: GL_SGIS_generate_mipmap
18:54:23: GL_SGIS_texture_lod
18:54:23: GL_SGIX_depth_texture
18:54:23: GL_SGIX_shadow
18:54:23: GL_SUN_slice_accum
18:54:23: Supported GLX extensions: GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context GLX_SGI_video_sync GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_swap_control GLX_EXT_swap_control GLX_EXT_swap_control_tear GLX_EXT_buffer_age GLX_ARB_create_context GLX_ARB_create_context_profile GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_EXT_texture_from_pixmap GLX_EXT_framebuffer_sRGB GLX_NV_copy_image GLX_EXT_create_context_es_profile GLX_EXT_create_context_es2_profile GLX_ARB_create_context_no_error GLX_ARB_create_context_robustness GLX_NV_delay_before_swap GLX_EXT_stereo_tree GLX_ARB_context_flush_control GLX_NV_robustness_video_memory_purge GLX_NV_multigpu_context 
18:54:23: **************************************
18:54:23: ***   OpenGL 3+ Renderer Started   ***
18:54:23: **************************************
18:54:23: Registering ResourceManager for type GpuProgram
18:54:23: RenderSystem capabilities
18:54:23: -------------------------
18:54:23: RenderSystem Name: OpenGL 3+ Rendering Subsystem
18:54:23: GPU Vendor: nvidia
18:54:23: Device Name: NVIDIA GeForce RTX 3060/PCIe/SSE2
18:54:23: Driver Version: 4.6.0.0
18:54:23:  * Fixed function pipeline: no
18:54:23:  * Hardware generation of mipmaps: yes
18:54:23:  * Texture blending: yes
18:54:23:  * Anisotropic texture filtering: yes
18:54:23:  * Dot product texture operation: yes
18:54:23:  * Cube mapping: yes
18:54:23:  * Hardware stencil buffer: yes
18:54:23:    - Stencil depth: 8
18:54:23:    - Two sided stencil support: yes
18:54:23:    - Wrap stencil values: yes
18:54:23:  * Hardware vertex / index buffers: yes
18:54:23:  * 32-bit index buffers: yes
18:54:23:  * Vertex programs: yes
18:54:23:  * Number of floating-point constants for vertex programs: 4096
18:54:23:  * Number of integer constants for vertex programs: 4096
18:54:23:  * Number of boolean constants for vertex programs: 4096
18:54:23:  * Fragment programs: yes
18:54:23:  * Number of floating-point constants for fragment programs: 4096
18:54:23:  * Number of integer constants for fragment programs: 4096
18:54:23:  * Number of boolean constants for fragment programs: 4096
18:54:23:  * Geometry programs: yes
18:54:23:  * Number of floating-point constants for geometry programs: 2048
18:54:23:  * Number of integer constants for geometry programs: 2048
18:54:23:  * Number of boolean constants for geometry programs: 2048
18:54:23:  * Tessellation Hull programs: yes
18:54:23:  * Number of floating-point constants for tessellation hull programs: 2048
18:54:23:  * Number of integer constants for tessellation hull programs: 2048
18:54:23:  * Number of boolean constants for tessellation hull programs: 2048
18:54:23:  * Tessellation Domain programs: yes
18:54:23:  * Number of floating-point constants for tessellation domain programs: 2048
18:54:23:  * Number of integer constants for tessellation domain programs: 2048
18:54:23:  * Number of boolean constants for tessellation domain programs: 2048
18:54:23:  * Compute programs: yes
18:54:23:  * Number of floating-point constants for compute programs: 2048
18:54:23:  * Number of integer constants for compute programs: 2048
18:54:23:  * Number of boolean constants for compute programs: 2048
18:54:23:  * Supported Shader Profiles: glsl glsl130 glsl140 glsl150 glsl330 glsl400 glsl410 glsl420 glsl430 glsl440
18:54:23:  * Texture Compression: yes
18:54:23:    - DXT: yes
18:54:23:    - VTC: yes
18:54:23:    - PVRTC: no
18:54:23:    - ATC: no
18:54:23:    - ETC1: no
18:54:23:    - ETC2: yes
18:54:23:    - BC4/BC5: yes
18:54:23:    - BC6H/BC7: yes
18:54:23:    - ASTC: no
18:54:23:  * Hardware Occlusion Query: yes
18:54:23:  * User clip planes: yes
18:54:23:  * VET_UBYTE4 vertex element type: yes
18:54:23:  * Infinite far plane projection: yes
18:54:23:  * Hardware render-to-texture: yes
18:54:23:  * Floating point textures: yes
18:54:23:  * Non-power-of-two textures: yes
18:54:23:  * 1d textures: yes
18:54:23:  * Volume textures: yes
18:54:23:  * Max Texture resolution (2D) 32768
18:54:23:  * Max Texture resolution (3D) 16384
18:54:23:  * Max Texture resolution (Cubemaps) 32768
18:54:23:  * Multiple Render Targets: 8
18:54:23:    - With different bit depths: yes
18:54:23:  * Point Sprites: yes
18:54:23:  * Extended point parameters: yes
18:54:23:  * Max Point Size: 189.875
18:54:23:  * Vertex texture fetch: yes
18:54:23:  * Number of world matrices: 0
18:54:23:  * Number of texture units: 16
18:54:23:  * Stencil buffer depth: 8
18:54:23:  * Number of vertex blend matrices: 0
18:54:23:    - Max vertex textures: 32
18:54:23:    - Vertex textures shared: yes
18:54:23:  * Render to Vertex Buffer : yes
18:54:23:  * Hardware Atomic Counters: yes
18:54:23:  * Compute max threads per threadgroup per axis: 1024, 1024, 64
18:54:23:  * Compute max threads per threadgroup total: 1024
18:54:23:  * GL 1.5 without VBO workaround: no
18:54:23:  * Frame Buffer objects: yes
18:54:23:  * Frame Buffer objects (ARB extension): no
18:54:23:  * Frame Buffer objects (ATI extension): no
18:54:23:  * PBuffer support: no
18:54:23:  * GL 1.5 without HW-occlusion workaround: no
18:54:23:  * Vertex Array Objects: yes
18:54:23:  * Separate shader objects: no
18:54:23:  * Using Reverse Z: yes
18:54:23: DefaultWorkQueue('Root') initialising on thread main.
18:54:23: Particle Renderer Type 'billboard' registered
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/Compositors' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/materials/Common' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/materials/Common/GLSL' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/materials/Common/GLSLES' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/materials/Terra' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/2.0/scripts/materials/Terra/GLSL' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/materials/programs' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/materials/scripts' of type 'FileSystem' to resource group 'General'
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/ogre2/media/materials/textures' of type 'FileSystem' to resource group 'General'
18:54:23: Parsing scripts for resource group Autodetect
18:54:23: Finished parsing scripts for resource group Autodetect
18:54:23: Creating resources for group Autodetect
18:54:23: All done
18:54:23: Parsing scripts for resource group General
18:54:23: Parsing script Quad.program
18:54:23: Parsing script Copyback.material
18:54:23: Parsing script DepthUtils.material
18:54:23: Parsing script DPSM.material
18:54:23: Parsing script EsmGaussianBlurLogFilter.material
18:54:23: Parsing script GpuNormalMapper.material
18:54:23: Parsing script selection_buffer.material
18:54:23: Compiler error: reference to a non existing object in selection_buffer.material(37)
18:54:23: Parsing script gpu_rays.material
18:54:23: Parsing script skybox.material
18:54:23: Parsing script gaussian_noise.material
18:54:23: Parsing script thermal.material
18:54:23: Parsing script depth_camera.material
18:54:23: Parsing script point_cloud_point.material
18:54:23: Compiler error: invalid parameters in point_cloud_point.material(34): incorrect type specified; only variants of int, uint, float, double, and bool allowed
18:54:23: Parsing script picker.material
18:54:23: Parsing script GpuNormalMapper.compositor
18:54:23: Parsing script TerraShadowGenerator.compositor
18:54:23: Parsing script Mipmaps.material.json
18:54:23: Parsing script EsmGaussianBlurLogFilter.material.json
18:54:23: Parsing script TerraShadowGenerator.material.json
18:54:23: Finished parsing scripts for resource group General
18:54:23: Creating resources for group General
18:54:23: All done
18:54:23: Parsing scripts for resource group Internal
18:54:23: Finished parsing scripts for resource group Internal
18:54:23: Creating resources for group Internal
18:54:23: All done
18:54:23: Added resource location '/home/chapulina/dev_bionic/ws_fortress/install/share/ignition/ignition-rendering6/media/materials/textures/' of type 'FileSystem' to resource group 'General'
18:54:23: Can't assign material scene::Material(65503) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65497) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65491) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65485) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65478) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65485) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:23: Can't assign material scene::Material(65466) because this Material does not exist. Have you forgotten to define it in a .material script?
18:54:24: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
18:54:24: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
18:54:24: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
18:54:24: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...

@chapulina chapulina removed the beta Targeting beta release of upcoming collection label Oct 4, 2021
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@iche033
Copy link
Contributor Author

iche033 commented Oct 7, 2021

I think the cause of the issue is this line in ogre2.log:

18:54:23: Compiler error: reference to a non existing object in selection_buffer.material(37)

I made some fixes in #450. I enabled the camera VisualAt test and now all CIs are green. I disabled applying device pixel ratio factor to the mouse positions in that branch which seem to help get the test to pass on some CIs. Can you give that a try?

This was referenced Oct 29, 2021
@chapulina chapulina linked an issue Nov 9, 2021 that may be closed by this pull request
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, works for me on both BIonic and Focal, and I didn't notice anything weird in the code. It would be nice to address the comments about screenScalingFactor before merging though.

ogre/src/OgreCamera.cc Outdated Show resolved Hide resolved
ogre2/src/Ogre2Camera.cc Outdated Show resolved Hide resolved
ogre2/src/Ogre2SelectionBuffer.cc Outdated Show resolved Hide resolved
@iche033 iche033 merged commit 0127d13 into ign-rendering6 Dec 1, 2021
@iche033 iche033 deleted the fix_selection_resize branch December 1, 2021 01:05
srmainwaring added a commit to srmainwaring/gz-rendering that referenced this pull request Dec 1, 2021
…ebosim#446

- Add new param colorTexResolution to the selection buffer shader
- Implement the Metal equivalent of texelFetch in the shaders

Signed-off-by: Rhys Mainwaring <[email protected]>
srmainwaring added a commit to srmainwaring/gz-rendering that referenced this pull request Dec 1, 2021
…ebosim#446

- Add new param colorTexResolution to the selection buffer shader
- Implement the Metal equivalent of texelFetch in the shaders

Signed-off-by: Rhys Mainwaring <[email protected]>
iche033 pushed a commit that referenced this pull request Dec 1, 2021
#498)

- Add new param colorTexResolution to the selection buffer shader
- Implement the Metal equivalent of texelFetch in the shaders

Signed-off-by: Rhys Mainwaring <[email protected]>
chapulina added a commit that referenced this pull request Dec 6, 2021
* fix selection buffer crash due to resize and incorrect selections

Signed-off-by: Ian Chen <[email protected]>

* test updating full selection buffer texture

Signed-off-by: Ian Chen <[email protected]>

* reenable visual at test

Signed-off-by: Ian Chen <[email protected]>

* fix codecheck

Signed-off-by: Ian Chen <[email protected]>

* testing rgb no depth, full buffer

Signed-off-by: Ian Chen <[email protected]>

* use 1x1 buffer, still no depth data

Signed-off-by: Ian Chen <[email protected]>

* prnt scaling factor

Signed-off-by: Ian Chen <[email protected]>

* disable device ratio

Signed-off-by: Ian Chen <[email protected]>

* reenable depth and utils test

Signed-off-by: Ian Chen <[email protected]>

* disable utils test, add visual at test after resize

Signed-off-by: Ian Chen <[email protected]>

* test texelfetch

Signed-off-by: Ian Chen <[email protected]>

* back to full buffer

Signed-off-by: Ian Chen <[email protected]>

* print ogre log

Signed-off-by: Ian Chen <[email protected]>

* codecheck

Signed-off-by: Ian Chen <[email protected]>

* fixing selection buffer mat script

Signed-off-by: Ian Chen <[email protected]>

* try 1x1 buffer again

Signed-off-by: Ian Chen <[email protected]>

* revert some test changes

Signed-off-by: Ian Chen <[email protected]>

* uncomment tests

Signed-off-by: Ian Chen <[email protected]>

* update scaling factor

Signed-off-by: Ian Chen <[email protected]>

* fix removing selection mat

Signed-off-by: Ian Chen <[email protected]>

* update screenScalingFactor

Signed-off-by: Ian Chen <[email protected]>

* minor tweak

Signed-off-by: Ian Chen <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
@Blast545 Blast545 mentioned this pull request Jun 9, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Camera/CameraTest.VisualAt/ogre2 flaky test on Bionic/amd64
3 participants