gfx-rs / gfx-ocean

Compute based ocean simulation with gfx_hal :ocean:
116 stars 7 forks source link

Unable to run Vulkan backend on Linux (Wayland) #20

Closed ebkalderon closed 2 years ago

ebkalderon commented 4 years ago

Under the latest master branch at the time of writing, starting the gfx-ocean example with the Vulkan backend on my Linux machine results in the following error logs:

[2020-03-24T11:12:33Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-VkSwapchainCreateInfoKHR-presentMode-01281 (0)] : vkCreateSwapchainKHR() called with a non-supported presentMode (i.e. VK_PRESENT_MODE_IMMEDIATE_KHR). The Vulkan spec states: presentMode must be one of the VkPresentModeKHR values returned by vkGetPhysicalDeviceSurfacePresentModesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-01281)
    object info: (type: DEVICE, hndl: 94841620447552)

[2020-03-24T11:12:34Z ERROR gfx_backend_vulkan] 
    VALIDATION [UNASSIGNED-CoreValidation-Shader-InconsistentSpirv (0)] : SPIR-V module not valid: MemoryBarrier: Vulkan specification requires Memory Semantics to have one of the following bits set: Acquire, Release, AcquireRelease or SequentiallyConsistent
      OpMemoryBarrier %uint_1 %uint_256

    object info: (type: DEVICE, hndl: 94841620447552)

[2020-03-24T11:12:34Z ERROR gfx_backend_vulkan] 
    VALIDATION [UNASSIGNED-CoreValidation-Shader-InconsistentSpirv (0)] : SPIR-V module not valid: MemoryBarrier: Vulkan specification requires Memory Semantics to have one of the following bits set: Acquire, Release, AcquireRelease or SequentiallyConsistent
      OpMemoryBarrier %uint_1 %uint_256

    object info: (type: DEVICE, hndl: 94841620447552)

Then the application hangs forever with no display output. An entry appears in the GNOME Shell dock named "Unknown," but with no visible application window attached to it.

I think the last two error messages may be related to #9, but I believe the first message regarding the non-supported presentMode is the real reason why I'm not getting a display.

Please let me know if there's some way I could help debug directly on my machine or if you need more information!

Details

sudo lshw -C display ```text *-display description: VGA compatible controller product: HD Graphics 620 vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 02 width: 64 bits clock: 33MHz capabilities: pciexpress msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:131 memory:db000000-dbffffff memory:90000000-9fffffff ioport:f000(size=64) memory:c0000-dffff ```
vulkaninfo ```text ========== VULKANINFO ========== Vulkan Instance Version: 1.2.135 Instance Extensions: count = 18 =============================== VK_EXT_acquire_xlib_display : extension revision 1 VK_EXT_debug_report : extension revision 8 VK_EXT_debug_utils : extension revision 1 VK_EXT_direct_mode_display : extension revision 1 VK_EXT_display_surface_counter : extension revision 1 VK_KHR_device_group_creation : extension revision 1 VK_KHR_display : extension revision 23 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1 VK_KHR_external_semaphore_capabilities : extension revision 1 VK_KHR_get_display_properties2 : extension revision 1 VK_KHR_get_physical_device_properties2 : extension revision 1 VK_KHR_get_surface_capabilities2 : extension revision 1 VK_KHR_surface : extension revision 25 VK_KHR_surface_protected_capabilities : extension revision 1 VK_KHR_wayland_surface : extension revision 6 VK_KHR_xcb_surface : extension revision 6 VK_KHR_xlib_surface : extension revision 6 Layers: count = 13 ================== VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.2.133, layer version 1: Layer Extensions: count = 3 VK_EXT_debug_report : extension revision 9 VK_EXT_debug_utils : extension revision 1 VK_EXT_validation_features : extension revision 2 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 3 VK_EXT_debug_marker : extension revision 4 VK_EXT_tooling_info : extension revision 1 VK_EXT_validation_cache : extension revision 1 VK_LAYER_LUNARG_api_dump (LunarG API dump layer) Vulkan version 1.2.131, layer version 2: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_LUNARG_device_simulation (LunarG device simulation layer) Vulkan version 1.2.131, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_LUNARG_monitor (Execution Monitoring Layer) Vulkan version 1.2.131, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_LUNARG_screenshot (LunarG image capture layer) Vulkan version 1.2.131, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation) Vulkan version 1.2.133, layer version 1: Layer Extensions: count = 3 VK_EXT_debug_report : extension revision 9 VK_EXT_debug_utils : extension revision 1 VK_EXT_validation_features : extension revision 2 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 3 VK_EXT_debug_marker : extension revision 4 VK_EXT_tooling_info : extension revision 1 VK_EXT_validation_cache : extension revision 1 VK_LAYER_LUNARG_vktrace (Vktrace tracing library) Vulkan version 1.2.131, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_RENDERDOC_Capture (Debugging capture layer for RenderDoc) Vulkan version 1.2.131, layer version 7: Layer Extensions: count = 1 VK_EXT_debug_utils : extension revision 1 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 1 VK_EXT_debug_marker : extension revision 3 VK_LAYER_RENDERDOC_Capture (Debugging capture layer for RenderDoc) Vulkan version 1.0.0, layer version 34: Layer Extensions: count = 1 VK_EXT_debug_utils : extension revision 1 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 1 VK_EXT_debug_marker : extension revision 3 VK_LAYER_VALVE_steam_fossilize_32 (Steam Pipeline Caching Layer) Vulkan version 1.1.73, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_VALVE_steam_fossilize_64 (Steam Pipeline Caching Layer) Vulkan version 1.1.73, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_VALVE_steam_overlay_32 (Steam Overlay Layer) Vulkan version 1.1.73, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 VK_LAYER_VALVE_steam_overlay_64 (Steam Overlay Layer) Vulkan version 1.1.73, layer version 1: Layer Extensions: count = 0 Devices: count = 1 GPU id = 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)) Layer-Device Extensions: count = 0 Presentable Surfaces: ===================== GPU id : 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)): Surface types: count = 2 VK_KHR_xcb_surface VK_KHR_xlib_surface Formats: count = 2 SurfaceFormat[0]: format = FORMAT_B8G8R8A8_SRGB colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR SurfaceFormat[1]: format = FORMAT_B8G8R8A8_UNORM colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR Present Modes: count = 3 PRESENT_MODE_IMMEDIATE_KHR PRESENT_MODE_MAILBOX_KHR PRESENT_MODE_FIFO_KHR VkSurfaceCapabilitiesKHR: ------------------------- minImageCount = 3 maxImageCount = 0 currentExtent: width = 256 height = 256 minImageExtent: width = 256 height = 256 maxImageExtent: width = 256 height = 256 maxImageArrayLayers = 1 supportedTransforms: count = 1 SURFACE_TRANSFORM_IDENTITY_BIT_KHR currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR supportedCompositeAlpha: count = 2 COMPOSITE_ALPHA_OPAQUE_BIT_KHR COMPOSITE_ALPHA_INHERIT_BIT_KHR supportedUsageFlags: count = 5 IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_SAMPLED_BIT IMAGE_USAGE_STORAGE_BIT IMAGE_USAGE_COLOR_ATTACHMENT_BIT VkSurfaceCapabilities2EXT: -------------------------- supportedSurfaceCounters: count = 0 None VkSurfaceProtectedCapabilitiesKHR: ---------------------------------- supportsProtected = false GPU id : 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2)): Surface type = VK_KHR_wayland_surface Formats: count = 2 SurfaceFormat[0]: format = FORMAT_B8G8R8A8_SRGB colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR SurfaceFormat[1]: format = FORMAT_B8G8R8A8_UNORM colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR Present Modes: count = 2 PRESENT_MODE_MAILBOX_KHR PRESENT_MODE_FIFO_KHR VkSurfaceCapabilitiesKHR: ------------------------- minImageCount = 4 maxImageCount = 0 currentExtent: width = 4294967295 height = 4294967295 minImageExtent: width = 1 height = 1 maxImageExtent: width = 16384 height = 16384 maxImageArrayLayers = 1 supportedTransforms: count = 1 SURFACE_TRANSFORM_IDENTITY_BIT_KHR currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR supportedCompositeAlpha: count = 2 COMPOSITE_ALPHA_OPAQUE_BIT_KHR COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR supportedUsageFlags: count = 5 IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_SAMPLED_BIT IMAGE_USAGE_STORAGE_BIT IMAGE_USAGE_COLOR_ATTACHMENT_BIT VkSurfaceCapabilities2EXT: -------------------------- supportedSurfaceCounters: count = 0 None VkSurfaceProtectedCapabilitiesKHR: ---------------------------------- supportsProtected = false Device Groups: ============== Group 0: Properties: physicalDevices: count = 1 Intel(R) HD Graphics 620 (Kaby Lake GT2) (ID: 0) subsetAllocation = 0 Present Capabilities: Intel(R) HD Graphics 620 (Kaby Lake GT2) (ID: 0): Can present images from the following devices: count = 1 Intel(R) HD Graphics 620 (Kaby Lake GT2) (ID: 0) Present modes: count = 1 DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR Device Properties and Extensions: ================================= GPU0: VkPhysicalDeviceProperties: --------------------------- apiVersion = 4198502 (1.1.102) driverVersion = 79704068 (0x4c03004) vendorID = 0x8086 deviceID = 0x5916 deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU deviceName = Intel(R) HD Graphics 620 (Kaby Lake GT2) VkPhysicalDeviceLimits: ----------------------- maxImageDimension1D = 16384 maxImageDimension2D = 16384 maxImageDimension3D = 2048 maxImageDimensionCube = 16384 maxImageArrayLayers = 2048 maxTexelBufferElements = 134217728 maxUniformBufferRange = 134217728 maxStorageBufferRange = 1073741824 maxPushConstantsSize = 128 maxMemoryAllocationCount = 4294967295 maxSamplerAllocationCount = 65536 bufferImageGranularity = 0x00000040 sparseAddressSpaceSize = 0x00000000 maxBoundDescriptorSets = 8 maxPerStageDescriptorSamplers = 65535 maxPerStageDescriptorUniformBuffers = 64 maxPerStageDescriptorStorageBuffers = 65535 maxPerStageDescriptorSampledImages = 65535 maxPerStageDescriptorStorageImages = 65535 maxPerStageDescriptorInputAttachments = 64 maxPerStageResources = 4294967295 maxDescriptorSetSamplers = 393210 maxDescriptorSetUniformBuffers = 384 maxDescriptorSetUniformBuffersDynamic = 8 maxDescriptorSetStorageBuffers = 393210 maxDescriptorSetStorageBuffersDynamic = 8 maxDescriptorSetSampledImages = 393210 maxDescriptorSetStorageImages = 393210 maxDescriptorSetInputAttachments = 256 maxVertexInputAttributes = 28 maxVertexInputBindings = 28 maxVertexInputAttributeOffset = 2047 maxVertexInputBindingStride = 2048 maxVertexOutputComponents = 128 maxTessellationGenerationLevel = 64 maxTessellationPatchSize = 32 maxTessellationControlPerVertexInputComponents = 128 maxTessellationControlPerVertexOutputComponents = 128 maxTessellationControlPerPatchOutputComponents = 128 maxTessellationControlTotalOutputComponents = 2048 maxTessellationEvaluationInputComponents = 128 maxTessellationEvaluationOutputComponents = 128 maxGeometryShaderInvocations = 32 maxGeometryInputComponents = 64 maxGeometryOutputComponents = 128 maxGeometryOutputVertices = 256 maxGeometryTotalOutputComponents = 1024 maxFragmentInputComponents = 116 maxFragmentOutputAttachments = 8 maxFragmentDualSrcAttachments = 1 maxFragmentCombinedOutputResources = 8 maxComputeSharedMemorySize = 65536 maxComputeWorkGroupCount: count = 3 65535 65535 65535 maxComputeWorkGroupInvocations = 1792 maxComputeWorkGroupSize: count = 3 1792 1792 1792 subPixelPrecisionBits = 8 subTexelPrecisionBits = 8 mipmapPrecisionBits = 8 maxDrawIndexedIndexValue = 4294967295 maxDrawIndirectCount = 4294967295 maxSamplerLodBias = 16 maxSamplerAnisotropy = 16 maxViewports = 16 maxViewportDimensions: count = 2 16384 16384 viewportBoundsRange: count = 2 -32768 32767 viewportSubPixelBits = 13 minMemoryMapAlignment = 4096 minTexelBufferOffsetAlignment = 0x00000010 minUniformBufferOffsetAlignment = 0x00000020 minStorageBufferOffsetAlignment = 0x00000004 minTexelOffset = -8 maxTexelOffset = 7 minTexelGatherOffset = -32 maxTexelGatherOffset = 31 minInterpolationOffset = -0.5 maxInterpolationOffset = 0.4375 subPixelInterpolationOffsetBits = 4 maxFramebufferWidth = 16384 maxFramebufferHeight = 16384 maxFramebufferLayers = 2048 framebufferColorSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT framebufferDepthSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT framebufferStencilSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT framebufferNoAttachmentsSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT maxColorAttachments = 8 sampledImageColorSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT sampledImageIntegerSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT sampledImageDepthSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT sampledImageStencilSampleCounts: count = 5 SAMPLE_COUNT_1_BIT SAMPLE_COUNT_2_BIT SAMPLE_COUNT_4_BIT SAMPLE_COUNT_8_BIT SAMPLE_COUNT_16_BIT storageImageSampleCounts: count = 1 SAMPLE_COUNT_1_BIT maxSampleMaskWords = 1 timestampComputeAndGraphics = true timestampPeriod = 83.3333 maxClipDistances = 8 maxCullDistances = 8 maxCombinedClipAndCullDistances = 8 discreteQueuePriorities = 2 pointSizeRange: count = 2 0.125 255.875 lineWidthRange: count = 2 0 2047.99 pointSizeGranularity = 0.125 lineWidthGranularity = 0.0078125 strictLines = false standardSampleLocations = true optimalBufferCopyOffsetAlignment = 0x00000080 optimalBufferCopyRowPitchAlignment = 0x00000080 nonCoherentAtomSize = 0x00000040 VkPhysicalDeviceSparseProperties: --------------------------------- residencyStandard2DBlockShape = false residencyStandard2DMultisampleBlockShape = false residencyStandard3DBlockShape = false residencyAlignedMipSize = false residencyNonResidentStrict = false VkPhysicalDeviceDepthStencilResolvePropertiesKHR: ------------------------------------------------- supportedDepthResolveModes: count = 4 RESOLVE_MODE_SAMPLE_ZERO_BIT RESOLVE_MODE_AVERAGE_BIT RESOLVE_MODE_MIN_BIT RESOLVE_MODE_MAX_BIT supportedStencilResolveModes: count = 3 RESOLVE_MODE_SAMPLE_ZERO_BIT RESOLVE_MODE_MIN_BIT RESOLVE_MODE_MAX_BIT independentResolveNone = true independentResolve = true VkPhysicalDeviceDescriptorIndexingPropertiesEXT: ------------------------------------------------ maxUpdateAfterBindDescriptorsInAllPools = 524288 shaderUniformBufferArrayNonUniformIndexingNative = false shaderSampledImageArrayNonUniformIndexingNative = false shaderStorageBufferArrayNonUniformIndexingNative = true shaderStorageImageArrayNonUniformIndexingNative = false shaderInputAttachmentArrayNonUniformIndexingNative = false robustBufferAccessUpdateAfterBind = true quadDivergentImplicitLod = false maxPerStageDescriptorUpdateAfterBindSamplers = 524288 maxPerStageDescriptorUpdateAfterBindUniformBuffers = 64 maxPerStageDescriptorUpdateAfterBindStorageBuffers = 4294967295 maxPerStageDescriptorUpdateAfterBindSampledImages = 524288 maxPerStageDescriptorUpdateAfterBindStorageImages = 524288 maxPerStageDescriptorUpdateAfterBindInputAttachments = 64 maxPerStageUpdateAfterBindResources = 4294967295 maxDescriptorSetUpdateAfterBindSamplers = 524288 maxDescriptorSetUpdateAfterBindUniformBuffers = 384 maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 8 maxDescriptorSetUpdateAfterBindStorageBuffers = 4294967295 maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 8 maxDescriptorSetUpdateAfterBindSampledImages = 524288 maxDescriptorSetUpdateAfterBindStorageImages = 524288 maxDescriptorSetUpdateAfterBindInputAttachments = 256 VkPhysicalDeviceDriverPropertiesKHR: ------------------------------------ driverID = DRIVER_ID_INTEL_OPEN_SOURCE_MESA driverName = Intel open-source Mesa driver driverInfo = Mesa 19.3.4 conformanceVersion = 1.1.2.0 VkPhysicalDeviceExternalMemoryHostPropertiesEXT: ------------------------------------------------ minImportedHostPointerAlignment = 0x00001000 VkPhysicalDeviceFloatControlsPropertiesKHR: ------------------------------------------- denormBehaviorIndependence = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL roundingModeIndependence = SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE shaderSignedZeroInfNanPreserveFloat16 = true shaderSignedZeroInfNanPreserveFloat32 = true shaderSignedZeroInfNanPreserveFloat64 = true shaderDenormPreserveFloat16 = true shaderDenormPreserveFloat32 = true shaderDenormPreserveFloat64 = true shaderDenormFlushToZeroFloat16 = false shaderDenormFlushToZeroFloat32 = true shaderDenormFlushToZeroFloat64 = true shaderRoundingModeRTEFloat16 = true shaderRoundingModeRTEFloat32 = true shaderRoundingModeRTEFloat64 = true shaderRoundingModeRTZFloat16 = true shaderRoundingModeRTZFloat32 = true shaderRoundingModeRTZFloat64 = true VkPhysicalDeviceIDProperties: ----------------------------- deviceUUID = 6588f41d-5ce8-5159-bafd-03c69b748ef9 driverUUID = 91ec74f0-c8b5-e897-5a25-702a2d24baab deviceNodeMask = 0 deviceLUIDValid = false VkPhysicalDeviceInlineUniformBlockPropertiesEXT: ------------------------------------------------ maxInlineUniformBlockSize = 4096 maxPerStageDescriptorInlineUniformBlocks = 32 maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = 32 maxDescriptorSetInlineUniformBlocks = 32 maxDescriptorSetUpdateAfterBindInlineUniformBlocks = 32 VkPhysicalDeviceLineRasterizationPropertiesEXT: ----------------------------------------------- lineSubPixelPrecisionBits = 4 VkPhysicalDeviceMaintenance3Properties: --------------------------------------- maxPerSetDescriptors = 1024 maxMemoryAllocationSize = 0x80000000 VkPhysicalDeviceMultiviewProperties: ------------------------------------ maxMultiviewViewCount = 16 maxMultiviewInstanceIndex = 268435455 VkPhysicalDevicePCIBusInfoPropertiesEXT: ---------------------------------------- pciDomain = 0 pciBus = 0 pciDevice = 2 pciFunction = 0 VkPhysicalDevicePointClippingProperties: ---------------------------------------- pointClippingBehavior = POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY VkPhysicalDeviceProtectedMemoryProperties: ------------------------------------------ protectedNoFault = false VkPhysicalDevicePushDescriptorPropertiesKHR: -------------------------------------------- maxPushDescriptors = 32 VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT: ------------------------------------------------- filterMinmaxSingleComponentFormats = true filterMinmaxImageComponentMapping = true VkPhysicalDeviceSubgroupProperties: ----------------------------------- subgroupSize = 32 supportedStages: count = 8 SHADER_STAGE_VERTEX_BIT SHADER_STAGE_TESSELLATION_CONTROL_BIT SHADER_STAGE_TESSELLATION_EVALUATION_BIT SHADER_STAGE_GEOMETRY_BIT SHADER_STAGE_FRAGMENT_BIT SHADER_STAGE_COMPUTE_BIT SHADER_STAGE_ALL_GRAPHICS SHADER_STAGE_ALL supportedOperations: count = 8 SUBGROUP_FEATURE_BASIC_BIT SUBGROUP_FEATURE_VOTE_BIT SUBGROUP_FEATURE_ARITHMETIC_BIT SUBGROUP_FEATURE_BALLOT_BIT SUBGROUP_FEATURE_SHUFFLE_BIT SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT SUBGROUP_FEATURE_CLUSTERED_BIT SUBGROUP_FEATURE_QUAD_BIT quadOperationsInAllStages = true VkPhysicalDeviceSubgroupSizeControlPropertiesEXT: ------------------------------------------------- minSubgroupSize = 8 maxSubgroupSize = 32 maxComputeWorkgroupSubgroups = 56 requiredSubgroupSizeStages: count = 2 SHADER_STAGE_COMPUTE_BIT SHADER_STAGE_ALL VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT: -------------------------------------------------- storageTexelBufferOffsetAlignmentBytes = 0x00000010 storageTexelBufferOffsetSingleTexelAlignment = true uniformTexelBufferOffsetAlignmentBytes = 0x00000001 uniformTexelBufferOffsetSingleTexelAlignment = false VkPhysicalDeviceTransformFeedbackPropertiesEXT: ----------------------------------------------- maxTransformFeedbackStreams = 4 maxTransformFeedbackBuffers = 4 maxTransformFeedbackBufferSize = 0x100000000 maxTransformFeedbackStreamDataSize = 512 maxTransformFeedbackBufferDataSize = 512 maxTransformFeedbackBufferDataStride = 2048 transformFeedbackQueries = true transformFeedbackStreamsLinesTriangles = false transformFeedbackRasterizationStreamSelect = false transformFeedbackDraw = true VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT: ---------------------------------------------------- maxVertexAttribDivisor = 268435455 Device Extensions: count = 76 ----------------------------- VK_EXT_buffer_device_address : extension revision 1 VK_EXT_calibrated_timestamps : extension revision 1 VK_EXT_conditional_rendering : extension revision 1 VK_EXT_depth_clip_enable : extension revision 1 VK_EXT_descriptor_indexing : extension revision 2 VK_EXT_display_control : extension revision 1 VK_EXT_external_memory_dma_buf : extension revision 1 VK_EXT_external_memory_host : extension revision 1 VK_EXT_fragment_shader_interlock : extension revision 1 VK_EXT_global_priority : extension revision 1 VK_EXT_host_query_reset : extension revision 1 VK_EXT_index_type_uint8 : extension revision 1 VK_EXT_inline_uniform_block : extension revision 1 VK_EXT_line_rasterization : extension revision 1 VK_EXT_memory_budget : extension revision 1 VK_EXT_pci_bus_info : extension revision 2 VK_EXT_pipeline_creation_feedback : extension revision 1 VK_EXT_post_depth_coverage : extension revision 1 VK_EXT_sampler_filter_minmax : extension revision 1 VK_EXT_scalar_block_layout : extension revision 1 VK_EXT_separate_stencil_usage : extension revision 1 VK_EXT_shader_demote_to_helper_invocation : extension revision 1 VK_EXT_shader_stencil_export : extension revision 1 VK_EXT_shader_subgroup_ballot : extension revision 1 VK_EXT_shader_subgroup_vote : extension revision 1 VK_EXT_shader_viewport_index_layer : extension revision 1 VK_EXT_subgroup_size_control : extension revision 2 VK_EXT_texel_buffer_alignment : extension revision 1 VK_EXT_transform_feedback : extension revision 1 VK_EXT_vertex_attribute_divisor : extension revision 3 VK_EXT_ycbcr_image_arrays : extension revision 1 VK_GOOGLE_decorate_string : extension revision 1 VK_GOOGLE_hlsl_functionality1 : extension revision 1 VK_INTEL_performance_query : extension revision 1 VK_KHR_16bit_storage : extension revision 1 VK_KHR_8bit_storage : extension revision 1 VK_KHR_bind_memory2 : extension revision 1 VK_KHR_create_renderpass2 : extension revision 1 VK_KHR_dedicated_allocation : extension revision 1 VK_KHR_depth_stencil_resolve : extension revision 1 VK_KHR_descriptor_update_template : extension revision 1 VK_KHR_device_group : extension revision 1 VK_KHR_draw_indirect_count : extension revision 1 VK_KHR_driver_properties : extension revision 1 VK_KHR_external_fence : extension revision 1 VK_KHR_external_fence_fd : extension revision 1 VK_KHR_external_memory : extension revision 1 VK_KHR_external_memory_fd : extension revision 1 VK_KHR_external_semaphore : extension revision 1 VK_KHR_external_semaphore_fd : extension revision 1 VK_KHR_get_memory_requirements2 : extension revision 1 VK_KHR_image_format_list : extension revision 1 VK_KHR_imageless_framebuffer : extension revision 1 VK_KHR_incremental_present : extension revision 1 VK_KHR_maintenance1 : extension revision 1 VK_KHR_maintenance2 : extension revision 1 VK_KHR_maintenance3 : extension revision 1 VK_KHR_multiview : extension revision 1 VK_KHR_pipeline_executable_properties : extension revision 1 VK_KHR_push_descriptor : extension revision 1 VK_KHR_relaxed_block_layout : extension revision 1 VK_KHR_sampler_mirror_clamp_to_edge : extension revision 1 VK_KHR_sampler_ycbcr_conversion : extension revision 1 VK_KHR_shader_atomic_int64 : extension revision 1 VK_KHR_shader_clock : extension revision 1 VK_KHR_shader_draw_parameters : extension revision 1 VK_KHR_shader_float16_int8 : extension revision 1 VK_KHR_shader_float_controls : extension revision 1 VK_KHR_shader_subgroup_extended_types : extension revision 1 VK_KHR_spirv_1_4 : extension revision 1 VK_KHR_storage_buffer_storage_class : extension revision 1 VK_KHR_swapchain : extension revision 70 VK_KHR_uniform_buffer_standard_layout : extension revision 1 VK_KHR_variable_pointers : extension revision 1 VK_KHR_vulkan_memory_model : extension revision 3 VK_NV_compute_shader_derivatives : extension revision 1 VkQueueFamilyProperties: ======================== queueProperties[0]: ------------------- minImageTransferGranularity = (1,1,1) queueCount = 1 queueFlags = QUEUE_GRAPHICS | QUEUE_COMPUTE | QUEUE_TRANSFER timestampValidBits = 36 present support: VK_KHR_xcb_surface = true VK_KHR_xlib_surface = true VK_KHR_wayland_surface = true VkPhysicalDeviceMemoryProperties: ================================= memoryHeaps: count = 2 memoryHeaps[0]: size = 4974184448 (0x1287c0800) (4.63 GiB) budget = 4973395968 (0x128700000) (4.63 GiB) usage = 0 (0x00000000) (0.00 B) flags: count = 1 MEMORY_HEAP_DEVICE_LOCAL_BIT memoryHeaps[1]: size = 1073741824 (0x40000000) (1024.00 MiB) budget = 1073741824 (0x40000000) (1024.00 MiB) usage = 0 (0x00000000) (0.00 B) flags: count = 1 MEMORY_HEAP_DEVICE_LOCAL_BIT memoryTypes: count = 2 memoryTypes[0]: heapIndex = 0 propertyFlags = 0x000f: count = 4 MEMORY_PROPERTY_DEVICE_LOCAL_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_CACHED_BIT usable for: IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_X8_D24_UNORM_PACK32, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D24_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT IMAGE_TILING_LINEAR: color images memoryTypes[1]: heapIndex = 1 propertyFlags = 0x000f: count = 4 MEMORY_PROPERTY_DEVICE_LOCAL_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_CACHED_BIT usable for: IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_X8_D24_UNORM_PACK32, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D24_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT IMAGE_TILING_LINEAR: color images VkPhysicalDeviceFeatures: ========================= robustBufferAccess = true fullDrawIndexUint32 = true imageCubeArray = true independentBlend = true geometryShader = true tessellationShader = true sampleRateShading = true dualSrcBlend = true logicOp = true multiDrawIndirect = true drawIndirectFirstInstance = true depthClamp = true depthBiasClamp = true fillModeNonSolid = true depthBounds = false wideLines = true largePoints = true alphaToOne = true multiViewport = true samplerAnisotropy = true textureCompressionETC2 = true textureCompressionASTC_LDR = true textureCompressionBC = true occlusionQueryPrecise = true pipelineStatisticsQuery = true vertexPipelineStoresAndAtomics = true fragmentStoresAndAtomics = true shaderTessellationAndGeometryPointSize = true shaderImageGatherExtended = true shaderStorageImageExtendedFormats = true shaderStorageImageMultisample = false shaderStorageImageReadWithoutFormat = false shaderStorageImageWriteWithoutFormat = true shaderUniformBufferArrayDynamicIndexing = true shaderSampledImageArrayDynamicIndexing = true shaderStorageBufferArrayDynamicIndexing = true shaderStorageImageArrayDynamicIndexing = true shaderClipDistance = true shaderCullDistance = true shaderFloat64 = true shaderInt64 = true shaderInt16 = true shaderResourceResidency = false shaderResourceMinLod = true sparseBinding = false sparseResidencyBuffer = false sparseResidencyImage2D = false sparseResidencyImage3D = false sparseResidency2Samples = false sparseResidency4Samples = false sparseResidency8Samples = false sparseResidency16Samples = false sparseResidencyAliased = false variableMultisampleRate = true inheritedQueries = true VkPhysicalDevice16BitStorageFeatures: ------------------------------------- storageBuffer16BitAccess = true uniformAndStorageBuffer16BitAccess = true storagePushConstant16 = true storageInputOutput16 = false VkPhysicalDevice8BitStorageFeaturesKHR: --------------------------------------- storageBuffer8BitAccess = true uniformAndStorageBuffer8BitAccess = true storagePushConstant8 = true VkPhysicalDeviceBufferDeviceAddressFeaturesEXT: ----------------------------------------------- bufferDeviceAddress = true bufferDeviceAddressCaptureReplay = false bufferDeviceAddressMultiDevice = false VkPhysicalDeviceConditionalRenderingFeaturesEXT: ------------------------------------------------ conditionalRendering = true inheritedConditionalRendering = true VkPhysicalDeviceDepthClipEnableFeaturesEXT: ------------------------------------------- depthClipEnable = true VkPhysicalDeviceDescriptorIndexingFeaturesEXT: ---------------------------------------------- shaderInputAttachmentArrayDynamicIndexing = false shaderUniformTexelBufferArrayDynamicIndexing = true shaderStorageTexelBufferArrayDynamicIndexing = true shaderUniformBufferArrayNonUniformIndexing = false shaderSampledImageArrayNonUniformIndexing = true shaderStorageBufferArrayNonUniformIndexing = true shaderStorageImageArrayNonUniformIndexing = true shaderInputAttachmentArrayNonUniformIndexing = false shaderUniformTexelBufferArrayNonUniformIndexing = true shaderStorageTexelBufferArrayNonUniformIndexing = true descriptorBindingUniformBufferUpdateAfterBind = false descriptorBindingSampledImageUpdateAfterBind = true descriptorBindingStorageImageUpdateAfterBind = true descriptorBindingStorageBufferUpdateAfterBind = true descriptorBindingUniformTexelBufferUpdateAfterBind = true descriptorBindingStorageTexelBufferUpdateAfterBind = true descriptorBindingUpdateUnusedWhilePending = true descriptorBindingPartiallyBound = true descriptorBindingVariableDescriptorCount = false runtimeDescriptorArray = true VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT: --------------------------------------------------- fragmentShaderSampleInterlock = true fragmentShaderPixelInterlock = true fragmentShaderShadingRateInterlock = false VkPhysicalDeviceHostQueryResetFeaturesEXT: ------------------------------------------ hostQueryReset = true VkPhysicalDeviceImagelessFramebufferFeaturesKHR: ------------------------------------------------ imagelessFramebuffer = true VkPhysicalDeviceIndexTypeUint8FeaturesEXT: ------------------------------------------ indexTypeUint8 = true VkPhysicalDeviceInlineUniformBlockFeaturesEXT: ---------------------------------------------- inlineUniformBlock = true descriptorBindingInlineUniformBlockUpdateAfterBind = true VkPhysicalDeviceLineRasterizationFeaturesEXT: --------------------------------------------- rectangularLines = true bresenhamLines = true smoothLines = true stippledRectangularLines = false stippledBresenhamLines = true stippledSmoothLines = false VkPhysicalDeviceMultiviewFeatures: ---------------------------------- multiview = true multiviewGeometryShader = true multiviewTessellationShader = true VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR: -------------------------------------------------------- pipelineExecutableInfo = true VkPhysicalDeviceProtectedMemoryFeatures: ---------------------------------------- protectedMemory = false VkPhysicalDeviceSamplerYcbcrConversionFeatures: ----------------------------------------------- samplerYcbcrConversion = true VkPhysicalDeviceScalarBlockLayoutFeaturesEXT: --------------------------------------------- scalarBlockLayout = true VkPhysicalDeviceShaderAtomicInt64FeaturesKHR: --------------------------------------------- shaderBufferInt64Atomics = true shaderSharedInt64Atomics = false VkPhysicalDeviceShaderClockFeaturesKHR: --------------------------------------- shaderSubgroupClock = true shaderDeviceClock = false VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT: ---------------------------------------------------------- shaderDemoteToHelperInvocation = true VkPhysicalDeviceShaderDrawParametersFeatures: --------------------------------------------- shaderDrawParameters = true VkPhysicalDeviceFloat16Int8FeaturesKHR: --------------------------------------- shaderFloat16 = true shaderInt8 = true VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR: ------------------------------------------------------- shaderSubgroupExtendedTypes = true VkPhysicalDeviceSubgroupSizeControlFeaturesEXT: ----------------------------------------------- subgroupSizeControl = true computeFullSubgroups = true VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT: ------------------------------------------------ texelBufferAlignment = true VkPhysicalDeviceTransformFeedbackFeaturesEXT: --------------------------------------------- transformFeedback = true geometryStreams = true VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR: ------------------------------------------------------- uniformBufferStandardLayout = true VkPhysicalDeviceVariablePointersFeatures: ----------------------------------------- variablePointersStorageBuffer = true variablePointers = true VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT: -------------------------------------------------- vertexAttributeInstanceRateDivisor = true vertexAttributeInstanceRateZeroDivisor = true VkPhysicalDeviceVulkanMemoryModelFeaturesKHR: --------------------------------------------- vulkanMemoryModel = true vulkanMemoryModelDeviceScope = true vulkanMemoryModelAvailabilityVisibilityChains = true VkPhysicalDeviceYcbcrImageArraysFeaturesEXT: -------------------------------------------- ycbcrImageArrays = true ```
ebkalderon commented 4 years ago

I should also mention that I'm successfully able to run the hello-triangle and skybox examples from wgpu-rs under Vulkan, so presumably my Vulkan configuration is set up correctly.

ebkalderon commented 4 years ago

Hmm, commenting the swap_config.present_mode = hal::window::PresentMode::IMMEDIATE line from src/main.rs eliminates the first log message, but there's still no display.

kvark commented 4 years ago

Interesting, it doesn't like the barriers in the shaders for some reason. I tested on Linux/NV and it works fine.

ebkalderon commented 4 years ago

Does anyone have a machine with Intel graphics willing to reproduce this behavior? Is there anything I could do to help?

kvark commented 4 years ago

@ebkalderon you could look at the barriers used in the shader, find the corresponding spec about when these get available, and then make sure we at least expose these features/limits in the API.

msiglreith commented 4 years ago

FWIW these barrier warnings are due to a bug in the glslangValidator used in the version of glsl-to-spirv crate which is used for runtime compiling the shaders - we should move away from it

ebkalderon commented 4 years ago

Okay, I just figured something else out! I tried switching from a Wayland session to an X11 session, and gfx-ocean suddenly gives me a display. Both the versions in master and @msiglreith's cleanup branch seem to work in X11, but not in Wayland. Very strange, considering that the Wayland backend works just fine in wgpu-rs. :confused:

FYI, I'm now getting a bunch of different validation errors printed on every single frame, but this doesn't seem to affect the demo at all:

[2020-03-25T18:15:58Z ERROR gfx_backend_vulkan] 
    VALIDATION [VUID-vkDestroyFramebuffer-framebuffer-00892 (0)] : Cannot call vkDestroyFramebuffer on VkFramebuffer 0x7d000000007d[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
    object info: (type: DEVICE, hndl: 94773950754288)
<snip a zillion more of these, with an ever-increasing memory address>

I think these validation errors should go in a separate issue, though.

kvark commented 4 years ago

The validation layers are from https://github.com/gfx-rs/gfx/issues/3015#issuecomment-531491026

valpackett commented 4 years ago

Looks like a deadlock on a mutex inside winit when setting window title:

* thread #1, name = 'ocean', stop reason = signal SIGSTOP
  * frame #0: 0x0000000801f8cf3a libc.so.7`__sys_nanosleep at _nanosleep.S:4
    frame #1: 0x0000000802248b2a libthr.so.3`mutex_lock_common [inlined] mutex_self_lock(m=<unavailable>, abstime=0x0000000000000000) at thr_mutex.c:931:5
    frame #2: 0x0000000802248a6e libthr.so.3`mutex_lock_common [inlined] mutex_lock_sleep(curthread=0x0000000802612000, m=<unavailable>, abstime=0x0000000000000000) at thr_mutex.c:656
    frame #3: 0x00000008022488e7 libthr.so.3`mutex_lock_common(m=<unavailable>, abstime=<unavailable>, cvattach=false, rb_onlist=<unavailable>) at thr_mutex.c:734
    frame #4: 0x0000000802247799 libthr.so.3`__Tthr_mutex_lock(mutex=0x0000000802608d00) at thr_mutex.c:753:9
    frame #5: 0x0000000001a3baf0 ocean`std::sys::unix::mutex::Mutex::lock::hc262409cfcc6d008(self=0x0000000802608d00) at mutex.rs:63:17
    frame #6: 0x00000000019b6bb1 ocean`std::sys_common::mutex::Mutex::raw_lock::h79c7992a8f25720a(self=0x0000000802608d00) at mutex.rs:41:9
    frame #7: 0x00000000019f7016 ocean`std::sync::mutex::Mutex$LT$T$GT$::lock::h9d0614965890f194(self=0x000000080262c6f0) at mutex.rs:219:13
    frame #8: 0x0000000001a5da0e ocean`winit::platform_impl::platform::wayland::window::Window::set_title::h07d4480729f81402(self=0x00007fffffff4370, title=(data_ptr = "gfx-ocean :: 2.69 msx\x05", length = 20)) at window.rs:230:9
    frame #9: 0x000000000174d0c9 ocean`winit::platform_impl::platform::Window::set_title::hc995163f0d976008(self=0x00007fffffff4368, title=(data_ptr = "gfx-ocean :: 2.69 msx\x05", length = 20)) at mod.rs:238:40

Commenting out window.set_title(&format!("gfx-ocean :: {:.*} ms", 2, avg_cpu_time * 1000.0)) fixes the problem.

Since this works on other platforms, I guess it's a winit bug.

valpackett commented 4 years ago

okay, so it's fixed in winit master

okias commented 2 years ago

also work with master 2022-04-28, can be closed?