[r300g] multiple tex-miplevel-selection tests crash with "u_blitter:494: Caught recursion. This is a driver bug."
Submitted by Pavel Ondračka
Assigned to Default DRI bug account
Description
Recently around 20 tex-miplevel-selection test regressed on my RV530.
Specifically this concerns the tex-miplevel-selection {1D,2D,2DRect}Shadow tests eg. tex-miplevel-selection *GradARB 1DShadow -auto -fbo tex-miplevel-selection *GradARB 2DRectShadow -auto -fbo tex-miplevel-selection GL2:texture() 2DRectShadow -auto -fbo and others.
It used to work approximately one month ago and I tried to bisect mesa, however I was unable to find a good commit, so the regression must have happened in some other component. My best guess at this moment is some piglit change. Those tests are the only crashing piglits on my RV530 at the moment.
Backtrace from one selected test: /bin/tex-miplevel-selection *GradARB 1DShadow -auto -fbo r300: DRM version: 2.40.0, Name: ATI RV530, ID: 0x71c5, GB: 1, Z: 2 r300: GART size: 509 MB, VRAM size: 256 MB r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: YES u_blitter:494: Caught recursion. This is a driver bug.
Program received signal SIGSEGV, Segmentation fault.
r300_emit_gpu_flush (r300=0x8090ca0, size=9, state=0x807e7d0)
at r300_emit.c:349
349 height = surf->cbzb_height;
(gdb) bt full
#0 r300_emit_gpu_flush (r300=0x8090ca0, size=9, state=0x807e7d0)
at r300_emit.c:349
gpuflush = 0x807e7d0
fb = 0x807e798
height = 1
width = 1
cs_copy = 0xb4b3b008
cs_winsys = 0x807e238
cs_count = 0
__func__ = "r300_emit_gpu_flush"
#1 0xb738cf2e in r300_emit_dirty_state (r300=0x8090ca0) at r300_emit.c:1450
atom = 0x8090e38
#2 0xb739017e in r300_emit_states (instance_id=-1, index_bias=0,
buffer_offset=0, index_buffer=0x0, flags=<optimized out>, r300=0x8090ca0)
at r300_render.c:259
indexed = 0 '\000'
validate_vbos = <optimized out>
emit_states = <optimized out>
emit_vertex_arrays = 0 '\000'
emit_vertex_arrays_swtcl = 0 '\000'
#3 r300_prepare_for_rendering (r300=r300@entry=0x8090ca0,
flags=<optimized out>, flags@entry=PREP_EMIT_STATES, index_buffer=0x0,
cs_dwords=21, buffer_offset=0, index_bias=0, instance_id=-1)
at r300_render.c:311
No locals.
#4 0xb7391775 in r300_blitter_draw_rectangle (blitter=0x8062750, x1=0, y1=0,
x2=1, y2=1, depth=0, type=UTIL_BLITTER_ATTRIB_COLOR,
attrib=0xb76437c0 <color>) at r300_render.c:1141
last_sprite_coord_enable = 0
width = 1
height = 1
vertex_size = <optimized out>
dwords = 21
zeros = {f = {0, 0, 0, 0}, i = {0, 0, 0, 0}, ui = {0, 0, 0, 0}}
cs_copy = 0xb4b3b008
cs_winsys = <optimized out>
cs_count = 0
__func__ = "r300_blitter_draw_rectangle"
#5 0xb72da0c4 in util_blitter_clear_custom (blitter=blitter@entry=0x8062750,
width=width@entry=1, height=1, num_layers=0, clear_buffers=0,
color=0xb76437c0 <color>, depth=0, stencil=0, custom_dsa=0x8064f20,
custom_blend=0x0) at util/u_blitter.c:1247
ctx = 0x8062750
pipe = 0x8090ca0
sr = {ref_value = "\000"}
#6 0xb72db349 in util_blitter_custom_clear_depth (blitter=0x8062750, width=1,
height=1, depth=0, custom_dsa=0x8064f20) at util/u_blitter.c:1273
color = {f = {0, 0, 0, 0}, i = {0, 0, 0, 0}, ui = {0, 0, 0, 0}}
#7 0xb73847c7 in r300_decompress_zmask (r300=0x8090ca0) at r300_blit.c:481
fb = 0x807e798
#8 0xb7384eb1 in r300_decompress_zmask_locked_unsafe (r300=0x8090ca0)
at r300_blit.c:500
fb = {width = 1, height = 1, nr_cbufs = 0, cbufs = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, zsbuf = 0x81ce978}
#9 0xb7384f00 in r300_decompress_zmask_locked (r300=0x8090ca0)
at r300_blit.c:509
saved_fb = {width = 900, height = 600, nr_cbufs = 1, cbufs = {
0x81cbde0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, zsbuf = 0x0}
#10 0xb739b128 in r300_decompress_depth_textures (r300=0x8090ca0)
at r300_state_derived.c:1033
state = 0x8096518
tex = <optimized out>
count = 2
i = <optimized out>
#11 r300_update_derived_state (r300=0x8090ca0) at r300_state_derived.c:1071
No locals.
#12 0xb7391751 in r300_blitter_draw_rectangle (blitter=0x8062750, x1=0, y1=0,
x2=960, y2=304, depth=0.600000024, type=UTIL_BLITTER_ATTRIB_COLOR,
attrib=0x815ee98) at r300_render.c:1136
last_sprite_coord_enable = 0
width = 960
height = 304
vertex_size = <optimized out>
dwords = 21
zeros = {f = {0, 0, 0, 0}, i = {0, 0, 0, 0}, ui = {0, 0, 0, 0}}
cs_copy = 0xb4b3b008
cs_winsys = <optimized out>
cs_count = 0
__func__ = "r300_blitter_draw_rectangle"
#13 0xb72da0c4 in util_blitter_clear_custom (blitter=0x8062750,
width=<optimized out>, height=304, num_layers=1, clear_buffers=4,
color=0x815ee98, depth=0.60000002384185791, stencil=0, custom_dsa=0x0,
custom_blend=0x0) at util/u_blitter.c:1247
ctx = 0x8062750
pipe = 0x8090ca0
sr = {ref_value = "\000"}
#14 0xb72db307 in util_blitter_clear (blitter=<optimized out>,
width=<optimized out>, height=<optimized out>, num_layers=<optimized out>,
clear_buffers=<optimized out>, color=<optimized out>,
depth=<optimized out>, stencil=0) at util/u_blitter.c:1263
No locals.
#15 0xb7383458 in r300_clear (pipe=0x8090ca0, buffers=4, color=0x815ee98,
depth=0.60000002384185791, stencil=0) at r300_blit.c:368
fb = <optimized out>
hyperz = 0x80819c0
width = 960
height = 304
hyperz_dcv = 2576980224
__func__ = "r300_clear"
#16 0xb71952fb in st_Clear (ctx=0x815dd38, mask=256)
at ../../src/mesa/state_tracker/st_cb_clear.c:532
depthRb = <optimized out>
stencilRb = <optimized out>
quad_buffers = <optimized out>
clear_buffers = <optimized out>
i = <optimized out>
#17 0xb7042fb2 in _mesa_Clear (mask=16384) at ../../src/mesa/main/clear.c:222
bufferMask = 256
ctx = <optimized out>
__func__ = "_mesa_Clear"
__PRETTY_FUNCTION__ = "_mesa_Clear"
#18 0x0804c879 in piglit_display ()
at /home/Paulie/piglit/tests/texturing/tex-miplevel-selection.c:1429
fetch_level = -1208610337
baselevel = -1073745544
maxlevel = 0
minlod = -1208152064
maxlod = 3
bias = 6
mipfilter = 1
expected_level = 134534584
x = 134533911
y = 33190
total = 0
failed = 1
start_bias = -5
end_bias = 5
end_min_lod = 5
end_max_lod = 5
end_mipfilter = 1
end_fetch_level = 5
#19 0xb7f611f8 in run_test (gl_fw=0x8051008, argc=3, argv=0xbffff2a4)
at /home/Paulie/piglit/tests/util/piglit-framework-gl/piglit_fbo_framework.c:52
result = PIGLIT_PASS
#20 0xb7f48e5a in piglit_gl_test_run (argc=3, argv=0xbffff2a4,
config=0xbffff1b8)
at /home/Paulie/piglit/tests/util/piglit-framework-gl.c:151
__PRETTY_FUNCTION__ = "piglit_gl_test_run"
#21 0x08049612 in main (argc=3, argv=0xbffff2a4)
at /home/Paulie/piglit/tests/texturing/tex-miplevel-selection.c:67
config = {supports_gl_es_version = 0, supports_gl_core_version = 0,
supports_gl_compat_version = 10,
require_forward_compatible_context = false,
require_debug_context = false, window_width = 900,
window_height = 600, window_samples = 0, window_visual = 5,
requires_displayed_window = false, init = 0x8049667 <piglit_init>,
display = 0x804c780 <piglit_display>, subtests = 0x0,
selected_subtests = 0x0, num_selected_subtests = 0}
__PRETTY_FUNCTION__ = "main"
GPU:RV530 Kernel: 3.17.8-300.fc21.i686 Mesa: 5b01512d Libdrm: eca91cf1 piglit: 25ac42db
Version: git