<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - vkUpdateDescriptorSets causes SIGSEGV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99796#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - vkUpdateDescriptorSets causes SIGSEGV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99796">bug 99796</a>
              from <span class="vcard"><a class="email" href="mailto:miwait00@web.de" title="MW <miwait00@web.de>"> <span class="fn">MW</span></a>
</span></b>
        <pre>I got a (In reply to Jason Ekstrand from <a href="show_bug.cgi?id=99796#c6">comment #6</a>)
<span class="quote">> (In reply to MW from <a href="show_bug.cgi?id=99796#c5">comment #5</a>)
> > Turns out, I actually screwed up with the validation layers and close to
> > nothing was logged, so the errors is:
> > 
> > ERROR: [139684814067950] Code 937 : vkUpdateDescriptorsSets() failed write
> > update validation for Descriptor Set 0x38 with error: Attempting write
> > update to descriptor set 0x38 binding #0 with type
> > VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER but update type is
> > VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER. For more information refer to Vulkan Spec
> > Section '13.2.4. Descriptor Set Updates' which states 'descriptorType must
> > match the type of dstBinding within dstSet'
> > (<a href="https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec">https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec</a>.
> > html#VkWriteDescriptorSet)

> That sounds very much like the kind of thing that would cause a segfault on
> our driver.

> > Which is quite bizarre since it works on nvidia - but I'll look into it.

> They implement descriptor sets differently.</span >

Since you are there, I got a "new" issue. Seems to be a shader compiler
failure?
"Fehler beim lesen der Variable": "Error while reading the variable"

Thread 2 "java" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fa2472b3700 (LWP 23119)]
0x00007fa21d4a2b31 in brw::vec4_visitor::nir_emit_intrinsic (this=<optimized
out>, instr=<optimized out>)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:462
462     ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp: Datei
oder Verzeichnis nicht gefunden.
(gdb) backtrace
#0  0x00007fa21d4a2b31 in brw::vec4_visitor::nir_emit_intrinsic
(this=<optimized out>, instr=<optimized out>)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:462
#1  0x00007fa21d499be8 in brw::vec4_visitor::nir_emit_block (this=<optimized
out>, block=<optimized out>)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:215
#2  0x00007fa21d499b76 in brw::vec4_visitor::nir_emit_cf_list (this=<optimized
out>, list=<optimized out>)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:170
#3  0x00007fa21d499af8 in brw::vec4_visitor::nir_emit_impl (this=<optimized
out>, impl=<optimized out>)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:152
#4  0x00007fa21d499586 in brw::vec4_visitor::emit_nir_code (this=<optimized
out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:47
#5  0x00007fa21d489930 in brw::vec4_visitor::run (this=<optimized out>) at
../../../../../../../src/mesa/drivers/dri/i965/brw_vec4.cpp:2552
#6  0x00007fa21d489ba0 in brw_compile_vs (compiler=<optimized out>,
log_data=<optimized out>, mem_ctx=<optimized out>, key=<optimized out>, 
    prog_data=<optimized out>, src_shader=<optimized out>, 
    clip_planes=<Fehler beim Lesen der Variable: Could not find the frame base
for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*,
brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*,
char**)".>, 
    use_legacy_snorm_formula=<Fehler beim Lesen der Variable: Could not find
the frame base for "brw_compile_vs(brw_compiler const*, void*, void*,
brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*,
bool, int, unsigned int*, char**)".>, 
    shader_time_index=<Fehler beim Lesen der Variable: Could not find the frame
base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key
const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int,
unsigned int*, char**)".>, 
    final_assembly_size=<Fehler beim Lesen der Variable: Could not find the
frame base for "brw_compile_vs(brw_compiler const*, void*, void*,
brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*,
bool, int, unsigned int*, char**)".>, 
    error_str=<Fehler beim Lesen der Variable: Could not find the frame base
for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*,
brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*,
char**)".>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4.cpp:2835
#7  0x00007fa21d3e392e in anv_pipeline_compile_vs (pipeline=0x7fa21f364000,
cache=0x7fa21f23f040, module=<optimized out>, entrypoint=<optimized out>, 
    spec_info=<optimized out>, info=<optimized out>) at
../../../../../src/intel/vulkan/anv_pipeline.c:484
#8  0x00007fa21d3e4b0a in anv_pipeline_init (pipeline=0x7fa21f364000,
device=0x7fa21f3f9000, cache=<optimized out>, pCreateInfo=0x7fa240799b48, 
    alloc=0x7fa21f3f9008) at
../../../../../src/intel/vulkan/anv_pipeline.c:1216
#9  0x00007fa21d579c5b in gen7_CreateGraphicsPipelines (_device=0x7fa21f3f9000,
pipelineCache=0x7fa21f23f040, count=1, pCreateInfos=<optimized out>, 
    pAllocator=0x0, pPipelines=0x7fa240362ce0) at
../../../../../src/intel/vulkan/genX_pipeline.c:1465
#10 0x00007fa209b95e0a in unique_objects::CreateGraphicsPipelines(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**) () from
/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_unique_objects.so
#11 0x00007fa208f85e9c in core_validation::CreateGraphicsPipelines(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**) () from
/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_core_validation.so
#12 0x00007fa208864a29 in object_tracker::CreateGraphicsPipelines(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**) () from
/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_object_tracker.so
#13 0x00007fa2085006ed in
parameter_validation::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*,
unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks
const*, VkPipeline_T**) () from
/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_parameter_validation.so
#14 0x00007fa208202c0e in threading::CreateGraphicsPipelines(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**) () from
/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_threading.so


Since it states "brw_compile_vs", the vertex shader looks like that:

#version 450
#extension GL_ARB_separate_shader_objects : enable

layout(binding = 1) uniform UniformBufferObject {
    float surfaceWidth;
    float surfaceHeight;
//    float scale;
} ubo;

layout(push_constant) uniform PushConstants {
    int flagsPos;
    int flagsPass;
    float postOffsetX;
    float postOffsetY;
    mat4 modelView;
    vec4 color;
} push;

layout(location = 0)    in vec3     in_Position;
layout(location = 1)    in vec2     in_TextureCrd;

layout(location = 0   ) out vec2    pass_TextureCrd;
layout(location = 1000) out vec4    pass_Color;

const int FLAG_POS_ABS          = 0x1;
const int FLAG_PASS_TXT         = 0x1;
const int FLAG_PASS_CLR         = 0x2;
const int FLAG_PASS_PUSH_CLR    = 0x4;

void main(void) {
    vec4 pos = push.modelView * vec4(in_Position, 1.0f);

    gl_Position.z = pos.z;

    // [0;width] to [-1;1] and [0;height] to [-1;1]
    if ((push.flagsPos & FLAG_POS_ABS) != 0) {
        gl_Position.x = pos.x / (.5f * ubo.surfaceWidth ) + push.postOffsetX;
            gl_Position.y = pos.y / (.5f * ubo.surfaceHeight) +
push.postOffsetY;

    } else {
        gl_Position.x = pos.x + push.postOffsetX;
            gl_Position.y = pos.y + push.postOffsetY;
    }



    // parameters to pass along
    pass_TextureCrd = in_TextureCrd;
    pass_Color      = push.color;
}

I am about to test it with a simpler shader, but desktop ~ laptop sync is
slow atm :/</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>