Skip to contentSkip to conversation

New: r200 falls back to software when clearing FBOs

Bug 40554 [email protected] 1 participant 6 messages Sep 1, 2011 – Dec 5, 2012

lore
Share & tools
lore
#0 lore raw

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

Summary: r200 falls back to software when clearing FBOs
Product: Mesa
Version: git
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/r200
AssignedTo: [email protected]
ReportedBy: [email protected]

Created an attachment (id=50814)
--> (https://bugs.freedesktop.org/attachment.cgi?id=50814)
Sample application

glClear(GL_COLOR_BUFFER_BIT) causes a software fallback when a FBO is bound. The line in the debug output that signals this fallback is

r200Clear: swrast clear, mask: 100

0x100 is BUFFER_BIT_COLOR0 as far as I can see, which is indeed not handled in that function. I have attached a sample application that is a side product of attempting to reproduce bug 40552. The sample doesn't crash(yet), but it reproduces the software fallback.

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 40554] r200 falls back to software when clearing FBOs

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

--- Comment #1 from Roland Scheidegger <[email protected]> 2011-09-02 17:21:26 PDT --- Hmm I guess at least when using the kernel_mm path (which is just _mesa_meta_Clear) there shouldn't be any swrast fallback. Not quite sure though how well fbos will actually work...
The old kernel clear path is quite a mess anyway (though it has to be said fastzclear was fast...).

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 40554] r200 falls back to software when clearing FBOs

In reply to [email protected]

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

Stefan Dösinger <[email protected]> changed:

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

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Stefan Dösinger <[email protected]> --- This bug appears to have been fixed. I no longer get any software fallback debug output in my sample application, and the performance of Wine with FBOs is too high to suspect that there are any SW fallbacks.

Signature · 2 lines
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

#3 lore raw

[Bug 40554] r200 falls back to software when clearing FBOs

In reply to [email protected]

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

--- Comment #3 from Roland Scheidegger <[email protected]> --- FWIW the relevant commit fixing this bug was de694b6b10b7ce23a00cd7296a955f162704ee62.

Signature · 2 lines
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

#4 lore raw

[Bug 40554] r200 falls back to software when clearing FBOs

In reply to [email protected]

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

--- Comment #4 from Stefan Dösinger <[email protected]> --- Clearing by drawing geometry? Isn't that somewhat inefficient? Doesn't the hardware have a nicer way to deal with this?

It's now also applying ATI_fragment_shader shaders when clearing. I'll send a patch for that.

Signature · 2 lines
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

#5 lore raw

[Bug 40554] r200 falls back to software when clearing FBOs

In reply to [email protected]

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

--- Comment #5 from Roland Scheidegger <[email protected]> --- (In reply to comment #4)

Quoted 2 lines

Clearing by drawing geometry? Isn't that somewhat inefficient? Doesn't the hardware have a nicer way to deal with this?

There are two normal methods how you can do ordinary buffer clears on this hw.
1) With the 2d blitter.
2) With the 3d engine (by drawing a tri/quad).
In practice, both should most likely have the same performance, as it should be limited by memory bandwidth. I believe in theory the 2d blitter might be faster for this class of hardware, but IIRC you also get problems with 3d engine caches etc. Also, if you use 2d blit, you need to clear color and depth buffer separately.
For depth/stencil buffer, you could use fast z clears (in some cases - it is tricky, for instance can't clear depth and stencil individually and not with pixel granularity viewport), which just sets a bit per tile saying this block is cleared. All hyperz functionality (which fast z clear is) is however defunct since dri2 (dri1 had it working mostly, was never enabled by default).

Quoted 3 lines

It's now also applying ATI_fragment_shader shaders when clearing. I'll send a patch for that.

Hmm yes that sounds wrong.

Signature · 2 lines
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