Vulkan exception when using PlanarReflections Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


jwwalker
Goblin
Posts: 268
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 19

Vulkan exception when using PlanarReflections

Post by jwwalker »

I have code that's rendering mirrors using the PlanarReflections library, and it works OK on Mac with the Metal render system, and on Win32 using the Direct3D render system, but throws an exception when using the Vulkan render system on Win64. However, Sample_PlanarReflections works as expected on Windows with Vulkan and 64 bits, so I don't think it's that I have broken versions of the Ogre libraries or resources. Any ideas would be appreciated.

Call stack:

Code: Select all

RenderSystem_Vulkan_d.dll!Ogre::ExceptionFactory::throwException(Ogre::Exception::ExceptionCodes code, int number, const std::string & desc, const std::string & src, const char * file, long line) Line 297	C++
RenderSystem_Vulkan_d.dll!Ogre::checkTextureLayout(const Ogre::TextureGpu * texture, Ogre::RenderPassDescriptor * currentRenderPassDescriptor) Line 1563	C++
RenderSystem_Vulkan_d.dll!Ogre::VulkanRenderSystem::_setTextures(unsigned int slotStart, const Ogre::DescriptorSetTexture * set, unsigned int hazardousTexIdx) Line 1623	C++
OgreMain_d.dll!Ogre::CommandBuffer::execute_setTextures(Ogre::CommandBuffer * _this, const Ogre::CbBase * _cmd) Line 73	C++
OgreMain_d.dll!Ogre::CommandBuffer::execute() Line 109	C++
OgreMain_d.dll!Ogre::RenderQueue::render(Ogre::RenderSystem * rs, unsigned char firstRq, unsigned char lastRq, bool casterPass, bool dualParaboloid) Line 472	C++
OgreMain_d.dll!Ogre::SceneManager::_renderPhase02(Ogre::Camera * camera, const Ogre::Camera * lodCamera, unsigned char firstRq, unsigned char lastRq, bool includeOverlays) Line 1488	C++
OgreMain_d.dll!Ogre::Camera::_renderScenePhase02(const Ogre::Camera * lodCamera, unsigned char firstRq, unsigned char lastRq, bool includeOverlays) Line 389	C++
OgreMain_d.dll!Ogre::Viewport::_updateRenderPhase02(Ogre::Camera * camera, const Ogre::Camera * lodCamera, unsigned char firstRq, unsigned char lastRq) Line 207	C++
OgreMain_d.dll!Ogre::CompositorPassScene::execute(const Ogre::Camera * lodCamera) Line 316	C++
OgreMain_d.dll!Ogre::CompositorNode::_update(const Ogre::Camera * lodCamera, Ogre::SceneManager * sceneManager) Line 836	C++
OgreMain_d.dll!Ogre::CompositorWorkspace::_update(const bool bInsideAutoreleasePool) Line 837	C++
OgreMain_d.dll!Ogre::CompositorManager2::_updateImplementation() Line 791	C++
OgreMain_d.dll!Ogre::RenderSystem::updateCompositorManager(Ogre::CompositorManager2 * compositorManager) Line 1312	C++
OgreMain_d.dll!Ogre::CompositorManager2::_update() Line 713	C++
OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets() Line 1571	C++
OgreMain_d.dll!Ogre::Root::renderOneFrame() Line 1102	C++

Ogre.log:

Code: Select all

16:11:24: Creating resource group General
16:11:24: Creating resource group Internal
16:11:24: Creating resource group Autodetect
16:11:24: SceneManagerFactory for type 'DefaultSceneManager' registered.
16:11:24: Registering ResourceManager for type Material
16:11:24: Registering ResourceManager for type Mesh
16:11:24: Registering ResourceManager for type Mesh2
16:11:24: Registering ResourceManager for type OldSkeleton
16:11:24: MovableObjectFactory for type 'ParticleSystem' registered.
16:11:24: ArchiveFactory for archive type FileSystem registered.
16:11:24: ArchiveFactory for archive type Zip registered.
16:11:24: ArchiveFactory for archive type EmbeddedZip registered.
16:11:24: DDS codec registering
16:11:24: FreeImage version: 3.18.0
16:11:24: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
16:11:24: 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,psb,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
16:11:24: ETC codec registering
16:11:24: OITD codec registering
16:11:24: Registering ResourceManager for type HighLevelGpuProgram
16:11:24: MovableObjectFactory for type 'Decal' registered.
16:11:24: MovableObjectFactory for type 'InternalCubemapProbe' registered.
16:11:24: MovableObjectFactory for type 'Entity' registered.
16:11:24: MovableObjectFactory for type 'Item' registered.
16:11:24: MovableObjectFactory for type 'Light' registered.
16:11:24: MovableObjectFactory for type 'Rectangle2Dv2' registered.
16:11:24: MovableObjectFactory for type 'BillboardSet' registered.
16:11:24: MovableObjectFactory for type 'ManualObject2' registered.
16:11:24: MovableObjectFactory for type 'BillboardChain' registered.
16:11:24: MovableObjectFactory for type 'RibbonTrail' registered.
16:11:24: MovableObjectFactory for type 'WireAabb' registered.
16:11:24: *-*-* OGRE Initialising
16:11:24: *-*-* Version 3.0.0unstable (E)
16:11:24: Loading library D:\FFx64\RenderSystem_Vulkan_d.dll
16:11:24: Installing plugin: Vulkan RenderSystem
16:11:24: [Vulkan] Initializing VkInstance
16:11:24: Found instance extension: VK_KHR_device_group_creation
16:11:24: Found instance extension: VK_KHR_display
16:11:24: Found instance extension: VK_KHR_external_fence_capabilities
16:11:24: Found instance extension: VK_KHR_external_memory_capabilities
16:11:24: Found instance extension: VK_KHR_external_semaphore_capabilities
16:11:24: Found instance extension: VK_KHR_get_display_properties2
16:11:24: Found instance extension: VK_KHR_get_physical_device_properties2
16:11:24: Found instance extension: VK_KHR_get_surface_capabilities2
16:11:24: Found instance extension: VK_KHR_surface
16:11:24: Found instance extension: VK_KHR_surface_protected_capabilities
16:11:24: Found instance extension: VK_KHR_win32_surface
16:11:24: Found instance extension: VK_EXT_debug_report
16:11:24: Found instance extension: VK_EXT_debug_utils
16:11:24: Found instance extension: VK_EXT_direct_mode_display
16:11:24: Found instance extension: VK_EXT_swapchain_colorspace
16:11:24: Found instance extension: VK_NV_external_memory_capabilities
16:11:24: Found instance extension: VK_KHR_portability_enumeration
16:11:24: Found instance layer: VK_LAYER_NV_optimus
16:11:24: Found instance layer: VK_LAYER_LUNARG_api_dump
16:11:24: Found instance layer: VK_LAYER_LUNARG_gfxreconstruct
16:11:24: Found instance layer: VK_LAYER_KHRONOS_synchronization2
16:11:24: Found instance layer: VK_LAYER_KHRONOS_validation
16:11:24: Found instance layer: VK_LAYER_LUNARG_monitor
16:11:24: Found instance layer: VK_LAYER_LUNARG_screenshot
16:11:24: Found instance layer: VK_LAYER_KHRONOS_profiles
16:11:24: Requesting Instance Extension: VK_KHR_get_physical_device_properties2
16:11:24: Requesting Instance Extension: VK_KHR_win32_surface
16:11:24: Requesting Instance Extension: VK_EXT_debug_report
16:11:24: Requesting Instance Extension: VK_EXT_debug_utils
16:11:24: Requesting Instance Extension: VK_KHR_surface
16:11:24: [Vulkan] Found 1 devices
16:11:24: [Vulkan] Found devices:
16:11:24: NVIDIA GeForce RTX 2060 #0
16:11:24: [Vulkan] Found 1 devices
16:11:24: [Vulkan] Found devices:
16:11:24: NVIDIA GeForce RTX 2060 #0
16:11:24: Plugin successfully installed
16:11:24: CPU Identifier & Features
16:11:24: -------------------------
16:11:24:  *   CPU ID: GenuineIntel: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
16:11:24:  *   Logical cores: 8
16:11:24:  *      SSE: yes
16:11:24:  *     SSE2: yes
16:11:24:  *     SSE3: yes
16:11:24:  *      MMX: yes
16:11:24:  *   MMXEXT: yes
16:11:24:  *    3DNOW: no
16:11:24:  * 3DNOWEXT: no
16:11:24:  *     CMOV: yes
16:11:24:  *      TSC: yes
16:11:24:  *      FPU: yes
16:11:24:  *      PRO: yes
16:11:24:  *       HT: no
16:11:24: -------------------------
16:11:24: [Vulkan] Found 1 devices
16:11:24: [Vulkan] Selecting device 0
16:11:24: Found device extension: VK_KHR_16bit_storage
16:11:24: Found device extension: VK_KHR_8bit_storage
16:11:24: Found device extension: VK_KHR_acceleration_structure
16:11:24: Found device extension: VK_KHR_bind_memory2
16:11:24: Found device extension: VK_KHR_buffer_device_address
16:11:24: Found device extension: VK_KHR_copy_commands2
16:11:24: Found device extension: VK_KHR_create_renderpass2
16:11:24: Found device extension: VK_KHR_dedicated_allocation
16:11:24: Found device extension: VK_KHR_deferred_host_operations
16:11:24: Found device extension: VK_KHR_depth_stencil_resolve
16:11:24: Found device extension: VK_KHR_descriptor_update_template
16:11:24: Found device extension: VK_KHR_device_group
16:11:24: Found device extension: VK_KHR_draw_indirect_count
16:11:24: Found device extension: VK_KHR_driver_properties
16:11:24: Found device extension: VK_KHR_dynamic_rendering
16:11:24: Found device extension: VK_KHR_external_fence
16:11:24: Found device extension: VK_KHR_external_fence_win32
16:11:24: Found device extension: VK_KHR_external_memory
16:11:24: Found device extension: VK_KHR_external_memory_win32
16:11:24: Found device extension: VK_KHR_external_semaphore
16:11:24: Found device extension: VK_KHR_external_semaphore_win32
16:11:24: Found device extension: VK_KHR_format_feature_flags2
16:11:24: Found device extension: VK_KHR_fragment_shader_barycentric
16:11:24: Found device extension: VK_KHR_fragment_shading_rate
16:11:24: Found device extension: VK_KHR_get_memory_requirements2
16:11:24: Found device extension: VK_KHR_global_priority
16:11:24: Found device extension: VK_KHR_image_format_list
16:11:24: Found device extension: VK_KHR_imageless_framebuffer
16:11:24: Found device extension: VK_KHR_maintenance1
16:11:24: Found device extension: VK_KHR_maintenance2
16:11:24: Found device extension: VK_KHR_maintenance3
16:11:24: Found device extension: VK_KHR_maintenance4
16:11:24: Found device extension: VK_KHR_multiview
16:11:24: Found device extension: VK_KHR_pipeline_executable_properties
16:11:24: Found device extension: VK_KHR_pipeline_library
16:11:24: Found device extension: VK_KHR_present_id
16:11:24: Found device extension: VK_KHR_present_wait
16:11:24: Found device extension: VK_KHR_push_descriptor
16:11:24: Found device extension: VK_KHR_ray_query
16:11:24: Found device extension: VK_KHR_ray_tracing_maintenance1
16:11:24: Found device extension: VK_KHR_ray_tracing_pipeline
16:11:24: Found device extension: VK_KHR_relaxed_block_layout
16:11:24: Found device extension: VK_KHR_sampler_mirror_clamp_to_edge
16:11:24: Found device extension: VK_KHR_sampler_ycbcr_conversion
16:11:24: Found device extension: VK_KHR_separate_depth_stencil_layouts
16:11:24: Found device extension: VK_KHR_shader_atomic_int64
16:11:24: Found device extension: VK_KHR_shader_clock
16:11:24: Found device extension: VK_KHR_shader_draw_parameters
16:11:24: Found device extension: VK_KHR_shader_float16_int8
16:11:24: Found device extension: VK_KHR_shader_float_controls
16:11:24: Found device extension: VK_KHR_shader_integer_dot_product
16:11:24: Found device extension: VK_KHR_shader_non_semantic_info
16:11:24: Found device extension: VK_KHR_shader_subgroup_extended_types
16:11:24: Found device extension: VK_KHR_shader_subgroup_uniform_control_flow
16:11:24: Found device extension: VK_KHR_shader_terminate_invocation
16:11:24: Found device extension: VK_KHR_spirv_1_4
16:11:24: Found device extension: VK_KHR_storage_buffer_storage_class
16:11:24: Found device extension: VK_KHR_swapchain
16:11:24: Found device extension: VK_KHR_swapchain_mutable_format
16:11:24: Found device extension: VK_KHR_synchronization2
16:11:24: Found device extension: VK_KHR_timeline_semaphore
16:11:24: Found device extension: VK_KHR_uniform_buffer_standard_layout
16:11:24: Found device extension: VK_KHR_variable_pointers
16:11:24: Found device extension: VK_KHR_video_decode_h264
16:11:24: Found device extension: VK_KHR_video_decode_h265
16:11:24: Found device extension: VK_KHR_video_decode_queue
16:11:24: Found device extension: VK_KHR_video_queue
16:11:24: Found device extension: VK_KHR_vulkan_memory_model
16:11:24: Found device extension: VK_KHR_win32_keyed_mutex
16:11:24: Found device extension: VK_KHR_workgroup_memory_explicit_layout
16:11:24: Found device extension: VK_KHR_zero_initialize_workgroup_memory
16:11:24: Found device extension: VK_EXT_4444_formats
16:11:24: Found device extension: VK_EXT_attachment_feedback_loop_layout
16:11:24: Found device extension: VK_EXT_blend_operation_advanced
16:11:24: Found device extension: VK_EXT_border_color_swizzle
16:11:24: Found device extension: VK_EXT_buffer_device_address
16:11:24: Found device extension: VK_EXT_calibrated_timestamps
16:11:24: Found device extension: VK_EXT_color_write_enable
16:11:24: Found device extension: VK_EXT_conditional_rendering
16:11:24: Found device extension: VK_EXT_conservative_rasterization
16:11:24: Found device extension: VK_EXT_custom_border_color
16:11:24: Found device extension: VK_EXT_depth_clamp_zero_one
16:11:24: Found device extension: VK_EXT_depth_clip_control
16:11:24: Found device extension: VK_EXT_depth_clip_enable
16:11:24: Found device extension: VK_EXT_depth_range_unrestricted
16:11:24: Found device extension: VK_EXT_descriptor_buffer
16:11:24: Found device extension: VK_EXT_descriptor_indexing
16:11:24: Found device extension: VK_EXT_discard_rectangles
16:11:24: Found device extension: VK_EXT_extended_dynamic_state
16:11:24: Found device extension: VK_EXT_extended_dynamic_state2
16:11:24: Found device extension: VK_EXT_extended_dynamic_state3
16:11:24: Found device extension: VK_EXT_external_memory_host
16:11:24: Found device extension: VK_EXT_fragment_shader_interlock
16:11:24: Found device extension: VK_EXT_full_screen_exclusive
16:11:24: Found device extension: VK_EXT_global_priority
16:11:24: Found device extension: VK_EXT_global_priority_query
16:11:24: Found device extension: VK_EXT_graphics_pipeline_library
16:11:24: Found device extension: VK_EXT_hdr_metadata
16:11:24: Found device extension: VK_EXT_host_query_reset
16:11:24: Found device extension: VK_EXT_image_2d_view_of_3d
16:11:24: Found device extension: VK_EXT_image_robustness
16:11:24: Found device extension: VK_EXT_image_view_min_lod
16:11:24: Found device extension: VK_EXT_index_type_uint8
16:11:24: Found device extension: VK_EXT_inline_uniform_block
16:11:24: Found device extension: VK_EXT_line_rasterization
16:11:24: Found device extension: VK_EXT_load_store_op_none
16:11:24: Found device extension: VK_EXT_memory_budget
16:11:24: Found device extension: VK_EXT_memory_priority
16:11:24: Found device extension: VK_EXT_mesh_shader
16:11:24: Found device extension: VK_EXT_multi_draw
16:11:24: Found device extension: VK_EXT_mutable_descriptor_type
16:11:24: Found device extension: VK_EXT_non_seamless_cube_map
16:11:24: Found device extension: VK_EXT_opacity_micromap
16:11:24: Found device extension: VK_EXT_pageable_device_local_memory
16:11:24: Found device extension: VK_EXT_pci_bus_info
16:11:24: Found device extension: VK_EXT_pipeline_creation_cache_control
16:11:24: Found device extension: VK_EXT_pipeline_creation_feedback
16:11:24: Found device extension: VK_EXT_pipeline_robustness
16:11:24: Found device extension: VK_EXT_post_depth_coverage
16:11:24: Found device extension: VK_EXT_primitive_topology_list_restart
16:11:24: Found device extension: VK_EXT_primitives_generated_query
16:11:24: Found device extension: VK_EXT_private_data
16:11:24: Found device extension: VK_EXT_provoking_vertex
16:11:24: Found device extension: VK_EXT_queue_family_foreign
16:11:24: Found device extension: VK_EXT_robustness2
16:11:24: Found device extension: VK_EXT_sample_locations
16:11:24: Found device extension: VK_EXT_sampler_filter_minmax
16:11:24: Found device extension: VK_EXT_scalar_block_layout
16:11:24: Found device extension: VK_EXT_separate_stencil_usage
16:11:24: Found device extension: VK_EXT_shader_atomic_float
16:11:24: Found device extension: VK_EXT_shader_demote_to_helper_invocation
16:11:24: Found device extension: VK_EXT_shader_image_atomic_int64
16:11:24: Found device extension: VK_EXT_shader_module_identifier
16:11:24: Found device extension: VK_EXT_shader_subgroup_ballot
16:11:24: Found device extension: VK_EXT_shader_subgroup_vote
16:11:24: Found device extension: VK_EXT_shader_viewport_index_layer
16:11:24: Found device extension: VK_EXT_subgroup_size_control
16:11:24: Found device extension: VK_EXT_texel_buffer_alignment
16:11:24: Found device extension: VK_EXT_tooling_info
16:11:24: Found device extension: VK_EXT_transform_feedback
16:11:24: Found device extension: VK_EXT_vertex_attribute_divisor
16:11:24: Found device extension: VK_EXT_vertex_input_dynamic_state
16:11:24: Found device extension: VK_EXT_ycbcr_2plane_444_formats
16:11:24: Found device extension: VK_EXT_ycbcr_image_arrays
16:11:24: Found device extension: VK_NV_acquire_winrt_display
16:11:24: Found device extension: VK_NV_clip_space_w_scaling
16:11:24: Found device extension: VK_NV_compute_shader_derivatives
16:11:24: Found device extension: VK_NV_cooperative_matrix
16:11:24: Found device extension: VK_NV_copy_memory_indirect
16:11:24: Found device extension: VK_NV_corner_sampled_image
16:11:24: Found device extension: VK_NV_coverage_reduction_mode
16:11:24: Found device extension: VK_NV_cuda_kernel_launch
16:11:24: Found device extension: VK_NV_dedicated_allocation
16:11:24: Found device extension: VK_NV_dedicated_allocation_image_aliasing
16:11:24: Found device extension: VK_NV_device_diagnostic_checkpoints
16:11:24: Found device extension: VK_NV_device_diagnostics_config
16:11:24: Found device extension: VK_NV_device_generated_commands
16:11:24: Found device extension: VK_NV_external_memory
16:11:24: Found device extension: VK_NV_external_memory_win32
16:11:24: Found device extension: VK_NV_fill_rectangle
16:11:24: Found device extension: VK_NV_fragment_coverage_to_color
16:11:24: Found device extension: VK_NV_fragment_shader_barycentric
16:11:24: Found device extension: VK_NV_fragment_shading_rate_enums
16:11:24: Found device extension: VK_NV_framebuffer_mixed_samples
16:11:24: Found device extension: VK_NV_geometry_shader_passthrough
16:11:24: Found device extension: VK_NV_inherited_viewport_scissor
16:11:24: Found device extension: VK_NV_linear_color_attachment
16:11:24: Found device extension: VK_NV_low_latency
16:11:24: Found device extension: VK_NV_memory_decompression
16:11:24: Found device extension: VK_NV_mesh_shader
16:11:24: Found device extension: VK_NV_ray_tracing
16:11:24: Found device extension: VK_NV_ray_tracing_invocation_reorder
16:11:24: Found device extension: VK_NV_representative_fragment_test
16:11:24: Found device extension: VK_NV_sample_mask_override_coverage
16:11:24: Found device extension: VK_NV_scissor_exclusive
16:11:24: Found device extension: VK_NV_shader_image_footprint
16:11:24: Found device extension: VK_NV_shader_sm_builtins
16:11:24: Found device extension: VK_NV_shader_subgroup_partitioned
16:11:24: Found device extension: VK_NV_shading_rate_image
16:11:24: Found device extension: VK_NV_viewport_array2
16:11:24: Found device extension: VK_NV_viewport_swizzle
16:11:24: Found device extension: VK_NV_win32_keyed_mutex
16:11:24: Found device extension: VK_NVX_binary_import
16:11:24: Found device extension: VK_NVX_image_view_handle
16:11:24: Found device extension: VK_NVX_multiview_per_view_attributes
16:11:24: Requesting Extension: VK_KHR_16bit_storage
16:11:24: Requesting Extension: VK_KHR_maintenance2
16:11:24: Requesting Extension: VK_KHR_shader_float16_int8
16:11:24: Requesting Extension: VK_KHR_storage_buffer_storage_class
16:11:24: Requesting Extension: VK_EXT_shader_subgroup_vote
16:11:24: Requesting Extension: VK_EXT_shader_viewport_index_layer
16:11:24: Requesting Extension: VK_EXT_debug_marker
16:11:24: Requesting Extension: VK_KHR_swapchain
16:11:25: [Vulkan] API Version: 1.3.236 (0x4030ec)
16:11:25: [Vulkan] Driver Version (raw): 0x84cf4000
16:11:25: [Vulkan] Vendor ID: 0x10de
16:11:25: [Vulkan] Device ID: 0x1f08
16:11:25: Registering ResourceManager for type GpuProgram
16:11:25: RenderSystem capabilities
16:11:25: -------------------------
16:11:25: RenderSystem Name: Vulkan Rendering Subsystem
16:11:25: GPU Vendor: nvidia
16:11:25: Device Name: NVIDIA GeForce RTX 2060
16:11:25: Driver Version: 531.61.0.0
16:11:25:  * Fixed function pipeline: no
16:11:25:  * Hardware generation of mipmaps: yes
16:11:25:  * Texture blending: yes
16:11:25:  * Anisotropic texture filtering: yes
16:11:25:  * Dot product texture operation: yes
16:11:25:  * Cube mapping: yes
16:11:25:  * Hardware stencil buffer: yes
16:11:25:    - Stencil depth: 8
16:11:25:    - Two sided stencil support: yes
16:11:25:    - Wrap stencil values: yes
16:11:25:  * Hardware vertex / index buffers: yes
16:11:25:  * 32-bit index buffers: no
16:11:25:  * Vertex programs: no
16:11:25:  * Number of floating-point constants for vertex programs: 256
16:11:25:  * Number of integer constants for vertex programs: 256
16:11:25:  * Number of boolean constants for vertex programs: 256
16:11:25:  * Fragment programs: no
16:11:25:  * Number of floating-point constants for fragment programs: 256
16:11:25:  * Number of integer constants for fragment programs: 256
16:11:25:  * Number of boolean constants for fragment programs: 256
16:11:25:  * Geometry programs: no
16:11:25:  * Number of floating-point constants for geometry programs: 256
16:11:25:  * Number of integer constants for geometry programs: 256
16:11:25:  * Number of boolean constants for geometry programs: 256
16:11:25:  * Tessellation Hull programs: no
16:11:25:  * Number of floating-point constants for tessellation hull programs: 256
16:11:25:  * Number of integer constants for tessellation hull programs: 256
16:11:25:  * Number of boolean constants for tessellation hull programs: 256
16:11:25:  * Tessellation Domain programs: no
16:11:25:  * Number of floating-point constants for tessellation domain programs: 256
16:11:25:  * Number of integer constants for tessellation domain programs: 256
16:11:25:  * Number of boolean constants for tessellation domain programs: 256
16:11:25:  * Compute programs: yes
16:11:25:  * Number of floating-point constants for compute programs: 256
16:11:25:  * Number of integer constants for compute programs: 256
16:11:25:  * Number of boolean constants for compute programs: 256
16:11:25:  * Supported Shader Profiles: glsl glslvk hlsl hlslvk
16:11:25:  * Texture Compression: yes
16:11:25:    - DXT: yes
16:11:25:    - VTC: no
16:11:25:    - PVRTC: no
16:11:25:    - ATC: no
16:11:25:    - ETC1: no
16:11:25:    - ETC2: no
16:11:25:    - BC4/BC5: yes
16:11:25:    - BC6H/BC7: yes
16:11:25:    - ASTC: no
16:11:25:  * Hardware Occlusion Query: no
16:11:25:  * User clip planes: yes
16:11:25:  * VET_UBYTE4 vertex element type: yes
16:11:25:  * Infinite far plane projection: yes
16:11:25:  * Hardware render-to-texture: yes
16:11:25:  * Floating point textures: yes
16:11:25:  * Non-power-of-two textures: yes
16:11:25:  * 1d textures: yes
16:11:25:  * Volume textures: yes
16:11:25:  * Max Texture resolution (2D) 16384
16:11:25:  * Max Texture resolution (3D) 4096
16:11:25:  * Max Texture resolution (Cubemaps) 16384
16:11:25:  * Multiple Render Targets: 1
16:11:25:    - With different bit depths: no
16:11:25:  * Point Sprites: yes
16:11:25:  * Extended point parameters: yes
16:11:25:  * Max Point Size: 256
16:11:25:  * Vertex texture fetch: no
16:11:25:  * Number of world matrices: 0
16:11:25:  * Number of texture units: 32
16:11:25:  * Stencil buffer depth: 8
16:11:25:  * Number of vertex blend matrices: 0
16:11:25:  * Render to Vertex Buffer : no
16:11:25:  * Hardware Atomic Counters: no
16:11:25:  * Shader 16-bit floating point (half): no
16:11:25:  * Compute max threads per threadgroup per axis: 1024, 1024, 64
16:11:25:  * Compute max threads per threadgroup total: 1024
16:11:25:  * Using Reverse Z: yes
16:11:25: Supported memory types for general buffer usage: 31
16:11:25: Supported memory types for reading: 31
16:11:25: VkDevice will use coherent memory buffers: true
16:11:25: VkDevice will use non-coherent memory buffers: false
16:11:25: VkDevice will use coherent memory for reading: true
16:11:25: VkDevice read memory is coherent: true
16:11:27: Trying presentMode = IMMEDIATE_KHR
16:11:27: Chosen presentMode = IMMEDIATE_KHR
16:11:27: surfaceCaps.currentTransform = 1
16:11:27: DefaultWorkQueue('Root') initialising on thread main.
16:11:27:  _hlmsMacroblockCreated 
16:11:27:  _hlmsBlendblockCreated 
16:11:27: Particle Renderer Type 'billboard' registered
16:11:27: Added resource location 'D:\FFx64\ogre resources/2.0/scripts/materials/Common' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/2.0/scripts/materials/Common/Any' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/2.0/scripts/materials/Common/HLSL' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/2.0/scripts/materials/Common/GLSL' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Contents/Resources/2.0/scripts/materials/HDR' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Contents/Resources/2.0/scripts/materials/HDR/HLSL' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Contents/Resources/2.0/scripts/materials/HDR/Metal' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Contents/Resources/2.0/scripts/materials/PbsMaterials' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Hlms/Common/Any' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Hlms/Common/HLSL' of type 'FileSystem' to resource group 'General'
16:11:27: Added resource location 'D:\FFx64\ogre resources/Hlms/Common/GLSL' of type 'FileSystem' to resource group 'General'
16:11:27: Creating resource group Popular
16:11:27: Added resource location 'D:\FFx64\ogre resources/2.0/scripts/Compositors' of type 'FileSystem' to resource group 'Popular'
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: [INFO] Texture cache not found at C:\Users\jw\AppData\Local\FrameForge\Ogre-cache\/textureMetadataCache.json
16:11:27: Parsing scripts for resource group Autodetect
16:11:27: Finished parsing scripts for resource group Autodetect
16:11:27: Creating resources for group Autodetect
16:11:27: All done
16:11:27: Parsing scripts for resource group General
16:11:27: Parsing script Quad.program
16:11:27: Shader Ogre/Compositor/Quad_vs_VK compiled successfully.
16:11:27: Shader Ogre/Compositor/QuadCameraDir_vs_VK compiled successfully.
16:11:27: Shader Ogre/Compositor/QuadCameraDirNoUV_vs_VK compiled successfully.
16:11:27: Parsing script Atmosphere.material
16:11:27: Shader Ogre/Atmo/NprSky_ps_VK compiled successfully.
16:11:27:  _hlmsMacroblockCreated 
16:11:27: Parsing script Copyback.material
16:11:27: Shader Ogre/Copy/4xFP32_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsMacroblockCreated 
16:11:27: Shader Ogre/Copy/4xFP32_2DArray_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Shader Ogre/Copy/1xFP32_ps_VK compiled successfully.
16:11:27: Shader Ogre/Resolve/1xFP32_Subsample0_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script DepthUtils.material
16:11:27: Shader Ogre/Depth/DownscaleMax_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsMacroblockCreated 
16:11:27: Parsing script DPM.material
16:11:27: Shader Ogre/DPM/CubeToDpm_4xFP16_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsMacroblockCreated 
16:11:27: Parsing script DPSM.material
16:11:27: Shader Ogre/DPSM/CubeToDpsm_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Shader Ogre/DPSM/CubeToDpsm_Colour_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script EsmGaussianBlurLogFilter.material
16:11:27: Shader ESM/GaussianLogFilterH_ps_VK compiled successfully.
16:11:27: Shader ESM/GaussianLogFilterV_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script HiddenAreaMeshVr.material
16:11:27: Shader Ogre/VR/HiddenAreaMeshVr_vs_VK compiled successfully.
16:11:27: Shader Ogre/VR/HiddenAreaMeshVr_ps_VK compiled successfully.
16:11:27:  _hlmsBlendblockCreated 
16:11:27: Parsing script JWDepthOfField.material
16:11:27: Shader JW/DoF_ps_vulkan compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsMacroblockCreated 
16:11:27: Parsing script PccDepthCompressor.material
16:11:27: Shader PccDepthCompressor_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsBlendblockCreated 
16:11:27: Parsing script RadialDensityMask.material
16:11:27: Shader Ogre/Compositor/RadialDensityMask_vs_VK compiled successfully.
16:11:27: Shader Ogre/VR/RadialDensityMask_ps_VK compiled successfully.
16:11:27: Parsing script SelectionHalo.material
16:11:27: Shader JW/SelHalo_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script Sky.material
16:11:27: Shader Ogre/Sky/Cubemap_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Shader Ogre/Sky/Equirectangular_ps_VK compiled successfully.
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script EsmGaussianBlurLogFilter.material.json
16:11:27:  _hlmsSamplerblockCreated 
16:11:27: Parsing script Mipmaps.material.json
16:11:27: Finished parsing scripts for resource group General
16:11:27: Creating resources for group General
16:11:27: All done
16:11:27: Parsing scripts for resource group Internal
16:11:27: Finished parsing scripts for resource group Internal
16:11:27: Creating resources for group Internal
16:11:27: All done
16:11:27: Parsing scripts for resource group Popular
16:11:27: Parsing script JWNodes.compositor
16:11:27: Finished parsing scripts for resource group Popular
16:11:27: Creating resources for group Popular
16:11:27: All done
16:11:27: Trying presentMode = FIFO_KHR
16:11:27: Chosen presentMode = FIFO_KHR
16:11:27: surfaceCaps.currentTransform = 1
16:11:44: Trying presentMode = FIFO_KHR
16:11:44: Chosen presentMode = FIFO_KHR
16:11:44: surfaceCaps.currentTransform = 1
16:11:44: Trying presentMode = FIFO_KHR
16:11:44: Chosen presentMode = FIFO_KHR
16:11:44: surfaceCaps.currentTransform = 1
16:11:45: Trying presentMode = FIFO_KHR
16:11:45: Chosen presentMode = FIFO_KHR
16:11:45: surfaceCaps.currentTransform = 1
16:11:45: Trying presentMode = FIFO_KHR
16:11:45: Chosen presentMode = FIFO_KHR
16:11:45: surfaceCaps.currentTransform = 1
16:11:45: Trying presentMode = FIFO_KHR
16:11:45: Chosen presentMode = FIFO_KHR
16:11:45: surfaceCaps.currentTransform = 1
16:11:45: Trying presentMode = FIFO_KHR
16:11:45: Chosen presentMode = FIFO_KHR
16:11:45: surfaceCaps.currentTransform = 1
16:11:45: Trying presentMode = FIFO_KHR
16:11:45: Chosen presentMode = FIFO_KHR
16:11:45: surfaceCaps.currentTransform = 1
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsBlendblockCreated 
16:11:46:  _hlmsSamplerblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46: Shader 100000000VertexShader_vs compiled successfully.
16:11:46: Shader 100000000PixelShader_ps compiled successfully.
16:11:46: Shader 300000000VertexShader_vs compiled successfully.
16:11:46: Shader 300000000PixelShader_ps compiled successfully.
16:11:46:  _hlmsMacroblockCreated 
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46:  _hlmsMacroblockCreated 
16:11:46: Shader 100000001VertexShader_vs compiled successfully.
16:11:46: Shader 100000001PixelShader_ps compiled successfully.
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46: Shader 100000002VertexShader_vs compiled successfully.
16:11:46: Shader 100000002PixelShader_ps compiled successfully.
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsBlendblockCreated 
16:11:46:  _hlmsSamplerblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsBlendblockCreated 
16:11:46:  _hlmsSamplerblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46:  _hlmsMacroblockCreated 
16:11:46: Shader 300000001VertexShader_vs compiled successfully.
16:11:46: Shader 300000001PixelShader_ps compiled successfully.
16:11:46:  _hlmsMacroblockCreated 
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46: Trying presentMode = FIFO_KHR
16:11:46: Chosen presentMode = FIFO_KHR
16:11:46: surfaceCaps.currentTransform = 1
16:11:46:  _hlmsMacroblockCreated 
16:11:47: Shader 100000003VertexShader_vs compiled successfully.
16:11:47: Shader 100000003PixelShader_ps compiled successfully.
16:11:47:  _hlmsMacroblockCreated 
16:11:47:  _hlmsBlendblockCreated 
16:11:47:  _hlmsSamplerblockCreated 
16:11:47:  _hlmsMacroblockCreated 
16:11:47:  _hlmsMacroblockCreated 
16:11:47:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsBlendblockCreated 
16:11:49:  _hlmsSamplerblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsBlendblockCreated 
16:11:49:  _hlmsSamplerblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsBlendblockCreated 
16:11:49:  _hlmsSamplerblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49: Trying presentMode = FIFO_KHR
16:11:49: Chosen presentMode = FIFO_KHR
16:11:49: surfaceCaps.currentTransform = 1
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsBlendblockCreated 
16:11:49:  _hlmsSamplerblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:49:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsBlendblockCreated 
16:11:50:  _hlmsSamplerblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsBlendblockCreated 
16:11:50:  _hlmsSamplerblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsBlendblockCreated 
16:11:50:  _hlmsSamplerblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:11:50:  _hlmsMacroblockCreated 
16:12:02: Shader 100000004VertexShader_vs compiled successfully.
16:12:02: Shader 100000004PixelShader_ps compiled successfully.
16:12:02: Shader 100000005VertexShader_vs compiled successfully.
16:12:02: Shader 100000005PixelShader_ps compiled successfully.
16:12:02:  _hlmsMacroblockCreated 
16:12:02:  _hlmsBlendblockCreated 
16:12:02:  _hlmsSamplerblockCreated 
16:12:02:  _hlmsMacroblockCreated 
16:12:02:  _hlmsMacroblockCreated 
16:12:02: Shader 300000002VertexShader_vs compiled successfully.
16:12:02:  _hlmsMacroblockCreated 
16:12:02: Shader 100000006VertexShader_vs compiled successfully.
16:12:02:  _hlmsMacroblockCreated 
16:12:02: Shader 100000007VertexShader_vs compiled successfully.
16:12:02: Shader 100000007PixelShader_ps compiled successfully.
16:12:02: Shader 100000008VertexShader_vs compiled successfully.
16:12:03: Shader 100000008PixelShader_ps compiled successfully.
16:12:03: Shader 100000009VertexShader_vs compiled successfully.
16:12:03: Shader 100000009PixelShader_ps compiled successfully.
16:12:03: Shader 100000010VertexShader_vs compiled successfully.
16:12:03: Shader 100000010PixelShader_ps compiled successfully.
16:12:03: Shader 300000003VertexShader_vs compiled successfully.
16:12:03: Shader 300000003PixelShader_ps compiled successfully.
16:12:03:  _hlmsMacroblockCreated 
16:12:03: Shader 100000011VertexShader_vs compiled successfully.
16:12:03: Shader 100000011PixelShader_ps compiled successfully.
16:12:03: OGRE EXCEPTION(1:InvalidStateException): Texture PlanarReflections #0 is not in ResourceLayout::Texture nor RenderTargetReadOnly. Did you forget to expose it to  compositor? Currently rendering to target: RenderWindow in VulkanRenderSystem::checkTextureLayout at D:\MoreCode\Ogre\ogre-next-fork\RenderSystems\Vulkan\src\OgreVulkanRenderSystem.cpp (line 1569)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5477
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1359

Re: Vulkan exception when using PlanarReflections

Post by dark_sylinc »

The specifics is that this code in HlmsPbs::analyzeBarriers didn't enter the if statement:

Code: Select all

if( mPlanarReflections && mPlanarReflections->cameraMatches( renderingCamera ) )
{
    const size_t maxActiveActors = mPlanarReflections->getMaxActiveActors();

        for( size_t i = 0u; i < maxActiveActors; ++i )
        {
            barrierSolver.resolveTransition(
                resourceTransitions, mPlanarReflections->getTexture( (uint8)i ),
                ResourceLayout::Texture, ResourceAccess::Read, 1u << PixelShader );
        }
}

The reasons can be:

  • mPlanarReflections->update() wasn't called. This can happen if you have multiple workspaces and at least one of them you didn't add the workspace listener

  • You modified the camera after mPlanarReflections->update(). The function cameraMatches relies on the camera settings remaining the same.

  • There is a bug in cameraMatches and it returned false when it should've returned true. The logic inside is a little brittle. I can't figure out better, more robust ways.

jwwalker
Goblin
Posts: 268
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 19

Re: Vulkan exception when using PlanarReflections

Post by jwwalker »

Thanks, that was very helpful. Turns out that I was forgetting to call HlmsPbs::setPlanarReflections, so I guess the surprising thing is that it ever worked in other render systems.

There is one thing I'd like to check, though. I have multiple instances of SceneManager, and since the PlanarReflections constructor takes a pointer to a SceneManager, I also have multiple instances of PlanarReflections. But there's only one instance of HlmsPbs, so it's a little uncomfortable for that to maintain a pointer to PlanarReflections. Is it OK to call setPlanarReflections each time the workspace listener workspacePreUpdate method runs?

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5477
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1359

Re: Vulkan exception when using PlanarReflections

Post by dark_sylinc »

jwwalker wrote: Sun Apr 23, 2023 4:00 am

Thanks, that was very helpful. Turns out that I was forgetting to call HlmsPbs::setPlanarReflections, so I guess the surprising thing is that it ever worked in other render systems.

Yep! That's the thing about our Vulkan RenderSystem: it's more annoying with its errors and requires more maintenance. But often it results in your code becoming more robust and stable.

jwwalker wrote: Sun Apr 23, 2023 4:00 am

But there's only one instance of HlmsPbs, so it's a little uncomfortable for that to maintain a pointer to PlanarReflections. Is it OK to call setPlanarReflections each time the workspace listener workspacePreUpdate method runs?

As far as I can tell that should be fine! (can't say I tried doing that). If you have problems with it post them in the forum.