turnip,lvp: Crash in ycbcr lowering in GFXBench Aztec Ruins Vulkan tests
E.g. for Turnip + VN the crash looks like:
Crash reason: SIGSEGV /0x00000000
Crash address: 0x18
Process uptime: not available
Thread 0 (crashed)
0 libvulkan_freedreno.so!tu_shader_create [tu_shader.c : 477 + 0x0]
r0 = 0x00000004 r1 = 0x00000000 r2 = 0x00000005 r3 = 0xe9b09160
r4 = 0x00000001 r5 = 0xe9d89548 r6 = 0x00000000 r7 = 0x0000000b
r8 = 0xe9b0832c r9 = 0xe9f11c18 r10 = 0x00000000 r12 = 0x00000001
fp = 0xec8fe84c sp = 0xec8fe7b0 lr = 0x00000002 pc = 0xed5e8926
Found by: given as instruction pointer in context
1 libvulkan_freedreno.so!tu_CreateGraphicsPipelines [tu_pipeline.c : 2429 + 0x9]
r4 = 0x00000000 r5 = 0x00000003 r6 = 0x00000004 r7 = 0xe9e16988
r8 = 0x00000000 r9 = 0x00000000 r10 = 0xec8feabc fp = 0xeabacb18
sp = 0xec8fea40 pc = 0xed5e222f
Found by: call frame info
2 libvirglrenderer.so.1!vkr_dispatch_vkCreateGraphicsPipelines [vkr_pipeline_gen.h : 278 + 0xb]
r4 = 0x00000000 r5 = 0x00000000 r6 = 0xeabb35f8 r7 = 0x00000000
r8 = 0x00000000 r9 = 0xec8fec80 r10 = 0x04c28f20 fp = 0xebf04700
sp = 0xec8fec30 pc = 0xedbbeebd
Found by: call frame info
3 libvirglrenderer.so.1!vn_dispatch_vkCreateGraphicsPipelines [vn_protocol_renderer_pipeline.h : 1488 + 0x5]
r4 = 0xb4000078 r5 = 0x00000000 r6 = 0xec8fec80 r7 = 0x690441d0
r8 = 0xedc9d2d8 r9 = 0x00000000 r10 = 0x04c28ff8 fp = 0x00000000
sp = 0xec8fec80 pc = 0xedb946f7
Found by: call frame info
4 libvirglrenderer.so.1!vkr_context_submit_cmd [vn_protocol_renderer_dispatches.h : 451 + 0x5]
r4 = 0x00000041 r5 = 0x00000000 r6 = 0x04c28ff8 r7 = 0x00000000
r8 = 0x04c28f60 r9 = 0xedc25288 r10 = 0x04c28fb8 fp = 0xedc10f08
sp = 0xec8fece0 pc = 0xedb88b53
Found by: call frame info
5 libvirglrenderer.so.1!vkr_ring_thread [vkr_ring.c : 325 + 0x1]
r4 = 0x04c29598 r5 = 0x000012cc r6 = 0x00000000 r7 = 0x04c2d758
r8 = 0x04c29604 r9 = 0x000012cc r10 = 0x0000ae0c fp = 0x04c29580
sp = 0xec8fed08 pc = 0xedbc19b1
Found by: call frame info
6 libpthread.so.0 + 0x53ad
r4 = 0x00000000 r5 = 0xec8ff5f8 r6 = 0xffea48f6 r7 = 0xec8fed70
r8 = 0xec8ff3e0 r9 = 0xedc95010 r10 = 0x00000000 fp = 0xec8feea0
sp = 0xec8fed70 pc = 0xedac03af
Found by: call frame info
static void
lower_tex_ycbcr(const struct tu_pipeline_layout *layout,
nir_builder *builder,
nir_tex_instr *tex)
{
int deref_src_idx = nir_tex_instr_src_index(tex, nir_tex_src_texture_deref);
assert(deref_src_idx >= 0);
nir_deref_instr *deref = nir_src_as_deref(tex->src[deref_src_idx].src);
nir_variable *var = nir_deref_instr_get_variable(deref);
const struct tu_descriptor_set_layout *set_layout =
layout->set[var->data.descriptor_set].layout; <============= CRASH IS HERE
const struct tu_descriptor_set_binding_layout *binding =
&set_layout->binding[var->data.binding];
const struct tu_sampler_ycbcr_conversion *ycbcr_samplers =
tu_immutable_ycbcr_samplers(set_layout, binding);
if (!ycbcr_samplers)
return;
Edited by Samuel Pitoiset