zink: the Saboteur apitrace and nsight capture crash inside zink using wined3d
System information
- OS: Debian sid
- GPU: 6900xt and 1060
- Kernel version: 5.18.5
- Mesa version: main
If applicable
- Wine/Proton version: wine-7.12 (Staging)
Describe the issue
The apitrace crashes on replay with wined3d upon entering the main menu, the nsight capture triggers the crash directly.
d3d9 apitrace: https://drive.google.com/file/d/1EUDneqhTe60--Sojf_RmH5UR-DQS4bkj/view?usp=sharing (stolen from https://github.com/doitsujin/dxvk/issues/1560)
d3d9 nsight: https://drive.google.com/file/d/1SGYAeLppvH72kJWmVQyZ2gnfPjArc4dV/view?usp=sharing
backtrace:
(gdb) bt
#0 0x00007f03c7270f34 in zink_draw<(zink_multidraw)1, (zink_dynamic_state)3, false, false> (pctx=0x7f0398008690, dinfo=0x7f03982e70e0, drawid_offset=0, dindirect=0x0, draws=0x22ee8f4, num_draws=1, vstate=0x0, partial_velem_mask=0)
at ../src/gallium/drivers/zink/zink_draw.cpp:743
#1 0x00007f03c7222b4d in zink_draw_vbo<(zink_multidraw)1, (zink_dynamic_state)3, false> (pctx=0x7f0398008690, info=0x7f03982e70e0, drawid_offset=0, indirect=0x0, draws=0x22ee8f4, num_draws=1) at ../src/gallium/drivers/zink/zink_draw.cpp:860
#2 0x00007f03c6ebee78 in tc_call_draw_single (pipe=0x7f0398008690, call=0x7f03982e70d8, last_ptr=0x7f03982e9778) at ../src/gallium/auxiliary/util/u_threaded_context.c:3151
#3 0x00007f03c6eb6f2e in tc_batch_execute (job=0x7f03982e6a60, gdata=0x0, thread_index=0) at ../src/gallium/auxiliary/util/u_threaded_context.c:211
#4 0x00007f03c6eb754b in _tc_sync (tc=0x7f03982d89d0, info=0x7f03c7a8c942 "texture", func=0x7f03c7a8cde8 "tc_texture_map") at ../src/gallium/auxiliary/util/u_threaded_context.c:362
#5 0x00007f03c6ebd0e7 in tc_texture_map (_pipe=0x7f03982d89d0, resource=0x7f039a545300, level=0, usage=10, box=0x22eea70, transfer=0x22eeb60) at ../src/gallium/auxiliary/util/u_threaded_context.c:2280
#6 0x00007f03c67f91c7 in pipe_texture_map_3d (context=0x7f03982d89d0, resource=0x7f039a545300, level=0, access=10, x=0, y=0, z=0, w=512, h=1024, d=1, transfer=0x22eeb60) at ../src/gallium/auxiliary/util/u_inlines.h:572
#7 0x00007f03c67f9b98 in st_texture_image_map (st=0x7f039835e8b0, stImage=0x7f039a516b40, usage=10, x=0, y=0, z=0, w=512, h=1024, d=1, transfer=0x22eeb60) at ../src/mesa/state_tracker/st_texture.c:280
#8 0x00007f03c67bb1ab in st_MapTextureImage (ctx=0x7f039830cba0, texImage=0x7f039a516b40, slice=0, x=0, y=0, w=512, h=1024, mode=6, mapOut=0x22eebf0, rowStrideOut=0x22eebfc) at ../src/mesa/state_tracker/st_cb_texture.c:493
#9 0x00007f03c676eb82 in _mesa_store_compressed_texsubimage (ctx=0x7f039830cba0, dims=2, texImage=0x7f039a516b40, xoffset=0, yoffset=0, zoffset=0, width=512, height=1024, depth=1, format=35917, imageSize=262144, data=0xaae6e90)
at ../src/mesa/main/texstore.c:1360
#10 0x00007f03c67bf2e5 in st_CompressedTexSubImage (ctx=0x7f039830cba0, dims=2, texImage=0x7f039a516b40, x=0, y=0, z=0, w=512, h=1024, d=1, format=35917, imageSize=262144, data=0xaae6e90) at ../src/mesa/state_tracker/st_cb_texture.c:2344
#11 0x00007f03c675e63d in compressed_texture_sub_image (ctx=0x7f039830cba0, dims=2, texObj=0x7f0398591f30, texImage=0x7f039a516b40, target=3553, level=0, xoffset=0, yoffset=0, zoffset=0, width=512, height=1024, depth=1, format=35917,
imageSize=262144, data=0xaae6e90) at ../src/mesa/main/teximage.c:5676
#12 0x00007f03c675eaeb in compressed_tex_sub_image (dim=2, target=3553, textureOrIndex=0, level=0, xoffset=0, yoffset=0, zoffset=0, width=512, height=1024, depth=1, format=35917, imageSize=262144, data=0xaae6e90,
mode=TEX_MODE_CURRENT_ERROR, caller=0x7f03c77a0cf2 "glCompressedTexSubImage2D") at ../src/mesa/main/teximage.c:5814
#13 0x00007f03c675ee51 in _mesa_CompressedTexSubImage2D (target=3553, level=0, xoffset=0, yoffset=0, width=512, height=1024, format=35917, imageSize=262144, data=0xaae6e90) at ../src/mesa/main/teximage.c:5924
#14 0x000000007a86ecb3 in glCompressedTexSubImage2D (target=3553, level=0, xoffset=0, yoffset=0, width=512, height=1024, format=35917, imageSize=262144, data=0xaae6e90) at dlls/opengl32/opengl_ext.c:1725
#15 0x0000000220049ced in wined3d_texture_gl_upload_bo (src_format=src_format@entry=0x281050, target=target@entry=3553, level=level@entry=0, src_row_pitch=src_row_pitch@entry=1024, src_slice_pitch=src_slice_pitch@entry=262144,
dst_x=dst_x@entry=0, dst_y=dst_y@entry=0, dst_z=dst_z@entry=0, update_w=update_w@entry=512, update_h=update_h@entry=1024, update_d=<optimized out>, update_d@entry=1,
addr=addr@entry=0xaae6e90 "\005ja ````S\265\343([[[[\316\203Kkn\354\310H\352ja\020U\252\252\377(J\202\030U", srgb=srgb@entry=0, dst_texture=dst_texture@entry=0x4db1310, gl_info=gl_info@entry=0x26f388) at dlls/wined3d/texture.c:2347
#16 0x0000000220054f5b in wined3d_texture_gl_upload_data (context=context@entry=0x2e2e60, src_bo_addr=src_bo_addr@entry=0x22ef470, src_format=src_format@entry=0x281050, src_box=src_box@entry=0x22ef480, src_row_pitch=1024,
src_slice_pitch=262144, dst_texture=dst_texture@entry=0x4db1310, dst_sub_resource_idx=dst_sub_resource_idx@entry=0, dst_location=dst_location@entry=16, dst_x=dst_x@entry=0, dst_y=dst_y@entry=0, dst_z=dst_z@entry=0)
at dlls/wined3d/texture.c:2657
#17 0x000000022005bc04 in wined3d_texture_gl_load_texture (srgb=<optimized out>, context_gl=0x2e2e60, sub_resource_idx=0, texture_gl=0x4db1310) at dlls/wined3d/wined3d_private.h:1747
#18 wined3d_texture_gl_load_location (texture=0x4db1310, sub_resource_idx=0, context=0x2e2e60, location=<optimized out>) at dlls/wined3d/texture.c:3522
#19 0x000000022004f483 in wined3d_texture_load_location (texture=texture@entry=0x4db1310, sub_resource_idx=sub_resource_idx@entry=0, context=context@entry=0x2e2e60, location=location@entry=16) at dlls/wined3d/texture.c:866
#20 0x000000022005704a in wined3d_texture_load (texture=0x4db1310, context=context@entry=0x2e2e60, srgb=<optimized out>) at dlls/wined3d/texture.c:1703
#21 0x000000021ffa91c8 in context_preload_texture (context=context@entry=0x2e2e60, state=state@entry=0x19c0058 <CachedShaders+2424>, idx=idx@entry=0) at dlls/wined3d/context.c:367
#22 0x000000021ffa9f69 in context_preload_textures (context=context@entry=0x2e2e60, state=state@entry=0x19c0058 <CachedShaders+2424>) at dlls/wined3d/context.c:389
#23 0x000000021ffb5975 in context_apply_draw_state (indexed=<optimized out>, state=<optimized out>, device=<optimized out>, context=0x2e2e60) at dlls/wined3d/context_gl.c:4222
#24 draw_primitive (device=<optimized out>, state=<optimized out>, parameters=<optimized out>) at dlls/wined3d/context_gl.c:5174
#25 0x000000021ffc8462 in wined3d_cs_execute_next (queue=0x19ec590 <lp_dummy_tile+8528>, cs=0x19c0040 <CachedShaders+2400>) at dlls/wined3d/cs.c:3341
#26 wined3d_cs_run (ctx=0x19c0040 <CachedShaders+2400>, ctx@entry=<error reading variable: value has been optimized out>) at dlls/wined3d/cs.c:3419
#27 0x000000007b628fb9 in BaseThreadInitThunk (unknown=<optimized out>, entry=<optimized out>, arg=<optimized out>) at dlls/kernel32/thread.c:61
#28 0x000000017005f3f3 in RtlUserThreadStart (entry=0x21ffc8340 <wined3d_cs_run>, arg=0x19c0040 <CachedShaders+2400>) at dlls/ntdll/thread.c:241
#29 0x0000000000000000 in ?? ()