<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The Talos Principle crashes after loading screen (Haswell)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94831#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The Talos Principle crashes after loading screen (Haswell)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94831">bug 94831</a>
              from <span class="vcard"><a class="email" href="mailto:jajcus@jajcus.net" title="Jacek Konieczny <jajcus@jajcus.net>"> <span class="fn">Jacek Konieczny</span></a>
</span></b>
        <pre>At one point The Talos Principle creates a pipeline with vertex shader only:

t{0} vkCreateGraphicsPipelines(device = 0x4ad5650, pipelineCache = 0x4add9c0,
createInfoCount = 1, pCreateInfos = 0x7f01e39379c0, pAllocator = 0, pPipelines
= 0x7ffc39091e10) = VK_SUCCESS
   pCreateInfos[0] (0x7f01e39379c0)
    sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
    pNext = 0
    flags = 0
    stageCount = 1
    pStages = 0x7f01e3937790
    pVertexInputState = 0x7f01e39377f0
    pInputAssemblyState = 0x7f01e3937820
    pTessellationState = 0
    pViewportState = 0x7f01e3937840
    pRasterizationState = 0x7f01e3937870
    pMultisampleState = 0x7f01e39378b0
    pDepthStencilState = 0x7f01e3937938
    pColorBlendState = 0x7f01e3937900
    pDynamicState = 0x7f01e39379a0
    layout = 0x4b29810
    renderPass = 0x4cb3820
    subpass = 0
    basePipelineHandle = 0
    basePipelineIndex = 0
     pDynamicState (0x7f01e3937a20)
      sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      dynamicStateCount = 3
      pDynamicStates = 0x7f01e3937a50 (See individual array values below)
       pDynamicStates[0] = VK_DYNAMIC_STATE_VIEWPORT
       pDynamicStates[1] = VK_DYNAMIC_STATE_SCISSOR
       pDynamicStates[2] = VK_DYNAMIC_STATE_DEPTH_BIAS
     pColorBlendState (0x7f01e3937a18)
      sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      logicOpEnable = FALSE
      logicOp = VK_LOGIC_OP_NO_OP
      attachmentCount = 1
      pAttachments = 0x7f01e39378e0
      blendConstants = 0x7f01e3937928
       blendConstants[0] = 1
       blendConstants[1] = 1
       blendConstants[2] = 1
       blendConstants[3] = 1
       pAttachments[0] (0x7f01e39378e0)
        blendEnable = FALSE
        srcColorBlendFactor = VK_BLEND_FACTOR_ONE
        dstColorBlendFactor = VK_BLEND_FACTOR_ZERO
        colorBlendOp = VK_BLEND_OP_ADD
        srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE
        dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO
        alphaBlendOp = VK_BLEND_OP_ADD
        colorWriteMask = 0
     pDepthStencilState (0x7f01e3937a10)
      sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      depthTestEnable = TRUE
      depthWriteEnable = FALSE
      depthCompareOp = VK_COMPARE_OP_GREATER_OR_EQUAL
      depthBoundsTestEnable = FALSE
      stencilTestEnable = FALSE
      front = 0x7f01e3937960
      back = 0x7f01e393797c
      minDepthBounds = 0
      maxDepthBounds = 1
       back (0x7f01e393797c)
        failOp = VK_STENCIL_OP_KEEP
        passOp = VK_STENCIL_OP_KEEP
        depthFailOp = VK_STENCIL_OP_KEEP
        compareOp = VK_COMPARE_OP_NEVER
        compareMask = 0
        writeMask = 0
        reference = 0
       front (0x7f01e3937960)
        failOp = VK_STENCIL_OP_KEEP
        passOp = VK_STENCIL_OP_KEEP
        depthFailOp = VK_STENCIL_OP_KEEP
        compareOp = VK_COMPARE_OP_NEVER
        compareMask = 0
        writeMask = 0
        reference = 0
     pMultisampleState (0x7f01e3937a08)
      sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      rasterizationSamples = VK_SAMPLE_COUNT_1_BIT
      sampleShadingEnable = FALSE
      minSampleShading = 0
      pSampleMask = 0
      alphaToCoverageEnable = FALSE
      alphaToOneEnable = FALSE
     pRasterizationState (0x7f01e3937a00)
      sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      depthClampEnable = FALSE
      rasterizerDiscardEnable = FALSE
      polygonMode = VK_POLYGON_MODE_FILL
      cullMode = 2
      frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE
      depthBiasEnable = TRUE
      depthBiasConstantFactor = 0
      depthBiasClamp = 1
      depthBiasSlopeFactor = 0
      lineWidth = 1
     pViewportState (0x7f01e39379f8)
      sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      viewportCount = 1
      pViewports = 0
      scissorCount = 1
      pScissors = 0
     pInputAssemblyState (0x7f01e39379e8)
      sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
      primitiveRestartEnable = FALSE
     pVertexInputState (0x7f01e39379e0)
      sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
      pNext = 0
      flags = 0
      vertexBindingDescriptionCount = 1
      pVertexBindingDescriptions = 0x7f01e3937a74
      vertexAttributeDescriptionCount = 1
      pVertexAttributeDescriptions = 0x7f01e3937b34
       pVertexAttributeDescriptions[0] (0x7f01e3937b34)
        location = 0
        binding = 0
        format = VK_FORMAT_R32G32B32_SFLOAT
        offset = 0
       pVertexBindingDescriptions[0] (0x7f01e3937a74)
        binding = 0
        stride = 12
        inputRate = VK_VERTEX_INPUT_RATE_VERTEX
     pStages[0] (0x7f01e3937790)
      sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
      pNext = 0
      flags = 0
      stage = VK_SHADER_STAGE_VERTEX_BIT
      module = 0x4bec060
      pName = main
      pSpecializationInfo = 0

Then the driver crashes in 
cmd_buffer_flush_push_constants() trying to do something with a fragment shader
stage.

I was able to fix this with the attached patch. Unfortunately the game still
crashes, just a bit later, on a fragment shader compilation (in a pipeline
which has one):

#0  nir_deref_var_create (mem_ctx=mem_ctx@entry=0x71d73a8, var=0x0) at
nir/nir.c:580
#1  0x00007f01e1c821d6 in clone_deref_var (state=state@entry=0x7ffc3908f0c0,
ninstr=ninstr@entry=0x71d73a8, dvar=<optimized out>, dvar=<optimized out>)
    at nir/nir_clone.c:253
#2  0x00007f01e1c82817 in clone_tex (tex=0x713fb18, state=0x7ffc3908f0c0) at
nir/nir_clone.c:406
#3  clone_instr (instr=0x713fb18, state=0x7ffc3908f0c0) at nir/nir_clone.c:496
#4  clone_block (blk=0x71dce28, cf_list=0x71dcf10, state=0x7ffc3908f0c0) at
nir/nir_clone.c:535
#5  clone_cf_list (state=state@entry=0x7ffc3908f0c0, dst=dst@entry=0x71dcf10,
list=0x7175c90) at nir/nir_clone.c:582
#6  0x00007f01e1c82e17 in clone_function_impl
(state=state@entry=0x7ffc3908f0c0, fi=fi@entry=0x7175c68) at
nir/nir_clone.c:615
#7  0x00007f01e1c82f6d in nir_function_impl_clone (fi=0x7175c68) at
nir/nir_clone.c:648
#8  0x00007f01e1c8fbc2 in inline_functions_block (block=<optimized out>,
void_state=0x7ffc3908f1c0) at nir/nir_inline_functions.c:161
#9  0x00007f01e1c819b3 in nir_foreach_block (impl=0x7163268, cb=0x7f01e1c8fb40
<inline_functions_block>, state=0x7ffc3908f1c0) at nir/nir.c:1562
#10 0x00007f01e1c8fafa in inline_function_impl (impl=impl@entry=0x7163268,
inlined=inlined@entry=0x714a248) at nir/nir_inline_functions.c:240
#11 0x00007f01e1c9006b in inline_function_impl (inlined=0x714a248,
impl=0x7163268) at nir/nir_inline_functions.c:270
#12 nir_inline_functions (shader=shader@entry=0x71461f8) at
nir/nir_inline_functions.c:264
#13 0x00007f01e19392c0 in anv_shader_compile_to_nir (device=<optimized out>,
spec_info=0x7ffc3908f380, stage=MESA_SHADER_FRAGMENT, 
    entrypoint_name=0x71461f8 "\210\b\026\a", module=0x7ffc3908f450) at
anv_pipeline.c:148
#14 anv_pipeline_compile (pipeline=pipeline@entry=0x713b470,
module=module@entry=0x60ca6b0, entrypoint=<optimized out>,
entrypoint@entry=0x231668c "main", 
    stage=stage@entry=MESA_SHADER_FRAGMENT, spec_info=spec_info@entry=0x0,
prog_data=prog_data@entry=0x7ffc3908f450, map=0x7ffc3908f380) at
anv_pipeline.c:319
#15 0x00007f01e19395bd in anv_pipeline_compile_fs
(pipeline=pipeline@entry=0x713b470, cache=cache@entry=0x4add9c0,
info=info@entry=0x7f01e39379c0, 
    extra=extra@entry=0x0, module=module@entry=0x60ca6b0, entrypoint=0x231668c
"main", spec_info=0x0) at anv_pipeline.c:613
#16 0x00007f01e193a896 in anv_pipeline_init (pipeline=pipeline@entry=0x713b470,
device=device@entry=0x4ad5650, cache=cache@entry=0x4add9c0, 
    pCreateInfo=pCreateInfo@entry=0x7f01e39379c0, extra=extra@entry=0x0,
alloc=0x4ad5658, alloc@entry=0x0) at anv_pipeline.c:1188
#17 0x00007f01e1d55e96 in gen75_graphics_pipeline_create
(_device=_device@entry=0x4ad5650, cache=0x4add9c0, pCreateInfo=0x7f01e39379c0,
extra=0x0, 
    pAllocator=0x0, pPipeline=0x7ffc39091e10) at gen7_pipeline.c:202
#18 0x00007f01e193af13 in anv_graphics_pipeline_create
(_device=_device@entry=0x4ad5650, _cache=_cache@entry=0x4add9c0, 
    pCreateInfo=pCreateInfo@entry=0x7f01e39379c0, extra=extra@entry=0x0,
pAllocator=pAllocator@entry=0x0, pPipeline=pPipeline@entry=0x7ffc39091e10)
    at anv_pipeline.c:1277
#19 0x00007f01e193af9e in anv_CreateGraphicsPipelines (_device=0x4ad5650,
pipelineCache=0x4add9c0, count=1, pCreateInfos=<optimized out>, pAllocator=0x0, 
    pPipelines=0x7ffc39091e10) at anv_pipeline.c:1301</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>