Skip to contentSkip to conversation

Radeon only supports a maximum point size of 1.0.

Bug 702 [email protected] 1 participant 14 messages Nov 5, 2010 – Nov 11, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

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

--- Comment #4 from Daniel Richard G. <[email protected]> 2010-11-05 10:50:52 PDT --- Created an attachment (id=40069)
--> (https://bugs.freedesktop.org/attachment.cgi?id=40069)
Screenshot of modified "point" program from mesa-demos on r200

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
In reply to a message not in the archive

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

--- Comment #5 from Daniel Richard G. <[email protected]> 2010-11-05 10:51:49 PDT --- Created an attachment (id=40070)
--> (https://bugs.freedesktop.org/attachment.cgi?id=40070)
Screenshot of modified "point" program from mesa-demos on i915

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
In reply to a message not in the archive

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

Daniel Richard G. <[email protected]> changed:

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

            Version|unspecified                 |git
           Severity|enhancement                 |normal
                 CC|                            |[email protected]

--- Comment #6 from Daniel Richard G. <[email protected]> 2010-11-05 11:06:09 PDT --- This bug still exists on r200, and possibly Radeon generally.

I've modified mesa-demos-8.0.1/src/trivial/point.c with a glPointSize(16) call right before glBegin(GL_POINTS), and attached screenshots of the window it produces on both r200 and i915. The latter is correct, the former illustrates the bug. I get proper output using Nvidia's driver as well.

This bug is affecting Wings3D for me similarly to how it affects Maya for the original reporter; the program cannot display visible vertex points on mesh wireframes, and isolated vertices are all but impossible to see.

This behavior is inconsistent with other DRI drivers, and is particularly egregious on hardware (ATI FireGL 8800) that was purpose-built for CAD applications. This is not a request for enhancement, but a straight-up bug.

I am running Ubuntu Maverick on amd64 with kernel 2.6.36 plus Alex Deucher's patch from bug #25544, and Mesa packages from Ubuntu's xorg-edgers/radeon PPA built from git 20101103.

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
In reply to a message not in the archive

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

--- Comment #7 from Roland Scheidegger <[email protected]> 2010-11-05 21:10:13 PDT --- (In reply to comment #6)

Quoted 1 line

This bug still exists on r200, and possibly Radeon generally.

I am quite sure this used to work on r200 (not r100 which can't do it natively). Aliased points should be supported up to size 2047 (though antialiased points are still limited to size 1). What does glxinfo -l say wrt point size?

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
In reply to a message not in the archive

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

--- Comment #8 from Roland Scheidegger <[email protected]> 2010-11-05 21:38:01 PDT --- Hmm actually I see the problem. The driver relies on ctx->_TriangleCaps and tests for DD_POINT_SIZE. But nothing ever sets this - update_tricaps would but it's ifdefed out as it was basically reverted, looks like the revert wasn't quite complete.
Note that it should still work if point attenuation is used (e.g. pointblast demo).

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
In reply to a message not in the archive

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

--- Comment #9 from Roland Scheidegger <[email protected]> 2010-11-05 21:54:43 PDT --- Created an attachment (id=40078)
View: https://bugs.freedesktop.org/attachment.cgi?id=40078
Review: https://bugs.freedesktop.org/review?bug=702&attachment=40078

trivial possible fix

Here's a simple patch which would restore previous (2006...) behaviour... Though I'm thinking probably the driver should just do this on its own depending on the ctx->Point.Size.
Note the problem is the hardware has two hw primitives for points: point sprite and point. Only the former can have size larger than 1. I'm not quite sure (or can't remember) why we're not always using point sprites but points when the size is 1 and it's not attenuated. Maybe it's faster.

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
In reply to a message not in the archive

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

--- Comment #10 from Daniel Richard G. <[email protected]> 2010-11-06 00:01:19 PDT --- Hi Roland, I see you've been here before!

I no longer have the Ubuntu Maverick install I was testing with earlier (I don't have the disk it was on anymore), but I do have here an Ubuntu Lucid install (same hardware) with Mesa 7.7.1, which gives me this:

$ glxinfo -l | grep -i point
    GL_ARB_occlusion_query, GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, 
    GL_ALIASED_POINT_SIZE_RANGE = 1, 2047
    GL_SMOOTH_POINT_SIZE_RANGE = 1, 1

That seems to agree with what you said.

Your patch applies cleanly to 7.7.1, and indeed, it makes the points big! The modified "point" demo, "pointblast" (only w/"Point smooth off"), and Wings3D all now do as they should. Should I test your patch with bleeding-edge code?

I don't know what to make of the patch tweaking generic code instead of driver code, but it surely solves the problem for me. Could this, or some form of this, be committed into the tree?

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.
#8 lore raw
In reply to a message not in the archive

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

Roland Scheidegger <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #11 from Roland Scheidegger <[email protected]> 2010-11-06 07:05:57 PDT --- (In reply to comment #10)

Quoted 3 lines

Your patch applies cleanly to 7.7.1, and indeed, it makes the points big! The modified "point" demo, "pointblast" (only w/"Point smooth off"), and Wings3D all now do as they should. Should I test your patch with bleeding-edge code?

That should still work the same.

Quoted 4 lines

I don't know what to make of the patch tweaking generic code instead of driver code, but it surely solves the problem for me. Could this, or some form of this, be committed into the tree?

I think either this should be commited or instead it should be handled by the driver and the DD_POINT_SIZE flag completely removed as it's currently just broken. Since the plan initially was to remove the whole _TriangleCaps stuff and r200 is the only driver which makes use of this particular flag I'm leaning towards the latter.

In fact, the driver is quite broken anyway wrt point size, since with vertex programs you could output the point size per vertex, but the driver might still use the 1-sized point primitive, since _TriangleCaps DD_POINT_SIZE only looks at the global point size. But I really have no idea why the driver tries to use the point primitive instead of point sprite for 1-pixel points, otherwise it would be easiest to just always use point sprite prim (at least for aa points) which would get rid of both bugs.
(The other DD_POINT flags are also problematic - well DD_POINT_SMOOTH is not but that one just directly mirrors ctx->Point.Smooth. But DD_POINT_ATTEN is also meaningless with vertex programs. i915 uses this and at a quick glance I don't think it gets it right neither.)

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
In reply to a message not in the archive

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

--- Comment #12 from Daniel Richard G. <[email protected]> 2010-11-06 11:17:39 PDT ---

Quoted 5 lines

I think either this should be commited or instead it should be handled by the driver and the DD_POINT_SIZE flag completely removed as it's currently just broken. Since the plan initially was to remove the whole _TriangleCaps stuff and r200 is the only driver which makes use of this particular flag I'm leaning towards the latter.

Sounds like a good way to go. Fewer idiosyncrasies in older drivers should be a win.

Quoted 4 lines

In fact, the driver is quite broken anyway wrt point size, since with vertex programs you could output the point size per vertex, but the driver might still use the 1-sized point primitive, since _TriangleCaps DD_POINT_SIZE only looks at the global point size.

Still a better bug to have, at least, since vertex programs are a newer construct anyway (and less likely to be used in CAD-type scenarios).

Quoted 4 lines

But I really have no idea why the driver tries to use the point primitive instead of point sprite for 1-pixel points, otherwise it would be easiest to just always use point sprite prim (at least for aa points) which would get rid of both bugs.

FWIW, I modified the "point" demo into a poor man's benchmark (by putting the glBegin(GL_POINTS) and glVertex*() calls inside large loops, and adding gettimeofday() calls), and I'm seeing basically no differences between 1.0 and 1.001 for glPointSize(). You'd think the 1-pixel-point primitives would be faster on some hardware, but r200 doesn't seem to special-case those.

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.
#10 lore raw
In reply to a message not in the archive

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

--- Comment #13 from Roland Scheidegger <[email protected]> 2010-11-10 08:58:04 PST --- I've pushed a fix for r200 (c7192ab11f7e34fdfe17d36d089260c6703ddfa8).
Not sure what to do with the bug though, as it actually is against radeon (r100), I guess that's WONTFIX unless someone is still interested enough in this old chip.

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.
#11 lore raw
In reply to a message not in the archive

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

--- Comment #14 from Daniel Richard G. <[email protected]> 2010-11-10 11:50:58 PST --- Many thanks for getting that in! I'll give the new code a try once the PPA is updated.

So r100, at the hardware level, doesn't support point sizes larger than 1.0. "Fixing" this bug, then, would require implementing a software emulation of point sprites (as was suggested in the original circa-2003 bug discussion). I suppose this might be worthwhile if it were a cross-driver facility, such that it would benefit any hardware that lacks large-point powers. But for r100 alone, I think it's reasonable to point out that the problem is not in the software. WONTFIX sounds fine to me.

For reference, the aforementioned commit---plus the one that drops DD_POINT_SIZE as well as DD_LINE_WIDTH---are viewable here:

http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7192ab11f7e34fdfe17d36d089260c6703ddfa8

http://cgit.freedesktop.org/mesa/mesa/commit/?id=aad65fa112754074d24d0b5a8397db2663dc9454

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.
#13 lore raw
In reply to a message not in the archive

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

--- Comment #16 from Roland Scheidegger <[email protected]> 2010-11-10 16:09:34 PST --- (In reply to comment #14)

Quoted 8 lines

Many thanks for getting that in! I'll give the new code a try once the PPA is updated.

So r100, at the hardware level, doesn't support point sizes larger than 1.0. "Fixing" this bug, then, would require implementing a software emulation of point sprites (as was suggested in the original circa-2003 bug discussion). I suppose this might be worthwhile if it were a cross-driver facility, such that it would benefit any hardware that lacks large-point powers.

Yes, this is (easily) possible in gallium. But r100 can't really be ported to gallium even if you wanted... So all you can do easily is drop to swrast, which isn't terribly useful, so we just rely on apps wanting to use large points to convert them to tris themselves. Seems fair enough, apps shouldn't expect large point size support (well not on this old hardware at least...), the driver reports this correctly for r100.

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.
#14 lore raw
In reply to a message not in the archive

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

Roland Scheidegger <[email protected]> changed:

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

             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #17 from Roland Scheidegger <[email protected]> 2010-11-10 16:16:09 PST --- (In reply to comment #15)

Quoted 1 line

Please remember to push the r200 fix to the 7.9 branch as well.

Ok done: 78ccca5a69f285aea282384050d30f1a82cd15e1

And marking this as WONTFIX finally after 6 years :-).

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.