Skip to contentSkip to conversation

Drawing at screen boundary is very slow.

Bug 106053 [email protected] 1 participant 6 messages Apr 15, 2018 – Apr 17, 2018

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 106053
Summary: Drawing at screen boundary is very slow.
Product: Mesa
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]

Created attachment 138844
--> https://bugs.freedesktop.org/attachment.cgi?id=138844&action=edit
bitmap for testing

When a partially visible sprites are drawn to the screen, fps drops really badly.

code tested:
https://gist.github.com/vfjpl/bd442e34036547e4ccb05200762fa274

fully visible = 73.8 fps
fully invisible = 394 fps
partially visible = 5.75 fps

The same situation is happening on Allegro library. I don't know enough OpenGL to test it directly.

I can provide more test results. Just ask me to do it.

Extended renderer info (GLX_MESA_query_renderer):
Vendor: X.Org R300 Project (0x1002)
Device: ATI RC410 (0x5a62)
Version: 17.3.7
Accelerated: yes
Video memory: 128MB
Unified memory: no
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 2.0

And small question. Why Max core profile shows 0.0? Should I open another bug-report?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

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

--- Comment #1 from Hi-Angel <[email protected]> --- Can't comment on the rest, but

Quoted 1 line

And small question. Why Max core profile shows 0.0? Should I open another bug-report?

This is because the OpenGL version r300g supports didn't have the separation to core/compat profile. See also this comment
https://bugs.freedesktop.org/show_bug.cgi?id=103506#c8

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

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

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

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

         Resolution|---                         |NOTABUG
             Status|NEW                         |RESOLVED

--- Comment #2 from Marek Olšák <[email protected]> --- r300-r500 hardware capabilities don't meet the requirements of OpenGL core profile.

r300g on RC410 uses software emulation for vertex shaders and clipping (the same code as llvmpipe), because the hardware doesn't have any vertex processor and clipper.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

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

--- Comment #3 from Roland Scheidegger <[email protected]> --- (In reply to Marek Olšák from comment #2)

Quoted 3 lines

r300g on RC410 uses software emulation for vertex shaders and clipping (the same code as llvmpipe), because the hardware doesn't have any vertex processor and clipper.

Can't the chip do guardband clipping? I thought all radeon chips (starting from r100) could do this, regardless if they support hw tnl.
I could be wrong though (and I wouldn't know how large the guardband would be, and certainly draw's handling of guardband if you enable it is a bit lacking, since hw has fixed limits whereas draw will use a guardband twice the size of the viewport).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

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

--- Comment #4 from Marek Olšák <[email protected]> ---
I think the hw doesn't have a clipper, though it shouldn't be hard to verify if it's true. Yeah, draw could use some optimizations for the clipper, e.g. the guardband, but simply doing culling (not clipping) should be enough for point sprites.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

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

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

Quoted 4 lines

I think the hw doesn't have a clipper, though it shouldn't be hard to verify if it's true. Yeah, draw could use some optimizations for the clipper, e.g. the guardband, but simply doing culling (not clipping) should be enough for point sprites.

That's what I meant with guardband clipping: there's no actual clipping, but the hw will still cull pixels outside the viewport. Hence it probably would be better if draw wouldn't clip if a primitive doesn't fit into the viewport, but fits into the (hw) guardband. (And you are right that point sprites are a bit of a special case.)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel