New issue
Advanced search Search tips

Issue 840470 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

//gpu/vulkan & vulkan_tests fail when DCHECKs are enabled

Project Member Reported by spang@chromium.org, May 7 2018

Issue description

A number of validation errors occur when using vulkan_tests on Linux with an nvidia GPU.

[ RUN      ] BasicVulkanTest.BasicVulkanSurface
[50775:50775:0507/140427.110912:1223958215214:ERROR:vulkan_implementation.cc(26)] Object: 0x3ddc3580b820 | vkCreateSwapChainKHR(): pCrea
teInfo->surface is not known at this time to be supported for presentation by this device. The vkGetPhysicalDeviceSurfaceSupportKHR() mu
st be called beforehand, and it must return VK_TRUE support with this surface for at least one queue family of this device. The spec val
id usage text states 'surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR
' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-01270)
[50775:50775:0507/140427.111047:1223958215344:ERROR:vulkan_swap_chain.cc(113)] vkCreateSwapchainKHR() failed: -1000011001
../../gpu/vulkan/tests/vulkan_test.cc:22: Failure
Value of: surface->Initialize(GetDeviceQueue(), VulkanSurface::DEFAULT_SURFACE_FORMAT)
  Actual: false                                 
Expected: true                               
Stack trace:                                           
#0 0x000000f94b40 StackTraceGetter::CurrentStackTrace()
#1 0x000000fbd227 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#2 0x000000fbc68d testing::internal::AssertHelper::operator=()
#3 0x00000067c626 gpu::BasicVulkanTest_BasicVulkanSurface_Test::TestBody()
#4 0x000000ff995e testing::internal::HandleSehExceptionsInMethodIfSupported<>()

[  FAILED  ] BasicVulkanTest.BasicVulkanSurface (256 ms)


After attempting to fix this by adding some queries during init, I get:

[ RUN      ] BasicVulkanTest.EmptyVulkanSwaps                                                                                           
[50548:50548:0507/140345.349779:1223916454084:ERROR:vulkan_surface.cc(130)]  surface_format_.format  44                                 
[50548:50548:0507/140345.349887:1223916454184:INFO:vulkan_surface.cc(141)] 2 queue families                                             
[50548:50548:0507/140345.413567:1223916517872:ERROR:vulkan_implementation.cc(26)] Object: 0x0 | vkQueueSubmit: required parameter pSubmits[0].pWaitDstStageMask specified as NULL. (null)                                                                                       
[50548:50548:0507/140345.413703:1223916517999:ERROR:vulkan_command_buffer.cc(105)] vkQueueSubmit() failed: -1000011001                  
../../gpu/vulkan/tests/vulkan_test.cc:34: Failure                                                                                       
Expected equality of these values:                                                                                                      
  gfx::SwapResult::SWAP_ACK                                                                                                             
    Which is: 4-byte object <00-00 00-00>                                                                                               
  surface->SwapBuffers()                                                                                                                
    Which is: 4-byte object <01-00 00-00>                                                                                               
Stack trace:                                                                                                                            
#0 0x000000f94b40 StackTraceGetter::CurrentStackTrace()                                                                                 
#1 0x000000fbd227 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()                                                       
#2 0x000000fbc68d testing::internal::AssertHelper::operator=()                                                                          
#3 0x00000067cd11 gpu::BasicVulkanTest_EmptyVulkanSwaps_Test::TestBody()
#4 0x000000ff995e testing::internal::HandleSehExceptionsInMethodIfSupported<>()                                       
                                                 

After attempting to fix this by setting pWaitDstStageMask to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, I get:

[ RUN      ] BasicVulkanTest.EmptyVulkanSwaps                                                         
[51744:51744:0507/140733.622125:1224144726430:ERROR:vulkan_surface.cc(130)]  surface_format_.format  44
[51744:51744:0507/140733.622238:1224144726535:INFO:vulkan_surface.cc(141)] 2 queue families
[51744:51744:0507/140733.713260:1224144817565:WARNING:vulkan_implementation.cc(39)] Object: 0xffffffffffffffff | vkQueuePresentKHR(): Ca
nnot read invalid swapchain image 0x13, please fill the memory before using.
../../gpu/vulkan/tests/vulkan_test.cc:34: Failure           
Expected equality of these values:                   
  gfx::SwapResult::SWAP_ACK                                   
    Which is: 4-byte object <00-00 00-00>   
  surface->SwapBuffers()                             
    Which is: 4-byte object <01-00 00-00>                
Stack trace:
#0 0x000000f94b40 StackTraceGetter::CurrentStackTrace()
#1 0x000000fbd227 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#2 0x000000fbc68d testing::internal::AssertHelper::operator=()                                         
#3 0x00000067cd11 gpu::BasicVulkanTest_EmptyVulkanSwaps_Test::TestBody()                   
#4 0x000000ff995e testing::internal::HandleSehExceptionsInMethodIfSupported<>()
                                             
[51744:51744:0507/140733.726474:1224144830771:ERROR:vulkan_implementation.cc(26)] Object: 0x18 | Fence 0x18 is in use. The spec valid usage text states 'Each element of pFences must not be currently associated with any queue command that has not yet completed execution on
 that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-pFences-01123)                      
[51744:51744:0507/140733.726533:1224144830829:ERROR:vulkan_command_buffer.cc(99)] vkResetFences() failed: -1000011001
../../gpu/vulkan/tests/vulkan_test.cc:38: Failure
Expected equality of these values:
  gfx::SwapResult::SWAP_ACK
    Which is: 4-byte object <00-00 00-00>
  surface->SwapBuffers()
    Which is: 4-byte object <01-00 00-00>
