Skip to contentSkip to conversation

New: Regression: 185ed2105829d6f5eb19edb9abbf0d7977e157c3 breaks swtcl on r300g

Bug 54832 [email protected] 1 participant 10 messages Sep 13, 2012 – Sep 22, 2012

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=54832

             Bug #: 54832
           Summary: Regression: 185ed2105829d6f5eb19edb9abbf0d7977e157c3
                    breaks swtcl on r300g
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r300
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]

Lightsmark stopped working on my r300 laptop with swtcl following this commit:

commit 185ed2105829d6f5eb19edb9abbf0d7977e157c3

Author: Brian Paul <[email protected]>
Date:   Fri May 25 09:44:53 2012 -0600

draw: simplify index buffer specification

Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with draw_set_indexes() which simply takes a pointer and an index size.

When I start Lightsmark, it crashes during the "loading..." screen after a few seconds, before the demo starts rendering the scene. Prior to the crash, the debug statement ("warning index out of range") @ draw_pt_vsplit_tmp.h:59 is printed several times, followed by the message:

draw_pipeline_run: max_index (7589) outside vertex buffer (300)

and then a segfault.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 54832] Regression: 185ed2105829d6f5eb19edb9abbf0d7977e157c3 breaks swtcl on r300g

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #1 from Tomasz P. <[email protected]> 2012-09-13 13:05:08 UTC --- Someone on the mailing list suspects that in r300 compiler is somekind of bug. He wrote:

In playing with Coccinelle, I discovered a signed/unsigned bug in radeon_rename_regs.c:rc_rename_regs.

unsigned new_index;
unsigned writemask;
struct rc_variable * var = var_ptr->Item;

if (var->Inst->U.I.DstReg.File != RC_FILE_TEMPORARY) {
        continue;
}

new_index = rc_find_free_temporary_list(c, used, used_length,

                                                RC_MASK_XYZW);
if (new_index < 0) {
        rc_error(c, "Ran out of temporary registers\n");
        return;
}

unsigned new_index is compared with < 0.

I don't know the code, but I can't imagine that you'd need an unsigned to represent a register index value.

Matt Turner

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 54832] Regression: 185ed2105829d6f5eb19edb9abbf0d7977e157c3 breaks swtcl on r300g

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #2 from Tom Stellard <[email protected]> 2012-09-13 13:26:16 UTC --- (In reply to comment #1)

Quoted 21 lines

Someone on the mailing list suspects that in r300 compiler is somekind of bug. He wrote:

In playing with Coccinelle, I discovered a signed/unsigned bug in radeon_rename_regs.c:rc_rename_regs.

unsigned new_index;
unsigned writemask;
struct rc_variable * var = var_ptr->Item;

if (var->Inst->U.I.DstReg.File != RC_FILE_TEMPORARY) {
        continue;
}

new_index = rc_find_free_temporary_list(c, used, used_length,

                                                RC_MASK_XYZW);
if (new_index < 0) {
        rc_error(c, "Ran out of temporary registers\n");
        return;
}
Quoted 6 lines

unsigned new_index is compared with < 0.

I don't know the code, but I can't imagine that you'd need an unsigned to represent a register index value.

Matt Turner

Please file a separate bug for this.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 54832] Regression: 185ed2105829d6f5eb19edb9abbf0d7977e157c3 breaks swtcl on r300g

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #3 from Tomasz P. <[email protected]> 2012-09-13 14:21:30 UTC --- done, bug: 54867

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

Tom Stellard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|Regression:                 |Piglit Regression: r300g
                   |185ed2105829d6f5eb19edb9abb |swtcl 185ed21 draw:
                   |f0d7977e157c3 breaks swtcl  |simplify index buffer
                   |on r300g                    |specification
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #4 from Tom Stellard <[email protected]> 2012-09-17 00:43:08 UTC --- This commit also regresses the following piglit tests:

Segfault:

primitive-restart-DISABLE_VBO
primitive-restart-VBO_COMBINED_VERTEX_AND_INDEX
primitive-restart-VBO_INDEX_ONLY
primitive-restart-VBO_SEPARATE_VERTEX_AND_INDEX
primitive-restart-VBO_VERTEX_ONLY

Fail:

draw-batch

Note: This can be reproduced on any r300g supported hardware by setting the environment variable: RADEON_NO_TCL=1

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #5 from Tom Stellard <[email protected]> 2012-09-17 00:46:53 UTC --- Created attachment 67261
--> https://bugs.freedesktop.org/attachment.cgi?id=67261
Backtrace from primitive-restart-DISABLE_VBO piglit test

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #6 from Marek Olšák <[email protected]> 2012-09-17 01:37:25 UTC --- This should fix this:

http://lists.freedesktop.org/archives/mesa-dev/2012-September/027435.html

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

--- Comment #7 from Tom Stellard <[email protected]> 2012-09-17 02:13:28 UTC --- (In reply to comment #6)

Quoted 3 lines

This should fix this:

http://lists.freedesktop.org/archives/mesa-dev/2012-September/027435.html

It does fix it, thanks!

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 54832] Piglit Regression: r300g swtcl 185ed21 draw: simplify index buffer specification

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=54832

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Marek Olšák <[email protected]> 2012-09-22 14:34:07 UTC --- I pushed the fix into master and 9.0. Closing.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel