Bug 108957 - VkRunner tests assert when run with nir test environment variables
Summary: VkRunner tests assert when run with nir test environment variables
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-05 20:49 UTC by Mark Janes
Modified: 2018-12-05 20:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Janes 2018-12-05 20:49:12 UTC
Mesa i965 CI runs tests in a mode designed to detect problems with our use of NIR.  The following environment variables are set:

NIR_TEST_CLONE=true NIR_TEST_SERIALIZE=true

With the addition of VkRunner tests to piglit, the following tests began to fail in this mode:

piglit.vulkan.glsl450.face-forward-double
piglit.vulkan.glsl450.frexp-double
piglit.vulkan.glsl450.isinf-double
piglit.vulkan.glsl450.reflect-double
piglit.vulkan.glsl450.refract-double
piglit.vulkan.shaders.fs-large-local-array
piglit.vulkan.shaders.fs-large-local-array-vec2
piglit.vulkan.shaders.fs-large-local-array-vec3
piglit.vulkan.shaders.fs-large-local-array-vec4
piglit.vulkan.shaders.fs-multiple-large-local-array

stderr:
/tmp/vkrunner-1E4K6k
vkrunner: ../src/intel/vulkan/anv_pipeline.c:193: anv_shader_compile_to_nir: Assertion `exec_list_length(&nir->functions) == 1' failed.
Comment 1 Jason Ekstrand 2018-12-05 20:59:54 UTC
This is entirely due to the way we handle hanging onto the entrypoint we get out of SPIR-V.  The spirv_to_nir pass returns a nir_function_impl instead of a nir_shader and we hang on to it while we do a couple of passes such as function inlining.  We then go to delete all but the main entrypoint assuming that the nir_function_impl pointer we're hanging on to is still valid.  If NIR_TEST_CLONE is set, it won't be valid because it will have been cloned out from under us.  This isn't an actual issue in production, but we should probably sort out what to do about it one of these days.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.