Stack trace:
#0 0x000000f94b40 StackTraceGetter::CurrentStackTrace()
#1 0x000000fbd227 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#2 0x000000fbc68d testing::internal::AssertHelper::operator=()
#3 0x00000067ce18 gpu::BasicVulkanTest_EmptyVulkanSwaps_Test::TestBody()
#4 0x000000ff995e testing::internal::HandleSehExceptionsInMethodIfSupported<>()



driver info:
ii  libvulkan-dev:amd64                 1.1.70+dfsg1-1         amd64                  Vulkan loader library -- development files
ii  libvulkan1:amd64                    1.1.70+dfsg1-1         amd64                  Vulkan loader library
ii  nvidia-driver                       384.111-3              amd64                  NVIDIA metapackage

VkPhysicalDeviceProperties:
===========================
        apiVersion     = 0x400031  (1.0.49)
        driverVersion  = 1612431360 (0x601bc000)
        vendorID       = 0x10de
        deviceID       = 0x0ffe
        deviceType     = DISCRETE_GPU
        deviceName     = Quadro K2000



 

Comment 1 by spang@chromium.org, May 7 2018

Cc: vmi...@chromium.org

Comment 2 by piman@chromium.org, May 7 2018

Cc: -dyen@chromium.org ericrk@chromium.org
Components: -Internals>GPU Internals>GPU>Internals
Owner: cblume@chromium.org
Chris, is this something you might want to look at after the loader work?
Yeah, this seems up my alley.
I'll add it to my queue.
Status: Assigned (was: Untriaged)

Comment 6 by spang@chromium.org, May 11 2018

Summary: //gpu/vulkan & vulkan_tests fail when DCHECKs are enabled (was: nvidia vulkan API usage errors in //gpu/vulkan & vulkan_tests)
Retitling since these errors are only generated when VK_LAYER_LUNARG_standard_validation is enabled. It is enabled whenever DCHECK is enabled.
Project Member

Comment 8 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/46641e60d7be573707e9d09347afe0a1f4a2ef14

commit 46641e60d7be573707e9d09347afe0a1f4a2ef14
Author: Michael Spang <spang@chromium.org>
Date: Mon May 14 20:26:05 2018

vulkan: Add conservative synchronization to submit

Add missing value for required parameter pWaitDstStageMask to
command buffer submission. This fixes a validation error:

[25936:25936:0510/163736.372562:1612536696:ERROR:vulkan_instance.cc(24)] Object: 0x0 | vkQueueSubmit: required parameter pSubmits[0].pWaitDstStageMask specified as NULL. (null)

Bug:  840470 
Test: Run vulkan_tests on linux with nvidia GPU

Change-Id: Ib7a70da78808872e60d6461cc2ff6495fc50115c
Reviewed-on: https://chromium-review.googlesource.com/1054497
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558441}
[modify] https://crrev.com/46641e60d7be573707e9d09347afe0a1f4a2ef14/gpu/vulkan/vulkan_command_buffer.cc

Project Member

Comment 9 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d6365357fd540a4a2c3563d1bd87312ad3f9a503

commit d6365357fd540a4a2c3563d1bd87312ad3f9a503
Author: Michael Spang <spang@chromium.org>
Date: Mon May 14 20:47:53 2018

vulkan: Fix incorrect index during VkImageView construction

All framebuffers refer to the same image because the attachment index is
used instead of the swap chain image index. Use the swap chain image
index instead.

Bug:  840470 
Test: ozone_demo on X11
Change-Id: Ie9132719be5ed2391042530a5fce4aba8ecbff15
Reviewed-on: https://chromium-review.googlesource.com/1054499
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558449}
[modify] https://crrev.com/d6365357fd540a4a2c3563d1bd87312ad3f9a503/gpu/vulkan/vulkan_render_pass.cc

Project Member

Comment 10 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0dc6825f3e6739c16c3d614d3b6ee41d2c523f17

commit 0dc6825f3e6739c16c3d614d3b6ee41d2c523f17
Author: Michael Spang <spang@chromium.org>
Date: Mon May 14 21:06:01 2018

vulkan: Check present support to surface during init

The validation layer requires a call to
vkGetPhysicalDeviceSurfaceSupportKHR() even if support was already
verified via vkGetPhysicalDeviceXlibPresentationSupportKHR().

Bug:  840470 
Test: Run vulkan_tests on linux with nvidia GPU

Change-Id: I4005e8ef9584a8d413a39882c374c7bc5ab5416b
Reviewed-on: https://chromium-review.googlesource.com/1053989
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558458}
[modify] https://crrev.com/0dc6825f3e6739c16c3d614d3b6ee41d2c523f17/gpu/vulkan/vulkan_surface.cc

Project Member

Comment 11 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25ec6708c15707a3be7b4104246cd478d3da4fac

commit 25ec6708c15707a3be7b4104246cd478d3da4fac
Author: Michael Spang <spang@chromium.org>
Date: Mon May 14 22:38:18 2018

vulkan: Initialize VulkanImageView format

This fixes a validation error in vulkan_tests:

[160937:160937:0511/145413.931833:81810095976:WARNING:vulkan_implementation.cc(39)] Object: 0x0 | vkCreateRenderPass: pCreateInfo->pAtta
chments[0].format is VK_FORMAT_UNDEFINED. The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.
org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentDescription-format-parameter)

Bug:  840470 
Test: vulkan_tests
Change-Id: I71e978d93077a3bddfe3e454ceab55929494e4c8
Reviewed-on: https://chromium-review.googlesource.com/1055786
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558498}
[modify] https://crrev.com/25ec6708c15707a3be7b4104246cd478d3da4fac/gpu/vulkan/vulkan_image_view.cc

Status: Fixed (was: Assigned)
With your patches and some other patches I've landed elsewhere, Chrome and vulkan_tests now build and these DCHECKs are no longer an issue.

Sign in to add a comment