Bug 29372 - [r300g] r300: Warning: cs_count off by 5 at (r300_emit_rs_state, r300_emit.c:629)
Summary: [r300g] r300: Warning: cs_count off by 5 at (r300_emit_rs_state, r300_emit.c:...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 01:37 UTC by Fabio Pedretti
Modified: 2010-08-03 06:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
possible fix (2.15 KB, patch)
2010-08-03 05:17 UTC, Marek Olšák
Details | Splinter Review
possible fix v2 (1.74 KB, patch)
2010-08-03 05:31 UTC, Marek Olšák
Details | Splinter Review

Description Fabio Pedretti 2010-08-03 01:37:30 UTC
Using the game 0ad pre-alpha3 7732 with RV530 on current git master:

1) start a game
2) clic on Menu -> Settings -> enable Developer Overlay -> OK
3) clic on Pathfinder overlay
4) Move some unit on the maps

Hundreds of message like the following appears:
r300: Warning: cs_count off by 5 at (r300_emit_rs_state, r300_emit.c:629)
Comment 1 Marek Olšák 2010-08-03 05:17:01 UTC
Created attachment 37538 [details] [review]
possible fix

Could you try this patch?
Comment 2 Fabio Pedretti 2010-08-03 05:22:31 UTC
(In reply to comment #1)
> Created an attachment (id=37538) [details]
> possible fix
> 
> Could you try this patch?

It instantly crash with it:

Program received signal SIGSEGV, Segmentation fault.
r300_bind_rs_state (pipe=0x84f7440, state=0x0) at r300_state.c:1110
1110	    r300->rs_state.size = 25 + (rs->polygon_offset_enable ? 5 : 0);
(gdb) bt
#0  r300_bind_rs_state (pipe=0x84f7440, state=0x0) at r300_state.c:1110
#1  0xaf49c09e in blitter_restore_CSOs (ctx=0x85098b0) at util/u_blitter.c:296
#2  0xaf49d5e1 in util_blitter_copy_region (blitter=0x85098b0, dst=0xae65d3f8, subdst=..., dstx=0, dsty=0, dstz=0, src=0xae65d5a0, 
    subsrc=..., srcx=0, srcy=0, srcz=0, width=64, height=64, ignore_stencil=1 '\001') at util/u_blitter.c:837
#3  0xaf30d562 in r300_hw_copy_region (pipe=0x84f7440, dst=0xae65d3f8, subdst=..., dstx=0, dsty=0, dstz=0, src=0xae65d5a0, subsrc=..., 
    srcx=0, srcy=0, srcz=0, width=64, height=64) at r300_blit.c:237
#4  r300_resource_copy_region (pipe=0x84f7440, dst=0xae65d3f8, subdst=..., dstx=0, dsty=0, dstz=0, src=0xae65d5a0, subsrc=..., srcx=0, 
    srcy=0, srcz=0, width=64, height=64) at r300_blit.c:292
#5  0xaf2f4c25 in r300_copy_into_tiled_texture (ctx=0x84f7440, trans=0xae651d88) at r300_transfer.c:78
#6  r300_texture_transfer_destroy (ctx=0x84f7440, trans=0xae651d88) at r300_transfer.c:223
#7  0xaf4c7c1a in u_transfer_destroy_vtbl (pipe=0x84f7440, transfer=0xae651d88) at util/u_resource.c:49
#8  0xaf411f56 in st_texture_image_unmap (st=0x858d828, stImage=0xae651c98) at state_tracker/st_texture.c:168
#9  0xaf4500ea in st_TexImage (ctx=<value optimized out>, dims=<value optimized out>, target=3553, level=0, internalFormat=32849, width=64, 
    height=64, depth=1, border=0, format=32992, type=5121, pixels=0xaeeab000, unpack=0x855e060, texObj=0xae651a78, texImage=0xae651c98, 
    imageSize=0, compressed_src=0 '\000') at state_tracker/st_cb_texture.c:765
#10 0xaf450afb in st_TexImage2D (ctx=0x854f248, target=3553, level=0, internalFormat=32849, width=64, height=64, border=0, format=32992, 
    type=5121, pixels=0xaeeab000, unpack=0x855e060, texObj=0xae651a78, texImage=0xae651c98) at state_tracker/st_cb_texture.c:798
#11 0xaf3aac54 in _mesa_TexImage2D (target=3553, level=0, internalFormat=32849, width=64, height=64, border=0, format=32992, type=5121, 
    pixels=0xaeeab000) at main/teximage.c:2409
Comment 3 Marek Olšák 2010-08-03 05:31:13 UTC
Created attachment 37539 [details] [review]
possible fix v2

Ah, of course it does. This fixed patch should work, can you test?
Comment 4 Fabio Pedretti 2010-08-03 05:40:55 UTC
(In reply to comment #3)
> Created an attachment (id=37539) [details]
> possible fix v2
> 
> Ah, of course it does. This fixed patch should work, can you test?

Yes, the warnings are no longer printed now.
Comment 5 Marek Olšák 2010-08-03 06:56:04 UTC
Pushed, closing..


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.